/* ═══════════════════════════════════════════════════════════════════════════
   GAY BNNUY — Aurora Borealis Theme
   Colour palette + animated gradients that evoke the northern lights
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Keyframe Animations ─────────────────────────────────────────────────── */

@keyframes aurora-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes aurora-glow {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 0.75; }
}

@keyframes aurora-shimmer {
    0%   { background-position: 0% 0%; }
    25%  { background-position: 50% 100%; }
    50%  { background-position: 100% 50%; }
    75%  { background-position: 50% 0%; }
    100% { background-position: 0% 0%; }
}

@keyframes float-up {
    0%   { transform: translateY(0) scale(1);   opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.3; }
    100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* ── Custom Colour Palette (Bootstrap 5 overrides) ───────────────────────── */

:root {
    --bs-primary:   #7fb7fe;
    --bs-secondary: #feb77f;
    --bs-success:   #07c46e;
    --bs-info:      #3165c9;
    --bs-warning:   #edd305;
    --bs-danger:    #ff1f1a;
    --bs-light:     #fdf2c5;
    --bs-dark:      #0c092e;

    --bs-primary-rgb:   127, 183, 254;
    --bs-secondary-rgb: 254, 183, 127;
    --bs-success-rgb:     7, 196, 110;
    --bs-info-rgb:       49, 101, 201;
    --bs-warning-rgb:   237, 211,   5;
    --bs-danger-rgb:    255,  31,  26;
    --bs-light-rgb:     253, 242, 197;
    --bs-dark-rgb:       12,   9,  46;

    --bs-body-bg:    #ffffff;
    --bs-body-color: #0c092e;
    --bs-btn-color:  #0c092e;

    /* Aurora-specific tokens */
    --aurora-deep:    #0c092e;
    --aurora-indigo:  #1a1354;
    --aurora-blue:    #3165c9;
    --aurora-sky:     #7fb7fe;
    --aurora-green:   #07c46e;
    --aurora-teal:    #0a9e6f;
    --aurora-peach:   #feb77f;
    --aurora-gold:    #fdf2c5;
    --aurora-magenta: #c850c0;
}

/* ── Body & Global ───────────────────────────────────────────────────────── */

body {
    font-family: 'Renogare-Regular', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

::selection {
    background: rgba(7, 196, 110, 0.35);
    color: #0c092e;
}

@font-face {
  font-family: 'Renogare-Regular';
  src: url('res/Renogare-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* ── Aurora Background on <main> ─────────────────────────────────────────── */

.bg-main {
    position: relative;
    background: linear-gradient(
        175deg,
        var(--aurora-deep)   0%,
        var(--aurora-indigo) 15%,
        #0f1847              30%,
        var(--aurora-deep)   100%
    );
    color: #eef3fa;
    z-index: 0;
}

/* Animated aurora curtain overlay */
.bg-main::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        135deg,
        rgba(7, 196, 110, 0.20)  0%,
        rgba(49, 101, 201, 0.25) 20%,
        rgba(127, 183, 254, 0.18) 40%,
        rgba(200, 80, 192, 0.12)  55%,
        rgba(7, 196, 110, 0.22)  70%,
        rgba(49, 101, 201, 0.15) 85%,
        transparent                100%
    );
    background-size: 300% 300%;
    animation: aurora-shimmer 12s ease infinite;
    pointer-events: none;
}

/* Secondary pulsing glow layer */
.bg-main::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(7, 196, 110, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 75% 60%, rgba(127, 183, 254, 0.15), transparent),
        radial-gradient(ellipse 50% 60% at 50% 80%, rgba(200, 80, 192, 0.10), transparent);
    animation: aurora-glow 8s ease-in-out infinite;
    pointer-events: none;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */

nav {
    z-index: 1000;
}

.navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(127, 183, 254, 0.2);
    transition: background-color 0.3s ease;
}

.bg-primary.navbar,
nav.bg-primary {
    background: linear-gradient(
        135deg,
        rgba(12, 9, 46, 0.92) 0%,
        rgba(26, 19, 84, 0.90) 50%,
        rgba(12, 9, 46, 0.92) 100%
    ) !important;
    background-size: 200% 200%;
    animation: aurora-shift 10s ease infinite;
}

.navbar-brand {
    color: var(--aurora-gold) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 12px rgba(7, 196, 110, 0.5);
    transition: text-shadow 0.3s ease;
}

.navbar-brand:hover {
    text-shadow:
        0 0 8px rgba(7, 196, 110, 0.7),
        0 0 24px rgba(127, 183, 254, 0.4);
}

.nav-link {
    color: rgba(253, 242, 197, 0.85) !important;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--aurora-green), var(--aurora-sky));
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--aurora-gold) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
    left: 15%;
}

