/* ========================================
   Ṣaḍdarśana Application Base Styles
   Six Classical Schools of Indian Philosophy
   Dark/Light Mode Support
   ======================================== */

/* Light Mode Variables (Default) */
:root {
    /* Primary Colors - Ṣaḍdarśana Theme */
    --primary-color: #311B92;        /* Deep indigo - wisdom */
    --secondary-color: #7C4DFF;      /* Vivid purple - philosophy */
    --accent-color: #D4AF37;         /* Golden - enlightenment */
    --philosophy-purple: #4A148C;    /* Dark purple */
    --philosophy-gold: #F9A825;      /* Bright gold */
    --philosophy-teal: #00695C;      /* Deep teal */
    
    /* Darśana-specific colors */
    --nyaya: #E65100;                /* Orange - logic */
    --vaisesika: #2E7D32;            /* Green - atomism */
    --samkhya: #6A1B9A;              /* Purple - dualism */
    --yoga: #1565C0;                 /* Blue - practice */
    --mimamsa: #C62828;              /* Red - ritual */
    --vedanta: #4A148C;              /* Deep purple - knowledge */
    
    /* Backgrounds */
    --background-color: #FAFAF9;     /* Soft warm white */
    --card-background: #FFFFFF;      /* Pure white */
    --surface-color: #FFFFFF;
    --nav-background: #FFFFFF;
    --footer-background: #311B92;    /* Deep indigo */
    --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: #1A1A1A;
    --text-secondary: #311B92;
    --text-muted: #6B7280;
    --text-inverse: #FFFFFF;
    --link-color: #311B92;
    --link-hover: #7C4DFF;
    
    /* Footer Specific */
    --footer-text: #FFFFFF;
    --footer-title-color: #D4AF37;
    --footer-link: #E1BEE7;
    --footer-link-hover: #F9A825;
    --footer-social-bg: rgba(255, 255, 255, 0.1);
    --footer-social-icon: #FFFFFF;
    
    /* Borders & Shadows */
    --border-color: #E5E7EB;
    --border-light: #EDE7F6;
    --shadow-light: 0 2px 12px rgba(49, 27, 146, 0.1);
    --shadow-medium: 0 4px 20px rgba(49, 27, 146, 0.15);
    --shadow-heavy: 0 8px 32px rgba(49, 27, 146, 0.2);
    
    /* Gradients */
    --gradient-header: linear-gradient(135deg, #311B92 0%, #512DA8 50%, #7C4DFF 100%);
    --gradient-hover: linear-gradient(135deg, #7C4DFF, #D4AF37);
    
    /* Component Specific */
    --header-height: 70px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* Primary Colors - Adjusted for dark backgrounds */
    --primary-color: #B39DDB;
    --secondary-color: #9575CD;
    --accent-color: #FFD54F;
    --philosophy-purple: #CE93D8;
    --philosophy-gold: #FFD54F;
    --philosophy-teal: #4DB6AC;
    
    /* Darśana-specific colors (brightened) */
    --nyaya: #FF9800;
    --vaisesika: #66BB6A;
    --samkhya: #BA68C8;
    --yoga: #42A5F5;
    --mimamsa: #EF5350;
    --vedanta: #AB47BC;
    
    /* 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: #B39DDB;
    --text-muted: #94A3B8;
    --text-inverse: #0F172A;
    --link-color: #B39DDB;
    --link-hover: #FFD54F;
    
    /* Footer Specific */
    --footer-text: #CBD5E1;
    --footer-title-color: #FFD54F;
    --footer-link: #94A3B8;
    --footer-link-hover: #FFD54F;
    --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, #1A237E 0%, #311B92 50%, #4A148C 100%);
    --gradient-hover: linear-gradient(135deg, #9575CD, #FFD54F);
}

/* 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: 'Literata', 'Inter', system-ui, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.7;
}

.content-container {
    max-width: 1400px;
    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 Om Symbol Pattern */
.header-ornament {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
    font-size: 8rem;
    color: var(--accent-color);
}

.ornament-1 {
    top: 5%;
    left: 5%;
    animation: float 20s ease-in-out infinite;
}

.ornament-2 {
    top: 50%;
    right: 10%;
    font-size: 6rem;
    animation: float 15s ease-in-out infinite 2s;
}

.ornament-3 {
    bottom: 10%;
    left: 20%;
    font-size: 5rem;
    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: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

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

.page-title {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-family: 'Merriweather', 'EB Garamond', serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.95;
    letter-spacing: 0.05em;
}

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

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

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

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

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

.crumb-separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.current-crumb {
    color: var(--accent-color);
    font-weight: 700;
}

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

.section-title {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2.5rem 0 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(--accent-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(--accent-color);
    opacity: 0.6;
}

/* ========================================
   INTRO SECTION
   ======================================== */

.intro-section {
    background: var(--card-background);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-light);
    border: 2px solid var(--border-color);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
    color: var(--text-primary);
}

.sanskrit-term {
    font-family: 'Noto Serif Devanagari', serif;
    color: var(--primary-color);
    font-weight: 600;
    font-style: italic;
}

/* ========================================
   DARŚANA GRID
   ======================================== */

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

.darshana-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

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

.darshana-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--card-color) 0%, var(--card-color-light) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.darshana-header::before {
    content: '☸';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 10rem;
    opacity: 0.1;
}

.darshana-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.darshana-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.darshana-names h3 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.darshana-sanskrit {
    font-family: 'Noto Serif Devanagari', serif;
    font-size: 1.5rem;
}

.founder-info {
    font-size: 0.95rem;
    opacity: 0.9;
    font-style: italic;
    margin-bottom: 1rem;
}

.darshana-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
}

.key-concepts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.concept-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-family: 'Noto Serif Devanagari', serif;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ========================================
   TEXTS SECTION
   ======================================== */

.texts-section {
    padding: 2rem;
    background: var(--background-color);
}

.texts-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.sutra-box {
    background: var(--card-background);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
}

.sutra-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.sutra-sanskrit {
    font-family: 'Noto Serif Devanagari', serif;
    color: var(--primary-color);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.sutra-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.prakarana-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.prakarana-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.prakarana-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--secondary-color);
}

.prakarana-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.prakarana-sanskrit {
    font-family: 'Noto Serif Devanagari', serif;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.prakarana-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.prakarana-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

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

/* ========================================
   TOGGLE BUTTON
   ======================================== */

.toggle-texts {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.toggle-texts:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.toggle-texts i {
    transition: transform 0.3s ease;
}

.toggle-texts.active i {
    transform: rotate(180deg);
}

/* ========================================
   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(124, 77, 255, 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: 2.5rem;
    }

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

    .darshana-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,
    .toggle-texts {
        display: none !important;
    }

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

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