/* ================================================================
   ATAKALAM — SHARED NAVBAR
   ================================================================ */

@keyframes navDropIn {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navItemIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navMenuIn {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    z-index: 1000;
    padding: 22px 0 0;
    background: transparent;
    transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: navDropIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.main-header .header-upper,
.main-header.fixed-header .header-upper {
    position: relative;
    top: auto;
    left: auto;
    z-index: 1;
    min-height: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    animation: none;
}

.main-header .header-inner,
.fixed-header .header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 14px 10px 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 102, 52, 0.58), rgba(40, 1, 68, 0.92) 70%);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.main-header .logo-outer .logo {
    background: transparent;
    border-radius: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    box-shadow: none;
}

.main-header .logo img,
.main-header .mobile-logo img {
    height: 40px !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    filter: none;
    transition: height 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.main-header .logo a:hover img {
    transform: scale(1.05);
}

.main-header .navbar-header {
    display: none;
}

.main-header .nav-outer {
    flex: 1;
    display: flex;
    justify-content: center;
}

.navbar-collapse {
    position: relative;
}

/* ===== NAV LINKS ===== */
.navigation {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: gap 0.4s ease;
}

.navigation li {
    margin: 0;
    opacity: 0;
    animation: navItemIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.navigation li:nth-child(1) {
    animation-delay: 0.08s;
}

.navigation li:nth-child(2) {
    animation-delay: 0.14s;
}

.navigation li:nth-child(3) {
    animation-delay: 0.20s;
}

.navigation li:nth-child(4) {
    animation-delay: 0.26s;
}

.navigation li:nth-child(5) {
    animation-delay: 0.32s;
}

.navigation li a {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 13px 24px !important;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.35s ease, padding 0.4s ease, font-size 0.4s ease;
}

.navigation li a:hover,
.navigation li a.active {
    color: #fff !important;
    text-decoration: none;
}

/* ===== SLIDING PILL ===== */
.nav-pill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.navbar-collapse.nav-ready .nav-pill {
    opacity: 1;
}

/* ===== CTA ===== */
.menu-btns {
    position: relative;
    z-index: 3;
}

.nav-cta-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 13px 28px;
    border-radius: 50px;
    background: #fff;
    color: #52018E !important;
    text-decoration: none;
    line-height: 1.1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-cta-badge .cta-main {
    font-family: 'Exo', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: #52018E;
}

.nav-cta-badge .cta-sub {
    font-family: 'Exo', sans-serif;
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #52018E;
    transition: color 0.35s ease;
}

.nav-cta-badge:hover {
    color: #b84a1f !important;
    text-decoration: none;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.nav-cta-badge:hover .cta-main {
    color: #b84a1f;
}

.nav-cta-badge:hover .cta-sub {
    color: #b84a1f;
}

/* ===== SHRINK ON SCROLL ===== */
.main-header.scrolled {
    padding: 16px 0 0;
}

.main-header.scrolled .header-inner {
    padding: 6px 10px 6px 18px;
}

.main-header.scrolled .logo img,
.main-header.scrolled .mobile-logo img {
    height: 44px !important;
}

.main-header.scrolled .navigation {
    gap: 2px;
}

.main-header.scrolled .navigation li a {
    padding: 9px 16px !important;
    font-size: 0.72rem;
}

.main-header.scrolled .nav-cta-badge {
    padding: 9px 20px;
}

.main-header.scrolled .nav-cta-badge .cta-main {
    font-size: 0.56rem;
}

.main-header.scrolled .nav-cta-badge .cta-sub {
    font-size: 0.4rem;
}

/* ===== HAMBURGER -> X ===== */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 26px;
    background: transparent;
    border: none;
    padding: 0;
}

.navbar-toggle .icon-bar {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.main-menu .navbar-header .navbar-toggle .icon-bar {
    background: #FF6634;
    width: 100%;
    height: 2px;
    margin: 0;
}

.navbar-toggle.is-active .icon-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-toggle.is-active .icon-bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.is-active .icon-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-header,
.navigation li a,
.navbar-toggle,
.nav-cta-badge,
.logo a,
.mobile-logo a {
    cursor: pointer;
}

/* ===== MOBILE (compact header, closed state) ===== */
@media (max-width: 991px) {
    .main-header .logo-outer {
        display: none;
    }

    .main-header .header-inner {
        flex-wrap: wrap;
        border-radius: 26px;
        padding: 14px 16px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 38%, rgba(255, 102, 52, 0.58) 62%, rgba(40, 1, 68, 0.92) 90%);
    }

    .main-header.scrolled .header-inner {
        padding: 14px 16px;
    }

    .main-header .nav-outer {
        order: 1;
        flex: 1 1 auto;
        display: block;
    }

    .main-header nav.main-menu {
        display: block;
        width: 100%;
    }

    .main-header .navbar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .main-header .mobile-logo {
        display: inline-flex;
    }

    .main-header .mobile-logo img {
        height: 40px !important;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-collapse {
        display: none;
    }

    .main-header .menu-btns {
        order: 2;
        margin-left: 10px;
    }

    .nav-cta-badge {
        padding: 11px 22px;
    }

    .nav-cta-badge .cta-main {
        font-size: 0.6rem;
    }

    .nav-cta-badge .cta-sub {
        font-size: 0.44rem;
    }
}

@media (max-width: 768px) {
    .main-header .logo img {
        height: 40px !important;
    }
}

/* ================================================================
   MOBILE FULL-SCREEN MENU (.mnav)
   ================================================================ */
.mnav {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    flex-direction: column;
    padding: 24px 24px 40px;
    background-color: #080808;
    background-image: radial-gradient(circle at 20% 10%, rgba(255, 102, 52, 0.1), transparent 19%), radial-gradient(circle at 80% 20%, rgba(82, 1, 142, 0.1), transparent 18%), radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.04), transparent 35%), url('../images/Dark_Page_Atkalam_bg.webp');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    overflow-y: auto;
}

body.nav-menu-open .mnav {
    display: flex;
    animation: navMenuIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.nav-menu-open {
    overflow: hidden;
}

.mnav-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mnav-logo img {
    height: 40px;
    width: auto;
}

.mnav-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.mnav-links {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

.mnav-links li {
    opacity: 0;
    animation: navItemIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mnav-links li:nth-child(1) {
    animation-delay: 0.1s;
}

.mnav-links li:nth-child(2) {
    animation-delay: 0.17s;
}

.mnav-links li:nth-child(3) {
    animation-delay: 0.24s;
}

.mnav-links li:nth-child(4) {
    animation-delay: 0.31s;
}

.mnav-links a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-family: 'Exo', sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 28px;
    border-radius: 999px;
    transition: color 0.3s ease, background 0.3s ease;
}

.mnav-links a.active {
    color: #fff;
    background: linear-gradient(135deg, #FF6634, #52018E);
}

.mnav-cta {
    align-self: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 220px;
    margin-top: 20px;
    padding: 18px 36px;
    border-radius: 50px;
    background: #fff;
    color: #52018E;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.mnav-cta:hover {
    transform: translateY(-3px);
    color: #52018E;
    text-decoration: none;
}

.mnav-cta-main {
    font-family: 'Exo', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.05rem;
    color: #52018E;
}

.mnav-cta-sub {
    font-family: 'Exo', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(82, 1, 142, 0.6);
}

@media (min-width: 992px) {
    .mnav {
        display: none !important;
    }
}