/* ============================================================
   CUSTOM THEME STYLES
   Header, Homepage, Category, Footer
   ============================================================ */

/* ---- Reset base ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    background: #f4f6f8;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: #0d0d0d;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 64px;
    position: relative;
}

/* Logo */
.site-logo {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.3px;
    flex-shrink: 0;
    line-height: 1;
}

.site-logo span {
    color: #f59e0b;
}

/* Nav */
.header-nav {
    flex: 1;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    padding: 3px 12px;
    color: #d1d5db;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    line-height: 1;
    border: 1.5px solid transparent;
}

.nav-menu li a:hover {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    border-color: rgba(245,158,11,0.3);
}

.nav-menu li a.active {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

/* Burger */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}

.burger-btn:hover,
.burger-btn:focus-visible {
    background: rgba(255,255,255,0.1);
    outline: none;
}

.burger-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.25s ease;
    transform-origin: center;
}

.burger-btn.is-open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.burger-btn.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger-btn.is-open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile menu */
@media (max-width: 900px) {
    .burger-btn {
        display: flex;
    }

    .header-nav {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #111827;
        border-top: 1px solid #1f2937;
        padding: 0 16px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
    }

    .header-nav.is-open {
        max-height: 80vh;
        overflow-y: auto;
        opacity: 1;
        pointer-events: auto;
        padding: 12px 16px 16px;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-menu li a {
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 14px;
        border-color: #1f2937;
        justify-content: flex-start;
    }
}

/* ============================================================
   HOMEPAGE
   ============================================================ */
.site-main {
    padding: 32px 0 48px;
}

.hp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

/* Post card */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.post-card__thumb {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
}

.post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.post-card:hover .post-card__thumb img {
    transform: scale(1.04);
}

.post-card__thumb--placeholder {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.post-card__body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.post-card__cat {
    display: inline-block;
    padding: 3px 10px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s;
}

.post-card__cat:hover {
    background: #16a34a;
    color: #fff;
}

.post-card__date {
    font-size: 12px;
    color: #9ca3af;
}

.post-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.post-card__title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.post-card__title a:hover {
    color: #f59e0b;
}

.post-card__excerpt {
    font-size: 13.5px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #f59e0b;
    text-decoration: none;
    margin-top: 4px;
    transition: gap 0.2s, color 0.2s;
}

.post-card__more:hover {
    gap: 8px;
    color: #d97706;
}

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.cat-main {
    padding-bottom: 48px;
}

.cat-hero {
    background: linear-gradient(135deg, #0d0d0d 0%, #1f2937 100%);
    color: #fff;
    padding: 36px 20px 32px;
    margin-bottom: 32px;
}

.cat-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.breadcrumbs a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #f59e0b;
}

.cat-hero__title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.cat-hero__desc {
    font-size: 15px;
    color: #9ca3af;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.cat-hero__meta {
    font-size: 13px;
    color: #6b7280;
}

.cat-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

/* Category cards grid */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cat-grid .cat-card:first-child {
    grid-column: 1 / -1;
    grid-template-columns: 420px 1fr;
}

.cat-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s, transform 0.2s;
}

.cat-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.cat-grid .cat-card:not(:first-child) {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
}

.cat-card__thumb {
    display: block;
    overflow: hidden;
    background: #f3f4f6;
}

.cat-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.cat-card:hover .cat-card__thumb img {
    transform: scale(1.05);
}

.cat-grid .cat-card:not(:first-child) .cat-card__thumb {
    height: 180px;
}

.cat-card__no-img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card__body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cat-card__date {
    font-size: 12px;
    color: #9ca3af;
}

.cat-card__sep {
    color: #d1d5db;
    font-size: 12px;
}

.cat-card__author {
    font-size: 12px;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.cat-card__author:hover {
    color: #16a34a;
}

.cat-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.cat-grid .cat-card:first-child .cat-card__title {
    font-size: 22px;
}

.cat-card__title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.cat-card__title a:hover {
    color: #f59e0b;
}

.cat-card__excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.cat-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.cat-card__tag {
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 4px;
    padding: 2px 7px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.cat-card__tag:hover {
    background: #fef3c7;
    color: #d97706;
}

.cat-card__read {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #f59e0b;
    text-decoration: none;
    transition: gap 0.2s, color 0.2s;
}

.cat-card__read:hover {
    gap: 7px;
    color: #d97706;
}

/* Empty state */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #6b7280;
    font-size: 15px;
}

.no-posts a {
    color: #16a34a;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.no-posts a:hover {
    color: #f59e0b;
}

/* ============================================================
   PAGINATION (shared)
   ============================================================ */
.pagination {
    margin-top: 32px;
}

.pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.pagination .page-numbers li > * {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1.5px solid #e5e7eb;
    transition: all 0.2s;
}

.pagination .page-numbers li > a:hover {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}

.pagination .page-numbers li > .current {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.pagination .page-numbers li > .dots {
    border: none;
    background: transparent;
}

/* ============================================================
   SIDEBAR (shared)
   ============================================================ */
.hp-sidebar,
.cat-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.sidebar-widget__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #374151;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

/* Popular posts */
.popular-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.popular-item__link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    padding: 6px;
    transition: background 0.2s;
}

.popular-item__link:hover {
    background: #f9fafb;
}

.popular-item__rank {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.popular-item:first-child .popular-item__rank {
    background: #fef3c7;
    color: #d97706;
}

.popular-item__thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}

.popular-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popular-item__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.popular-item__title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.popular-item__link:hover .popular-item__title {
    color: #f59e0b;
}

.popular-item__date {
    font-size: 11px;
    color: #9ca3af;
}

/* Category list */
.cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cat-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cat-list__item a {
    font-size: 13.5px;
    color: #374151;
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 6px;
    flex: 1;
    transition: background 0.2s, color 0.2s;
}

.cat-list__item a:hover {
    background: #f0fdf4;
    color: #16a34a;
}

.cat-list__count {
    font-size: 11px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 20px;
    padding: 2px 8px;
    flex-shrink: 0;
}

.no-popular {
    color: #6b7280;
    font-size: 14px;
    text-align: center;
    padding: 12px 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #0d0d0d;
    color: #9ca3af;
    padding: 40px 24px 28px;
    margin-top: 48px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.3px;
    transition: color 0.2s;
}

.footer-logo:hover {
    color: #f59e0b;
}

.footer-tagline {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    max-width: 260px;
}

.footer-cats {
    text-align: center;
}

.footer-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin: 0 0 12px;
}

.footer-cats ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.footer-cats li a {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid #1f2937;
    border-radius: 20px;
    transition: border-color 0.2s, color 0.2s;
}

.footer-cats li a:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

.footer-copy {
    text-align: right;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.footer-copy a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-copy a:hover {
    color: #f59e0b;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .cat-container {
        grid-template-columns: 1fr;
    }

    .cat-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .sidebar-widget {
        flex: 1;
        min-width: 240px;
    }
}

@media (max-width: 960px) {
    .hp-container {
        grid-template-columns: 1fr;
    }

    .hp-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
}

/* Small tablet */
@media (max-width: 768px) {
    .cat-grid {
        grid-template-columns: 1fr;
    }

    .cat-grid .cat-card:first-child {
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    .cat-grid .cat-card:first-child .cat-card__thumb {
        height: 220px;
    }

    .cat-card {
        grid-template-columns: 1fr;
    }

    .cat-card__thumb {
        height: 180px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-tagline {
        max-width: 100%;
    }

    .footer-copy {
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .hp-container {
        padding: 0 12px;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-card__thumb {
        height: 200px;
    }

    .post-card__body {
        padding: 14px 16px;
    }

    .post-card__title {
        font-size: 15px;
    }

    .hp-sidebar {
        flex-direction: column;
    }

    .sidebar-widget {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .cat-container,
    .cat-hero {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cat-sidebar {
        flex-direction: column;
    }

    .cat-hero {
        padding-top: 24px;
        padding-bottom: 20px;
    }
}
.related-posts {
    margin-top: 30px;
}

.related-posts h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.related-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-item h4 {
    padding: 10px;
    font-size: 14px;
    color: #111;
}

.related-item a {
    text-decoration: none;
}
    .single-container {
        max-width: 1100px;
        margin: 30px auto;
        padding: 0 15px;
        display: flex;
        gap: 25px;
    }

    /* MAIN */
    .single-content {
        flex: 3;
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .single-title {
        font-size: 28px;
        margin-bottom: 10px;
        color: #111;
    }

    .single-meta {
        font-size: 13px;
        color: #666;
        margin-bottom: 15px;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .single-meta a {
        color: #01AA19;
        text-decoration: none;
    }

    .single-meta a:hover {
        color: #ffb100;
    }

    .single-thumb img {
        width: 100%;
        height: auto;
        border-radius: 10px;
        margin-bottom: 15px;
    }

    .single-content p {
        line-height: 1.7;
        margin-bottom: 15px;
        color: #333;
    }

    .single-tags {
        margin-top: 20px;
    }

    .single-tags a {
        display: inline-block;
        padding: 5px 10px;
        margin: 3px;
        font-size: 12px;
        background: #f3f3f3;
        border-radius: 5px;
        text-decoration: none;
        color: #333;
    }

    .single-tags a:hover {
        background: #ffb100;
        color: #000;
    }

    /* SIDEBAR */
    .single-sidebar {
        flex: 1;
    }

    .widget {
        background: #fff;
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .widget h3 {
        margin-bottom: 10px;
        font-size: 16px;
    }

    .rec-item {
        display: flex;
        gap: 10px;
        margin-bottom: 10px;
    }

    .rec-item img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 6px;
    }

    .rec-item a {
        font-size: 14px;
        text-decoration: none;
        color: #111;
    }

    .rec-item a:hover {
        color: #ffb100;
    }

    /* RESPONSIVE */
    @media (max-width: 900px) {
        .single-container {
            flex-direction: column;
        }

        .single-title {
            font-size: 22px;
        }
    }