/* ========================================
   JAIN JINVANI - LAYOUT STYLES
   Grid, containers, sections, structure
   ======================================== */

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: 800px;
}

.container-wide {
    max-width: 1400px;
}

/* ===== Main Layout (with Sidebar) ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-smooth);
}


/* ===== Section ===== */
.section {
    padding: var(--space-4xl) 0;
    /* Increased from 3xl for better Proximity between major sections */
    position: relative;
}

.section-sm {
    padding: var(--space-xl) 0;
}

.section-lg {
    padding: var(--space-4xl) 0;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

.section-header p {
    margin-top: var(--space-md);
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===== Grid Systems ===== */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ===== Flexbox Utilities ===== */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* ===== Page Layouts ===== */

/* Hero Section */
.hero {
    min-height: 70vh;
    /* Increased slightly for better breathing room */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-sacred);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-3xl) var(--space-lg);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* CSS-based subtle pattern (no external image dependency) */
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: var(--space-xl);
}

.hero h1 {
    color: white;
    margin-bottom: var(--space-md);
    font-family: var(--font-devanagari);
}

.hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
}

/* Page Hero (smaller, for sub-pages) */
.page-hero {
    background: var(--gradient-sacred);
    padding: var(--space-2xl) 0 var(--space-xl);
    text-align: center;
    color: white;
}


.page-hero h1 {
    color: white;
    margin-bottom: var(--space-sm);
    font-family: var(--font-devanagari);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.page-hero .icon {
    font-size: 4rem;
    display: block;
    margin-bottom: var(--space-md);
}

/* Page Content */
.page-content {
    padding: var(--space-xl) 0;
}

/* ===== Two Column Layouts ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-image img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: var(--space-2xl) 0;
    text-align: center;
    margin-bottom: 0;
}

/* Mobile footer spacing for fixed bottom nav */
@media (max-width: 1024px) {
    .footer {
        padding-bottom: 100px;
    }

    body {
        padding-bottom: 0;
    }
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.footer a {
    color: var(--gold);
}

.footer a:hover {
    color: var(--gold-light);
}

/* ===== Responsive Layout ===== */

/* Tablet */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 50vh;
        padding: var(--space-xl) var(--space-md);
    }

    .hero-content {
        padding: var(--space-lg);
    }

    .page-hero {
        padding: 40px var(--space-md) 25px;
    }

    /* Add bottom padding for mobile nav */
    .main-content {
        padding-bottom: calc(var(--mobile-nav-height) + var(--space-lg));
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    :root {
        --space-lg: 16px;
        --space-xl: 24px;
        --space-2xl: 40px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}