/* ==========================================================================
   MODERN RESPONSIVE HEADER & ANIMATIONS (IPA CONVEX)
   ========================================================================== */

:root {
    --hdr-navy-dark: #050038;
    --hdr-navy-primary: #0A0064;
    --hdr-navy-light: #140882;
    --hdr-gold-bright: #ffb800;
    --hdr-gold-hover: #ffa000;
    --hdr-gold-light: #ffe885;
    --hdr-white: #ffffff;
    --hdr-transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --hdr-transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --hdr-shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.08);
    --hdr-shadow-lg: 0 14px 40px rgba(3, 7, 43, 0.35);
    --hdr-shadow-gold: 0 8px 25px rgba(255, 184, 0, 0.5);
}

/* Base Wrapper */
.ipa-header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: var(--hdr-transition-smooth);
}

/* Body Padding Offset */
body {
    padding-top: 184px !important;
}
@media (max-width: 991px) {
    body {
        padding-top: 70px !important;
    }
}

/* Top White Header Bar */
.ipa-top-bar {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px 0;
    max-height: 150px;
    transition: margin-top 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                visibility 0.35s,
                box-shadow var(--hdr-transition-smooth);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ipa-top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo Styling & Hover Animation */
.ipa-logo-link {
    display: inline-flex;
    align-items: center;
    position: relative;
    text-decoration: none;
    transition: transform var(--hdr-transition-fast);
}

.ipa-logo-link:hover {
    transform: scale(1.02);
}

.ipa-logo-img {
    height: 110px;
    width: auto;
    object-fit: contain;
    transition: filter var(--hdr-transition-fast), transform var(--hdr-transition-fast);
}

/* Top Action Buttons (Desktop) */
.ipa-action-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Modern Pill Button Base */
.ipa-btn-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-decoration: none !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #FFB800 0%, #FFA000 100%);
    border: 2px solid #FFCA28;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    transition: transform var(--hdr-transition-fast), box-shadow var(--hdr-transition-fast), border-color var(--hdr-transition-fast);
    box-shadow: 0 4px 16px rgba(255, 160, 0, 0.38);
}

/* Shimmer Sweep Animation on Non-Hover (Idle State) */
.ipa-btn-pill::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    animation: ipa-shimmer 3.2s infinite ease-in-out;
    z-index: 2;
}

@keyframes ipa-shimmer {
    0% {
        left: -75%;
    }
    35%, 100% {
        left: 125%;
    }
}

/* Idle Pulse Animation for "REGISTER NOW" */
.ipa-btn-pulse {
    animation: ipa-idle-pulse 2.4s infinite ease-in-out;
}

@keyframes ipa-idle-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(255, 160, 0, 0.38);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 8px 22px rgba(255, 184, 0, 0.6);
    }
}

/* Hover Animation on Action Buttons */
.ipa-btn-pill:hover {
    transform: translateY(-3px) scale(1.04) !important;
    box-shadow: var(--hdr-shadow-gold) !important;
    border-color: #ffffff;
    color: #ffffff !important;
}

.ipa-btn-pill:active {
    transform: translateY(-1px) scale(0.99) !important;
}

