/*
 * ======================================================================================
 * PROJECT: ShagunShadi Premium Matrimony
 * THEME: "The Royal Majesty" (v8.0 - ELITE FONTS & DARK MODE FIX)
 * DESCRIPTION: Compact typography + Universal Dark Mode overrides.
 * ======================================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* --- THEME COLORS --- */
    --primary: #960018;
    --primary-rgb: 150, 0, 24;
    --primary-dark: #700012;
    --gold: #C5A059;
    --gold-light: #E6C786;
    --gold-gradient: linear-gradient(135deg, #C5A059 0%, #E6C786 100%);

    /* --- 2. DYNAMIC FONT SCALE (Default: 100%) --- */
    --base-scale: 100%;
    
    /* --- LIGHT MODE DEFAULTS --- */
    --bg-body: #FFFFFF;
    --bg-surface: #F8F9FA;
    --bg-card: #FFFFFF;       
    --bg-input: #FFFFFF;      
    --bg-nav: rgba(255, 255, 255, 0.98);
    --bg-glass: rgba(255, 255, 255, 0.95);
    
    /* Text */
    --text-main: #222222;
    --text-muted: #555555;
    --text-inverse: #FFFFFF;
    
    /* Borders & Shadows */
    --border-color: #EEEEEE;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.03);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.08); 
    --radius-pill: 50px;
}

/* --- DARK MODE VARIABLES --- */
body.dark-mode {
    --bg-body: #0a0a0a;       /* Deepest Black */
    --bg-surface: #141414;    /* Slightly lighter for sections */
    --bg-card: #1A1A1A;       /* Dark Grey for Cards */
    --bg-input: #222222;      /* Dark Input Fields */
    --bg-nav: rgba(10, 10, 10, 0.98);
    --bg-glass: rgba(20, 20, 20, 0.90);
    
    --text-main: #E0E0E0;     /* Off-White Text */
    --text-muted: #A0A0A0;    /* Light Grey Muted */
    
    --border-color: #333333;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.5); 
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.8);
}

/* --- DARK MODE OVERRIDES (Applied via [data-theme="dark"]) --- */
[data-theme="dark"] {
    --bg-body: #050505;
    --bg-surface: #121212;
    --bg-card: #1E1E1E;
    --bg-glass: rgba(20, 20, 20, 0.90);
    --text-main: #E0E0E0;
    --text-muted: #A0A0A0;
    --border-color: #333333;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold) 0%, var(--primary) 100%);
    border-radius: 10px;
}


/* APPLY FONT SCALE */
html {
    font-size: var(--base-scale); /* 100% = 16px, 110% = 17.6px, etc. */
    transition: font-size 0.3s ease;
}

/* --- BASE TYPOGRAPHY (ELITE SIZE) --- */
body {
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 0.95rem; /* Professional Standard Size */
    transition: background-color 0.3s ease, color 0.3s ease; 
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; color: var(--primary); font-weight: 700; letter-spacing: -0.02em; }

/* Fixed Display Sizes (Not Huge) */
.display-1 { font-size: 3.5rem !important; }
.display-2 { font-size: 3rem !important; }
.display-3 { font-size: 2.5rem !important; }
.display-4 { font-size: 2.2rem !important; }
.display-5 { font-size: 1.8rem !important; }
.display-6 { font-size: 1.5rem !important; }

a { text-decoration: none; transition: 0.3s; }
ul { padding: 0; margin: 0; list-style: none; }

/* ==========================================================================
   MEGA NAVIGATION
   ========================================================================== */
.navbar-royal {
    background: var(--bg-nav); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color); padding: 0;
    z-index: 1000;
}

.nav-link-royal {
    color: var(--text-main) !important; font-weight: 600;
    padding: 24px 12px !important; /* Compact Padding */
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; position: relative;
}
.nav-link-royal::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px;
    background: var(--primary); transition: 0.3s;
}
.nav-link-royal:hover::after { width: 100%; }
.nav-link-royal:hover { color: var(--primary) !important; }

/* Mega Menu */
.has-mega-menu { position: static; }
.mega-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-card); 
    border-top: 3px solid var(--primary);
    box-shadow: var(--shadow-lg);
    display: none; padding: 30px 0; z-index: 999;
    animation: slideDown 0.3s ease-out;
}
@media (min-width: 992px) {
    .has-mega-menu:hover .mega-menu { display: block; }
}

.mega-title {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    color: var(--gold); letter-spacing: 1.5px; margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color); padding-bottom: 6px;
}
.mega-list li a {
    display: block; padding: 6px 0; font-size: 0.9rem;
    color: var(--text-muted); font-weight: 500;
}
.mega-list li a:hover { color: var(--primary); padding-left: 5px; }

/* ==========================================================================
   HERO SECTION (Original Design Restored)
   ========================================================================== */

