/* ==========================================================================
   Ekdant Matrimony - Unified Design System & Premium Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Noto+Sans+Gujarati:wght@400;500;600;700&display=swap');

:root {
    /* Premium Dark Mode Colors (Maroon & Gold) */
    --bg-color: #0b0707;
    --card-bg: rgba(30, 16, 18, 0.65);
    --card-border: rgba(212, 175, 55, 0.15);
    --text-main: #fdfbf7;
    --text-muted: #c4b5b7;
    --primary: #B83A4B;
    --primary-hover: #d04b5d;
    --accent: #D4AF37;
    --accent-hover: #e6c24a;
    --border: #2e1a1c;
    --box-bg: #1a0f10;
    --toggle-bg: #2e1a1c;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-badge: #ef4444;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.1);
    --input-bg: rgba(26, 15, 16, 0.6);
    --header-bg: rgba(11, 7, 7, 0.85);
    --shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
    --glow-color: rgba(184, 58, 75, 0.15);
}

:root[data-theme="light"] {
    /* Premium Light Mode Colors (Maroon & Gold) */
    --bg-color: #fdfbf7;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(66, 0, 8, 0.08);
    --text-main: #200003;
    --text-muted: #6e5c5d;
    --primary: #420008;
    --primary-hover: #5d0611;
    --accent: #735c00;
    --accent-hover: #8e7202;
    --border: #e8dfdf;
    --box-bg: #f7f2f2;
    --toggle-bg: #dccbcb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-badge: #ef4444;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --input-bg: #ffffff;
    --header-bg: rgba(253, 251, 247, 0.85);
    --shadow: 0 20px 40px -20px rgba(66, 0, 8, 0.15);
    --glow-color: rgba(66, 0, 8, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   Background Ambient Aurora Glow Spots
   ========================================================================== */
.aurora-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.aurora-spot {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .aurora-spot {
    opacity: 0.08;
}

.aurora-1 {
    width: 450px;
    height: 450px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.aurora-2 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: 20%;
    left: -150px;
}

.aurora-3 {
    width: 350px;
    height: 350px;
    background: #ec4899;
    top: 40%;
    right: 10%;
}

/* ==========================================================================
   Header & Navbar Layout (Floating Glassmorphism)
   ========================================================================== */
header.app-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    color: var(--text-main);
}

.logo-link img {
    height: 36px;
    width: 36px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn-user {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-btn-user:hover {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.nav-btn-admin {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.nav-btn-admin:hover {
    background-color: var(--accent);
    color: #080c14;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.nav-btn-link {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-btn-link:hover {
    color: var(--text-main);
}

/* ==========================================================================
   Theme Switch
   ========================================================================== */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--toggle-bg);
    transition: 0.3s;
    border-radius: 22px;
    border: 1px solid var(--card-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-main);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
    background-color: #ffffff;
}

.theme-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================================
   Card Component & Content Layout
   ========================================================================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px;
    flex-grow: 1;
}

.container-large {
    max-width: 1200px;
}

/* Typography styles */
h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.04em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 70%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 32px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
    padding-left: 14px;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.75;
    margin-bottom: 16px;
}

ul {
    padding-left: 20px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.98rem;
}

li {
    margin-bottom: 8px;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* ==========================================================================
   Banners and Layout Elements for Landing Page
   ========================================================================== */
.hero-card {
    text-align: center;
    background: radial-gradient(circle at top, var(--glow-color) 0%, transparent 80%), var(--card-bg);
    padding: 56px 32px;
    margin-bottom: 40px;
}

.hero-logo {
    width: 80px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.3));
}

.subtitle {
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto 32px auto;
    color: var(--text-muted);
}

.banners-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 24px;
    margin-bottom: 40px;
}

@media (min-width: 992px) {
    .banners-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.banner-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border-radius: 20px;
}

/* 2x6 Aspect Ratio container for images (6 width to 2 height equals 3:1) */
.banner-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 7 / 4;
    /* 3:1 aspect ratio */
    overflow: hidden;
    background-color: var(--box-bg);
    border-bottom: 1px solid var(--border);
}

