/* ============================================
   CoffeeHub.web.id — Main Stylesheet
   FASE 7 — Mobile-first, dark mode, optimized
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --coffee: #6F4E37;
    --coffee-dark: #4A3324;
    --coffee-light: #8B6F47;
    --latte: #C8A27A;
    --latte-light: #E8D5B7;
    --cream: #FAF6F0;
    --cream-dark: #F0E8DC;
    --espresso: #2C2416;
    --text: #2C2416;
    --text-muted: #6B5D4F;
    --text-light: #FFFFFF;
    --bg: #FFFFFF;
    --bg-alt: #FAF6F0;
    --bg-card: #FFFFFF;
    --border: #E5DDD0;
    --link: #8B5E3C;
    --link-hover: #6F4E37;
    --success: #4CAF50;
    --error: #E53935;
    --warning: #FF9800;

    --radius: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --container: 1200px;
    --gap: 24px;
}

/* Dark Mode */
html.dark-mode {
    --text: #E8DCC8;
    --text-muted: #B8A88F;
    --bg: #1A1410;
    --bg-alt: #221B15;
    --bg-card: #2A2118;
    --border: #3A2E22;
    --link: #C8A27A;
    --link-hover: #E8D5B7;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin: 1.5em 0 0.5em;
    color: var(--text);
}

h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }
h4 { font-size: 18px; }

p { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.5em; }
li { margin-bottom: 0.4em; }

code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Menlo', 'Monaco', monospace;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 8px;
    background: var(--coffee);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    z-index: 9999;
}
.skip-link:focus { top: 8px; color: white; }

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px 0;
}

@media (min-width: 900px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

.main-content { min-width: 0; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 70px;
}

.logo img { height: 40px; width: auto; }

.main-nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--coffee);
    transition: width 0.3s;
}

.main-nav a:hover::after { width: 100%; }

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-actions button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.header-actions button:hover {
    background: var(--bg-alt);
    border-color: var(--coffee);
}

.theme-toggle .icon-moon { display: none; }
html.dark-mode .theme-toggle .icon-sun { display: none; }
html.dark-mode .theme-toggle .icon-moon { display: block; }

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: 0.3s;
}

/* Search panel */
.search-panel {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 20px 0;
}

.search-form {
    display: flex;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
}

.search-form button {
    background: var(--coffee);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
}

.search-form button:hover { background: var(--coffee-dark); }