.nav-link.active {
    color: var(--aurora-sky) !important;
}

.navbar-toggler {
    border-color: rgba(127, 183, 254, 0.4) !important;
}

.navbar-toggler-icon {
    filter: invert(1) brightness(1.5);
}

/* ── Sub-page navbars (bg-body-tertiary) ─────────────────────────────────── */

.bg-body-tertiary {
    background: linear-gradient(
        135deg,
        rgba(12, 9, 46, 0.95) 0%,
        rgba(26, 19, 84, 0.92) 50%,
        rgba(12, 9, 46, 0.95) 100%
    ) !important;
    background-size: 200% 200%;
    animation: aurora-shift 10s ease infinite;
    border-bottom: 1px solid rgba(127, 183, 254, 0.2);
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
    background: rgba(12, 9, 46, 0.7);
    border: 1px solid rgba(127, 183, 254, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(7, 196, 110, 0.4);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(7, 196, 110, 0.15),
        0 0 40px rgba(127, 183, 254, 0.10);
}

.card-img-top {
    transition: transform 0.4s ease, filter 0.4s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.1);
}

.card-body {
    background: rgba(12, 9, 46, 0.85) !important;
    color: var(--aurora-gold) !important;
    padding: 1.5rem;
    position: relative;
}

.card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--aurora-green),
        var(--aurora-sky),
        var(--aurora-magenta),
        transparent
    );
    opacity: 0;
    transition: opacity 0.35s ease;
}

.card:hover .card-body::before {
    opacity: 1;
}

.card-title {
    color: #ffffff;
    font-weight: 600;
}

.card-text {
    color: rgba(253, 242, 197, 0.8);
}

