/*
Theme Name: Popol Theme
Theme URI: https://popol.eu
Author: popol.eu
Description: Custom theme for popol.eu — Recepten, Fietsen, Reizen & Meer
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: popol-theme
Tags: blog, custom-menu, featured-images, responsive-layout, translation-ready
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --color-primary:     #3937A3;
    --color-primary-dk:  #2b2980;
    --color-primary-lt:  #5553C5;
    --color-accent:      #0DA3C2;
    --color-accent-dk:   #0b86a0;
    --color-coral:       #FE7D60;
    --color-bg:          #F5F5FA;
    --color-bg-card:     #FFFFFF;
    --color-text:        #2d2d3a;
    --color-text-muted:  #6b6b80;
    --color-border:      #E2E2EE;
    --color-sidebar-bg:  #1e1c6e;
    --color-sidebar-txt: #e8e8ff;
    --color-sidebar-hover: rgba(255,255,255,0.12);
    --sidebar-width:     260px;
    --header-height:     64px;
    --radius:            8px;
    --radius-lg:         14px;
    --shadow-sm:         0 1px 4px rgba(57,55,163,0.07);
    --shadow-md:         0 4px 16px rgba(57,55,163,0.12);
    --shadow-lg:         0 8px 32px rgba(57,55,163,0.16);
    --font-body:         'Inter', 'Roboto', system-ui, -apple-system, sans-serif;
    --font-heading:      'Inter', 'Roboto', system-ui, -apple-system, sans-serif;
    --transition:        0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.65;
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-primary-dk);
    margin-bottom: 0.6em;
}
h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.1em; }
ul, ol { padding-left: 1.5em; margin-bottom: 1em; }
li { margin-bottom: 0.3em; }

blockquote {
    border-left: 4px solid var(--color-accent);
    padding: 0.8em 1.2em;
    background: rgba(13,163,194,0.07);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    margin: 1.5em 0;
}

code, pre {
    font-family: 'Fira Code', 'Consolas', monospace;
    background: rgba(57,55,163,0.06);
    border-radius: 4px;
}
code { padding: 0.15em 0.4em; font-size: 0.88em; }
pre { padding: 1em; overflow-x: auto; margin: 1em 0; }

/* ============================================================
   LAYOUT: SIDEBAR + MAIN
   ============================================================ */

/* Off-canvas sidebar */
#site-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-sidebar-bg);
    color: var(--color-sidebar-txt);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
}

#site-sidebar::-webkit-scrollbar { width: 4px; }
#site-sidebar::-webkit-scrollbar-track { background: transparent; }
#site-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

/* Sidebar logo / brand */
.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.3px;
}
.brand-logo {
    width: 38px; height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    display: block;
}
.brand-tld { color: var(--color-coral); }
.sidebar-brand .brand-tagline {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
    display: block;
    margin-top: 1px;
}

/* Sidebar navigation */
.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav .nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.38);
    padding: 16px 20px 6px;
}
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: var(--color-sidebar-txt);
    font-size: 0.9rem;
    border-radius: 0;
    transition: background var(--transition), color var(--transition);
}
.sidebar-nav ul li a:hover,
.sidebar-nav ul li.current-menu-item > a,
.sidebar-nav ul li.current_page_item > a {
    background: var(--color-sidebar-hover);
    color: #fff;
}
.sidebar-nav ul li.current-menu-item > a,
.sidebar-nav ul li.current_page_item > a {
    border-left: 3px solid var(--color-accent);
    padding-left: 17px;
    background: rgba(13,163,194,0.15);
    color: var(--color-accent);
}
.sidebar-nav .nav-icon {
    width: 18px; text-align: center;
    opacity: 0.75; font-size: 0.85rem; flex-shrink: 0;
}

/* Sidebar sub-menu */
.sidebar-nav ul ul {
    background: rgba(0,0,0,0.15);
    display: none;
}
.sidebar-nav ul li.menu-item-has-children > a::after {
    content: '›';
    margin-left: auto;
    transition: transform var(--transition);
    font-size: 1.1rem;
    opacity: 0.6;
}
.sidebar-nav ul li.menu-item-has-children.open > a::after {
    transform: rotate(90deg);
}
.sidebar-nav ul li.menu-item-has-children.open > ul { display: block; }
.sidebar-nav ul ul li a {
    padding-left: 48px;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.65);
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}

/* Main content wrapper */
#page-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* Mobile top header */
#mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--header-height);
    background: var(--color-sidebar-bg);
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}
#mobile-header .mobile-brand {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}
#mobile-header .brand-logo { width: 26px; height: 26px; border-radius: 7px; }
#sidebar-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 36px; height: 36px;
    display: flex; flex-direction: column;
    justify-content: center; gap: 5px;
    border-radius: var(--radius);
    padding: 6px;
    transition: background var(--transition);
}
#sidebar-toggle:hover { background: rgba(255,255,255,0.1); }
#sidebar-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
body.sidebar-open #sidebar-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.sidebar-open #sidebar-toggle span:nth-child(2) { opacity: 0; }
body.sidebar-open #sidebar-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay for mobile */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
body.sidebar-open #sidebar-overlay { display: block; }

