/**
 * Flat-File CMS - Main Styles
 * Modern, clean design using CSS Grid and Flexbox
 * 100% Vanilla CSS - Zero dependencies
 */

/* =========================================
   CSS Custom Properties (Variables)
   ========================================= */
:root {
    /* Color System */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --secondary-dark: #475569;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --light-gray: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #22c55e;
    --success-light: #86efac;
    --danger: #ef4444;
    --danger-light: #fca5a5;
    --warning: #f59e0b;
    --warning-light: #fcd34d;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-serif: Georgia, 'Times New Roman', Times, serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* 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);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================
   Container & Layout
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }
}

.main-content {
    flex: 1;
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
    background: var(--dark);
    color: white;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

/* Logo */
.logo {
    flex: 0 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    gap: var(--space-sm);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-text {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: var(--space-xs);
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 0.9375rem;
    position: relative;
}

.nav-link .nav-icon {
    margin-left: var(--space-xs);
}

.nav-link:hover {
    color: white;
    background: var(--primary-dark);
}

.nav-link.active {
    color: white;
    background: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-sm);
    right: var(--space-sm);
    height: 2px;
    background: white;
}

.admin-link {
    background: var(--secondary);
}

.admin-link:hover {
    background: var(--secondary-dark);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    flex-direction: column;
    gap: 4px;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: white;
    transition: all var(--transition-normal);
}

.hamburger:nth-child(1) {
    transform: rotate(0deg);
    transition: transform var(--transition-normal) ease;
}

.hamburger:nth-child(2) {
    width: 18px;
    margin-left: auto;
}

.hamburger:nth-child(3) {
    transform: rotate(0deg);
    transition: transform var(--transition-normal) ease;
}

/* Mobile Menu Active State */
.mobile-menu-toggle[aria-expanded="true"] .hamburger:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger:nth-child(3) {
    transform: rotate(-45deg);
}

/* =========================================
   Hero Section (Index Module)
   ========================================= */
.hero-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--space-3xl) 0;
    text-align: center;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    line-height: 1.2;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: var(--space-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-section a.hero-btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all var(--transition-normal);
    font-size: 1rem;
}

.hero-section a.hero-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin-top: var(--space-xl);
    box-shadow: var(--shadow-xl);
}

/* =========================================
   News Section
   ========================================= */
.news-section {
    padding: var(--space-3xl) 0;
    background: white;
}

.news-section h2 {
    font-size: 2rem;
    margin-bottom: var(--space-xl);
    text-align: center;
    color: var(--dark);
}

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

.news-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-content {
    padding: var(--space-lg);
}

.news-content .news-date {
    font-size: 0.8125rem;
    color: var(--secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--dark);
}

.news-content p {
    color: var(--secondary-dark);
    margin-bottom: var(--space-md);
}

.news-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
}

.news-link::after {
    content: '→';
    margin-left: var(--space-xs);
    transition: transform var(--transition-fast);
}

.news-link:hover::after {
    transform: translateX(4px);
}

/* =========================================
   Show Module Section
   ========================================= */
.show-section {
    padding: var(--space-3xl) 0;
    background: var(--light);
}

.show-section h2, .show-section h3 {
    font-size: 2rem;
    margin-bottom: var(--space-xl);
    text-align: center;
    color: var(--dark);
}

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

.show-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border);
}

.show-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.show-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.show-card:hover img {
    transform: scale(1.05);
}

.show-content {
    padding: var(--space-lg);
}

.show-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--dark);
}

.show-content p {
    color: var(--secondary-dark);
}

/* =========================================
   Show Detail View
   ========================================= */
.show-detail {
    max-width: 900px;
    margin: 0 auto;
}

.show-detail h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    color: var(--dark);
}

.show-detail .show-subtitle {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: var(--space-2xl);
    font-weight: 500;
}

.show-detail .show-text {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.show-detail .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.show-detail .gallery-item {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.show-detail .gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.show-detail .gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.show-detail .gallery-item:hover img {
    transform: scale(1.05);
}

.show-detail .downloads-section {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.show-detail .downloads-section h3 {
    margin-bottom: var(--space-lg);
    color: var(--dark);
}

.show-detail .download-item {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    text-decoration: none;
    color: var(--dark);
    transition: all var(--transition-fast);
    background: white;
}

.show-detail .download-item:hover {
    border-color: var(--primary);
    background: var(--light);
    padding-left: calc(var(--space-md) + 8px);
}

.show-detail .download-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.show-detail .download-icon svg {
    width: 20px;
    height: 20px;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: var(--space-2xl) 0 var(--space-md);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-xl);
}

.footer-section h4.footer-heading {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.footer-text {
    font-size: 0.9375rem;
    line-height: 1.6;
}

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

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
}

.footer-copyright {
    font-size: 0.875rem;
    color: #64748b;
}

/* =========================================
   Utility Classes
   ========================================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .news-grid, .show-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .site-header {
        padding: var(--space-sm) 0;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: var(--space-md);
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav .nav-link {
        padding: var(--space-md);
    }

    .mobile-menu-toggle[aria-expanded="true"] + .main-nav {
        display: flex;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1.125rem;
    }

    .news-grid, .show-grid {
        grid-template-columns: 1fr;
    }

    .show-detail h1 {
        font-size: 2rem;
    }

    .show-detail .show-subtitle {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .hero-section {
        padding: var(--space-2xl) 0;
    }

    .hero-section h2 {
        font-size: 1.75rem;
    }

    .news-section, .show-section {
        padding: var(--space-xl) 0;
    }
}