.live-results {
    max-width: 600px;
    margin: 12px auto 0;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.live-results:empty { display: none; }

.live-results a {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.live-results a:last-child { border-bottom: none; }
.live-results a:hover { background: var(--bg-alt); }
.live-results .lr-cat { color: var(--text-muted); font-size: 12px; }

/* ============================================
   READING PROGRESS
   ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--coffee), var(--latte));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s;
}

/* ============================================
   CARDS
   ============================================ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card a { color: inherit; display: block; }

.card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.card-body { padding: 20px; }

.card-cat {
    display: inline-block;
    background: var(--latte-light);
    color: var(--coffee-dark);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

html.dark-mode .card-cat {
    background: var(--coffee);
    color: var(--latte-light);
}

.card h3 {
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 12px;
}

.card-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.card-dot { color: var(--border); }

/* ============================================
   FEATURED HERO
   ============================================ */
.featured-section { margin-bottom: 48px; }

.featured-hero { margin-bottom: 24px; }

.hero-card {
    display: block;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/9;
    color: white;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.hero-card:hover img { transform: scale(1.05); }

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
}

.hero-content h2 {
    color: white;
    font-size: clamp(22px, 3.5vw, 36px);
    margin: 8px 0;
}

.hero-content p { color: rgba(255,255,255,0.9); margin: 0 0 8px; }
.hero-meta { font-size: 13px; color: rgba(255,255,255,0.8); }

.hero-cat {
    display: inline-block;
    background: var(--latte);
    color: var(--coffee-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* ============================================
   SECTION TITLE
   ============================================ */
.section-title {
    font-size: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--latte);
    display: inline-block;
    margin: 32px 0 16px;
}

/* ============================================
   ARTICLE (single)
   ============================================ */
.article-header { margin: 24px 0 32px; }

.article-cat {
    display: inline-block;
    background: var(--latte-light);
    color: var(--coffee-dark);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

html.dark-mode .article-cat {
    background: var(--coffee);
    color: var(--latte-light);
}

.article-header h1 {
    font-size: clamp(26px, 4vw, 44px);
    margin: 12px 0 20px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.article-meta a { color: var(--coffee); font-weight: 500; }

.article-hero {
    margin: 24px 0 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-hero img { width: 100%; }

.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
}

.article-content h2 {
    margin-top: 2em;
    padding-top: 0.5em;
    border-top: 1px solid var(--border);
}

.article-content h3 { margin-top: 1.5em; }

.article-content img {
    border-radius: var(--radius);
    margin: 20px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--latte);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 20px;
    border-radius: var(--radius);
}

.article-content a.internal-link {
    border-bottom: 1px dotted var(--coffee);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.article-content th, .article-content td {
    padding: 10px;
    border: 1px solid var(--border);
    text-align: left;
}

.article-content th {
    background: var(--bg-alt);
    font-weight: 600;
}

.lead {
    font-size: 19px;
    color: var(--text-muted);
    border-left: 4px solid var(--latte);
    padding-left: 20px;
    margin-bottom: 24px;
}

/* ============================================
   TOC
   ============================================ */
.toc {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin: 24px 0;
}

.toc-header {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--coffee);
}

.toc-list {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
}

.toc-list li { margin-bottom: 6px; }
.toc-list a { color: var(--text); }
.toc-list a:hover { color: var(--coffee); }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); }

/* ============================================
   TAGS + SHARE
   ============================================ */
.article-tags {
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 14px;
}

.tag {
    display: inline-block;
    background: var(--bg-alt);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 13px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.tag:hover {
    background: var(--coffee);
    color: white;
    border-color: var(--coffee);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    align-items: center;
    font-size: 14px;
}

.share-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    color: white;
    transition: opacity 0.2s;
}

.share-btn:hover { opacity: 0.85; color: white; }
.share-twitter { background: #000; }
.share-facebook { background: #1877F2; }
.share-pinterest { background: #E60023; }
.share-whatsapp { background: #25D366; }
.share-copy { background: var(--coffee); }

/* ============================================
   AUTHOR BOX
   ============================================ */
.author-box {
    display: flex;
    gap: 20px;
    background: var(--bg-alt);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 32px 0;
    border: 1px solid var(--border);
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--coffee);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.author-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--coffee);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    flex-shrink: 0;
}

.author-info h3 { margin: 0 0 8px; font-size: 18px; }
.author-info p { margin: 0 0 8px; color: var(--text-muted); font-size: 14px; }
.author-link { font-weight: 600; font-size: 14px; }

.author-header {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.author-bio { color: var(--text-muted); margin: 8px 0; }
.author-count { font-size: 13px; color: var(--text-muted); }

/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts {
    margin: 48px 0;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.related-card:hover { transform: translateY(-4px); }
.related-card a { color: inherit; display: block; }

.related-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.related-card h3 {
    font-size: 15px;
    padding: 12px 16px 4px;
    margin: 0;
    line-height: 1.4;
}

.related-cat {
    display: block;
    font-size: 11px;
    color: var(--coffee);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 0 16px;
}

.related-meta {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 16px 16px;
}

/* ============================================
   CLUSTER BOX
   ============================================ */
.cluster-box {
    background: linear-gradient(135deg, var(--latte-light), var(--cream-dark));
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 32px 0;
    border-left: 4px solid var(--coffee);
}

html.dark-mode .cluster-box {
    background: linear-gradient(135deg, var(--coffee-dark), var(--coffee));
    color: var(--latte-light);
}

.cluster-box h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: var(--coffee-dark);
}

html.dark-mode .cluster-box h3 { color: var(--latte); }

.cluster-box ul { margin: 0; padding-left: 20px; }
.cluster-box a { color: inherit; }
.cluster-box a:hover { color: var(--coffee); }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.widget-title {
    font-size: 16px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--latte);
}

/* Popular posts */
.popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.popular-list li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.popular-list li:last-child { border-bottom: none; }

.popular-rank {
    background: var(--latte);
    color: var(--coffee-dark);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.popular-list a { color: var(--text); display: block; }

.popular-title {
    display: block;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.popular-meta {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

/* Category list */
.category-list { list-style: none; margin: 0; padding: 0; }

.category-list li { margin-bottom: 4px; }

.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
}

.category-list a:hover { background: var(--bg-alt); color: var(--coffee); }

.category-list .count {
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Tag cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-cloud .tag { font-size: 12px; padding: 4px 10px; }
.tag-cloud .tag span { opacity: 0.6; font-size: 10px; }

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-form {
    background: linear-gradient(135deg, var(--coffee), var(--coffee-dark));
    color: white;
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.newsletter-form h3 {
    color: white;
    margin: 8px 0;
    font-size: 20px;
}

.newsletter-form p {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin-bottom: 16px;
}

.newsletter-icon { font-size: 36px; }

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 10px;
}

.newsletter-form button {
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--coffee-dark);
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.newsletter-form button:hover {
    background: var(--latte);
    color: var(--coffee-dark);
}

.newsletter-msg {
    margin-top: 10px;
    font-size: 13px;
    min-height: 20px;
}

.newsletter-msg.success { color: #A5D6A7; }
.newsletter-msg.error { color: #EF9A9A; }

.newsletter-small {
    font-size: 11px;
    opacity: 0.7;
    margin: 8px 0 0;
}

.article-newsletter { margin: 40px 0; max-width: 500px; }

/* ============================================
   ADS
   ============================================ */
.ad-container {
    margin: 24px 0;
    text-align: center;
    min-height: 90px;
}

.ad-header { background: var(--bg-alt); padding: 8px 0; margin: 0; }
.ad-in-article { margin: 32px 0; }
.ad-sidebar { margin-bottom: 24px; }

.ad-mobile-anchor {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding: 4px 0;
}

@media (min-width: 900px) {
    .ad-mobile-anchor { display: none; }
}

/* ============================================
   AMAZON BOX
   ============================================ */
.amazon-box {
    background: var(--bg-alt);
    border: 2px solid var(--latte);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 32px 0;
}

.amazon-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--coffee-dark);
    margin-bottom: 8px;
}

.amazon-disclosure {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-style: italic;
}

.amazon-list { list-style: none; padding: 0; margin: 0; }

.amazon-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.amazon-item:last-child { border-bottom: none; }

.amazon-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }

.amazon-info { flex: 1; }
.amazon-info a { font-weight: 600; color: var(--text); display: block; margin-bottom: 4px; }
.amazon-rating { font-size: 13px; color: var(--text-muted); }
.amazon-price { font-weight: 700; color: var(--coffee); margin: 4px 0; }

.amazon-btn {
    display: inline-block;
    background: #FF9900;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

.amazon-btn:hover { background: #E68A00; color: white; }

.amazon-disclosure-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 300;
    padding: 16px 20px;
    transform: translateY(100%);
    transition: transform 0.4s;
}

.cookie-banner.show { transform: translateY(0); }

.cookie-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.cookie-text { flex: 1; min-width: 250px; font-size: 14px; }
.cookie-text p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }

.cookie-actions { display: flex; gap: 8px; }

.cookie-btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
}

.cookie-reject { background: transparent; color: var(--text); }
.cookie-accept { background: var(--coffee); color: white; border-color: var(--coffee); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--espresso);
    color: var(--latte-light);
    padding: 60px 0 20px;
    margin-top: 60px;
}

html.dark-mode .site-footer { background: #0F0A06; }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--latte);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }

.footer-col li { margin-bottom: 8px; }

.footer-col a { color: var(--latte-light); font-size: 14px; }
.footer-col a:hover { color: white; }

.footer-about p { color: var(--latte); font-size: 14px; }

.footer-logo { filter: brightness(0) invert(1); margin-bottom: 16px; }

.footer-social { display: flex; gap: 12px; margin-top: 16px; }

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--latte-light);
    font-size: 16px;
    font-weight: 700;
}

.footer-social a:hover { background: var(--coffee); color: white; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: var(--latte);
}

.footer-tagline { color: var(--latte); margin-top: 4px; }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--coffee);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.back-to-top:hover { background: var(--coffee-dark); transform: translateY(-2px); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
    flex-wrap: wrap;
    align-items: center;
}

.page-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
}

.page-btn:hover { background: var(--coffee); color: white; border-color: var(--coffee); }

.page-info { color: var(--text-muted); font-size: 14px; }

/* ============================================
   CATEGORY / TAG HEADER
   ============================================ */
.category-header {
    padding: 24px 0 32px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 32px;
}

.category-header h1 { margin: 0 0 12px; }

.pillar-intro {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 750px;
}

.category-count { font-size: 13px; color: var(--text-muted); margin-top: 12px; }

/* ============================================
   SEARCH
   ============================================ */
.search-header { padding: 24px 0 32px; border-bottom: 2px solid var(--border); margin-bottom: 32px; }

.search-form-large {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    max-width: 600px;
}

.search-form-large input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
}

