/* ============================================================
   common.css
   Shared styles: navbar, footer, buttons, dividers
   Used on every page.
   NOTE: :root lives in main_styles.css — load that first.
   ============================================================ */
 
/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
 
/* ── Navbar — Apple-style frosted-glass blur ─────────────── */
.navbar-main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.nav-item {
    padding: 1rem 1rem;
}
 
.global-nav-content {
    display: grid;
    height: var(--nav-height);
    /* semi-transparent + blur = frosted glass */
    background: var(--navbar-glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--navbar-border);
    transition: background .4s ease,
                border-color .4s ease,
                box-shadow .4s ease, 
                height .4s cubic-bezier(.4, 0, .2, 1);
}
/* After scrolling — slightly more opaque, still glassy */
.navbar-main.navbar-shrunk .global-nav-content{
    background: var(--navbar-shrunk);
    border-bottom-color: var(--navbar-border-shrunk);
    border-weight: 1.9px;
}

.fixed-cont,
.responsive-cont {
    grid-column: 1;
    grid-row: 1;
}

.fixed-cont {
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    pointer-events: none;
}
.fixed-cont > * { pointer-events: auto; }

.brand-cont {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
 
/* ── Logo — spring bounce + glow on hover ─────────────────── */
.logo {
    height: 48px;
    width: auto;
    /* cubic-bezier with overshoot gives a spring feel */
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1),
                filter    .35s ease;
}
 
.navbar-brand { display: flex; align-items: center; }
 
.navbar-brand:hover .logo {
    transform: scale(1.1) rotate(-3deg);
    filter: drop-shadow(0 0 10px var(--primary-color1));
}
 
/* ── Desktop nav groups ───────────────────────────────────── */
.responsive-cont {
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    padding: 0 2rem;
    gap: 0;
}

.nav-group-left,
.nav-group-right {
    display: flex;
    gap: .5rem;
}

.toggle-cont { display: none; }

/* ── Nav links — sliding underline on hover ───────────────── */
 
.nav-link {
    font-family: var(--font-subheading);
    font-size: .9rem;
    font-weight: 1;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, 0.80) !important;
    padding-bottom: 4px;
    background-image: linear-gradient(var(--primary-color1), var(--primary-color1));
    background-size: 0% 2px;
    background-position: right bottom;
    background-repeat: no-repeat;
    transition: color .25s ease,
                background-size .32s cubic-bezier(.4, 0, .2, 1);
}

.nav-link:hover {
    color: var(--primary-color1) !important;
    opacity: 1;
}
 
/* ── Hamburger button ─────────────────────────────────────── */
.navbar-toggler {
    display: none;
    background: none;
    padding: .5rem .6rem;
    cursor: pointer;
    border-style: none;
    transition: border-color .3s ease;
}
 
/* Three bars — each transitions independently */
.ham-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    margin: 4px 0;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1),
                opacity   .25s ease,
                width     .3s ease;
    transform-origin: center;
}
 
/* Active state — bars morph into an X */
.global-nav-content.active .bar-top {
    transform: translateY(6px) rotate(45deg);
}
.global-nav-content.active .bar-mid {
    opacity: 0;
    width: 0;
}
.global-nav-content.active .bar-low {
    transform: translateY(-6px) rotate(-45deg);
}
 
