/* =========================================
   Global Category Archive Styles
========================================= */

.hyway-category-archive .hyway-home__section {
    min-height: 80vh;
    padding-top: 80px;
}

.hyway-category-archive h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: capitalize;
}

/* Base style for all category cards to ensure consistency */
.hyway-category-archive .article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid transparent; /* Placeholder for dynamic borders */
}

.hyway-category-archive .article-card:hover {
    transform: translateY(-5px);
}

/* =========================================
   Category-Specific Color Themes
========================================= */

/* 1. SECONDMENTS (Blue/Travel Vibe) */
.hyway-cat-secondment .hyway-home__section { background-color: #f0f7f9; }
.hyway-cat-secondment h1 { color: #005a87; }
.hyway-cat-secondment .hyway-home__kicker { color: #0073aa; }
.hyway-cat-secondment .article-card { border-top-color: #0073aa; }

/* 2. TRAINING & EDUCATION (Orange/Action Vibe) */
.hyway-cat-training .hyway-home__section { background-color: #fffaf5; }
.hyway-cat-training h1 { color: #8e4403; }
.hyway-cat-training .hyway-home__kicker { color: var(--logo-orange-color); }
.hyway-cat-training .article-card { border-top-color: var(--logo-orange-color); }

/* 3. SCIENTIFIC INSIGHTS (Brand Green/Technical Vibe) */
.hyway-cat-research .hyway-home__section { background-color: #f4f8f7; }
.hyway-cat-research h1 { color: var(--logo-green-color); }
.hyway-cat-research .hyway-home__kicker { color: #2d6a7a; }
.hyway-cat-research .article-card { border-top-color: var(--logo-green-color); }

/* 4. SEMINARS & TALKS (Teal/Media Vibe) */
.hyway-cat-seminar .hyway-home__section { background-color: #f9fdfd; }
.hyway-cat-seminar h1 { color: #1a4d4d; }
.hyway-cat-seminar .hyway-home__kicker { color: #20b2aa; }
.hyway-cat-seminar .article-card { border-top-color: #20b2aa; }

/* 5. CONSORTIUM NEWS (Grey/Formal Vibe) */
.hyway-cat-consortium .hyway-home__section { background-color: #f8f9fa; }
.hyway-cat-consortium h1 { color: #343a40; }
.hyway-cat-consortium .hyway-home__kicker { color: #6c757d; }
.hyway-cat-consortium .article-card { border-top-color: #adb5bd; }

/* 6. OUTREACH & IMPACT (Bright Green/Sustainability Vibe) */
.hyway-cat-outreach .hyway-home__section { background-color: #fafff8; }
.hyway-cat-outreach h1 { color: #2e4d2e; }
.hyway-cat-outreach .hyway-home__kicker { color: #4caf50; }
.hyway-cat-outreach .article-card { border-top-color: #81c784; }

/* =========================================
   Empty State Styling
========================================= */
.hyway-home__empty-text {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    font-size: 1.2rem;
    color: var(--hyway-home-muted);
    font-style: italic;
    background: #fff;
    border-radius: 15px;
    border: 2px dashed #e1e4e8;
}

/* =========================================
   Archive Layout & Sidebar
========================================= */

/* Creates the CSS Grid for Desktop */
.hyway-archive-layout {
    display: grid;
    grid-template-columns: 1fr 320px; /* Main content takes remaining space, sidebar is 320px */
    gap: 50px;
    align-items: start; /* Prevents the sidebar from stretching to the bottom */
}

/* Sidebar Widgets */
.hyway-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(34, 87, 102, 0.05);
}

.hyway-widget-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    color: var(--logo-green-color, #225766);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--background-color5-off-white, #f4f5f8);
}

/* Category List Widget Styling */
.hyway-widget-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hyway-widget-categories li {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hyway-widget-categories a {
    color: var(--hyway-home-muted, #555555);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.hyway-widget-categories a:hover {
    color: var(--logo-orange-color, #b85804);
}

/* The post count numbers generated by WordPress */
.hyway-widget-categories .count {
    background: var(--background-color5-off-white, #f4f5f8);
    color: var(--logo-green-color, #225766);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

/* Recent Posts Widget Styling */
.hyway-recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hyway-recent-post-item {
    display: flex;
    gap: 15px;
    align-items: center;
    text-decoration: none;
    group-hover: transform;
}

.hyway-recent-post-item:hover h4 {
    color: var(--logo-orange-color, #b85804);
}

.hyway-recent-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.hyway-recent-info h4 {
    font-size: 0.95rem;
    color: #333;
    margin: 0 0 5px 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.hyway-recent-info .hyway-recent-date {
    font-size: 0.8rem;
    color: #888;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .hyway-archive-layout {
        grid-template-columns: 1fr; /* Stacks the sidebar under the cards on mobile */
        gap: 30px;
    }
}