.card-body .btn {
    align-self: center;
    white-space: nowrap;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn-primary {
    --bs-btn-bg:           var(--aurora-green);
    --bs-btn-border-color: var(--aurora-green);
    --bs-btn-color:        #ffffff;

    --bs-btn-hover-bg:           #06a85e;
    --bs-btn-hover-border-color: #06a85e;
    --bs-btn-hover-color:        #ffffff;

    --bs-btn-active-bg:           #059452;
    --bs-btn-active-border-color: #059452;
    --bs-btn-active-color:        #ffffff;

    --bs-btn-disabled-bg:           var(--aurora-green);
    --bs-btn-disabled-border-color: var(--aurora-green);
    --bs-btn-disabled-color:        #ffffff;

    --bs-btn-focus-shadow-rgb: 7, 196, 110;

    /*max-width: 50%;*/

    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 0.5rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(7, 196, 110, 0.3);
}

.btn-primary:hover {
    box-shadow:
        0 4px 16px rgba(7, 196, 110, 0.4),
        0 0 20px rgba(7, 196, 110, 0.2);
    transform: translateY(-1px);
}

.btn-secondary {
    --bs-btn-bg:           var(--aurora-sky);
    --bs-btn-border-color: var(--aurora-sky);
    --bs-btn-color:        var(--aurora-deep);

    --bs-btn-hover-bg:           #5ea2fd;
    --bs-btn-hover-border-color: #5ea2fd;
    --bs-btn-hover-color:        var(--aurora-deep);

    --bs-btn-active-bg:           #4893fc;
    --bs-btn-active-border-color: #4893fc;
    --bs-btn-active-color:        var(--aurora-deep);

    --bs-btn-focus-shadow-rgb: 127, 183, 254;

    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(127, 183, 254, 0.3);
}

.btn-secondary:hover {
    box-shadow:
        0 4px 16px rgba(127, 183, 254, 0.4),
        0 0 20px rgba(127, 183, 254, 0.2);
    transform: translateY(-1px);
}

.btn-outline-primary {
    --bs-btn-color:        var(--aurora-green);
    --bs-btn-border-color: var(--aurora-green);
    --bs-btn-hover-bg:     var(--aurora-green);
    --bs-btn-hover-color:  #ffffff;
    --bs-btn-active-bg:    var(--aurora-green);
    --bs-btn-active-color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
}

/* ── Intro / Hero Section ────────────────────────────────────────────────── */

main .container.bg-secondary.rounded,
main > .container.bg-secondary.rounded,
.bg-main .container.bg-secondary {
    --bs-secondary-rgb: none;
    background-color: transparent !important;
    background: linear-gradient(
        135deg,
        rgba(7, 196, 110, 0.15) 0%,
        rgba(49, 101, 201, 0.20) 35%,
        rgba(127, 183, 254, 0.15) 65%,
        rgba(200, 80, 192, 0.10) 100%
    ) !important;
    border: 1px solid rgba(127, 183, 254, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--aurora-gold);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

main .container.bg-secondary h1,
.bg-main .container.bg-secondary h1 {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(127, 183, 254, 0.4);
}

main .container.bg-secondary .lead,
.bg-main .container.bg-secondary .lead {
    color: rgba(253, 242, 197, 0.9);
}

/* ── bg-light override (sub-page headers & see-more sections) ────────────── */

.bg-light,
.container.bg-light {
    background: rgba(12, 9, 46, 0.6) !important;
    border: 1px solid rgba(127, 183, 254, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--aurora-gold) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.bg-light h1,
.bg-light h3,
.container.bg-light h1,
.container.bg-light h3 {
    color: #ffffff;
    text-shadow: 0 0 16px rgba(127, 183, 254, 0.3);
}

.bg-light .lead,
.container.bg-light .lead {
    color: rgba(253, 242, 197, 0.85);
}

.bg-light a,
.container.bg-light a:not(.btn) {
    color: var(--aurora-sky);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.bg-light a:hover,
.container.bg-light a:not(.btn):hover {
    color: var(--aurora-green);
}

/* ── bg-dark override ────────────────────────────────────────────────────── */

.bg-dark {
    background-color: var(--aurora-deep) !important;
}

/* ── Aurora gradient utility ─────────────────────────────────────────────── */

.bg-gradient {
    background: linear-gradient(
        135deg,
        var(--aurora-deep)   0%,
        var(--aurora-blue)  25%,
        var(--aurora-green) 50%,
        var(--aurora-sky)   75%,
        var(--aurora-deep)  100%
    );
    background-size: 300% 300%;
    animation: aurora-shift 8s ease infinite;
}

/* ── Sub-page body background ────────────────────────────────────────────── */

body {
    background: linear-gradient(
        175deg,
        var(--aurora-deep)   0%,
        var(--aurora-indigo) 20%,
        #0f1847              45%,
        var(--aurora-deep)   100%
    );
    background-attachment: fixed;
    color: var(--aurora-gold);
    min-height: 100vh;
}

/* Content text on sub-pages */
.content-text p,
.content-image p {
    color: rgba(253, 242, 197, 0.85);
}

/* ── Images ──────────────────────────────────────────────────────────────── */

.header-img {
    width: 50%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.content-image img,
.content-text img {
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.content-image img:hover,
.content-text img:hover {
    box-shadow:
        0 6px 28px rgba(0, 0, 0, 0.4),
        0 0 16px rgba(127, 183, 254, 0.15);
    transform: scale(1.02);
}

/* ── iframes (YouTube embeds) ────────────────────────────────────────────── */

iframe {
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    max-width: 100%;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer {
    background: linear-gradient(
        135deg,
        var(--aurora-deep) 0%,
        var(--aurora-indigo) 100%
    ) !important;
    color: rgba(253, 242, 197, 0.7) !important;
    border-top: 1px solid rgba(127, 183, 254, 0.2) !important;
    padding: 1rem 0;
    font-size: 0.9rem;
}

/* ── Links ───────────────────────────────────────────────────────────────── */

a:not(.btn):not(.nav-link):not(.navbar-brand) {
    color: var(--aurora-sky);
    transition: color 0.3s ease;
}

a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
    color: var(--aurora-green);
}

/* ── Scrollbar (Webkit) ──────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--aurora-deep);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        var(--aurora-green),
        var(--aurora-blue)
    );
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        var(--aurora-sky),
        var(--aurora-green)
    );
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--aurora-blue) var(--aurora-deep);
}

/* ── Utility: aurora text glow ───────────────────────────────────────────── */

.text-aurora {
    background: linear-gradient(
        90deg,
        var(--aurora-green),
        var(--aurora-sky),
        var(--aurora-magenta),
        var(--aurora-green)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: aurora-shift 6s ease infinite;
}

/* ── Responsive tweaks ───────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .header-img {
        width: 80%;
    }

    .card:hover {
        transform: translateY(-3px) scale(1.01);
    }

    iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 576px) {
    .header-img {
        width: 95%;
    }
}

/* ── Border override for .border-dark on footer ──────────────────────────── */

.border-dark {
    border-color: rgba(127, 183, 254, 0.2) !important;
}

/* ── Smooth transitions everywhere ───────────────────────────────────────── */

*,
*::before,
*::after {
    transition-timing-function: ease;
}
