/* ===== FabricNest — Main Stylesheet ===== */


:root {
    --cream: #faf8f4;
    --warm-white: #fff9f2;
    --linen: #f2ece2;
    --sand: #e8dcc8;
    --taupe: #c4a882;
    --brown: #8b6914;
    --dark-brown: #4a3000;
    --text: #2c2415;
    --text-light: #6b5a3e;
    --text-muted: #9c8866;
    --accent: #c17f3b;
    --accent-light: #f0d5b0;
    --accent-dark: #9a5f1e;
    --green: #4a7c59;
    --red: #c0392b;
    --border: #e2d5c0;
    --shadow: 0 2px 16px rgba(74,48,0,0.08);
    --shadow-lg: 0 8px 40px rgba(74,48,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --max-width: 1200px;
    --transition: all 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dark); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ===== TOPBAR ===== */
.topbar {
    background: var(--dark-brown);
    color: var(--sand);
    font-size: 12px;
    padding: 8px 0;
    letter-spacing: 0.5px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }

/* ===== HEADER ===== */
.site-header {
    background: var(--warm-white);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-icon { font-size: 28px; }
.logo-name {
    display: block;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-brown);
    line-height: 1;
}
.logo-tag {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    background: var(--accent-light);
    color: var(--accent-dark);
}
.header-search { display: flex; align-items: center; gap: 8px; }
.search-input {
    border: 1.5px solid var(--border);
    background: var(--linen);
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 13px;
    width: 180px;
    outline: none;
    font-family: var(--font-body);
    transition: var(--transition);
}
.search-input:focus { border-color: var(--accent); width: 220px; background: #fff; }
.search-btn {
    background: var(--accent);
    border: none;
    border-radius: 50%;
    width: 36px; height: 36px;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
}
.search-btn:hover { background: var(--accent-dark); }
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--dark-brown);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--dark-brown) 0%, #6b4a10 50%, #8b6520 100%);
    color: white;
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
}
.hero h1 span { color: var(--taupe); }
.hero p { font-size: 18px; opacity: 0.85; margin-bottom: 32px; line-height: 1.6; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-body);
    text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); color: white; transform: translateY(-2px); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; }
.hero-featured { position: relative; }
.hero-featured-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
    background: var(--sand);
}
.hero-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--taupe); }
.stat-label { font-size: 12px; opacity: 0.7; }

/* ===== SECTIONS ===== */
.section { padding: 60px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.section-title {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--dark-brown);
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px; height: 3px;
    background: var(--accent);
    margin-top: 8px;
    border-radius: 2px;
}
.view-all { font-size: 14px; font-weight: 600; color: var(--accent); }
.view-all:hover { color: var(--accent-dark); }

/* ===== ARTICLE CARDS ===== */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.articles-grid.col-4 { grid-template-columns: repeat(4, 1fr); }
.articles-grid.col-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-img {
    aspect-ratio: 16/9;
    background: var(--linen);
    overflow: hidden;
    position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-img-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: linear-gradient(135deg, var(--linen), var(--sand));
}

.card-cat {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.card-cat:hover { background: var(--accent-dark); color: white; }

.card-body { padding: 20px; }
.card-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--dark-brown);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.card-meta span { display: flex; align-items: center; gap: 4px; }
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-top: 12px;
}
.read-more:hover { gap: 10px; color: var(--accent-dark); }

/* ===== FEATURED CARD (LARGE) ===== */
.card-featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.card-featured .card-img { aspect-ratio: auto; min-height: 280px; }
.card-featured .card-body { display: flex; flex-direction: column; justify-content: center; padding: 32px; }
.card-featured .card-title { font-size: 22px; -webkit-line-clamp: 3; }

/* ===== CATEGORY PILLS ===== */
.category-pills { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    text-decoration: none;
}
.pill:hover, .pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}
.pill-count {
    background: var(--linen);
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
}
.pill:hover .pill-count, .pill.active .pill-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ===== SIDEBAR ===== */
.content-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
.sidebar-widget {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.widget-title {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--dark-brown);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-light);
}
.sidebar-post { display: flex; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.sidebar-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar-post-img {
    width: 70px; height: 60px;
    border-radius: var(--radius-sm);
    background: var(--linen);
    overflow: hidden;
    flex-shrink: 0;
}
.sidebar-post-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-post-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-brown);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-post-title a { color: inherit; text-decoration: none; }
.sidebar-post-title a:hover { color: var(--accent); }
.sidebar-post-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    display: inline-block;
    background: var(--linen);
    color: var(--text-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}
.tag:hover { background: var(--accent); color: white; }