/* Wrapper: Back to fixed height, but transition added for smooth JS resizing */
.hero-wrapper { 
    position: relative; 
    height: 100vh;      /* Default Full Screen */
    min-height: 700px;  /* Minimum safety height */
    width: 100%; 
    overflow: hidden; 
    transition: height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth resize animation */
}

/* Background */
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%); 
    z-index: 1;
}
.carousel-item { height: 100%; }
.carousel-item img { object-fit: cover; height: 100%; width: 100%; }

/* Text Content: Back to Absolute Center */
.hero-content-center {
    position: absolute; 
    top: 30%; /* Slightly higher to leave room for tabs */
    left: 50%; 
    transform: translate(-50%, -50%);
    text-align: center; 
    width: 90%; 
    z-index: 5; 
    color: #fff;
    transition: top 0.4s ease; /* Animate movement */
}
.typewriter-cursor { border-right: 3px solid var(--gold); animation: blink 0.8s infinite; }

/* Tab Container: Back to Absolute Overlay */
.hero-tab-container {
    position: absolute; 
    top: 55%; 
    left: 50%; 
    transform: translateX(-50%);
    width: 90%; 
    max-width: 900px; 
    z-index: 10;
}

/* --- YOUR ORIGINAL STYLING (Unchanged) --- */
.hero-tabs-header { display: flex; justify-content: center; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }

.hero-tab-btn {
    background: rgba(255,255,255,0.9); color: #333; 
    padding: 10px 25px; border-radius: 30px; cursor: pointer;
    font-weight: 700; font-size: 0.85rem; border: none; transition: 0.3s;
}
.hero-tab-btn.active {
    background: var(--primary); color: #fff;
    box-shadow: 0 10px 20px rgba(150,0,24,0.3);
}

.hero-glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    padding: 25px; border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.1);
}

.tab-content-item { display: none; animation: fadeIn 0.5s ease; }
.tab-content-item.active { display: block; }

.form-control-royal {
    background: var(--bg-input); 
    border: 1px solid var(--border-color);
    padding: 10px 15px; border-radius: 6px; 
    color: var(--text-main);     
    width: 100%; font-size: 0.9rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.form-control-royal:focus { border-color: var(--gold); outline: none; }

.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, #a00028 100%);
    color: #fff; padding: 10px 25px; border-radius: 50px;
    font-weight: 600; border: none; letter-spacing: 0.5px; font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(150, 0, 24, 0.2); transition: all 0.3s ease;
}
.btn-premium:hover {
    background: linear-gradient(135deg, #a00028 0%, var(--primary) 100%);
    transform: translateY(-2px); box-shadow: 0 10px 25px rgba(150, 0, 24, 0.4); color: #fff;
}
.btn-gold {
    background: linear-gradient(135deg, #C5A059 0%, #D4AF37 100%);
    color: #fff; padding: 10px 25px; border-radius: 50px;
    font-weight: 600; border: none; letter-spacing: 0.5px; font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.2); transition: all 0.3s ease;
}
.btn-gold:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #C5A059 100%);
    transform: translateY(-2px); box-shadow: 0 10px 25px rgba(197, 160, 89, 0.4); color: #fff;
}

