/*
Theme Name: Go Green Group
Theme URI: https://go-green-group.com
Description: Restored from Web Archive (redesign mode, skin: eco-green)
Version: 1.0
Text Domain: gogreenlocal
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #ffffff;
    --bg-alt: #f4faf6;
    --bg-section: #fafdfb;
    --fg: #1a1a1a;
    --muted: #474747;
    --muted-2: #969696;
    --primary: #0AC24A;
    --primary-dark: #08993a;
    --primary-soft: #effaf2;
    --secondary: #458481;
    --rule: #e3e7e3;
    --content-width: 1180px;
    --reading-width: 760px;
    --gutter: 24px;
    --gutter-sm: 16px;
    --radius: 6px;
    --shadow-soft: 0 1px 3px rgba(10,194,74,0.06), 0 4px 12px rgba(10,194,74,0.04);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ====== HEADER ====== */
header.site {
    background: rgba(255,255,255,0.96);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 14px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
}
header.site .brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
    flex-shrink: 0;
}
header.site .brand-logo { display: flex; align-items: center; }
header.site .custom-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
header.site .custom-logo {
    display: block;
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}
header.site nav { flex: 1 1 auto; }
header.site nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 16px;
    font-size: 13.5px;
}
header.site nav a {
    color: var(--muted);
    padding: 4px 0;
    transition: color .15s ease;
    white-space: nowrap;
}
header.site nav a:hover,
header.site nav .current-menu-item a { color: var(--primary-dark); }

