/* ===== CSS Variables ===== */
:root {
    --primary: #E87530;
    --primary-dark: #D06020;
    --secondary: #3A3D42;
    --accent: #2B8C8C;
    --bg-white: #FFFFFF;
    --bg-light: #F5F6F8;
    --text: #333333;
    --text-light: #666666;
    --border: #E0E0E0;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-white);
    line-height: 1.7;
    font-size: 16px;
}

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

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.7rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

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

/* ===== Header ===== */
.site-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.site-logo { display: flex; align-items: center; }
.logo-img { height: 50px; width: auto; }

.nav-list {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-list li a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--secondary);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-list li a:hover,
.nav-list li.current-menu-item a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger { position: relative; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* ===== Hero Section ===== */
.hero-section {
    background: var(--secondary);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    background: linear-gradient(135deg, rgba(58,61,66,0.9) 0%, rgba(232,117,48,0.7) 100%);
    padding: 80px 0;
}

.hero-content h1 {
    color: #fff;
    font-size: 2.6rem;
    font-weight: 800;
    max-width: 700px;
}

.hero-image {
    margin-top: 30px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* ===== Sections ===== */
.intro-section,
.featured-articles,
.more-articles,
.categories-section,
.cta-section {
    padding: 60px 0;
}

.featured-articles { background: var(--bg-light); }
.more-articles { background: var(--bg-white); }
.categories-section { background: var(--bg-light); }

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 12px auto 0;
}

/* ===== Post Grid ===== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.post-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 20px;
}

.post-card-cat {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.post-card-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.post-card-title a {
    color: var(--secondary);
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.read-more {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== Category Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    display: block;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.cat-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #2a2d32 100%);
    color: #fff;
    text-align: center;
}

.cta-inner h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 12px;
}

.cta-inner p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    opacity: 0.9;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ===== Single Post ===== */
.single-hero img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
}

.single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding-top: 30px;
    padding-bottom: 60px;
    align-items: start;
}

.single-main {
    min-width: 0;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.breadcrumbs a { color: var(--primary); }

.single-cat {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.single-header h1 {
    font-size: 2.4rem;
    margin-bottom: 24px;
}

.single-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.single-content h2 {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.single-content h3 { margin-top: 1.5rem; }

.single-content p { margin-bottom: 1.2rem; }

.single-content ul, .single-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.single-content li { margin-bottom: 0.4rem; }

.single-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 1.5rem 0;
    background: var(--bg-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.related-posts {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

/* ===== Sidebar ===== */
.single-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-widget h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.sidebar-post {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.sidebar-post:last-child { margin-bottom: 0; }

.sidebar-post-img img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
}

.sidebar-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.4;
    display: block;
}

.sidebar-post-title:hover { color: var(--primary); }

.sidebar-cats {
    list-style: none;
}

.sidebar-cats li {
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.sidebar-cats li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.sidebar-cats a {
    color: var(--text);
    font-size: 0.9rem;
}

.sidebar-cats a:hover { color: var(--primary); }

.sidebar-cta {
    background: linear-gradient(135deg, var(--secondary) 0%, #2a2d32 100%);
    color: #ccc;
    text-align: center;
}

.sidebar-cta h3 {
    color: #fff;
    border-bottom-color: var(--primary);
}

.sidebar-cta p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.btn-sm {
    padding: 10px 24px;
    font-size: 0.9rem;
}

/* ===== Page ===== */
.page-content-wrap {
    max-width: 900px;
    padding-top: 30px;
    padding-bottom: 60px;
}

.page-hero img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.page-title {
    margin-bottom: 24px;
}

.page-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.page-content p { margin-bottom: 1.2rem; }

/* ===== Archive ===== */
.archive-wrap {
    padding-top: 30px;
    padding-bottom: 60px;
}

.archive-header {
    margin-bottom: 30px;
}

.archive-header h1 {
    font-size: 2rem;
}

.archive-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-top: 8px;
}

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.error-404 p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.search-404 {
    margin-top: 40px;
}

/* ===== Search Form ===== */
.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 1rem;
    font-family: var(--font-body);
}

.search-field:focus {
    outline: none;
    border-color: var(--primary);
}

.search-submit {
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.search-submit:hover {
    background: var(--primary-dark);
}

/* ===== Pagination ===== */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination a, .pagination span {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 600;
}

.pagination .current {
    background: var(--primary);
    color: #fff;
}

.pagination a:hover {
    background: var(--bg-light);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--secondary);
    color: #ccc;
    padding-top: 50px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.footer-col a {
    color: #ccc;
}

.footer-col a:hover {
    color: var(--primary);
}

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

.footer-nav li {
    margin-bottom: 8px;
}

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

.footer-posts li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        padding: 20px;
    }

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

    .nav-list {
        flex-direction: column;
        gap: 12px;
    }

    h1 { font-size: 1.8rem; }
    .hero-content h1 { font-size: 2rem; }
    .single-header h1 { font-size: 1.8rem; }

    .hero-overlay { padding: 50px 0; }

    .single-layout { grid-template-columns: 1fr; }
    .single-sidebar { position: static; }

    .post-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }

    .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: 1fr; }
}