.banner-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-card:hover .banner-image-container img {
    transform: scale(1.05);
}

.banner-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Base 37 Interactive Widget style */
.base37-section {
    background: radial-gradient(circle at bottom right, var(--glow-color) 0%, transparent 60%), var(--card-bg);
    border-color: rgba(56, 189, 248, 0.2);
}

.code-badge {
    font-family: monospace;
    background-color: var(--box-bg);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==========================================================================
   Buttons and Forms styling
   ========================================================================== */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-secondary {
    background-color: var(--toggle-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 0.95rem;
    background-color: var(--input-bg);
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    user-select: none;
}

/* ==========================================================================
   Alerts, Boxes & Status elements
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--primary);
    color: #ffffff;
    margin-bottom: 16px;
}

.badge-danger {
    background-color: var(--danger);
}

.badge-success {
    background-color: var(--success);
}

.danger-box {
    background-color: var(--error-bg);
    border: 1px solid var(--danger);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.alert-banner {
    background-color: var(--error-bg);
    border-left: 4px solid var(--danger);
    padding: 18px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.08);
    border-left: 4px solid #f59e0b;
    color: var(--text-main);
}

.tech-box {
    background-color: var(--box-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
}

.status-box {
    background-color: var(--box-bg);
    padding: 20px;
    border-radius: 10px;
    border: 1px dashed var(--border);
    margin-bottom: 16px;
}

/* ==========================================================================
   Footer (Floating Glassmorphism style)
   ========================================================================== */
footer.app-footer {
    background-color: var(--header-bg);
    border-top: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 32px 24px;
    margin-top: auto;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-main);
}

/* ==========================================================================
   Grid System
   ========================================================================== */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   Mobile-Friendly Responsive Overrides
   For Mobile screens: Cards expand to full screen, margins vanish
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        padding: 16px 0;
        margin: 0;
        max-width: 100% !important;
        width: 100% !important;
    }

    .card, .history-section {
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
        padding: 24px 16px;
        margin-bottom: 0;
    }

    .banners-grid {
        gap: 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    .banner-card {
        border-bottom: 1px solid var(--border);
    }

    .nav-container {
        padding: 12px 16px;
    }

    .nav-links {
        display: none;
        /* Let buttons wrap or simplify on smaller mobile screen */
    }

    .hero-card {
        padding: 40px 16px;
    }

    h1 {
        font-size: 1.85rem;
    }

    .logo-text {
        font-size: 1.05rem;
    }

    .logo-link img {
        height: 32px;
        width: 32px;
    }

    .hero-section {
        padding: 32px 16px;
        border-radius: 0;
        margin-bottom: 24px;
        border-left: none;
        border-right: none;
    }

    .hero-section::before {
        border-radius: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .advisory-card {
        padding: 24px 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .advisory-card::before {
        border-radius: 0;
    }

    .downloader-card {
        padding: 24px 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        text-align: center;
        justify-content: center;
    }

    .downloader-card h2 {
        border-left: none;
        padding-left: 0;
    }

    .features-container {
        padding: 0 16px;
    }

    .helpline-grid {
        padding: 0 16px;
    }

    .channel-grid {
        grid-template-columns: 1fr;
    }

    .people-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
}

/* ==========================================================================
   Luxury Typography & Component Enhancements
   ========================================================================== */
.font-cinzel {
    font-family: 'Cinzel', serif;
}

.font-gujarati {
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.luxury-border {
    border: 1px solid var(--card-border);
    position: relative;
}

.luxury-border::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    pointer-events: none;
    border-radius: inherit;
}

/* Tab Switching Control */
.tab-container {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    padding-bottom: 8px;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-main);
    background-color: var(--box-bg);
}

.tab-btn.active {
    color: var(--accent);
    background-color: rgba(212, 175, 55, 0.1);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.2);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Channel grid layout */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.channel-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.channel-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(184, 58, 75, 0.1);
    background-color: rgba(184, 58, 75, 0.05);
}

.channel-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.channel-info {
    min-width: 0;
}

.channel-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* People Grid */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.person-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.person-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(184, 58, 75, 0.15);
}

.person-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    margin-bottom: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.person-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.person-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}