/* Nav Auth Buttons */
.btn-login-royal {
    color: var(--primary); background-color: transparent; border: 1px solid var(--primary);
    padding: 6px 20px; border-radius: 50px; font-weight: 700;
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; transition: 0.3s;
}
.btn-login-royal:hover { background-color: var(--primary); color: #fff; }

.btn-register-royal {
    background: linear-gradient(135deg, var(--primary) 0%, #a00028 100%);
    color: #fff; border: 1px solid transparent; padding: 6px 20px;
    border-radius: 50px; font-weight: 700; text-transform: uppercase;
    font-size: 0.75rem; letter-spacing: 1px; transition: 0.3s;
}
.btn-register-royal:hover { background: linear-gradient(135deg, #a00028 0%, var(--primary) 100%); color: #fff; }

/* ==========================================================================
   SUCCESS STORIES
   ========================================================================== */
.stories-track-wrapper { position: relative; margin: 0 -15px; }
.stories-track {
    display: flex; gap: 20px; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 20px;
    scrollbar-width: none; scroll-behavior: smooth;
}
.stories-track::-webkit-scrollbar { display: none; }

.story-item { flex: 0 0 320px; scroll-snap-align: start; }

.story-card-elite {
    position: relative; height: 450px; border-radius: 16px; overflow: hidden;
    cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.08); transition: transform 0.4s ease;
    background: var(--bg-card); 
}
.story-card-elite:hover { transform: translateY(-5px); }

.img-wrapper { height: 100%; width: 100%; position: relative; }
.img-wrapper img { height: 100%; width: 100%; object-fit: cover; transition: transform 0.6s ease; }
.story-card-elite:hover .img-wrapper img { transform: scale(1.05); }

.overlay-gradient {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.content-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 25px;
    z-index: 2; transform: translateY(15px); transition: transform 0.4s ease;
}
.story-card-elite:hover .content-overlay { transform: translateY(0); }

.glass-badge {
    display: inline-block; background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px); padding: 4px 10px; border-radius: 20px;
    color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    margin-bottom: 10px; border: 1px solid rgba(255,255,255,0.15);
}
.couple-name { color: #fff; font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 4px; }
.couple-quote { color: rgba(255,255,255,0.85); font-size: 0.85rem; font-style: italic; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-more-link { color: var(--gold); text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; opacity: 0; transition: 0.3s; }
.story-card-elite:hover .read-more-link { opacity: 1; }

.nav-btn-elite {
    width: 45px; height: 45px; border-radius: 50%; 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    color: var(--text-main); font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.nav-btn-elite:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ==========================================================================
   PRICING TABLE
   ========================================================================== */
.pricing-track-wrapper { position: relative; margin: 0 -15px; }
.pricing-track {
    display: flex; gap: 20px; overflow-x: auto;
    scroll-snap-type: x mandatory; padding: 20px 5px;
    scrollbar-width: none; scroll-behavior: smooth;
}
.pricing-track::-webkit-scrollbar { display: none; }

.pricing-item { flex: 0 0 320px; scroll-snap-align: start; }

.pricing-card-standard {
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    border-radius: 16px;
    padding: 25px; transition: 0.3s;
}
.pricing-card-standard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

.pricing-card-featured {
    background: var(--bg-card); 
    border: 2px solid var(--gold); border-radius: 16px;
    padding: 30px 25px; box-shadow: 0 10px 30px rgba(197, 160, 89, 0.15);
    transform: scale(1.02); z-index: 2;
}

.featured-badge {
    position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
    background: var(--gold-gradient); color: #fff;
    padding: 6px 15px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
}

.icon-circle {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto;
    background: var(--bg-surface); 
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.service-card-elite {
    background: var(--bg-card); 
    border-radius: 16px; position: relative; overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow-sm);
}
.service-card-elite::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 4px;
    background: var(--gold-gradient); transition: width 0.4s ease;
}
.service-card-elite:hover::after { width: 100%; }

.service-icon-box {
    width: 60px; height: 60px; background: var(--bg-surface); 
    color: var(--primary); font-size: 1.8rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: 0.3s;
}
.service-card-elite:hover .service-icon-box { background: var(--primary); color: #fff; }
.service-card-elite:hover .service-title { color: var(--primary); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
/* 1. Base Structure using Theme Variables */
    .footer-elite {
        background-color: var(--bg-surface); /* Adapts to Light/Dark */
        color: var(--text-muted);
        border-top: 1px solid var(--border-color);
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    /* 2. Typography */
    .footer-heading {
        color: var(--text-main); /* Black in Light, White in Dark */
        font-family: var(--font-heading);
        font-weight: 700;
        margin-bottom: 25px;
        position: relative;
        display: inline-block;
    }
    .footer-heading::after {
        content: '';
        position: absolute;
        bottom: -8px; left: 0;
        width: 40px; height: 2px;
        background: var(--gold);
    }
    .footer-subheading {
        color: var(--text-main);
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 2px;
    }
    .footer-text { color: var(--text-muted); }
    .text-main { color: var(--text-main) !important; }

    /* 3. Links */
    .footer-links li { margin-bottom: 12px; }
    .footer-links a {
        color: var(--text-muted);
        text-decoration: none;
        transition: all 0.3s ease;
        display: inline-block;
    }
    .footer-links a:hover {
        color: var(--primary);
        transform: translateX(5px);
    }
    .footer-contact-link {
        color: var(--text-main);
        text-decoration: none;
        font-weight: 700;
        font-size: 1.1rem;
        transition: 0.3s;
    }
    .footer-contact-link:hover { color: var(--gold); }

    /* 4. Social Buttons (Adaptive) */
    .social-btn-elite {
        width: 40px; height: 40px;
        border-radius: 50%;
        background: var(--bg-card); /* White in Light, Dark in Dark */
        border: 1px solid var(--border-color);
        display: flex; align-items: center; justify-content: center;
        color: var(--text-main);
        text-decoration: none;
        transition: 0.3s;
        box-shadow: var(--shadow-sm);
    }
    .social-btn-elite:hover {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
        transform: translateY(-3px);
    }

    /* 5. App Buttons (Adaptive Outline) */
    .btn-outline-adaptive {
        border: 1px solid var(--border-color);
        color: var(--text-main);
        transition: 0.3s;
    }
    .btn-outline-adaptive:hover {
        background: var(--text-main);
        color: var(--bg-body);
        border-color: var(--text-main);
    }

    /* 6. Logo Logic (Crucial for Light/Dark) */
    .footer-logo { transition: 0.3s; }
    /* In Dark Mode, invert logo to make it white */
    body.dark-mode .footer-logo { filter: brightness(0) invert(1); }

    /* Helpers */
    .text-gold { color: var(--gold) !important; }
    .hover-gold:hover { color: var(--gold) !important; }
    .placeholder-white-50::placeholder { color: rgba(255,255,255,0.5); }
    .opacity-10 { opacity: 0.1; }
    .opacity-05 { opacity: 0.05; }



/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */
@media (max-width: 991px) {
    .hero-wrapper { height: auto !important; min-height: 100vh; padding-bottom: 50px; background: #000; }
    .carousel-item { position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 0; }
    .hero-content-center { position: relative; top: auto; left: auto; transform: none; padding-top: 120px; padding-bottom: 30px; width: 100%; z-index: 2; }
    .hero-tab-container { position: relative; top: auto; left: auto; transform: none; width: 95%; margin: 0 auto; z-index: 10; }
    
    .hero-tabs-header { flex-wrap: wrap; gap: 8px; }
    .hero-tab-btn { flex: 1 1 40%; font-size: 0.8rem; padding: 10px; text-align: center; }
    
    .navbar-collapse { background: var(--bg-body); max-height: 80vh; overflow-y: auto; padding: 15px; border-top: 1px solid var(--border-color); }
    .nav-link-royal { padding: 15px 0 !important; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; }
    
    .mega-menu { position: static; display: none; box-shadow: none; border-top: none; padding: 10px 0; background: var(--bg-surface); }
    .mega-menu.mobile-active { display: block; }
    
    .newsletter-box { flex-direction: column; text-align: center; margin-bottom: -30px; }
    
    .pricing-item { flex: 0 0 85%; }
}

/* contact us page */
  .contact-card-elite {
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        border: 1px solid rgba(0,0,0,0.05);
    }
    .contact-card-elite:hover {
        transform: translateX(10px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
        border-left: 4px solid var(--gold);
    }
    
    .hover-gold:hover { color: var(--gold) !important; transition: 0.3s; }
    
    /* Using royal classes from CSS file for icons */
    .icon-box-royal {
        width: 60px; height: 60px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
    }
/* ==========================================================================
   Theme Engine
   ========================================================================== */
/* SETTINGS PANEL STYLES */
    .theme-panel {
        position: fixed;
        top: 0; right: -320px; /* Hidden by default */
        width: 320px;
        height: 100vh;
        background: var(--bg-card);
        color: var(--text-main);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 9999;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        border-left: 1px solid var(--border-color);
        overflow-y: auto;
    }
    .theme-panel.active { right: 0; }

    /* Floating Gear Button */
    .settings-trigger {
        position: fixed;
        top: 50%; right: 0;
        transform: translateY(-50%);
        width: 50px; height: 50px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-right: 0;
        border-radius: 10px 0 0 10px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer;
        box-shadow: -5px 5px 15px rgba(0,0,0,0.05);
        z-index: 9998;
        color: var(--text-main);
        font-size: 1.5rem;
    }
    .ri-spin-slow { animation: spin 3s linear infinite; }
    @keyframes spin { 100% { transform: rotate(360deg); } }

    /* Color Dots */
    .color-dot {
        width: 35px; height: 35px;
        border-radius: 50%;
        cursor: pointer;
        border: 3px solid transparent;
        transition: transform 0.2s;
        box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    }
    .color-dot:hover { transform: scale(1.15); border-color: #fff; }

    /* Dark Mode specific adjust for panel */
    [data-theme="dark"] .theme-panel { border-left: 1px solid #333; }


   /* ==========================================================================
   DARK MODE UTILITY
   ========================================================================== */
/* Force Bootstrap utility classes to obey our theme in dark mode */
body.dark-mode .bg-white { background-color: var(--bg-card) !important; color: var(--text-main) !important; }
body.dark-mode .bg-light { background-color: var(--bg-surface) !important; color: var(--text-main) !important; }
body.dark-mode .text-dark { color: var(--text-main) !important; }
body.dark-mode .text-muted { color: var(--text-muted) !important; }
body.dark-mode .border-light { border-color: var(--border-color) !important; }

/* In dark mode, Primary Red Headings can look dull. Gold is more elegant. */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: var(--text-main);
}
body.dark-mode .text-primary { color: var(--gold) !important; }

/* Ensure login button is visible in dark mode */
body.dark-mode .btn-login-royal { color: var(--gold); border-color: var(--gold); }
body.dark-mode .btn-login-royal:hover { background-color: var(--gold); color: #000; }


/* CSS FOR AGENT DASHDOARD */

/* CSS FOR AGENT DASHDOARD END */