/* ── Mobile — smooth slide-down menu ─────────────────────── */
@media (max-width: 991px) {

    .navbar-toggler { display: block; }

    .fixed-cont {
        display: grid;
        grid-row: 1;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        padding: 0 0.9rem;
        pointer-events: auto;
    }

    .brand-cont {
        grid-column: 2;
        justify-self: center;
    }

    .toggle-cont {
        display: flex;
        align-items: center;
        grid-column: 3;
        justify-self: end;
        height: var(--nav-height);
    }

    .responsive-cont {
        grid-row: 2;
        flex-direction: column;
        justify-content: flex-start;
        left: 0;
        width: 100%;
        gap: 0;
        overflow: hidden;
        opacity: 0;
        padding: 0 2rem;
        pointer-events: none;
        transition: opacity    .3s ease,
                    padding    .35s ease;
    }

    .nav-group-left,
    .nav-group-right {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0;
    }

    .global-nav-content {
    /* semi-transparent + blur = frosted glass */
        background: rgba(22, 33, 62, 0.45);
        border-bottom: 1px solid rgba(108, 211, 229, 0.15);
    }
/*nav active height*/
    .global-nav-content.active {
        height: 470px;
        background: rgba(22, 33, 62, 0.45);
        border-bottom: 1px solid rgba(108, 211, 229, 0.15);
    }

    .global-nav-content.active .responsive-cont {
        opacity: 1;
        pointer-events: auto;
        padding: 1rem 2rem;
    }

    .nav-link { 
        padding: .65rem 0 !important; 
        font-size:  1rem;
    }

    .nav-item {
        padding: 2rem 5rem;
    }
}
 
/* ── Divider ──────────────────────────────────────────────── */
.divider-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}
 
.divider-custom-line {
    flex: 1;
    max-width: 200px;
    height: 2px;
    background: var(--primary-color1);
    opacity: .5;
}
 
.divider-custom-icon {
    color: var(--primary-color1);
    font-size: 1rem;
}
 
/* ── Flow Buttons ─────────────────────────────────────────── */
.btn.flow-btn {
    position: relative;
    display: inline-block;
    padding: .7rem 2rem;
    font-family: var(--font-heading);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: #fff;
    border: 2px solid var(--primary-color1);
    background: transparent;
    overflow: hidden;
    transition: color .25s ease-out;
    z-index: 0;
}

.btn.flow-btn span {
    position: absolute;
    inset: 0;
    background: var(--primary-color1);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
}

.btn.flow-btn:hover { color: var(--color-dark); }
 
.btn.flow-btn.btn-xl { padding: 1rem 3rem; font-size: .9rem; }
.btn.flow-btn.btn-m  { padding: .6rem 1.6rem; }
 
/* ── Footer ───────────────────────────────────────────────── */
.footer {
    background: var(--color-dark2);
    border-top: 1px solid rgba(108, 211, 229, 0.18);
    padding: 3rem 1rem;
    color: var(--color-text);
    font-size: .9rem;
}

.footer-cont {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    justify-content: center;
    letter-spacing: .1em;
    color: #fff;
    margin: 0;
}
/*not used
.footer-tagline {
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--color-muted);
    margin: 0;
}*/

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.foot-item {
    padding: 0.5rem 0;
}

.footer-link {
    font-family: var(--font-body);
    font-size: .85rem;
    letter-spacing: .05em;
    color: var(--color-text);
    transition: color .2s;
}
.footer-link:hover { color: var(--primary-color1); }
 
.social-links { margin-top: .5rem; }
 
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--primary-color1);
    border-radius: 50%;
    color: var(--primary-color1);
    font-size: .9rem;
    transition: background .2s, color .2s, transform .2s;
}
.social-icon:hover {
    background: var(--primary-color1);
    color: var(--color-dark);
    transform: scale(1.12);
    opacity: 1;
}
 
.copyright {
    background: #0d0d1a;
    color: var(--color-muted);
    font-size: .8rem;
    padding: 1rem;
    text-align: center;
}
.copyright a { color: var(--primary-color1); }
 
/* ── Modal system ─────────────────────────────────────────── */
.modal-full {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-full.modal-open { display: flex; }
 
.modal-container {
    background: var(--color-dark2);
    border: 1px solid var(--primary-color1);
    border-radius: 4px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
 
.modal-controls { display: flex; justify-content: flex-end; padding: .5rem; }
.modal-header   { padding: 1rem 1.5rem .5rem; }
.modal-body     { padding: .5rem 1.5rem 1.5rem; }
 
.yt-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.yt-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
 
body.modal-active { overflow: hidden; }