/* ===== SINGLE ARTICLE ===== */
.article-header { padding: 50px 0 30px; background: var(--warm-white); }
.article-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.article-breadcrumb a { color: var(--accent); }
.article-breadcrumb span { margin: 0 8px; }
.article-title {
    font-family: var(--font-display);
    font-size: 40px;
    line-height: 1.25;
    color: var(--dark-brown);
    margin-bottom: 20px;
    max-width: 800px;
}
.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-muted);
}
.article-meta-bar span { display: flex; align-items: center; gap: 6px; }
.article-featured-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 30px 0;
}
.article-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
}
.article-content h2 {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--dark-brown);
    margin: 36px 0 16px;
}
.article-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--dark-brown);
    margin: 28px 0 12px;
}
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 20px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
    border-left: 4px solid var(--accent);
    background: var(--accent-light);
    padding: 20px 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 28px 0;
    font-style: italic;
    color: var(--accent-dark);
}
.article-content img { border-radius: var(--radius-sm); margin: 20px auto; }
.article-content table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.article-content th {
    background: var(--dark-brown);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
}
.article-content td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 15px; }
.article-content tr:hover td { background: var(--linen); }

.article-tags { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-tags h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text-muted); }
.article-share { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    color: white;
    transition: var(--transition);
}
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-pin { background: #e60023; }
.share-copy { background: var(--accent); }
.share-btn:hover { opacity: 0.9; transform: translateY(-2px); }

/* ===== NEWSLETTER ===== */
.newsletter-section { background: var(--dark-brown); padding: 50px 0; }
.newsletter-box { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.newsletter-text h3 { font-family: var(--font-display); font-size: 26px; color: white; margin-bottom: 8px; }
.newsletter-text p { color: var(--sand); font-size: 15px; }
.newsletter-form { display: flex; gap: 8px; flex: 1; max-width: 440px; min-width: 280px; }
.newsletter-form input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.2);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form input:focus { background: rgba(255,255,255,0.15); border-color: var(--taupe); }
.newsletter-form button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    font-family: var(--font-body);
}
.newsletter-form button:hover { background: var(--accent-dark); }

/* ===== FOOTER ===== */
.site-footer { background: #1a1108; color: #c4a882; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { font-family: var(--font-display); font-size: 22px; color: white; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; line-height: 1.7; color: #9c8866; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    text-decoration: none;
}
.footer-social a:hover { background: var(--accent); }
.footer-col h4 { color: white; font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: #9c8866; font-size: 14px; transition: var(--transition); }
.footer-col ul a:hover { color: var(--taupe); padding-left: 4px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b5a3e;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: var(--linen);
    padding: 14px 0;
    font-size: 13px;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); }
.breadcrumb span { margin: 0 8px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; flex-wrap: wrap; }
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: white;
    border: 1.5px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}
.page-btn:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent-dark); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.dots { display: inline-flex; align-items: center; padding: 0 4px; color: var(--text-muted); }

/* ===== ALERTS ===== */
.alert { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: var(--accent-light); color: var(--accent-dark); border: 1px solid var(--taupe); }

/* ===== PAGE HEADER ===== */
.page-hero {
    background: linear-gradient(135deg, var(--dark-brown), #6b4a10);
    color: white;
    padding: 50px 0;
    text-align: center;
}
.page-hero h1 { font-family: var(--font-display); font-size: 38px; margin-bottom: 12px; }
.page-hero p { font-size: 16px; opacity: 0.8; max-width: 600px; margin: 0 auto; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    background: var(--warm-white);
    color: var(--text);
    outline: none;
    transition: var(--transition);
}
.form-control:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 3px rgba(193,127,59,0.1); }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-submit {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}
.form-submit:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .articles-grid.col-4 { grid-template-columns: repeat(2, 1fr); }
    .card-featured { grid-column: span 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 38px; }
}