/* Main content */
#main-content {
    flex: 1;
    padding: 36px 40px;
    max-width: 1100px;
    width: 100%;
    margin-inline: auto;
}

/* Homepage: content spans the full area; sections get their own container */
body.home #main-content {
    max-width: none;
    padding: 0;
}
body.home .home-section {
    max-width: 1196px;
    margin: 0 auto;
    padding: 48px 48px 0;
}
body.home .home-section:last-of-type { padding-bottom: 48px; }

/* Site footer */
#site-footer {
    background: var(--color-sidebar-bg);
    color: rgba(255,255,255,0.65);
    padding: 40px;
    margin-left: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto 32px;
}
.footer-col h4 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a { color: rgba(255,255,255,0.55); font-size: 0.88rem; }
.footer-col ul li a:hover { color: var(--color-accent); }
.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================================
   HERO / PAGE HEADER
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    padding: 48px 40px;
    margin: -36px -40px 36px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: 5%;
    width: 250px; height: 250px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.8rem); position: relative; z-index: 1; }
.page-hero .hero-subtitle { font-size: 1.05rem; opacity: 0.82; position: relative; z-index: 1; margin: 0; }
.page-hero .hero-breadcrumb { font-size: 0.8rem; opacity: 0.6; margin-bottom: 12px; position: relative; z-index: 1; }
.page-hero .hero-breadcrumb a { color: rgba(255,255,255,0.75); }

