/* General styles adapted from your site */
:root {
    --bg: #0b0b0b;
    --panel: #111;
    --card: #141414;
    --text: #f2f2f2;
    --muted: #b8b8b8;
    --brand: #d11b1b;
    --brand-700: #a41515;
    --border-color: #1f1f1f;
    --radius: 16px;
    --shadow: 0 10px 25px rgba(0,0,0,.25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    line-height: 1.2;
}

.container {
    width: min(100%, 1100px);
    margin-inline: auto;
    padding: clamp(16px, 3vw, 32px);
}

/* Header - Reusing your existing site's styles */
/* NOTE: The header uses the main styles.css for its mobile-first logic */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    letter-spacing: .2px;
}

.nav {
    display: none; /* Hidden by default on mobile, handled by main.js */
    flex-direction: column;
    gap: 8px;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background-color 0.2s;
}

.nav a:hover, .nav a.active {
    background: #1b1b1b;
    text-decoration: none;
}

.nav a.active {
    background-color: var(--brand);
    color: white;
}


/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2rem 1rem;
}
.hero-section h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
}
.hero-section p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 65ch;
    margin: auto;
}

/* Features Layout */
.features-grid {
    display: grid;
    gap: 2rem;
}

.feature-card {
    background: var(--bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.feature-card h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.feature-description {
    color: var(--muted);
    margin-bottom: 1.5rem;
}
.showcase-box {
    background: var(--card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
}

/* Accordion Styles */
.accordion-item {
    border-bottom: 1px solid var(--border-color);
}
.accordion-item:last-child {
    border-bottom: none;
}
.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 0;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}
.accordion-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease-out;
    flex-shrink: 0; /* Prevents icon from shrinking */
}
.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.accordion-content p {
    padding: 0 0 1rem 0;
    margin: 0;
    color: var(--muted);
}

/* Tab Styles */
.tab-buttons {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    gap: 0.5rem;
    background-color: var(--panel);
    padding: 0.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}
.tab-btn {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: none;
    background: none;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}
.tab-btn.active {
    background-color: var(--brand);
    color: white;
}
.tab-content h3 {
    margin-top: 0;
}
.tab-content p {
    color: var(--muted);
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns on mobile */
    gap: 1rem;
}
.gallery-img {
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: opacity 0.3s;
}
.gallery-img:hover {
    opacity: 0.8;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-content {
    position: relative;
}
.modal-close-btn {
    position: absolute;
    top: -2.5rem;
    right: -1rem;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}
#modalImage {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
}

/* Data Fetching Skeleton Loader */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1rem;
}
.article-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}
.article-card h3 {
    margin-top: 0;
}
.article-card p {
    color: var(--muted);
}
.article-skeleton {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.skeleton-line {
    height: 1rem;
    background-color: var(--panel);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}
.skeleton-line.title {
    width: 75%;
    height: 1.5rem;
}
.skeleton-line.short {
    width: 85%;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* Form Styles */
.form-grid {
    display: grid;
    gap: 1rem; /* Reduced gap for mobile */
}
#contactForm div {
    margin-bottom: 1rem;
}
#contactForm label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
#contactForm input,
#contactForm textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
}
#contactForm input:focus,
#contactForm textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(209, 27, 27, 0.3);
}
.error-message {
    color: #ef4444; /* Red-500 */
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
.form-message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}
.form-message.success {
    background-color: rgba(22, 163, 74, 0.1); /* Green-700 with opacity */
    color: #16a34a;
    border: 1px solid #16a34a;
}
.form-footer {
    text-align: right;
    margin-bottom: 0;
}
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    box-shadow: var(--shadow);
    background: var(--brand);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn:hover {
    background: var(--brand-700);
}

/* Footer - Reusing your existing site's styles */
.site-footer {
    padding: 32px 16px;
    background: #090909;
    border-top: 1px solid #1a1a1a;
    text-align: center;
    color: var(--muted);
    margin-top: 3rem;
}
.site-footer a {
    color: var(--text);
}

/* Utility */
.hidden {
    display: none;
}

/* ======================================= */
/* MEDIA QUERY FOR DESKTOP        */
/* ======================================= */
@media (min-width: 768px) {
    .nav {
        display: flex; /* Show nav on desktop */
        flex-direction: row;
    }

    .hero-section {
        padding: 4rem 1rem;
    }

    .showcase-box {
        padding: 1.5rem;
    }

    .tab-buttons {
        flex-direction: row; /* Side-by-side on desktop */
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
    }

    .articles-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
    }

    .form-grid {
        grid-template-columns: 1fr 1fr; /* 2 columns on desktop */
        gap: 1.5rem;
    }
}
