/* ==========================================================================
   MAYATNA - MASTER STYLE.CSS (Fully Responsive & Bug Free)
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
    background: #FDF8F0;
    overflow-x: hidden;
    width: 100vw;
}

/* CRITICAL FIX: Removed the global * { max-width: 100%; } which was breaking absolute positioning and flexboxes! 
   Instead, we only apply it to media elements. */
img, video, svg {
    max-width: 100%;
    height: auto;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.font-cormorant {
    font-family: 'Cormorant Garamond', serif;
}

/* SCREEN TRANSITIONS */
.screen {
    transition: opacity 0.5s ease, visibility 0.5s;
}

/* GOLD GRADIENT TEXT */
.gold-text {
    background: linear-gradient(135deg, #D4AF37 0%, #F5E06A 45%, #D4AF37 60%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shimmer-text {
    background: linear-gradient(90deg, #D4AF37 0%, #F5E06A 30%, #fff8dc 50%, #F5E06A 70%, #D4AF37 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 2.5s linear infinite;
}

/* GLASS */
.glass {
    background: rgba(253, 248, 240, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.glass-dark {
    background: rgba(11, 29, 58, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* HOVER LIFT */
.hover-lift {
    transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.38s ease;
    will-change: transform;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(11, 29, 58, 0.12);
}

/* 3D TILT */
.hover-tilt {
    transition: transform 0.15s ease;
    will-change: transform;
    transform-style: preserve-3d;
}

.hover-tilt:not(:hover) {
    transition: transform 0.55s ease-out;
}

/* WAVE BARS */
.wave-1 { animation-delay: 0s; }
.wave-2 { animation-delay: 0.15s; }
.wave-3 { animation-delay: 0.3s; }
.wave-4 { animation-delay: 0.08s; }
.wave-5 { animation-delay: 0.22s; }
.wave-6 { animation-delay: 0.36s; }

/* SCROLL REVEAL */
.sr {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sr.visible {
    opacity: 1;
    transform: translateY(0);
}

.sr-left {
    opacity: 0;
    transform: translateX(-36px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sr-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.sr-right {
    opacity: 0;
    transform: translateX(36px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sr-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.sr-d1 { transition-delay: 0.05s; }
.sr-d2 { transition-delay: 0.12s; }
.sr-d3 { transition-delay: 0.2s; }
.sr-d4 { transition-delay: 0.28s; }
.sr-d5 { transition-delay: 0.36s; }

/* FAQ */
details>summary {
    list-style: none;
    cursor: pointer;
}

details>summary::-webkit-details-marker {
    display: none;
}

details[open] summary~* {
    animation: fadeIn 0.4s ease;
}

.faq-icon {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

details[open] .faq-icon {
    transform: rotate(45deg);
    color: #D4AF37;
}

/* PROGRESS BAR */
.progress-wrapper {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    cursor: pointer;
    overflow: visible;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4AF37, #F5E06A);
    border-radius: 999px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #E5C05C;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(229, 192, 92, 0.8);
}

/* LIVE DOT */
@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.live-dot {
    animation: live-pulse 1.2s ease-in-out infinite;
}

/* MANDALA BG */
.mandala-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Ccircle cx='80' cy='80' r='78' fill='none' stroke='%23D4AF37' stroke-width='0.4' opacity='0.12'/%3E%3Ccircle cx='80' cy='80' r='55' fill='none' stroke='%23D4AF37' stroke-width='0.3' opacity='0.08'/%3E%3Ccircle cx='80' cy='80' r='32' fill='none' stroke='%23D4AF37' stroke-width='0.3' opacity='0.07'/%3E%3Cline x1='80' y1='2' x2='80' y2='158' stroke='%23D4AF37' stroke-width='0.3' opacity='0.06'/%3E%3Cline x1='2' y1='80' x2='158' y2='80' stroke='%23D4AF37' stroke-width='0.3' opacity='0.06'/%3E%3Cline x1='24' y1='24' x2='136' y2='136' stroke='%23D4AF37' stroke-width='0.3' opacity='0.05'/%3E%3Cline x1='136' y1='24' x2='24' y2='136' stroke='%23D4AF37' stroke-width='0.3' opacity='0.05'/%3E%3C/svg%3E");
    background-size: 160px 160px;
}

/* PREMIUM CARD GLOW */
.premium-glow {
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.3), 0 20px 60px rgba(212, 175, 55, 0.2), 0 0 80px rgba(212, 175, 55, 0.08);
}

/* SECTION DIVIDER */
.gold-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    opacity: 0.3;
}

/* BUTTON ACTIVE */
button:not(.hover-lift):active {
    transform: scale(0.96);
}

/* NAVBAR TRANSITION */
#navbar {
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* HERO BG ANIM */
.hero-bg-anim {
    background: linear-gradient(135deg, #0B1D3A 0%, #1A365D 40%, #0B1D3A 70%, #0D1F3C 100%);
    background-size: 400% 400%;
    animation: bgShift 8s ease infinite;
}

@keyframes bgShift {
    0%, 100% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
}

/* MOBILE MENU */
#mobileMenu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 450px;
    opacity: 1;
}

/* FIX: Mobile bottom padding so content doesn't hide behind nav */
@media (max-width: 767px) {
    main {
        padding-bottom: 90px !important;
    }
}

/* FIX: Ticker overflow */
.ticker-wrap {
    overflow: hidden;
    width: 100%;
}

/* FIX: Horizontal scroll sections need touch scrolling */
.h-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

/* line-clamp utility */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ANTI-GRAVITY PREMIUM UI */
.glass-premium {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 15px 35px rgba(11, 29, 58, 0.15);
}

/* MULTI LEVEL DROPDOWN - OVERLAP FIX */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999; 
    position: absolute;
    min-width: 180px;
}

.group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-expand:focus-within input, .search-expand.active input {
    opacity: 1;
    transition-delay: 0.15s;
}

/* MOBILE SEARCH BAR FIX */
#mobileSearchBar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    z-index: 50;
    position: relative;
}

#mobileSearchBar.animate-fade-in {
    max-height: 80px;
    opacity: 1;
    transform: translateY(0);
    padding-top: 8px;
    padding-bottom: 8px;
}

/* MULTI LEVEL DROPDOWN - OVERLAP FIX */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999; /* Forces dropdown over everything including search bars */
    position: absolute;
    min-width: 180px;
}

.group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* BOTTOM NAV PILL */
#bottomNavPill {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    transform: translateY(150%);
    opacity: 0;
}

#bottomNavPill.visible {
    transform: translateY(0);
    opacity: 1;
}

.nav-icon-active {
    color: #D4AF37 !important;
    transform: translateY(-4px) scale(1.1);
}

/* SPLIT LOGIN MODAL */
.login-split {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .login-split {
        flex-direction: row;
        min-height: 500px;
    }
    .login-split-img {
        flex: 1;
        border-top-left-radius: 1.5rem;
        border-bottom-left-radius: 1.5rem;
        border-top-right-radius: 0;
    }
    .login-split-form {
        flex: 1.2;
        border-top-right-radius: 1.5rem;
        border-bottom-right-radius: 1.5rem;
        border-bottom-left-radius: 0;
    }
}

/* BOTTOM SHEET MODAL MOBILE */
@media (max-width: 767px) {
    .bottom-sheet {
        align-items: flex-end !important;
    }
    .bottom-sheet-content {
        width: 100% !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .bottom-sheet:not(.opacity-0) .bottom-sheet-content {
        transform: translateY(0);
    }
}

/* TYPING DOTS FOR AI BOT */
.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #0B1D3A;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out both;
    opacity: 0.6;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); opacity: 1; }
}