/* Secondary Action Button (JOIN AS EXHIBITOR) */
.ipa-btn-secondary {
    background: linear-gradient(135deg, #FFC107 0%, #FF8F00 100%);
    border: 2px solid #FFD54F;
    box-shadow: 0 4px 16px rgba(255, 143, 0, 0.38);
}


/* ==========================================================================
   BOTTOM NAVIGATION BAR (DARK NAVY - CENTERED)
   ========================================================================== */
.ipa-main-nav {
    background: linear-gradient(180deg, #0A0064 0%, #050038 100%);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    position: relative;
}

.ipa-nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center; /* CENTERED NAV BAR */
}

/* Nav List - CENTERED */
.ipa-nav-list {
    display: flex;
    align-items: center;
    justify-content: center; /* CENTERED MENU ITEMS */
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Scrolled Mini Logo Container & Styling */
.ipa-scrolled-logo-item {
    display: flex;
    align-items: center;
}

.ipa-scrolled-logo {
    display: inline-flex;
    align-items: center;
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    margin-right: 0;
    text-decoration: none !important;
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease,
                margin-right 0.35s ease,
                visibility 0.4s;
}

.ipa-scrolled-logo-img {
    height: 54px;
    width: auto;
    object-fit: contain;
    background: transparent !important;
    padding: 0;
    border-radius: 0;
    box-shadow: none !important;
    filter: brightness(0) invert(1);
    transition: transform 0.25s ease, filter 0.25s ease;
}

.ipa-scrolled-logo:hover .ipa-scrolled-logo-img {
    transform: scale(1.06);
    filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

/* Activate Mini Logo when Scrolled (Positioned at Far Left Corner) */
@media (min-width: 992px) {
    .ipa-header-wrapper.scrolled .ipa-scrolled-logo-item {
        margin-right: auto;
        transition: margin-right 0.35s ease;
    }

    .ipa-header-wrapper.scrolled .ipa-scrolled-logo {
        max-width: 240px;
        opacity: 1;
        visibility: visible;
        margin-right: 18px;
    }
}

/* Home Icon Link */
.ipa-home-item {
    position: relative;
    margin-right: 14px;
}

.ipa-home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #ffffff !important;
    font-size: 1.15rem;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--hdr-transition-fast);
    position: relative;
    overflow: hidden;
}

.ipa-home-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    opacity: 0.8;
    transition: var(--hdr-transition-fast);
}

.ipa-home-link:hover::before {
    background: var(--hdr-gold-bright);
    opacity: 1;
}

.ipa-home-link i {
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color var(--hdr-transition-fast);
}

.ipa-home-link:hover i {
    transform: scale(1.25) rotate(-8deg);
    color: #06105a !important;
}

/* Main Nav Menu Items */
.ipa-nav-item {
    position: relative;
}

.ipa-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    color: #ffffff !important;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: color var(--hdr-transition-fast), transform var(--hdr-transition-fast);
    position: relative;
}

/* Animated Sliding Underline on Hover */
.ipa-nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #FFB800, #FFE885);
    border-radius: 4px;
    transform: translateX(-50%);
    transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.85);
}

.ipa-nav-item:hover > .ipa-nav-link::after,
.ipa-nav-item.active > .ipa-nav-link::after {
    width: 80%;
}

.ipa-nav-item:hover > .ipa-nav-link {
    color: var(--hdr-gold-light) !important;
    transform: translateY(-2px);
}

/* Chevron Dropdown Arrow Animation */
.ipa-caret {
    font-size: 0.72rem;
    transition: transform 0.35s ease;
    opacity: 0.8;
}

.ipa-nav-item:hover > .ipa-nav-link .ipa-caret {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--hdr-gold-bright);
}

/* Dropdown Menu (Glassmorphic Card) */
.ipa-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    min-width: 240px;
    background: rgba(10, 0, 100, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 0;
    margin-top: 0;
    list-style: none;
    box-shadow: var(--hdr-shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 12px) scale(0.96);
    transform-origin: top center;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
    z-index: 100;
}

.ipa-nav-item:hover > .ipa-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

/* Dropdown Menu Items */
.ipa-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 22px;
    color: #e2e8f0 !important;
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.25s ease;
    position: relative;
}

.ipa-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 0%;
    background: var(--hdr-gold-bright);
    border-radius: 0 4px 4px 0;
    transform: translateY(-50%);
    transition: height 0.25s ease;
}

.ipa-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--hdr-gold-light) !important;
    padding-left: 28px;
}

.ipa-dropdown-item:hover::before {
    height: 70%;
}


/* ==========================================================================
   SCROLLED STATE (STICKY ANIMATION)
   ========================================================================== */