/* ============================================================
   CARDS
   ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}
.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-img { width: 100%; height: 180px; object-fit: cover; }
.card-img-placeholder {
    width: 100%; height: 180px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}
.card-body { padding: 18px 20px; }
.card-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    margin-bottom: 6px;
}
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.card-title a { color: var(--color-primary-dk); }
.card-title a:hover { color: var(--color-accent); }
.card-excerpt { font-size: 0.88rem; color: var(--color-text-muted); margin-bottom: 12px; line-height: 1.55; }
.card-meta { font-size: 0.78rem; color: var(--color-text-muted); display: flex; gap: 12px; flex-wrap: wrap; }

/* Category color coding */
.card-img-placeholder.cat-recipes   { background: linear-gradient(135deg, #FF6B6B, #FFA07A); }
.card-img-placeholder.cat-cycling   { background: linear-gradient(135deg, #4CAF50, #2196F3); }
.card-img-placeholder.cat-travel    { background: linear-gradient(135deg, #9C27B0, #3F51B5); }
.card-img-placeholder.cat-czech     { background: linear-gradient(135deg, #FF9800, #F44336); }
.card-img-placeholder.cat-general   { background: linear-gradient(135deg, #607D8B, #455A64); }

/* ============================================================
   HOMEPAGE SECTIONS
   ============================================================ */
.home-intro {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 36px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 24px;
    align-items: center;
}
.home-intro-icon {
    font-size: 3.5rem;
    flex-shrink: 0;
}
.home-intro h2 { color: var(--color-primary); margin-bottom: 8px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}
.section-header h2 { margin: 0; }
.section-header a {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* Category showcase tiles */
.category-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0 36px;
}
.category-tile {
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    color: #fff;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.category-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-tile::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity var(--transition);
}
.category-tile:hover::before { opacity: 1; }
.category-tile .tile-icon { font-size: 2.4rem; margin-bottom: 10px; position: relative; z-index: 1; }
.category-tile .tile-title { font-size: 1rem; font-weight: 700; position: relative; z-index: 1; }
.category-tile .tile-count { font-size: 0.78rem; opacity: 0.8; position: relative; z-index: 1; margin-top: 4px; }
.tile-recipes  { background: linear-gradient(135deg, #e74c3c, #e67e22); }
.tile-cycling  { background: linear-gradient(135deg, #27ae60, #2980b9); }
.tile-france   { background: linear-gradient(135deg, #8e44ad, #3498db); }
.tile-czech    { background: linear-gradient(135deg, #d35400, #c0392b); }
.tile-dogs     { background: linear-gradient(135deg, #16a085, #2c3e50); }
.tile-other    { background: linear-gradient(135deg, #2c3e50, #4a5568); }

/* ============================================================
   SINGLE POST / PAGE
   ============================================================ */
.entry-header { margin-bottom: 28px; }
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 12px;
}
.entry-meta span { display: flex; align-items: center; gap: 5px; }
.entry-category-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(57,55,163,0.1);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entry-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    line-height: 1.75;
}
.entry-content h2 { margin-top: 1.6em; padding-top: 1em; border-top: 1px solid var(--color-border); }
.entry-content h3 { margin-top: 1.3em; color: var(--color-primary); }
.entry-content img {
    border-radius: var(--radius);
    margin: 1em 0;
    box-shadow: var(--shadow-sm);
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9rem;
}
.entry-content table th {
    background: var(--color-primary);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
}
.entry-content table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--color-border);
}
.entry-content table tr:nth-child(even) td { background: rgba(57,55,163,0.03); }

/* ============================================================
   RECIPE TEMPLATE
   ============================================================ */
.recipe-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
}
.recipe-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    padding: 28px 32px;
}
.recipe-header h1 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.recipe-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
}
.recipe-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 10px 16px;
    min-width: 80px;
}
.recipe-stat .stat-label { font-size: 0.7rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }
.recipe-stat .stat-value { font-size: 1.1rem; font-weight: 700; margin-top: 2px; }
.recipe-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.recipe-body { display: grid; grid-template-columns: 1fr 2fr; gap: 0; }
.recipe-ingredients {
    padding: 28px 24px;
    background: rgba(57,55,163,0.03);
    border-right: 1px solid var(--color-border);
}
.recipe-ingredients h3 { color: var(--color-primary); font-size: 1rem; margin-bottom: 16px; }
.recipe-ingredients ul { list-style: none; padding: 0; }
.recipe-ingredients ul li {
    padding: 7px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.recipe-ingredients ul li::before {
    content: '●';
    color: var(--color-accent);
    font-size: 0.5rem;
    margin-top: 5px;
    flex-shrink: 0;
}
.recipe-instructions { padding: 28px 32px; }
.recipe-instructions h3 { color: var(--color-primary); font-size: 1rem; margin-bottom: 16px; }
.recipe-instructions ol { padding-left: 0; counter-reset: steps; list-style: none; }
.recipe-instructions ol li {
    counter-increment: steps;
    padding: 12px 0 12px 48px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
    position: relative;
}
.recipe-instructions ol li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 10px;
    width: 28px; height: 28px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ============================================================
   ARCHIVE / BLOG LIST
   ============================================================ */
.archive-header { margin-bottom: 28px; }
.post-list { display: flex; flex-direction: column; gap: 20px; }
.post-item {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 24px 28px;
    display: flex;
    gap: 20px;
    transition: box-shadow var(--transition);
}
.post-item:hover { box-shadow: var(--shadow-md); }
.post-item-thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.post-item-thumb-placeholder {
    width: 120px; height: 90px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
}
.post-item-body { flex: 1; }
.post-item-category { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--color-accent); margin-bottom: 5px; }
.post-item-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.post-item-title a { color: var(--color-primary-dk); }
.post-item-title a:hover { color: var(--color-accent); }
.post-item-excerpt { font-size: 0.87rem; color: var(--color-text-muted); margin-bottom: 8px; }
.post-item-meta { font-size: 0.78rem; color: var(--color-text-muted); }

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 36px 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text);
    transition: all var(--transition);
}
.pagination a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ============================================================
   TAG CLOUD
   ============================================================ */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag-cloud a {
    padding: 4px 12px;
    background: rgba(57,55,163,0.08);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(57,55,163,0.15);
    transition: all var(--transition);
}
.tag-cloud a:hover { background: var(--color-primary); color: #fff; }

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.widget-area {
    width: 280px;
    flex-shrink: 0;
}
.widget {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--color-border);
    margin-bottom: 20px;
}
.widget-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
}
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: 5px 0; border-bottom: 1px solid var(--color-border); font-size: 0.88rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--color-text); }
.widget ul li a:hover { color: var(--color-accent); }

/* Content + sidebar layout */
.content-with-sidebar {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.content-with-sidebar .main-area { flex: 1; min-width: 0; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-form {
    display: flex;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--color-primary);
    background: var(--color-bg-card);
    margin-bottom: 24px;
}
.search-form label {
    flex: 1;
    display: flex;
    min-width: 0;
}
.search-form input[type="search"] {
    flex: 1;
    width: 100%;
    min-width: 0;
    border: none;
    padding: 10px 16px;
    font-size: 0.95rem;
    outline: none;
    background: transparent;
    color: var(--color-text);
}
.search-form button,
.search-form input[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background var(--transition);
}
.search-form button:hover,
.search-form input[type="submit"]:hover { background: var(--color-accent); }

/* Compact search in the mobile header */
#mobile-header .search-form {
    margin: 0;
    max-width: 180px;
    border: none;
}
#mobile-header .search-form input[type="search"] { padding: 8px 12px; font-size: 0.85rem; }
#mobile-header .search-form button,
#mobile-header .search-form input[type="submit"] { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-dk); color: #fff; }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-accent { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-accent:hover { background: var(--color-accent-dk); color: #fff; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-muted    { color: var(--color-text-muted); }
.text-accent   { color: var(--color-accent); }
.text-primary  { color: var(--color-primary); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 24px; }
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.alert-info    { background: rgba(13,163,194,0.1); border-left: 4px solid var(--color-accent); }
.alert-warning { background: rgba(254,125,96,0.1); border-left: 4px solid var(--color-coral); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    #site-sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
        box-shadow: none;
    }
    body.sidebar-open #site-sidebar {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    #page-wrapper { margin-left: 0; }
    #mobile-header { display: flex; }
    #main-content { padding: 24px 20px; }
    .page-hero { padding: 32px 20px; margin: -24px -20px 24px; }
    .recipe-body { grid-template-columns: 1fr; }
    .recipe-ingredients { border-right: none; border-bottom: 1px solid var(--color-border); }
    .content-with-sidebar { flex-direction: column; }
    .widget-area { width: 100%; }
    .home-intro { flex-direction: column; text-align: center; }
    .post-item { flex-direction: column; }
    .post-item-thumb, .post-item-thumb-placeholder { width: 100%; height: 160px; }
}

@media (max-width: 560px) {
    .card-grid { grid-template-columns: 1fr; }
    .category-tiles { grid-template-columns: repeat(2, 1fr); }
    .recipe-stats { gap: 12px; }
    .recipe-stat { padding: 8px 12px; }
}

/* ============================================================
   HOMEPAGE — HERO
   ============================================================ */
.home-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    padding: 72px 48px;
    margin: 0;
    position: relative;
    overflow: hidden;
}
.home-hero::before {
    content: '';
    position: absolute;
    top: -40%; right: -8%;
    width: 500px; height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}
.home-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.home-hero-text h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 14px;
}
.home-hero-text h1 span { color: var(--color-coral); }
.home-hero-text p {
    font-size: 1.1rem;
    opacity: 0.88;
    max-width: 520px;
    margin-bottom: 24px;
}
.home-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-outline-white {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius);
    font-weight: 600; font-size: 0.9rem;
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    transition: all var(--transition);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); color: #fff; border-color: #fff; }
.home-hero-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.hero-stat {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    text-align: center;
    backdrop-filter: blur(4px);
    min-width: 90px;
}
.hero-stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}
.hero-stat span:last-child {
    font-size: 0.78rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   HOMEPAGE — SECTIONS
   ============================================================ */
.home-section {
    padding: 48px 0;
    border-bottom: 1px solid var(--color-border);
}
.home-section:last-child { border-bottom: none; }
.home-section-alt { background: transparent; }

/* Topic grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.topic-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-sm);
}
.topic-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.topic-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: filter var(--transition);
}
.topic-card:hover .topic-card-bg { filter: brightness(1.1); }
.topic-card-body {
    position: relative;
    z-index: 1;
    padding: 24px 22px;
    color: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.topic-icon { font-size: 2rem; margin-bottom: 10px; }
.topic-card-body h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.topic-card-body p {
    font-size: 0.85rem;
    opacity: 0.88;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 12px;
}
.topic-link {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Info strip */
.info-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow var(--transition), transform var(--transition);
}
.info-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--color-text); }
.info-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.info-body { display: flex; flex-direction: column; gap: 3px; }
.info-body strong { font-size: 0.95rem; color: var(--color-primary-dk); }
.info-body span { font-size: 0.8rem; color: var(--color-text-muted); }

.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

@media (max-width: 900px) {
    .home-hero { padding: 48px 20px; margin: 0; }
    .home-hero-inner { flex-direction: column; gap: 24px; }
    .hero-stat { padding: 12px 16px; min-width: 70px; }
    .hero-stat-num { font-size: 1.4rem; }
    .topic-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .home-section { padding: 32px 0; }
    body.home .home-section { padding: 32px 20px 0; }
    body.home .home-section:last-of-type { padding-bottom: 32px; }
}

@media (max-width: 560px) {
    .topic-grid { grid-template-columns: 1fr 1fr; }
    .info-strip { grid-template-columns: 1fr; }
}

/* ============================================================
   HPV SECTION GRID
   ============================================================ */
.hpv-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 28px;
}
.hpv-section-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.hpv-section-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--color-primary);
    color: var(--color-text);
}
.hpv-card-icon { font-size: 2rem; }
.hpv-section-card h3 {
    font-size: 1.05rem;
    color: var(--color-primary-dk);
    margin: 0;
}
.hpv-section-card p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    #site-sidebar, #mobile-header, #site-footer { display: none !important; }
    #page-wrapper { margin-left: 0; }
    .entry-content { box-shadow: none; border: none; padding: 0; }
}
