/*
Theme Name: Best Christmas Gifts
Theme URI: https://www.bestchristmasgifts.us/
Author: Best Christmas Gifts
Author URI: https://www.bestchristmasgifts.us/
Description: A festive, wide-layout WordPress theme built for Christmas gift guide listicles. Full-width design with generous content area, readable large typography, Christmas red/green/gold styling, optimized "Top 10" post layouts, product card support, and a beautiful homepage hero.
Version: 1.1.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: best-christmas-gifts
Tags: blog, christmas, holiday, full-width-template, custom-logo, featured-images, custom-menu, widgets, translation-ready
*/

/* ============================================================
   BEST CHRISTMAS GIFTS THEME
   ============================================================ */

:root {
    --bcg-red: #C41E2F;
    --bcg-red-dark: #9E1626;
    --bcg-green: #1A5D1A;
    --bcg-green-dark: #123F12;
    --bcg-gold: #D4A017;
    --bcg-gold-light: #F3D47B;
    --bcg-cream: #FFFBF5;
    --bcg-text: #2B2B2B;
    --bcg-text-light: #5A5A5A;
    --bcg-border: #EAE0D0;
    --bcg-radius: 12px;
    --bcg-header-h: 68px;
    --bcg-container: 1600px;
    --bcg-gutter: 30px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

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

/* Prevent 100vw full-bleed sections from creating horizontal scrollbars.
   overflow-x: clip (not hidden) preserves position: sticky on the header. */
html, body { overflow-x: clip; }
@supports not (overflow: clip) {
    html, body { overflow-x: hidden; }
}

body {
    margin: 0;
    background: var(--bcg-cream);
    color: var(--bcg-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; border-radius: var(--bcg-radius); }

a { color: var(--bcg-red); text-decoration: none; }
a:hover { color: var(--bcg-red-dark); text-decoration: underline; }

.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* ---------- Wide layout: 1600px, equal 30px gutters, centered ---------- */
.bcg-site-container {
    max-width: var(--bcg-container);
    margin: 0 auto;
    padding-left: var(--bcg-gutter);
    padding-right: var(--bcg-gutter);
    width: 100%;
}

.bcg-content-area {
    max-width: var(--bcg-container);
    margin: 0 auto;
    padding: 2.5rem var(--bcg-gutter);
    width: 100%;
}

/* Full-bleed sections (hero etc.) use the full viewport, edge to edge */
.bcg-full-bleed { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--bcg-green-dark);
    line-height: 1.25;
    margin: 2rem 0 1rem;
    font-weight: 700;
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; border-bottom: 3px solid var(--bcg-gold); padding-bottom: .5rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }

.entry-title { font-size: 2.6rem; margin: 0 0 1rem; }
.entry-title a { color: var(--bcg-green-dark); }
.entry-title a:hover { color: var(--bcg-red); text-decoration: none; }

/* ---------- Header: slim sticky navbar (~68px) ---------- */
.site-header {
    background: linear-gradient(180deg, var(--bcg-green-dark), var(--bcg-green));
    color: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header-inner {
    max-width: var(--bcg-container);
    height: var(--bcg-header-h);
    margin: 0 auto;
    padding: 0 var(--bcg-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    position: relative;
}
/* Keep the sticky header below the WP admin bar when logged in */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar .site-header { top: 46px; }
}
.site-branding { display: flex; align-items: center; gap: .7rem; min-width: 0; flex-shrink: 1; }
.site-branding img.custom-logo { width: auto; height: 40px; max-width: 180px; border-radius: 8px; flex-shrink: 0; }
.site-branding-text { line-height: 1.15; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.site-title { margin: 0; font-size: 1.3rem; font-weight: 800; }
.site-title a { color: #fff; text-decoration: none; }
.site-title a:hover { color: var(--bcg-gold-light); text-decoration: none; }
.site-description { margin: .1rem 0 0; font-size: .72rem; color: var(--bcg-gold-light); opacity: .85; }

.main-navigation { flex: 1; display: flex; justify-content: center; min-width: 0; }
.main-navigation ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 1.4rem; flex-wrap: nowrap; align-items: center;
}
.main-navigation li { position: relative; }
.main-navigation a {
    color: #fff; font-weight: 600; font-size: .98rem; text-decoration: none;
    padding: .3rem .1rem; border-bottom: 2px solid transparent; white-space: nowrap;
}
.main-navigation a:hover { color: var(--bcg-gold-light); border-bottom-color: var(--bcg-gold); text-decoration: none; }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { color: var(--bcg-gold-light); border-bottom-color: var(--bcg-gold); }

/* Dropdown sub-menus (categories dropdown etc.) */
.main-navigation li.menu-item-has-children > a::after {
    content: " \25BE"; font-size: .8em; opacity: .8;
}
.main-navigation ul ul {
    display: none; position: absolute; top: 100%; left: 0;
    background: #fff; min-width: 230px; border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,.22); padding: .6rem 0; z-index: 200;
}
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul { display: block; }
.main-navigation ul ul a {
    display: block; color: var(--bcg-text); font-size: .95rem; font-weight: 600;
    padding: .55rem 1.2rem; border: none; white-space: normal;
}
.main-navigation ul ul a:hover { background: var(--bcg-cream); color: var(--bcg-red); border: none; }

.header-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.search-toggle {
    background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.45);
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.search-toggle:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.search-toggle[aria-expanded="true"] { background: var(--bcg-gold); border-color: var(--bcg-gold); color: #2B2B2B; }

.menu-toggle {
    display: none; background: var(--bcg-red); color: #fff; border: none;
    padding: .55rem .9rem; border-radius: 8px; font-size: 1.05rem; cursor: pointer; line-height: 1;
}
.menu-toggle:hover { background: var(--bcg-red-dark); }

/* ---------- Search overlay ---------- */
.search-overlay {
    background: var(--bcg-green-dark);
    border-top: 1px solid rgba(255,255,255,.15);
}
.search-overlay[hidden] { display: none; }
.search-overlay-inner {
    max-width: 800px; margin: 0 auto; padding: .9rem var(--bcg-gutter);
    display: flex; align-items: center; gap: .8rem;
}
.search-overlay .search-form { flex: 1; display: flex; gap: .5rem; }
.search-overlay .search-field {
    flex: 1; min-width: 0; padding: .65rem 1rem; border-radius: 50px; border: 2px solid transparent;
    font-size: 1rem; font-family: inherit; line-height: 1.5; color: var(--bcg-text);
    -webkit-appearance: none; appearance: none;
}
.search-overlay .search-field:focus { outline: none; border-color: var(--bcg-gold); }
.search-overlay .search-submit {
    flex: 0 0 auto;
    background: var(--bcg-gold); border: none; border-radius: 50px;
    padding: .65rem 1.6rem; font-weight: 700; cursor: pointer; font-size: 1rem; line-height: 1.5;
    font-family: inherit; color: #2B2B2B; white-space: nowrap;
}
.search-overlay .search-submit:hover { background: #b8890f; }
.search-close {
    background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.45);
    width: 40px; height: 40px; border-radius: 50%; font-size: 1.4rem; line-height: 1;
    cursor: pointer; flex-shrink: 0;
}
.search-close:hover { background: rgba(255,255,255,.15); }

/* ---------- Hero (front page) ---------- */
.bcg-hero {
    background: radial-gradient(ellipse at center top, var(--bcg-green) 0%, var(--bcg-green-dark) 70%),
                linear-gradient(180deg, var(--bcg-green-dark), var(--bcg-green-dark));
    color: #fff;
    text-align: center;
    padding: 4rem 2rem 3.5rem;
    position: relative;
    overflow: hidden;
}
.bcg-hero::before {
    content: "❄ ❆ ❄ ❆ ❄ ❆ ❄ ❆ ❄ ❆ ❄ ❆";
    position: absolute; top: 1rem; left: 0; right: 0;
    font-size: 1.4rem; color: rgba(255,255,255,.35); letter-spacing: 1.2rem;
    pointer-events: none;
}
.bcg-hero h1 { color: #fff; font-size: 3rem; margin: 0 0 1rem; border: none; padding: 0; }
.bcg-hero p.lead { font-size: 1.25rem; max-width: 720px; margin: 0 auto 1.8rem; color: #f2f2f2; }
.bcg-hero .hero-cta { display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.8rem; }
.hero-search { max-width: 640px; margin: 0 auto; }
.hero-search .search-form {
    display: flex; align-items: stretch; gap: 0;
    background: #fff; border-radius: 50px; padding: .35rem;
    box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
.hero-search .search-field {
    flex: 1 1 auto; min-width: 0; border: none;
    padding: .8rem 1.4rem; font-size: 1.05rem; line-height: 1.5;
    border-radius: 50px; font-family: inherit; color: var(--bcg-text);
    -webkit-appearance: none; appearance: none; background: transparent;
}
.hero-search .search-field:focus { outline: none; }
.hero-search .search-field::-webkit-search-cancel-button,
.hero-search .search-field::-webkit-search-decoration { -webkit-appearance: none; }
.hero-search .search-submit {
    flex: 0 0 auto; background: var(--bcg-red); color: #fff; border: none; border-radius: 50px;
    padding: .8rem 2rem; font-weight: 700; font-size: 1.05rem; line-height: 1.5;
    font-family: inherit; cursor: pointer; white-space: nowrap;
}
.hero-search .search-submit:hover { background: var(--bcg-red-dark); }

.btn {
    display: inline-block; padding: .85rem 1.9rem; border-radius: 50px;
    font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; border: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.25); text-decoration: none; }
.btn-red { background: var(--bcg-red); color: #fff; }
.btn-red:hover { background: var(--bcg-red-dark); color: #fff; }
.btn-gold { background: var(--bcg-gold); color: #2B2B2B; }
.btn-gold:hover { background: #b8890f; color: #2B2B2B; }
.btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Trust badges ---------- */
.bcg-trust {
    background: #fff; border-bottom: 1px solid var(--bcg-border);
    padding: 1.6rem var(--bcg-gutter);
}
.bcg-trust-inner {
    max-width: var(--bcg-container); margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem; text-align: center;
}
.trust-item { display: flex; align-items: center; justify-content: center; gap: .7rem; }
.trust-item .trust-icon {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    background: var(--bcg-cream); border: 2px solid var(--bcg-gold);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.trust-item strong { display: block; font-size: .98rem; color: var(--bcg-green-dark); }
.trust-item span { display: block; font-size: .82rem; color: var(--bcg-text-light); }

/* ---------- Homepage sections ---------- */
.bcg-home-section { padding: 3.5rem 0; }
.bcg-home-section .section-head { text-align: center; max-width: 760px; margin: 0 auto 2.2rem; }
.bcg-home-section .section-head h2 { display: inline-block; margin-bottom: .8rem; }
.bcg-home-section .section-head p { color: var(--bcg-text-light); margin: 0; font-size: 1.05rem; }
.bcg-home-section.alt { background: #fff; }
.bcg-home-section.alt .bcg-full-bleed { background: #fff; }

/* Category cards on homepage */
.bcg-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem;
    margin: 2.5rem 0;
}
.bcg-guide-card {
    background: #fff; border: 1px solid var(--bcg-border); border-radius: var(--bcg-radius);
    overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex; flex-direction: column;
}
.bcg-guide-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.bcg-guide-card .card-image img { width: 100%; height: 200px; object-fit: cover; border-radius: 0; display: block; }
.bcg-guide-card .card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.bcg-guide-card .card-cat {
    display: inline-block; background: var(--bcg-green); color: #fff;
    font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    padding: .25rem .8rem; border-radius: 50px; margin-bottom: .8rem; align-self: flex-start;
}
.bcg-guide-card h3 { margin: 0 0 .6rem; font-size: 1.35rem; border: none; padding: 0; }
.bcg-guide-card h3 a { color: var(--bcg-green-dark); }
.bcg-guide-card h3 a:hover { color: var(--bcg-red); text-decoration: none; }
.bcg-guide-card p { color: var(--bcg-text-light); font-size: .98rem; flex: 1; }
.bcg-guide-card .card-meta { font-size: .85rem; color: #999; margin-top: 1rem; }

/* Recipient category cards: centered layout, icon badge, button CTA */
.bcg-guide-card.bcg-cat-card .card-body { text-align: center; align-items: center; padding: 2rem 1.5rem 1.9rem; }
.bcg-guide-card .card-count {
    display: block; font-size: .75rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--bcg-text-light); opacity: .7; margin-bottom: .5rem;
}
.bcg-cat-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 78px; height: 78px; border-radius: 50%; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--bcg-gold-light) 0%, var(--bcg-gold) 100%);
    border: 3px solid #fff; box-shadow: 0 6px 16px rgba(212,160,23,.35);
    font-size: 2.3rem; line-height: 1; margin: .4rem 0 1rem;
    transition: transform .18s ease;
}
.bcg-guide-card.bcg-cat-card:hover .bcg-cat-icon { transform: scale(1.08) rotate(-5deg); }
.bcg-guide-card.bcg-cat-card h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.btn-view-guides {
    display: inline-block; margin-top: 1.2rem; padding: .7rem 1.9rem;
    background: var(--bcg-red); color: #fff !important; font-weight: 700; font-size: .95rem;
    border-radius: 50px; text-decoration: none !important; border: none; cursor: pointer;
    box-shadow: 0 4px 12px rgba(196,30,47,.3);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn-view-guides:hover, .btn-view-guides:focus {
    background: var(--bcg-red-dark); color: #fff !important; text-decoration: none !important;
    transform: translateY(-2px); box-shadow: 0 8px 18px rgba(196,30,47,.4);
}

/* Why choose us */
.bcg-why-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem; margin-top: 2rem;
}
.why-item {
    background: #fff; border: 1px solid var(--bcg-border); border-radius: var(--bcg-radius);
    padding: 1.8rem; text-align: center;
}
.why-item .why-icon { font-size: 2.2rem; display: block; margin-bottom: .8rem; }
.why-item h3 { margin: 0 0 .6rem; font-size: 1.25rem; border: none; padding: 0; }
.why-item p { margin: 0; color: var(--bcg-text-light); font-size: .97rem; }

/* Testimonials */
.bcg-testimonials {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem; margin-top: 2rem;
}
.testimonial {
    background: #fff; border: 1px solid var(--bcg-border); border-radius: var(--bcg-radius);
    padding: 1.8rem; position: relative;
}
.testimonial::before {
    content: "\201C"; position: absolute; top: .4rem; left: 1.2rem;
    font-size: 3.5rem; color: var(--bcg-gold); opacity: .5; font-family: Georgia, serif; line-height: 1;
}
.testimonial p { font-style: italic; color: var(--bcg-text-light); margin: 1.2rem 0 .8rem; }
.testimonial .stars { color: var(--bcg-gold); letter-spacing: .15rem; font-size: 1.05rem; }
.testimonial cite { font-style: normal; font-weight: 700; color: var(--bcg-green-dark); font-size: .95rem; }

/* Newsletter */
.bcg-newsletter {
    background: linear-gradient(135deg, var(--bcg-red), var(--bcg-red-dark));
    color: #fff; text-align: center; border-radius: var(--bcg-radius);
    padding: 3rem 2rem; margin: 3rem 0 0;
}
.bcg-newsletter h2 { color: #fff; border: none; padding: 0; margin: 0 0 .8rem; }
.bcg-newsletter p { color: #ffe9ec; max-width: 560px; margin: 0 auto 1.6rem; }
.newsletter-form { display: flex; gap: .6rem; max-width: 520px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input[type="email"] {
    flex: 1; min-width: 220px; padding: .85rem 1.3rem; border-radius: 50px;
    border: none; font-size: 1rem; font-family: inherit;
}
.newsletter-form input[type="email"]:focus { outline: 3px solid var(--bcg-gold-light); }
.newsletter-form button {
    background: var(--bcg-gold); color: #2B2B2B; border: none; border-radius: 50px;
    padding: .85rem 2rem; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.newsletter-form button:hover { background: #b8890f; }
.newsletter-note { font-size: .82rem; color: #ffd9de; margin-top: 1rem; }

/* ---------- Single post: listicle styling ---------- */
.single-post-layout { display: block; }
.bcg-post-header { text-align: center; max-width: 900px; margin: 0 auto 2rem; }
.bcg-post-header .post-cats a {
    display: inline-block; background: var(--bcg-red); color: #fff; font-size: .85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; padding: .3rem 1rem; border-radius: 50px; margin: 0 .25rem .8rem;
}
.bcg-post-header .post-cats a:hover { background: var(--bcg-red-dark); text-decoration: none; }
.post-meta { color: var(--bcg-text-light); font-size: .95rem; margin-bottom: 1.5rem; }
.post-meta a { color: var(--bcg-text-light); }
.post-featured { margin: 0 auto 2.5rem; max-width: 1000px; }
.post-featured img { width: 100%; height: auto; }

.bcg-entry-content { max-width: 900px; margin: 0 auto; font-size: 1.05rem; overflow-wrap: break-word; }
.bcg-entry-content pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Table of contents box */
.bcg-toc {
    background: #fff; border: 2px solid var(--bcg-gold); border-radius: var(--bcg-radius);
    padding: 1.5rem 1.8rem; margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(212,160,23,.15);
}
.bcg-toc h2, .bcg-toc h3 { border: none; padding: 0; margin: 0 0 1rem; font-size: 1.4rem; color: var(--bcg-red); }
.bcg-toc ol { margin: 0; padding-left: 1.4rem; columns: 1; }
.bcg-toc li { margin-bottom: .5rem; }
.bcg-toc a { color: var(--bcg-green); font-weight: 600; }
.bcg-toc a:hover { color: var(--bcg-red); }

/* Numbered product headings inside listicles */
.bcg-entry-content h2.product-heading, .bcg-entry-content h2[id^="product"] {
    background: linear-gradient(90deg, var(--bcg-green-dark), var(--bcg-green));
    color: #fff; border: none; border-radius: var(--bcg-radius);
    padding: 1rem 1.5rem; margin-top: 3rem; scroll-margin-top: 90px;
}
.bcg-entry-content h2[id], .bcg-entry-content h3[id] { scroll-margin-top: 90px; }

/* Product card placeholder area (used by the BCG Product Cards plugin) */
.bcg-product-card-slot { margin: 2rem 0; }

/* Affiliate disclosure box */
.bcg-disclosure {
    background: #FFF8E6; border-left: 5px solid var(--bcg-gold);
    padding: 1rem 1.4rem; border-radius: 0 10px 10px 0;
    font-size: .92rem; color: var(--bcg-text-light); margin: 2rem 0;
}

/* ---------- Beautiful post tables (comparison tables etc.) ---------- */
.single-post-layout table,
.bcg-entry-content table,
.wp-block-table table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    margin: 2rem 0; font-size: .95rem; line-height: 1.6;
    background: #fff; border: 1px solid var(--bcg-border);
    border-radius: var(--bcg-radius); overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.single-post-layout caption,
.bcg-entry-content caption {
    caption-side: top; padding: .9rem 1rem; font-weight: 700;
    color: var(--bcg-green-dark); background: var(--bcg-cream);
    border-bottom: 1px solid var(--bcg-border); font-size: 1rem;
}
.wp-block-table figcaption {
    text-align: center; font-style: italic; color: var(--bcg-text-light);
    font-size: .9rem; margin-top: .8rem;
}
/* Christmas-themed header row */
.single-post-layout thead th,
.bcg-entry-content thead th,
.wp-block-table thead th,
.single-post-layout th,
.bcg-entry-content th,
.wp-block-table th {
    background: linear-gradient(180deg, var(--bcg-green) 0%, var(--bcg-green-dark) 100%);
    color: #fff; font-weight: 700; text-align: left;
    padding: .95rem 1.1rem; font-size: .95rem; letter-spacing: .01em;
    border-bottom: 3px solid var(--bcg-gold); vertical-align: bottom;
}
.single-post-layout td,
.bcg-entry-content td,
.wp-block-table td {
    padding: .85rem 1.1rem; border-bottom: 1px solid var(--bcg-border);
    vertical-align: top;
}
/* Alternating row colors */
.single-post-layout tbody tr:nth-child(even) td,
.bcg-entry-content tbody tr:nth-child(even) td,
.wp-block-table tbody tr:nth-child(even) td { background: var(--bcg-cream); }
/* Hover highlight */
.single-post-layout tbody tr:hover td,
.bcg-entry-content tbody tr:hover td,
.wp-block-table tbody tr:hover td { background: #FDF3E0; }
/* Rounded outer corners */
.single-post-layout thead tr:first-child th:first-child,
.bcg-entry-content thead tr:first-child th:first-child,
.wp-block-table thead tr:first-child th:first-child { border-top-left-radius: var(--bcg-radius); }
.single-post-layout thead tr:first-child th:last-child,
.bcg-entry-content thead tr:first-child th:last-child,
.wp-block-table thead tr:first-child th:last-child { border-top-right-radius: var(--bcg-radius); }
.single-post-layout tbody:first-child tr:first-child td:first-child,
.bcg-entry-content tbody:first-child tr:first-child td:first-child,
.wp-block-table tbody:first-child tr:first-child td:first-child { border-top-left-radius: var(--bcg-radius); }
.single-post-layout tbody:first-child tr:first-child td:last-child,
.bcg-entry-content tbody:first-child tr:first-child td:last-child,
.wp-block-table tbody:first-child tr:first-child td:last-child { border-top-right-radius: var(--bcg-radius); }
.single-post-layout tbody tr:last-child td:first-child,
.bcg-entry-content tbody tr:last-child td:first-child,
.wp-block-table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--bcg-radius); }
.single-post-layout tbody tr:last-child td:last-child,
.bcg-entry-content tbody tr:last-child td:last-child,
.wp-block-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--bcg-radius); }
.single-post-layout tbody tr:last-child td,
.bcg-entry-content tbody tr:last-child td,
.wp-block-table tbody tr:last-child td { border-bottom: none; }
/* First column emphasis */
.single-post-layout tbody td:first-child,
.bcg-entry-content tbody td:first-child,
.wp-block-table tbody td:first-child { font-weight: 600; color: var(--bcg-green-dark); }
/* Gutenberg table wrapper scrolls on small screens */
.wp-block-table { overflow-x: auto; }
@media (max-width: 768px) {
    .single-post-layout table,
    .bcg-entry-content table,
    .wp-block-table table { font-size: .85rem; }
    .single-post-layout th, .single-post-layout td,
    .bcg-entry-content th, .bcg-entry-content td,
    .wp-block-table th, .wp-block-table td { padding: .65rem .75rem; }
    .bcg-entry-content > table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Verdict / final thoughts box */
.bcg-verdict {
    background: linear-gradient(135deg, #fff, #FFF6E8);
    border: 2px dashed var(--bcg-gold); border-radius: var(--bcg-radius);
    padding: 1.8rem; margin: 2.5rem 0;
}
.bcg-verdict h3 { color: var(--bcg-red); margin-top: 0; border: none; padding: 0; }

/* Related guides on single posts */
.bcg-related {
    max-width: var(--bcg-container);
    margin: 3rem auto 0;
    padding-left: var(--bcg-gutter);
    padding-right: var(--bcg-gutter);
    width: 100%;
}

/* ---------- Archive / index ---------- */
.archive-header { text-align: center; margin-bottom: 2.5rem; }
.archive-header h1 { border: none; padding: 0; }
.archive-description { color: var(--bcg-text-light); max-width: 760px; margin: 0 auto; font-size: 1.05rem; }

.posts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.post-card {
    background: #fff; border: 1px solid var(--bcg-border); border-radius: var(--bcg-radius);
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.post-card .post-thumb img { width: 100%; height: 210px; object-fit: cover; border-radius: 0; display: block; }
.post-card .post-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card h2 { font-size: 1.35rem; border: none; padding: 0; margin: 0 0 .7rem; }
.post-card .post-excerpt { color: var(--bcg-text-light); font-size: .98rem; flex: 1; }
.post-card .read-more { margin-top: 1.2rem; font-weight: 700; color: var(--bcg-red); }
.post-card .read-more:hover { color: var(--bcg-red-dark); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .6rem; justify-content: center; margin: 3rem 0 1rem; flex-wrap: wrap; }
.pagination .nav-previous, .pagination .nav-next { max-width: 100%; min-width: 0; }
.pagination .nav-previous a, .pagination .nav-next a { overflow-wrap: break-word; }
.pagination .page-numbers {
    display: inline-block; padding: .55rem 1.05rem; border-radius: 8px;
    background: #fff; border: 1px solid var(--bcg-border); color: var(--bcg-text); font-weight: 600;
}
.pagination .page-numbers:hover { background: var(--bcg-cream); text-decoration: none; }
.pagination .page-numbers.current { background: var(--bcg-red); border-color: var(--bcg-red); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bcg-green-dark); color: #e8e8e8; margin-top: 4rem; }
.site-footer-inner {
    max-width: var(--bcg-container); margin: 0 auto; padding: 3rem var(--bcg-gutter) 1.5rem;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem;
}
/* Consistent gold top accent on EVERY footer column */
.site-footer-inner > * {
    border-top: 3px solid var(--bcg-gold);
    padding-top: 1.2rem;
}
.site-footer .footer-widget h4,
.site-footer .widget-title {
    color: var(--bcg-gold-light); border: none; padding: 0; margin: 0 0 1rem;
    font-size: 1.1rem;
}
.site-footer a { color: #e8e8e8; }
.site-footer a:hover { color: var(--bcg-gold-light); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer p { font-size: .95rem; color: #d8d8d8; }
.legal-links .legal-pending { color: #a9a9a9; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.15); text-align: center;
    padding: 1.3rem 2rem; font-size: .9rem; color: #c9c9c9;
    max-width: var(--bcg-container); margin: 0 auto;
}
.footer-bottom .footer-menu { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 4rem 1rem; }
.error-404 h1 { font-size: 5rem; color: var(--bcg-red); border: none; }

/* ---------- Comments ---------- */
.comments-area { max-width: 900px; margin: 3rem auto 0; background: #fff; border: 1px solid var(--bcg-border); border-radius: var(--bcg-radius); padding: 2rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body { border-bottom: 1px solid var(--bcg-border); padding: 1.2rem 0; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; padding: .8rem; border: 1px solid var(--bcg-border); border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.comment-form .submit { background: var(--bcg-red); color: #fff; border: none; padding: .85rem 2rem; border-radius: 50px; font-size: 1rem; font-weight: 700; cursor: pointer; }
.comment-form .submit:hover { background: var(--bcg-red-dark); }

/* ---------- Block editor alignment (wide support) ---------- */
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; width: 100%; }

/* ---------- Generic search form ---------- */
.search-form { display: flex; gap: .5rem; }
.search-form .search-field { padding: .6rem .9rem; border-radius: 8px; border: 1px solid var(--bcg-border); font-size: 1rem; font-family: inherit; }
.search-form .search-submit { background: var(--bcg-gold); border: none; border-radius: 8px; padding: .6rem 1.2rem; font-weight: 700; cursor: pointer; color: #2B2B2B; }
.search-form .search-submit:hover { background: #b8890f; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .site-description { display: none; }
    .main-navigation ul { gap: 1rem; }
    .main-navigation a { font-size: .92rem; }
}

@media (max-width: 900px) {
    .main-navigation {
        display: none; position: absolute; top: var(--bcg-header-h); left: 0; right: 0;
        background: var(--bcg-green-dark); padding: .5rem var(--bcg-gutter) 1.2rem;
        box-shadow: 0 12px 24px rgba(0,0,0,.25);
    }
    .main-navigation.toggled { display: block; }
    .main-navigation ul { flex-direction: column; gap: 0; align-items: stretch; }
    .main-navigation li { border-bottom: 1px solid rgba(255,255,255,.12); }
    .main-navigation a { display: block; padding: .8rem .2rem; }
    .main-navigation ul ul { position: static; box-shadow: none; border-radius: 0; background: rgba(255,255,255,.06); }
    .main-navigation ul ul a { color: #fff; }
    .main-navigation li.submenu-open > ul { display: block; }
    .menu-toggle { display: inline-block; }
}

@media (max-width: 768px) {
    html { font-size: 17px; }
    .bcg-site-container, .bcg-content-area { padding-left: 20px; padding-right: 20px; }
    .bcg-related { padding-left: 20px; padding-right: 20px; }
    h1, .entry-title { font-size: 2rem; }
    .bcg-hero { padding: 3rem 1.2rem; }
    .bcg-hero h1 { font-size: 2.1rem; }
    .hero-search .search-form { flex-direction: column; border-radius: 20px; padding: .5rem; }
    .hero-search .search-field { border-radius: 14px; width: 100%; }
    .hero-search .search-submit { width: 100%; margin-top: .35rem; }
    .newsletter-form { flex-direction: column; }
    .newsletter-form input[type="email"], .newsletter-form button { width: 100%; }
    .site-footer-inner { grid-template-columns: 1fr; gap: 1.8rem; }
    /* Trust badges: single column of vertically-stacked centered badges on mobile */
    .bcg-trust-inner { grid-template-columns: 1fr; gap: 2.2rem; }
    .trust-item {
        flex-direction: column; align-items: center; text-align: center;
        gap: .55rem; padding: .4rem 0;
    }
    .trust-item .trust-icon {
        width: 60px; height: 60px; font-size: 1.7rem; margin-bottom: .2rem;
    }
    .trust-item strong { font-size: 1.02rem; }
    .trust-item span { font-size: .88rem; }
    .pagination .nav-previous, .pagination .nav-next { width: 100%; text-align: center; }
}

/* ---------- Small phones (<= 480px) ---------- */
@media (max-width: 480px) {
    /* Header: keep title, search and hamburger from overflowing */
    .site-header-inner { gap: .6rem; padding: 0 16px; }
    .site-title { font-size: 1.05rem; }
    .search-toggle { width: 36px; height: 36px; }
    .menu-toggle { padding: .5rem .7rem; }
    /* Single-column grids regardless of minmax minimums (no 300px+ overflow) */
    .bcg-card-grid, .posts-list { grid-template-columns: 1fr; }
    /* Search overlay stacks on tiny screens */
    .search-overlay-inner { flex-direction: column; align-items: stretch; }
    .search-overlay .search-form { flex-direction: column; }
    .search-overlay .search-submit { width: 100%; }
    .search-close { align-self: flex-end; }
    /* Hero tightening */
    .bcg-hero { padding: 2.5rem 1rem; }
    .bcg-hero h1 { font-size: 1.8rem; }
    .bcg-hero p.lead { font-size: 1.05rem; }
    .bcg-hero .hero-cta .btn { width: 100%; text-align: center; }
    /* Recipient category cards: smaller icon, tighter padding */
    .bcg-guide-card.bcg-cat-card .card-body { padding: 1.6rem 1.2rem; }
    .bcg-cat-icon { width: 64px; height: 64px; font-size: 1.9rem; }
    /* Tables: smaller text, tighter cells */
    .single-post-layout table,
    .bcg-entry-content table,
    .wp-block-table table { font-size: .8rem; }
    .single-post-layout th, .single-post-layout td,
    .bcg-entry-content th, .bcg-entry-content td,
    .wp-block-table th, .wp-block-table td { padding: .55rem .6rem; }
    /* Post header / TOC tightening */
    .bcg-toc { padding: 1.1rem 1.2rem; }
    .bcg-entry-content { font-size: 1rem; }
    .bcg-disclosure { font-size: .85rem; }
    .error-404 h1 { font-size: 3rem; }
    .comments-area { padding: 1.2rem; }
    .footer-bottom { padding: 1.1rem 1rem; }
}