@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-featured { display: none; }
    .hero { padding: 50px 0; }
    .hero h1 { font-size: 32px; }
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--warm-white);
        border-top: 1px solid var(--border);
        padding: 16px;
        box-shadow: var(--shadow-lg);
        z-index: 200;
    }
    .main-nav.open { display: flex; }
    .hamburger { display: flex; }
    .header-search { display: none; }
    .header-inner { position: relative; }
    .articles-grid { grid-template-columns: 1fr; }
    .card-featured { grid-column: span 1; grid-template-columns: 1fr; }
    .card-featured .card-img { min-height: 200px; }
    .content-sidebar { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .article-title { font-size: 28px; }
    .newsletter-box { flex-direction: column; }
    .section-title { font-size: 22px; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; }
    .topbar .container { flex-direction: column; gap: 4px; text-align: center; }
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {
    /* Header */
    .site-header { position: sticky; top: 0; z-index: 100; }
    .header-inner { padding: 12px 0; gap: 12px; }
    .logo-name { font-size: 18px; }
    .logo-tag { font-size: 10px; }
    .logo-icon { font-size: 22px; }

    /* Nav menu full width */
    .main-nav {
        width: 100%;
        left: -20px;
        right: -20px;
        padding: 12px 20px;
        gap: 4px;
    }
    .nav-link { padding: 10px 14px; font-size: 15px; border-radius: 8px; }

    /* Topbar smaller */
    .topbar { font-size: 11px; padding: 6px 0; }
    .topbar .container { flex-direction: column; gap: 2px; text-align: center; }

    /* Hero */
    .hero { padding: 36px 0; }
    .hero h1 { font-size: 26px; line-height: 1.3; }
    .hero p { font-size: 15px; }
    .hero-badge { font-size: 11px; }
    .hero-stats { gap: 16px; }
    .stat-num { font-size: 20px; }

    /* Category pills scroll */
    .category-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
    .category-pills::-webkit-scrollbar { height: 3px; }
    .pill { white-space: nowrap; flex-shrink: 0; padding: 8px 14px; font-size: 13px; }

    /* Cards */
    .card-body { padding: 14px; }
    .card-title { font-size: 15px; }
    .card-excerpt { font-size: 13px; }
    .card-meta { font-size: 11px; gap: 8px; }

    /* Article */
    .article-title { font-size: 22px; line-height: 1.3; }
    .article-content { font-size: 15px; line-height: 1.75; }
    .article-content h2 { font-size: 20px; }
    .article-content h3 { font-size: 17px; }
    .article-meta-bar { font-size: 12px; gap: 10px; }
    .article-featured-img { border-radius: 8px; }

    /* Share buttons */
    .article-share { gap: 8px; }
    .share-btn { padding: 8px 14px; font-size: 13px; }

    /* Page hero */
    .page-hero { padding: 36px 0; }
    .page-hero h1 { font-size: 28px; }
    .page-hero p { font-size: 14px; }

    /* Section */
    .section { padding: 36px 0; }
    .section-header { margin-bottom: 20px; }
    .section-title { font-size: 20px; }

    /* Newsletter */
    .newsletter-section { padding: 36px 0; }
    .newsletter-text h3 { font-size: 20px; }
    .newsletter-form { flex-direction: column; min-width: unset; width: 100%; }
    .newsletter-form input { width: 100%; }
    .newsletter-form button { width: 100%; }

    /* Footer */
    .site-footer { padding: 40px 0 0; }
    .footer-grid { gap: 24px; }
    .footer-logo { font-size: 18px; }

    /* Sidebar on mobile - hide heavy widgets */
    .content-sidebar aside .sidebar-widget:last-child { display: none; }

    /* Contact page grid */
    .container > div[style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    .container > div[style*="grid-template-columns: 1fr 1fr"] > div {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero h1 { font-size: 22px; }
    .hero-btns .btn { width: 100%; justify-content: center; }
    .article-title { font-size: 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .card-featured { grid-template-columns: 1fr !important; }

    /* Pagination */
    .pagination { gap: 4px; }
    .page-btn { min-width: 34px; height: 34px; font-size: 13px; }

    /* Topbar hide on very small */
    .topbar { display: none; }
}

/* ===== OVERFLOW FIX ===== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

/* Newsletter fix */
.newsletter-section {
    overflow: hidden;
}
.newsletter-box {
    flex-direction: column;
    gap: 20px;
}
.newsletter-text h3 {
    font-size: 20px;
    word-break: break-word;
}
.newsletter-form {
    width: 100%;
    max-width: 100%;
    min-width: unset;
    flex-direction: column;
    gap: 10px;
}
.newsletter-form input,
.newsletter-form button {
    width: 100%;
    max-width: 100%;
}

/* Footer full width fix */
.site-footer {
    overflow: hidden;
    width: 100%;
}
.footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}
.footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 4px;
}

/* All sections overflow fix */
.section,
.page-hero,
.hero,
.breadcrumb,
.topbar {
    overflow: hidden;
    width: 100%;
}

/* Container never overflow */
.container {
    max-width: 100%;
    padding: 0 16px;
}

/* Category pills fix */
.category-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    max-width: 100%;
}
.pill {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Cards grid fix */
.articles-grid {
    grid-template-columns: 1fr;
}
.card-featured {
    grid-column: span 1 !important;
    grid-template-columns: 1fr !important;
}
.card-featured .card-img {
    min-height: 180px;
}

/* Sidebar below content on mobile */
.content-sidebar {
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Tables overflow */
.table-wrap,
table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}