/* ============================================
   Category Archive Styles
   Matches design-guide.md values
   Enqueue this file from functions.php
   ============================================ */

.plant-archive-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    font-family: 'Inter', sans-serif;
    color: #1A1A1A;
}

/* ---- Section 1: Title block ---- */
.archive-title-block {
    padding: 48px 0 24px;
}
.archive-title-block h1 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 8px;
}
.archive-title-block p {
    font-size: 15px;
    color: #6B6B6B;
    margin: 0;
}

/* ---- Section 2: Category tabs ---- */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    border-bottom: 1px solid #E5E5E5;
    padding-bottom: 12px;
    margin-bottom: 32px;
}
.category-tabs .tab,
.plant-archive-wrap .category-tabs button.tab {
    /* Reset native <button> appearance — !important needed to beat theme/global button styles */
    background: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;

    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
    text-decoration: none;
    padding: 0 0 12px !important;
    margin: 0;
}
.category-tabs .tab:hover,
.plant-archive-wrap .category-tabs button.tab:hover {
    color: #0F1C3D;
}
.category-tabs .tab.active,
.plant-archive-wrap .category-tabs button.tab.active {
    color: #0F1C3D;
    border-bottom: 2px solid #0F1C3D !important;
}

/* ---- Shared: category label ---- */
.category-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0F1C3D;
    margin-bottom: 8px;
}
.meta {
    display: block;
    font-size: 13px;
    color: #6B6B6B;
}

/* ---- Section 3: Hero + Sidebar (page 1 only) ---- */
.hero-sidebar-row {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.hero-col {
    flex: 1 1 60%;
}
.hero-card {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.hero-card:hover {
    border-color: #0F1C3D;
    box-shadow: 0 10px 24px rgba(15,28,61,0.1);
    transform: translateY(-2px);
}
.hero-image {
    flex: 0 0 42%;
    overflow: hidden;
    border-radius: 4px;
}
.hero-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0;
    display: block;
    transition: transform 0.3s ease;
}
.hero-card:hover .hero-image img {
    transform: scale(1.04);
}
.hero-card:hover h2 {
    color: #2563EB;
}
.hero-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.hero-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 8px;
}
.hero-card .excerpt {
    font-size: 15px;
    color: #444;
    margin: 0 0 8px;
}
.hero-card .read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding: 10px 18px;
    border: 1px solid #0F1C3D;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #0F1C3D;
    width: fit-content;
}
.hero-card:hover .read-more-btn {
    background: #0F1C3D;
    color: #fff;
}
.hero-card .read-more-btn .arrow {
    font-size: 16px;
}

/* Stack the hero image above the text again on narrow screens */
@media (max-width: 900px) {
    .hero-card {
        flex-direction: column;
    }
    .hero-image {
        flex-basis: auto;
        width: 100%;
    }
}

.sidebar-col {
    flex: 1 1 35%;
    display: flex;
    flex-direction: column;
}
.sidebar-item {
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    padding: 16px 0;
    border-radius: 8px;
    border: 1px solid transparent;
    border-bottom: 1px solid #E5E5E5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}
.sidebar-item:hover {
    border-color: #0F1C3D;
    background: #FAFBFC;
    box-shadow: 0 6px 18px rgba(15,28,61,0.08);
    transform: translateY(-2px);
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
}
.sidebar-item:hover h3 {
    color: #2563EB;
}
.sidebar-item:last-child {
    border-bottom: none;
}
.sidebar-thumb {
    overflow: hidden;
    border-radius: 4px;
}
.sidebar-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: transform 0.25s ease;
}
.sidebar-item:hover .sidebar-thumb img {
    transform: scale(1.06);
}
.sidebar-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    margin: 0 0 4px;
}

/* ---- Section 3.5: Latest News heading ---- */
.latest-news-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.latest-news-heading-row h2 {
    font-family: 'Playfair Display', serif;
    font-size: 40px;
    font-weight: 700;
    color: #0F1C3D;
    margin: 8px 0 24px;
}
.date-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #1A1A1A;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    height: fit-content;
}
.date-filter:hover {
    border-color: #0F1C3D;
}
.date-filter .chev {
    font-size: 12px;
    color: #6B6B6B;
}

/* ---- Section 4: Grid + Most Read ---- */
.grid-mostread-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.grid-col {
    flex: 1 1 68%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    align-content: start;
}
.grid-item {
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    padding: 16px 0;
    border-radius: 8px;
    border: 1px solid transparent;
    border-bottom: 1px solid #E5E5E5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}
.grid-item:hover {
    border-color: #0F1C3D;
    background: #FAFBFC;
    box-shadow: 0 6px 18px rgba(15,28,61,0.08);
    transform: translateY(-2px);
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
}
.grid-item:hover h3 {
    color: #2563EB;
}
.pagination {
    grid-column: 1 / -1; /* span both columns */
}
.grid-thumb {
    overflow: hidden;
    border-radius: 4px;
    width: 70%;
}
.grid-thumb img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: transform 0.25s ease;
}
.grid-item:hover .grid-thumb img {
    transform: scale(1.06);
}
.grid-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    margin: 0 0 4px;
}

.mostread-col {
    flex: 1 1 28%;
}
.mostread-box {
    background: #F7F8FA;
    padding: 24px;
    border-radius: 4px;
}
.mostread-box h4 {
    font-size: 14px;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
    color: #0F1C3D;
}

/* Numbered "01 / 02 / 03" style via CSS counters — no JS needed */
.mostread-box ol {
    list-style: none;
    padding-left: 0;
    margin: 0;
    counter-reset: mostread;
}
.mostread-box li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}
.mostread-box li:last-child {
    margin-bottom: 0;
}
.mostread-box li::before {
    counter-increment: mostread;
    content: counter(mostread, decimal-leading-zero);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 20px;
    color: #0F1C3D;
    line-height: 1.1;
    flex: 0 0 auto;
}
.mostread-box a {
    color: #1A1A1A;
    text-decoration: none;
    transition: color 0.15s ease;
}
.mostread-box a:hover {
    color: #2563EB;
}

/* ---- Full-width newsletter bar (replaces old sidebar newsletter-box) ---- */
.newsletter-bar {
    background: #0F1C3D;
    color: #fff;
    border-radius: 4px;
    margin-top: 24px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.newsletter-bar-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1 1 420px;
}
.newsletter-bar-icon {
    font-size: 15px;
    background: rgba(255,255,255,0.1);
    padding: 6px;
    border-radius: 4px;
    flex: 0 0 auto;
}
.newsletter-bar h4 {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 4px;
}
.newsletter-bar-left p {
    max-width: 460px;
    font-size: 12px;
    color: #C7CEDC;
    margin: 0 0 2px;
    line-height: 1.4;
}
.newsletter-bar-sub {
    font-size: 12px;
    color: #C7CEDC;
}
.newsletter-bar-form {
    display: flex;
    gap: 8px;
    flex: 0 1 380px;
}
.newsletter-bar-input {
    flex: 1 1 auto;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}
.newsletter-bar-submit {
    flex: 0 0 auto;
    padding: 8px 16px;
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.newsletter-bar-submit:hover {
    background: #1D4ED8;
}
@media (max-width: 700px) {
    .newsletter-bar-form {
        flex-direction: column;
        width: 100%;
    }
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pagination .page-numbers:hover {
    border-color: #0F1C3D;
}

.pagination .page-numbers.current {
    background: #0F1C3D;
    border-color: #0F1C3D;
    color: #fff;
    box-shadow: none;
}

.pagination .page-numbers.dots {
    border: none;
    box-shadow: none;
    background: transparent;
    color: #6B6B6B;
    min-width: auto;
    padding: 0 2px;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    color: #1A1A1A;
}

.pagination .page-numbers.disabled {
    opacity: 0.4;
    pointer-events: none;
}
/* ---- Mobile ---- */
@media (max-width: 768px) {
    .hero-sidebar-row,
    .grid-mostread-row {
        flex-direction: column;
    }
    .archive-title-block h1 {
        font-size: 30px;
    }
}