.ipa-header-wrapper.scrolled .ipa-top-bar {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

/* Scroll-down: Collapse top white bar, keeping ONLY the blue navy navbar fixed at top */
@media (min-width: 992px) {
    .ipa-header-wrapper.scrolled .ipa-top-bar {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        overflow: hidden;
        border-bottom: none;
    }
}


/* ==========================================================================
   MOBILE ELEMENTS (CRITICAL: HIDDEN BY DEFAULT ON DESKTOP)
   ========================================================================== */
.ipa-mobile-drawer,
.ipa-mobile-overlay,
.ipa-mobile-banner,
.ipa-hamburger {
    display: none !important;
}

/* Media Queries for Mobile/Tablet Breakpoint (<= 991px) */
@media (max-width: 991px) {
    .ipa-hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        background: #06105a !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 10px;
        font-size: 1.25rem;
        cursor: pointer;
        outline: none;
        z-index: 10001;
        box-shadow: 0 4px 14px rgba(6, 16, 90, 0.35);
        transition: all 0.25s ease;
    }

    .ipa-hamburger:hover,
    .ipa-hamburger:active {
        background: #0d1e78 !important;
        color: #FFB800 !important;
        transform: scale(1.05);
    }

    .ipa-hamburger i {
        font-size: 1.3rem;
        line-height: 1;
        transition: transform 0.3s ease;
    }

    .ipa-hamburger.is-active i {
        transform: rotate(90deg);
        color: #FFB800 !important;
    }

    .ipa-main-nav {
        display: none !important;
    }

    .ipa-action-buttons {
        display: none !important;
    }

    .ipa-top-bar {
        padding: 8px 0;
    }

    .ipa-top-container {
        padding: 0 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .ipa-logo-img {
        height: 50px !important;
    }

    /* Mobile Offcanvas Drawer Container */
    .ipa-mobile-drawer {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(180deg, #0A0064 0%, #050038 100%);
        box-shadow: -10px 0 35px rgba(0, 0, 0, 0.5);
        z-index: 10000;
        overflow: hidden;
        padding: 0 !important;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ipa-mobile-drawer.is-open {
        right: 0;
    }

    /* Sticky Top Header in Drawer with Close Button */
    .ipa-drawer-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        background: rgba(3, 7, 43, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .ipa-drawer-tagline {
        background: rgba(255, 184, 0, 0.12);
        border: 1px solid rgba(255, 184, 0, 0.35);
        padding: 5px 12px;
        border-radius: 20px;
    }

    .ipa-drawer-tagline span {
        color: #FFB800;
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 1px;
        text-transform: uppercase;
    }

    .ipa-drawer-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #ffffff;
        font-size: 1.15rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        outline: none;
        transition: all 0.25s ease;
    }

    .ipa-drawer-close:hover,
    .ipa-drawer-close:active {
        background: #FFB800;
        border-color: #FFB800;
        color: #03072b;
        transform: scale(1.08);
    }

    /* Scrollable Drawer Content Container */
    .ipa-drawer-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 20px 20px 40px 20px;
    }

    /* Custom Slim Scrollbar for Drawer */
    .ipa-drawer-content::-webkit-scrollbar {
        width: 5px;
    }
    .ipa-drawer-content::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
    }
    .ipa-drawer-content::-webkit-scrollbar-thumb {
        background: rgba(255, 184, 0, 0.4);
        border-radius: 10px;
    }

    /* Mobile Backdrop Overlay */
    .ipa-mobile-overlay {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }

    .ipa-mobile-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .ipa-mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 25px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .ipa-mobile-actions .ipa-btn-pill {
        width: 100%;
        text-align: center;
    }

    .ipa-mobile-nav {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .ipa-mobile-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .ipa-mobile-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 10px;
        color: #ffffff;
        font-size: 0.95rem;
        font-weight: 700;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        text-decoration: none;
    }

    .ipa-mobile-link:hover,
    .ipa-mobile-link.active {
        color: var(--hdr-gold-bright);
    }

    .ipa-mobile-subnav {
        display: none;
        list-style: none;
        padding: 0 0 10px 15px;
        margin: 0;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 8px;
    }

    .ipa-mobile-sublink {
        display: block;
        padding: 10px;
        color: #cbd5e1;
        font-size: 0.88rem;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .ipa-mobile-sublink:hover {
        color: var(--hdr-gold-light);
    }
}