.search-form-large button {
    background: var(--coffee);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
}

.search-count { color: var(--text-muted); }

/* ============================================
   STATIC PAGES
   ============================================ */
.static-content {
    max-width: 800px;
    margin: 32px auto;
    font-size: 17px;
    line-height: 1.8;
}

.static-content h1 {
    font-size: clamp(28px, 4vw, 40px);
    margin: 0 0 12px;
}

.static-content .meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.static-content h2 {
    margin-top: 2em;
    padding-top: 0.5em;
    border-top: 1px solid var(--border);
}

.static-content h3 { margin-top: 1.5em; }

/* ============================================
   FORMS
   ============================================ */
.contact-form { max-width: 600px; margin: 24px 0; }

.form-row { margin-bottom: 20px; }

.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--coffee);
    box-shadow: 0 0 0 3px rgba(111,78,55,0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-primary { background: var(--coffee); color: white; }
.btn-primary:hover { background: var(--coffee-dark); color: white; }
.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }

.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    font-size: 15px;
}

.alert-success { background: #E8F5E9; color: #2E7D32; border-left: 4px solid var(--success); }
.alert-error { background: #FFEBEE; color: #C62828; border-left: 4px solid var(--error); }

/* ============================================
   404
   ============================================ */
.error-content { text-align: center; padding: 60px 0; max-width: 800px; margin: 0 auto; }

.error-code {
    font-family: var(--font-heading);
    font-size: clamp(80px, 15vw, 160px);
    font-weight: 800;
    color: var(--latte);
    line-height: 1;
    margin-bottom: 16px;
}

.error-content h1 { margin: 0 0 16px; }
.error-content p { color: var(--text-muted); font-size: 17px; }

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 32px 0;
    flex-wrap: wrap;
}

.error-suggestions { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); }
.error-suggestions h2 { font-size: 20px; }

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

.badge-new { background: #4CAF50; color: white; }
.badge-updated { background: var(--latte); color: var(--coffee-dark); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 899px) {
    .menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
        box-shadow: var(--shadow);
        z-index: 99;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
    .main-nav a::after { display: none; }

    .hero-content { padding: 20px; }
    .hero-content p { display: none; }
    .hero-content h2 { font-size: 20px; }

    .article-hero { margin: 16px -20px 24px; border-radius: 0; }

    .author-box { flex-direction: column; text-align: center; }
    .author-header { flex-direction: column; text-align: center; }

    .back-to-top { bottom: 80px; }

    .share-buttons { justify-content: center; }
    .article-tags { justify-content: center; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
    .footer-social { justify-content: center; }

    .search-form { flex-direction: column; }
    .search-form button { width: 100%; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .site-header, .site-footer, .sidebar, .ad-container,
    .share-buttons, .newsletter-form, .cookie-banner,
    .back-to-top, .breadcrumb, .related-posts { display: none !important; }

    body { font-size: 12pt; background: white; color: black; }
    .layout-with-sidebar { display: block; }
    a { color: black; text-decoration: underline; }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }