/*
Theme Name:   Hello Elementor Child
Theme URI:    http://garden-kneelers.local/
Description:  Child theme for Hello Elementor — Garden Kneelers & Seats site
Author:       Site Owner
Template:     hello-elementor
Version:      1.0.0
Text Domain:  hello-elementor-child
*/

/* ============================================================
   Garden Kneeler Hub — Custom Styles
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
    --clr-dark:    #1a3d1a;
    --clr-accent:  #7cb518;
    --clr-mid:     #5a8a00;
    --clr-bg:      #f7f4ef;
    --clr-white:   #ffffff;
    --clr-text:    #1e1e1e;
    --clr-muted:   #555555;
    --clr-border:  #e0ddd8;
    --clr-footer:  #111f11;
    --font-head:   Georgia, 'Times New Roman', serif;
    --font-body:   'Helvetica Neue', Arial, sans-serif;
    --radius:      6px;
    --shadow:      0 2px 12px rgba(0,0,0,.10);
    --max-w:       1200px;
    --header-h:    68px;
}

/* ── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--clr-text);
    background: var(--clr-bg);
    margin: 0;
    padding: 0;
}

a { color: #2d5200; text-decoration: none; }
a:hover { color: var(--clr-accent); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.1rem; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    line-height: 1.25;
    color: var(--clr-dark);
    margin: 0 0 .75rem;
}

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

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--clr-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 24px;
}

/* Logo */
.site-branding a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 3px;
}
.site-title {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-white);
    letter-spacing: .02em;
}
.site-title .accent { color: var(--clr-accent); }
.site-tagline {
    font-size: .68rem;
    color: rgba(255,255,255,.75);
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* Primary Nav */
.primary-nav { display: flex; align-items: center; }
.primary-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 2px;
    align-items: center;
}
.primary-nav li a {
    display: block;
    padding: 8px 13px;
    font-size: .84rem;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    letter-spacing: .025em;
    border-radius: var(--radius);
    transition: color .18s, background .18s;
}
.primary-nav li a:hover,
.primary-nav li.current-menu-item > a,
.primary-nav li.current-page-ancestor > a,
.primary-nav li.current-menu-parent > a {
    color: var(--clr-accent);
    background: rgba(124,181,24,.13);
    text-decoration: none;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 8px 10px;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--clr-white);
    border-radius: 2px;
}

/* ── HERO ────────────────────────────────────────────────────── */
.site-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    background: var(--clr-dark);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    opacity: .3;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 72px 0;
    max-width: 620px;
}

.hero-content h1 {
    font-size: clamp(1.75rem, 3.8vw, 2.7rem);
    color: var(--clr-white);
    margin-bottom: 1.1rem;
    line-height: 1.2;
}

.hero-content .hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.78);
    margin-bottom: 2rem;
    line-height: 1.65;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--clr-accent);
    color: var(--clr-dark) !important;
    font-weight: 700;
    font-size: .92rem;
    padding: 13px 26px;
    border-radius: var(--radius);
    text-decoration: none !important;
    letter-spacing: .025em;
    transition: background .2s, transform .15s;
    border: none;
}
.btn-primary:hover {
    background: var(--clr-mid);
    color: var(--clr-white) !important;
    transform: translateY(-1px);
}

/* ── SECTIONS ────────────────────────────────────────────────── */
.section { padding: 60px 0; }
.section-alt { background: var(--clr-white); }
.section-dark {
    background: var(--clr-dark);
    color: var(--clr-white);
}

.section-head { margin-bottom: 36px; }
.section-head h2 {
    font-size: 1.6rem;
    color: var(--clr-dark);
    margin-bottom: .3rem;
}
.section-dark .section-head h2 { color: var(--clr-white); }
.section-head p {
    color: var(--clr-muted);
    font-size: .95rem;
    margin: 0;
}
.section-dark .section-head p { color: rgba(255,255,255,.6); }

/* ── CATEGORY CARDS ─────────────────────────────────────────── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px 20px;
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.cat-card:hover {
    border-color: var(--clr-accent);
    box-shadow: 0 4px 18px rgba(124,181,24,.15);
    transform: translateY(-2px);
    text-decoration: none;
}

.cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(124,181,24,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.cat-card h3 {
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 700;
    color: var(--clr-dark);
    margin: 0;
}
.cat-card p {
    font-size: .8rem;
    color: var(--clr-muted);
    margin: 0;
    line-height: 1.45;
}
.cat-arrow {
    font-size: .85rem;
    color: #2d5200;
    font-weight: 700;
    margin-top: auto;
    padding-top: 8px;
}

/* ── ARTICLE CARDS ───────────────────────────────────────────── */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-card {
    background: var(--clr-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
}

.card-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--clr-border);
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.article-card:hover .card-img img { transform: scale(1.05); }

.card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-cat {
    font-size: .7rem;
    font-weight: 700;
    color: #4a6e00;
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-bottom: 8px;
}

.card-title {
    font-family: var(--font-head);
    font-size: .97rem;
    color: var(--clr-dark);
    line-height: 1.35;
    margin-bottom: 10px;
    flex: 1;
}
.article-card a { text-decoration: none; color: inherit; }
.article-card a:hover .card-title { color: var(--clr-mid); }

.card-excerpt {
    font-size: .82rem;
    color: var(--clr-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-more {
    font-size: .78rem;
    font-weight: 700;
    color: #2d5200;
    letter-spacing: .03em;
}
.card-more::after { content: ' \2192'; }

/* ── SINGLE POST / PAGE ──────────────────────────────────────── */
.site-main { padding: 40px 0 64px; }

.breadcrumb-bar {
    background: var(--clr-white);
    border-bottom: 1px solid var(--clr-border);
    padding: 9px 0;
}
.breadcrumb-bar .rank-math-breadcrumb {
    font-size: .78rem;
    color: var(--clr-muted);
}
.breadcrumb-bar .rank-math-breadcrumb a { color: #2d5200; }

.post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: start;
}

.entry-header { margin-bottom: 1.5rem; }
.entry-title {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    line-height: 1.2;
    margin-bottom: .5rem;
}
.entry-meta {
    font-size: .78rem;
    color: var(--clr-muted);
}
.entry-meta a { color: #2d5200; }

/* Content image (injected in article body) */
.article-image {
    margin: 2rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.entry-featured {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.entry-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entry-content { font-size: .97rem; }
.entry-content h2 {
    font-size: 1.4rem;
    margin: 2rem 0 .75rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--clr-accent);
}
.entry-content h3 {
    font-size: 1.1rem;
    margin: 1.6rem 0 .5rem;
}
.entry-content ul,
.entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.1rem;
}
.entry-content li { margin-bottom: .35rem; }
.entry-content a { color: #000FFF !important; font-weight: 500; }
.entry-content a:hover { color: #0000cc !important; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .88rem;
}
.entry-content thead th {
    background: var(--clr-dark);
    color: var(--clr-white);
    padding: 10px 14px;
    text-align: left;
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.entry-content tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--clr-border);
    vertical-align: top;
}
.entry-content tbody tr:nth-child(even) td { background: rgba(247,244,239,.8); }
.entry-content tbody tr:hover td { background: rgba(124,181,24,.06); }

/* Sidebar */
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
.sidebar-widget {
    background: var(--clr-white);
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    padding: 18px 20px;
    margin-bottom: 20px;
}
.sidebar-widget h4 {
    font-family: var(--font-body);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #4a6e00;
    margin-bottom: 12px;
}
.sidebar-widget ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-widget ul li a {
    font-size: .85rem;
    color: var(--clr-text);
    transition: color .15s;
}
.sidebar-widget ul li a:hover {
    color: var(--clr-mid);
    text-decoration: none;
}
.sidebar-widget ul li a::before {
    content: '\2192\00a0';
    color: var(--clr-accent);
    font-size: .8em;
}

/* Static pages */
.page-content-wrap {
    max-width: 780px;
    margin: 0 auto;
}
.page-content-wrap h2 { font-size: 1.5rem; }
.page-content-wrap h3 {
    font-size: 1.1rem;
    margin: 1.8rem 0 .5rem;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--clr-footer);
    padding: 52px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 44px;
}

.footer-brand .f-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--clr-white);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
}
.footer-brand .f-title .accent { color: var(--clr-accent); }
.footer-brand p {
    font-size: .84rem;
    color: rgba(255,255,255,.5);
    line-height: 1.65;
    max-width: 280px;
    margin: 0;
}

.f-col h4 {
    font-family: var(--font-body);
    font-size: .72rem;
    font-weight: 700;
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 14px;
}
.f-col ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.f-col ul li a {
    font-size: .85rem;
    color: rgba(255,255,255,.62);
    text-decoration: none;
    transition: color .18s;
}
.f-col ul li a:hover {
    color: var(--clr-accent);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 16px 0;
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-copy {
    font-size: .75rem;
    color: rgba(255,255,255,.65);
}
.footer-legal {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.footer-legal a {
    font-size: .75rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: color .18s;
}
.footer-legal a:hover {
    color: var(--clr-accent);
    text-decoration: none;
}

/* ── ARCHIVE ─────────────────────────────────────────────────── */
.archive-header {
    margin-bottom: 40px;
}
.archive-header h1 {
    font-size: 1.8rem;
    margin-bottom: .3rem;
}
.archive-header p { color: var(--clr-muted); }

/* ── UTILITIES ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cat-grid      { grid-template-columns: repeat(2, 1fr); }
    .article-grid  { grid-template-columns: repeat(2, 1fr); }
    .post-layout   { grid-template-columns: 1fr 240px; gap: 32px; }
    .footer-grid   { grid-template-columns: 1fr 1fr; }
    .footer-brand  { grid-column: 1 / -1; }
    .footer-brand p { max-width: 100%; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--clr-dark);
        border-top: 1px solid rgba(255,255,255,.1);
        z-index: 100;
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul {
        flex-direction: column;
        padding: 12px 24px 20px;
        gap: 0;
    }
    .primary-nav li a {
        padding: 11px 4px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,.07);
        font-size: .9rem;
    }
    .site-header { position: relative; }

    .site-hero  { min-height: 380px; }
    .hero-content { padding: 48px 0; }
    .hero-content h1 { font-size: 1.7rem; }

    .post-layout  { grid-template-columns: 1fr; }
    .sidebar      { display: none; }

    .article-grid { grid-template-columns: 1fr; }
    .section      { padding: 44px 0; }
    .footer-grid  { grid-template-columns: 1fr; gap: 28px; padding-bottom: 32px; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .footer-legal { justify-content: center; }
}

@media (max-width: 480px) {
    .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .cat-card { padding: 18px 14px; }
    .container { padding: 0 16px; }
}

/* ── PARENT THEME OVERRIDES ──────────────────────────────────── */
/*
 * Hello Elementor's theme.css constrains .site-header:not(.dynamic-header)
 * and .site-footer:not(.dynamic-footer) to max-width + auto margins.
 * Matching the exact selectors here so the child (loaded later) wins.
 */
.site-header:not(.dynamic-header) {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.site-footer:not(.dynamic-footer) {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* ── Amazon CTA Button ──────────────────────────────────────── */
.btn-amazon {
    display: inline-block;
    background: #ff9900;
    color: #111 !important;
    padding: 10px 22px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    margin: 10px 0 16px;
    transition: background .15s;
}
.btn-amazon:hover {
    background: #e68a00;
    color: #111 !important;
}

/* ── Related Articles Block ─────────────────────────────────── */
.related-articles {
    background: var(--clr-bg);
    border-left: 4px solid var(--clr-accent);
    padding: 20px 24px;
    margin: 48px 0 24px;
    border-radius: 0 4px 4px 0;
}
.related-articles h3 {
    color: var(--clr-dark);
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
}
.related-articles ul {
    margin: 0;
    padding-left: 20px;
    column-count: 2;
    column-gap: 32px;
}
.related-articles li { margin: 4px 0; }
.related-articles a {
    color: var(--clr-mid);
    text-decoration: none;
}
.related-articles a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .related-articles ul { column-count: 1; }
}

/* ── OVERFLOW PREVENTION — împiedică scroll orizontal pe toate dispozitivele */
html {
    overflow-x: hidden;
}
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Grid items trebuie să aibă min-width: 0 altfel nu se pot restrânge */
.post-layout > *,
.article-grid > *,
.cat-grid > *,
.footer-grid > * {
    min-width: 0;
}

/* ── MOBILE IMAGE & TABLE FIXES ─────────────────────────────── */
@media (max-width: 768px) {

    /* Toate imaginile din conținut — full width, niciodată overflow */
    .entry-content img,
    .entry-featured img,
    .article-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    /* Featured image — aspect ratio mai lejer pe ecran mic */
    .entry-featured {
        aspect-ratio: 4 / 3;
        margin-bottom: 1.5rem;
    }

    /* Imagini în corpul articolului — centrate, fără margin lateral negativ */
    .entry-content .article-image {
        margin: 1.25rem 0;
        border-radius: var(--radius);
    }

    /* Imagini inline în conținut (fără wrapper) */
    .entry-content img {
        border-radius: var(--radius);
        margin: 1rem auto;
        display: block;
    }

    /* Tabele — scroll orizontal, fără word-break în header */
    .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        font-size: .82rem;
    }
    .entry-content thead th {
        padding: 8px 10px;
        white-space: nowrap;
    }
    .entry-content tbody td {
        padding: 8px 10px;
        white-space: normal;
        word-break: break-word;
        min-width: 100px;
    }
}
