/* ============================================================================
   Tantra Portal Base Styles
   ============================================================================ */

/* CSS Variables - Light Theme (Default) */
:root {
    /* Primary Colors */
    --color-primary: #8B0000;
    --color-secondary: #FFFFFF;
    --color-background: #FFF8E7;
    --color-accent: #DC143C;
    
    /* Text Colors */
    --color-text: #1A1A1A;
    --color-text-muted: #6B7280;
    
    /* Border & Background Shades */
    --color-border: #E5E7EB;
    --color-border-light: #F3F4F6;
    --color-light: #FFE4E4;
    --color-dark: #1F2937;
    
    /* Sacred Colors */
    --color-sacred: #8B0000;
    --color-ritual: #B8860B;
    
    /* Fonts */
    --font-body: 'Literata', 'Inter', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Merriweather', 'EB Garamond', Garamond, serif;
    --font-sanskrit: 'Noto Serif Devanagari', 'Sanskrit 2003', serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Other */
    --header-height: 70px;
    --transition-speed: 0.3s;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --color-primary: #FF6B6B;
    --color-secondary: #1A1614;
    --color-background: #0F0E0D;
    --color-accent: #FF4458;
    
    --color-text: #F5F1E8;
    --color-text-muted: #A89B8F;
    
    --color-border: #3A342E;
    --color-border-light: #2A2520;
    --color-light: #4A4238;
    --color-dark: #F5F1E8;
    
    --color-sacred: #FF6B6B;
    --color-ritual: #D4A574;
}

/* ============================================================================
   Base Styles
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-background);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* ============================================================================
   Container & Layout
   ============================================================================ */

.tantra-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-lg);
}

a {
    color: var(--color-primary);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--color-accent);
}

.sanskrit-term {
    font-family: var(--font-sanskrit);
    color: var(--color-sacred);
    font-weight: 600;
}

/* ============================================================================
   Breadcrumb
   ============================================================================ */

.breadcrumb {
    background: var(--color-secondary);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.breadcrumb a:hover {
    color: var(--color-accent);
}

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

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero-section {
    position: relative;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 50%, #8B0000 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    margin-bottom: var(--space-3xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    text-align: center;
    color: white;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 50%, #8B0000 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><text x="10" y="50" font-size="40" fill="rgba(255,255,255,0.03)">ॐ</text></svg>');
    background-repeat: repeat;
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-family: var(--font-sanskrit);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
}

.hero-tagline {
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.95;
}

/* ============================================================================
   Sections
   ============================================================================ */

.intro-section,
.category-section {
    background: var(--color-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    margin-bottom: var(--space-3xl);
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
    position: relative;
    padding-bottom: var(--space-md);
    text-align: center;
}

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

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: var(--space-xl);
    text-align: justify;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   Category Headers
   ============================================================================ */

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.category-title {
    font-size: 2rem;
    color: var(--color-primary);
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.category-sanskrit {
    font-family: var(--font-sanskrit);
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

.category-description {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: var(--space-xl);
    font-style: italic;
}

/* ============================================================================
   Text/Card Grids
   ============================================================================ */

.text-grid,
.sahitya-grid,
.traditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.text-card,
.sahitya-card {
    background: var(--color-secondary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.text-card.active {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.2);
}

.text-card.active:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.3);
}

.text-card.coming-soon,
.sahitya-card.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
}

.text-card.coming-soon:hover,
.sahitya-card.coming-soon:hover {
    transform: none;
}

/* ============================================================================
   Badges
   ============================================================================ */

.coming-soon-badge {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: rgba(107, 114, 128, 0.9);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.available-badge {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ============================================================================
   Card Content
   ============================================================================ */

.text-title,
.sahitya-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
    font-family: var(--font-display);
}

.text-sanskrit,
.sahitya-sanskrit {
    font-family: var(--font-sanskrit);
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
}

.text-meta,
.sahitya-meta {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.text-meta strong,
.sahitya-meta strong {
    color: var(--color-text);
}

.text-description,
.sahitya-description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: var(--space-md);
}

/* ============================================================================
   Dividers
   ============================================================================ */

.section-divider {
    text-align: center;
    margin: var(--space-3xl) 0;
}

.divider-ornament {
    color: var(--color-accent);
    font-size: 1.5rem;
    letter-spacing: 1rem;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 1024px) {
    .tantra-container,
    .content-container {
        padding: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .tantra-container,
    .content-container {
        padding: var(--space-lg);
    }

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

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

    .hero-tagline {
        font-size: 1.1rem;
    }

    .section-title,
    .category-title {
        font-size: 1.8rem;
    }

    .text-grid,
    .sahitya-grid,
    .traditions-grid {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .tantra-container,
    .content-container {
        padding: var(--space-md);
    }

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

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
        padding: var(--space-md);
    }
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
    body {
        background: white;
        color: black;
    }

    .hero-section,
    .breadcrumb,
    header,
    .secondary-nav {
        display: none;
    }
}