/* ========================================
   Sahitya Application Base Styles
   Classical Sanskrit Literature
   Dark/Light Mode Support
   ======================================== */

/* Light Mode Variables (Default) */
:root {
    /* Primary Colors - Sahitya Theme */
    --primary-color: #3A2E2A;        /* Ink brown - manuscripts */
    --secondary-color: #9C6B30;      /* Manuscript gold */
    --accent-color: #8B4513;         /* Rich brown - ancient texts */
    --sahitya-gold: #D4AF37;         /* Classical gold */
    --sahitya-burgundy: #800020;     /* Deep burgundy */
    --sahitya-sepia: #704214;        /* Sepia - aged paper */
    
    /* Backgrounds */
    --background-color: #FAF8F4;     /* Parchment cream */
    --card-background: #FFFFFF;      /* Pure white */
    --surface-color: #FFF9F0;        /* Soft ivory */
    --nav-background: #FFFFFF;
    --footer-background: #3A2E2A;    /* Ink 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: #1F1F1F;
    --text-secondary: #3A2E2A;
    --text-muted: #8A7F75;
    --text-inverse: #FFFFFF;
    --link-color: #9C6B30;
    --link-hover: #D4AF37;
    
    /* Footer Specific */
    --footer-text: #FFFFFF;
    --footer-title-color: #D4AF37;
    --footer-link: #F3E9D7;
    --footer-link-hover: #FFD700;
    --footer-social-bg: rgba(255, 255, 255, 0.1);
    --footer-social-icon: #FFFFFF;
    
    /* Borders & Shadows */
    --border-color: #E2DED7;
    --border-light: #F3E9D7;
    --shadow-light: 0 2px 12px rgba(58, 46, 42, 0.1);
    --shadow-medium: 0 4px 20px rgba(58, 46, 42, 0.15);
    --shadow-heavy: 0 8px 32px rgba(58, 46, 42, 0.2);
    
    /* Gradients */
    --gradient-header: linear-gradient(135deg, #3A2E2A 0%, #5D4037 50%, #9C6B30 100%);
    --gradient-hover: linear-gradient(135deg, #9C6B30, #D4AF37);
    
    /* Component Specific */
    --header-height: 70px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* Primary Colors - Adjusted for dark backgrounds */
    --primary-color: #D4A574;
    --secondary-color: #C9A568;
    --accent-color: #DAA520;
    --sahitya-gold: #FFD700;
    --sahitya-burgundy: #C94F4F;
    --sahitya-sepia: #B8956A;
    
    /* Backgrounds */
    --background-color: #0F0E0D;
    --card-background: #1A1614;
    --surface-color: #2A2420;
    --nav-background: #1A1614;
    --footer-background: #1A1614;
    --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: #F5F1E8;
    --text-secondary: #D4A574;
    --text-muted: #A89B8F;
    --text-inverse: #0F0E0D;
    --link-color: #D4A574;
    --link-hover: #FFD700;
    
    /* Footer Specific */
    --footer-text: #E5DDD0;
    --footer-title-color: #FFD700;
    --footer-link: #C9B999;
    --footer-link-hover: #FFD700;
    --footer-social-bg: rgba(255, 255, 255, 0.05);
    --footer-social-icon: #C9B999;
    
    /* Borders & Shadows */
    --border-color: #3A342E;
    --border-light: #4A4238;
    --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, #1A1614 0%, #2A2420 50%, #3A342E 100%);
    --gradient-hover: linear-gradient(135deg, #C9A568, #FFD700);
}

/* 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: 'Inter', 'Lora', system-ui, sans-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: 4rem 2rem 3rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    text-align: center;
}

/* Decorative Scroll Pattern */
.header-ornament {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
    font-size: 10rem;
    color: var(--sahitya-gold);
}

.ornament-1 {
    top: -20%;
    left: 5%;
    animation: float 20s ease-in-out infinite;
    transform: rotate(-15deg);
}

.ornament-2 {
    top: 50%;
    right: 5%;
    font-size: 8rem;
    animation: float 15s ease-in-out infinite 2s;
    transform: rotate(15deg);
}

.ornament-3 {
    bottom: -10%;
    left: 20%;
    font-size: 7rem;
    animation: float 18s ease-in-out infinite 4s;
}

@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: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

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

.page-subtitle {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.95;
    color: var(--sahitya-gold);
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 720px;
    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);
}

/* ========================================
   SAHITYA GRID
   ======================================== */

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

.sahitya-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.sahitya-card::before {
    content: '📜';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 4rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.sahitya-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--secondary-color);
}

.sahitya-card:hover::before {
    opacity: 0.15;
    transform: rotate(15deg);
}

.sahitya-title {
    font-family: 'Merriweather', serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.sahitya-sanskrit {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.sahitya-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.genre-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--border-light);
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

/* ========================================
   CATEGORY SECTIONS
   ======================================== */

.category-section {
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
}

.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;
}

/* ========================================
   COMING SOON BADGE
   ======================================== */

.coming-soon {
    opacity: 0.6;
    pointer-events: none;
}

.coming-soon-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: var(--text-inverse);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ========================================
   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: 'Merriweather', 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(156, 107, 48, 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: 3rem 1rem 2rem;
    }

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

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

    .sahitya-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: 2rem;
    }

    .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;
    }
}