/* ====== HERO ====== */
.hero {
    background:
        radial-gradient(circle at 80% 0%, rgba(10,194,74,0.10), transparent 55%),
        linear-gradient(180deg, var(--primary-soft) 0%, #ffffff 100%);
    padding: 72px var(--gutter) 64px;
    text-align: center;
    position: relative;
}
.hero-inner {
    max-width: 880px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-eyebrow {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: rgba(10,194,74,0.10);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 18px;
    color: var(--fg);
    letter-spacing: -0.01em;
}
.hero .lead {
    color: var(--muted);
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.75;
    max-width: 640px;
    margin: 0 auto 28px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 32px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(10,194,74,0.30);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.hero-cta:hover {
    background: var(--primary-dark);
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(10,194,74,0.36);
}
.hero-cta.secondary {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px var(--primary);
}
.hero-cta.secondary:hover { background: var(--primary-soft); }

/* ====== MAIN ====== */
main.site {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 56px var(--gutter);
}
main.site article {
    max-width: var(--reading-width);
    margin: 0 auto;
}
.is-front main.site article {
    max-width: var(--content-width);
}

article h1 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px;
    color: var(--fg);
    letter-spacing: -0.01em;
}
article .entry-meta {
    color: var(--muted-2);
    font-size: 14px;
    margin-bottom: 32px;
}

article h2 {
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 20px;
    color: var(--fg);
    padding: 0;
    position: relative;
    text-align: center;
}
article h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: 12px auto 0;
}

/* ====== content sections (.cs) ======
   extract.py wraps each h2 + following siblings into <section class="cs">.
   Alternating background turns flat text into magazine-like blocks.
*/
article .cs {
    padding: 56px 32px;
    margin: 0 -32px;
    border-radius: var(--radius);
    text-align: center;
}
article .cs > * { max-width: 720px; margin-left: auto; margin-right: auto; }
article .cs > h3 { color: var(--secondary); font-weight: 600; margin-top: 24px; }
article .cs > p { text-align: left; }
article .cs:nth-of-type(odd) {
    background: var(--bg-section);
}
article .cs:nth-of-type(even) {
    background: linear-gradient(180deg, var(--primary-soft) 0%, #ffffff 100%);
}
article .cs + .cs { margin-top: 0; }

/* First section after a featured image gets some breathing room */
article > figure.hero-image + .cs { margin-top: 12px; }

article h3 {
    font-size: clamp(18px, 1.9vw, 21px);
    font-weight: 600;
    line-height: 1.45;
    margin: 36px 0 14px;
    color: var(--secondary);
}
article h4 {
    font-size: 17px;
    font-weight: 600;
    margin: 24px 0 10px;
    color: var(--fg);
}

article p, article ul, article ol, article blockquote {
    margin: 0 0 16px;
}

article ul, article ol { padding-left: 1.5em; }
article li { margin-bottom: 6px; }

article blockquote {
    border-left: 4px solid var(--primary);
    padding: 14px 22px;
    margin: 24px 0;
    background: var(--bg-alt);
    color: var(--muted);
    font-style: normal;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Inline images in flowing content — narrower, centred */
article > p > img,
article > img {
    margin: 28px auto;
    border-radius: var(--radius);
    max-width: min(100%, 640px);
}

/* Hero image (front-page.php — large featured at top of article) */
article > figure.hero-image {
    margin: -16px 0 36px;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 7;
    background: var(--bg-section);
}
article > figure.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
    max-width: none;
}

/* Inline figure (when trafilatura outputs <figure> within prose) */
article > figure {
    margin: 28px 0;
    text-align: center;
}
article > figure img { margin: 0 auto; border-radius: var(--radius); max-width: min(100%, 720px); }
article > figure figcaption {
    font-size: 14px;
    color: var(--muted-2);
    margin-top: 8px;
}

/* ====== restored-gallery (Stage 6 fallback) ======
   Compact responsive grid so 4-6 photos sit nicely instead of stacking
   full-width down the page.
*/
.restored-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 48px 0 24px;
}
.restored-gallery figure {
    margin: 0;
    background: var(--bg-section);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.restored-gallery figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
    transition: transform .4s ease;
}
.restored-gallery figure:hover img { transform: scale(1.04); }

/* Tables */
article table {
    border-collapse: collapse;
    width: 100%;
    margin: 24px 0;
    font-size: 15px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
}
article th, article td {
    border-bottom: 1px solid var(--rule);
    padding: 12px 14px;
    text-align: left;
}
article tr:last-child th, article tr:last-child td { border-bottom: none; }
article th { background: var(--bg-section); font-weight: 600; }

article a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
article a:hover { color: var(--primary); }

/* ====== FOOTER ====== */
footer.site {
    background: #122019;
    color: #cfd8d2;
    margin-top: 80px;
    padding: 56px var(--gutter) 24px;
}
.footer-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 2fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 36px;
}
.footer-brand { font-family: 'Inter', sans-serif; }
.footer-brand .name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}
.footer-brand .footer-logo-img {
    display: block;
    max-width: 220px;
    height: auto;
    margin-bottom: 14px;
}
.footer-brand p {
    color: #97a89c;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}
footer.site nav h4 {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin: 0 0 14px;
}
footer.site nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px 24px;
    font-size: 14px;
}
footer.site nav a { color: #a0c0a8; transition: color .15s ease; }
footer.site nav a:hover { color: #fff; text-decoration: none; }
footer.site .legal {
    border-top: 1px solid #1f3326;
    padding-top: 18px;
    color: #6f8775;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 960px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    header.site nav ul {
        justify-content: flex-start;
        gap: 4px 14px;
        font-size: 13px;
    }
}

@media (max-width: 720px) {
    body { font-size: 15px; }
    main.site { padding: 36px var(--gutter); }
    .hero { padding: 48px var(--gutter) 40px; }
    article h2 { font-size: 22px; }
    article h2::after { width: 44px; height: 3px; }
    article .cs { padding: 36px 20px; margin: 0 -20px; }
    article > p > img,
    article > img { margin: 20px auto; }
    .restored-gallery {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
        margin: 32px 0 16px;
    }
    .restored-gallery figure { aspect-ratio: 1 / 1; }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .hero-actions { flex-direction: column; }
    .hero-cta { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 26px; }
    .hero-eyebrow { font-size: 11px; }
    article h1 { font-size: 24px; }
    .restored-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
