/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --radius: 8px;
}

body {
    font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}
.site-logo { font-size: 22px; font-weight: 800; color: var(--text); }
.site-logo img { max-height: 44px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    padding: 8px 14px;
    color: var(--text);
    font-weight: 500;
    border-radius: 6px;
    transition: background .2s;
}
.main-nav a:hover { background: var(--bg-alt); color: var(--primary); }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 24px;
    color: var(--text);
}

/* Hero / Ads carousel */
.hero-ads {
    background: var(--bg-alt);
    padding: 32px 0;
}
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.ad-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: block;
    color: inherit;
}
.ad-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: inherit; }
.ad-card img { width: 100%; height: 200px; object-fit: cover; }
.ad-card-body { padding: 16px; }
.ad-card h3 { font-size: 18px; margin-bottom: 6px; color: var(--text); }
.ad-card p { color: var(--text-light); font-size: 14px; }

/* Sections */
.section { padding: 48px 0; }
.section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

/* Blog cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.post-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-alt);
}
.post-card-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .3s;
}
.post-card:hover .post-card-image img { transform: scale(1.05); }
.post-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.post-category {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.post-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.4;
}
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--primary); }
.post-summary { color: var(--text-light); font-size: 14px; flex: 1; }
.post-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
}

/* Article detail */
.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 0;
}
.article-header { margin-bottom: 24px; }
.article h1 { font-size: 32px; line-height: 1.2; margin-bottom: 12px; }
.article-meta {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}
.article-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}
.article-content {
    font-size: 17px;
    line-height: 1.8;
}
.article-content p { margin-bottom: 18px; }
.article-content img { border-radius: var(--radius); margin: 20px 0; }
.article-content h2, .article-content h3 { margin: 24px 0 12px; }

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.08); }

/* Footer */
.site-footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 40px 0 20px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 { color: #fff; margin-bottom: 14px; font-size: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #d1d5db; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    font-size: 14px;
    color: #9ca3af;
}

/* Mobile */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 0;
        border-bottom: 1px solid var(--border);
        transform: translateY(-110%);
        transition: transform .3s;
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav a { padding: 12px 16px; border-radius: 0; }
    .section { padding: 32px 0; }
    .section-title { font-size: 22px; }
    .article h1 { font-size: 24px; }
    .article-content { font-size: 16px; }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 95%; max-height: 95vh; }
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    background: none;
    border: none;
}

/* Breadcrumb */
.breadcrumb {
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 30px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
