/* ========================================
   Vālmīki Rāmāyaṇa Application Base Styles
   Site-wide components and layouts
   Dark/Light Mode Support
   ======================================== */

/* Light Mode Variables (Default) */
:root {
    /* Primary Colors - Rāmāyaṇa Theme */
    --primary-color: #B91C1C;        /* Deep crimson – heroism & dharma */
    --secondary-color: #F59E0B;      /* Golden amber – divine light */
    --accent-color: #059669;         /* Forest green – Ayodhya, nature */
    --rama-crimson: #DC2626;         /* Bright crimson */
    --rama-gold: #FBBF24;            /* Royal gold */
    --rama-forest: #166534;          /* Deep forest */
    
    /* Backgrounds */
    --background-color: #FFF8E3;     /* Light warm parchment */
    --card-background: #FFFDF5;      /* Soft ivory */
    --surface-color: #FFFFFF;
    --nav-background: #FFFFFF;
    --footer-background: #7C2D12;    /* Deep earthy brown */
    --footer-bottom-bg: rgba(0, 0, 0, 0.1);
    --footer-border: rgba(255, 255, 255, 0.2);
    --overlay-color: rgba(0, 0, 0, 0.5);
    
    /* Text Colors */
    --text-primary: #1F2937;
    --text-secondary: #B91C1C;
    --text-muted: #6B7280;
    --text-inverse: #FFFFFF;
    --link-color: #B91C1C;
    --link-hover: #F59E0B;
    
    /* Footer Specific */
    --footer-text: #FFFFFF;
    --footer-title-color: #FBBF24;
    --footer-link: #FEF3C7;
    --footer-link-hover: #FCD34D;
    --footer-social-bg: rgba(255, 255, 255, 0.1);
    --footer-social-icon: #FFFFFF;
    
    /* Borders & Shadows */
    --border-color: #FEE2E2;
    --border-light: #FEF3C7;
    --shadow-light: 0 2px 12px rgba(185, 28, 28, 0.1);
    --shadow-medium: 0 4px 20px rgba(185, 28, 28, 0.15);
    --shadow-heavy: 0 8px 32px rgba(185, 28, 28, 0.2);
    
    /* Gradients */
    --gradient-header: linear-gradient(135deg, #B91C1C 0%, #DC2626 50%, #F59E0B 100%);
    --gradient-hover: linear-gradient(135deg, #F59E0B, #DC2626);
    
    /* Component Specific */
    --header-height: 70px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* Primary Colors - Adjusted for dark backgrounds */
    --primary-color: #F87171;
    --secondary-color: #FBBF24;
    --accent-color: #34D399;
    --rama-crimson: #FCA5A5;
    --rama-gold: #FCD34D;
    --rama-forest: #6EE7B7;
    
    /* Backgrounds */
    --background-color: #0F172A;
    --card-background: #1E293B;
    --surface-color: #334155;
    --nav-background: #1E293B;
    --footer-background: #1E293B;
    --footer-bottom-bg: rgba(0, 0, 0, 0.3);
    --footer-border: rgba(255, 255, 255, 0.1);
    --overlay-color: rgba(0, 0, 0, 0.7);
    
    /* Text Colors */
    --text-primary: #F1F5F9;
    --text-secondary: #FBBF24;
    --text-muted: #94A3B8;
    --text-inverse: #0F172A;
    --link-color: #F87171;
    --link-hover: #FBBF24;
    
    /* Footer Specific */
    --footer-text: #CBD5E1;
    --footer-title-color: #FBBF24;
    --footer-link: #94A3B8;
    --footer-link-hover: #FCD34D;
    --footer-social-bg: rgba(255, 255, 255, 0.05);
    --footer-social-icon: #94A3B8;
    
    /* Borders & Shadows */
    --border-color: #334155;
    --border-light: #475569;
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    /* Gradients */
    --gradient-header: linear-gradient(135deg, #450A0A 0%, #7C2D12 50%, #78350F 100%);
    --gradient-hover: linear-gradient(135deg, #FBBF24, #F87171);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Noto Serif', 'Georgia', serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.7;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   PAGE HEADER
   ======================================== */

.page-header {
    background: var(--gradient-header);
    color: var(--text-inverse);
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Animated Ornaments */
.header-ornament {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
}

.ornament-1 {
    top: 10%;
    left: 5%;
    font-size: 6rem;
    animation: float 20s ease-in-out infinite;
    color: var(--rama-gold);
}

.ornament-2 {
    top: 60%;
    right: 8%;
    font-size: 5rem;
    animation: float 15s ease-in-out infinite 2s;
    color: var(--rama-crimson);
}

.ornament-3 {
    bottom: 10%;
    left: 15%;
    font-size: 4rem;
    animation: float 18s ease-in-out infinite 4s;
    color: var(--rama-forest);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(3deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(15px) rotate(-3deg); }
}

.page-header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.page-description {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-muted);
}

/* ========================================
   SECTION STYLES
   ======================================== */

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2.5rem 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--secondary-color);
}

.section-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider-ornament {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--secondary-color);
    opacity: 0.6;
}

/* ========================================
   KĀṆḌA NAVIGATION
   ======================================== */

.kanda-nav {
    margin-bottom: 3rem;
}

.kanda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.kanda-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.kanda-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.kanda-card:hover::before {
    transform: scaleX(1);
}

.kanda-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--secondary-color);
    background: var(--surface-color);
}

.kanda-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

.kanda-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.kanda-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ========================================
   FEATURE CARDS
   ======================================== */

.feature-section {
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.feature-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '🏹';
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--secondary-color);
    background: var(--surface-color);
}

.feature-card:hover::after {
    opacity: 0.2;
    transform: scale(1.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card h3 {
    font-family: 'Playfair Display', serif;
    margin: 0 0 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.feature-card p {
    flex: 1;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    font-weight: 600;
    text-decoration: none;
    color: var(--link-color);
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    justify-content: center;
}

.feature-link:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    transform: translateY(-2px);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background: var(--footer-background);
    color: var(--footer-text);
    margin-top: 4rem;
    padding: 3rem 0 0;
    border-top: 1px solid var(--footer-border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    flex: 1;
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--footer-title-color);
    font-weight: 600;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--footer-text);
    opacity: 0.9;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--footer-link);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--footer-link-hover);
    opacity: 1;
    transform: translateX(3px);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--footer-social-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-social-icon);
    transition: all 0.3s;
    border: 1px solid var(--footer-border);
}

.footer-social a:hover {
    background: var(--gradient-hover);
    color: var(--text-inverse);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
    border-color: transparent;
}

.footer-bottom {
    background: var(--footer-bottom-bg);
    padding: 1.5rem 0;
    border-top: 1px solid var(--footer-border);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--footer-text);
    opacity: 0.8;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    color: var(--footer-link);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: all 0.2s;
}

.footer-bottom-links a:hover {
    opacity: 1;
    color: var(--footer-link-hover);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .content-container {
        padding: 1rem;
    }

    .page-header {
        padding: 2rem 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1.2rem;
    }

    .kanda-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .ornament-1,
    .ornament-2,
    .ornament-3 {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        padding: 0 1rem 2rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .breadcrumb,
    .site-footer {
        display: none !important;
    }

    .page-header {
        background: white !important;
        color: black !important;
        padding: 1rem !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}