/*
Theme Name: HCG
Theme URI: https://www.hawdclimateguardian.org
Author: Hawd Climate Guardian
Description: Block theme recreating the Hawd Climate Guardian website (English and Somali).
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: hcg
*/

:root {
  --hcg-primary: #304b3d; --hcg-cream: #faf5eb; --hcg-sand: #f4eee2; --hcg-border: #e4dcc8;
  --hcg-gold: #d9a33f; --hcg-terracotta: #b9613c; --hcg-footer: #1f332a; --hcg-footer-text: #f5f0e5; --hcg-muted: #7e7467;
}
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
.wp-site-blocks > * { margin-block-start: 0; }
.hcg-main { margin: 0; }
.hcg-main > .wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }

/* Header */
.hcg-header { position: sticky; top: 0; z-index: 50; background: rgba(250,245,235,.97); border-bottom: 1px solid var(--hcg-border); backdrop-filter: blur(6px); }
.admin-bar .hcg-header { top: 32px; }
.hcg-header__inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hcg-logo img { height: 56px; width: auto; display: block; }
.hcg-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.hcg-nav a { display: block; padding: .5rem .8rem; border-radius: 6px; font-size: .88rem; font-weight: 500; color: var(--wp--preset--color--foreground); text-decoration: none; }
.hcg-nav a:hover, .hcg-nav a[aria-current="page"] { background: var(--hcg-sand); color: var(--hcg-primary); }
.hcg-header__right { display: flex; align-items: center; gap: .75rem; }
.hcg-lang { display: flex; gap: .15rem; font-size: .82rem; font-weight: 600; }
.hcg-lang a { padding: .3rem .5rem; border-radius: 6px; color: var(--hcg-muted); text-decoration: none; }
.hcg-lang a.is-current { background: var(--hcg-sand); color: var(--hcg-primary); }
.hcg-cta { background: var(--hcg-primary); color: #fff !important; padding: .6rem 1.1rem; border-radius: 8px; font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hcg-cta:hover { opacity: .92; }
.hcg-burger { display: none; width: 42px; height: 42px; border: 1px solid var(--hcg-border); border-radius: 8px; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0; }
.hcg-burger span { display: block; width: 20px; height: 2px; background: var(--hcg-primary); }
@media (max-width: 1100px) {
  .hcg-burger { display: flex; }
  .hcg-cta { display: none; }
  .hcg-nav { display: none; position: absolute; top: 80px; left: 0; right: 0; background: var(--hcg-cream); border-bottom: 1px solid var(--hcg-border); padding: .75rem 1.5rem 1rem; }
  .hcg-nav.is-open { display: block; }
  .hcg-nav ul { flex-direction: column; }
  .hcg-nav a { padding: .75rem .5rem; font-size: 1rem; }
}

/* Footer */
.hcg-footer { background: var(--hcg-footer); color: var(--hcg-footer-text); }
.hcg-footer a { color: var(--hcg-footer-text); text-decoration: none; opacity: .85; }
.hcg-footer a:hover { opacity: 1; text-decoration: underline; }
.hcg-footer__inner { max-width: 1280px; margin: 0 auto; padding: 3.5rem 1.5rem 2rem; }
.hcg-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.hcg-footer h3 { font-size: .9rem; font-weight: 600; margin: 0 0 1rem; font-family: var(--wp--preset--font-family--heading); color: var(--hcg-footer-text); }
.hcg-footer p, .hcg-footer li { font-size: .88rem; line-height: 1.7; opacity: .85; margin: 0 0 .5rem; }
.hcg-footer ul { list-style: none; margin: 0; padding: 0; }
.hcg-footer__logo { display: inline-block; background: #fefefb; border-radius: 6px; padding: .5rem .75rem; margin-bottom: 1rem; }
.hcg-footer__logo img { height: 56px; width: auto; display: block; }
.hcg-social { display: flex; align-items: center; gap: .6rem; margin-top: .75rem; font-size: .85rem; }
.hcg-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(245,240,229,.1); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.hcg-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(245,240,229,.12); font-size: .78rem; opacity: .8; }
@media (max-width: 860px) { .hcg-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hcg-footer__grid { grid-template-columns: 1fr; } }

/* Sections and typography */
.hcg-section { padding: 4rem 1.5rem; }
.hcg-section.is-compact { padding: 2rem 1.5rem; text-align: center; }
.hcg-section h1, .hcg-section h2 { margin-top: 0; }
.hcg-section h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.hcg-section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.hcg-section h3 { font-size: 1.2rem; margin: 0 0 .6rem; }
.hcg-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--hcg-gold); margin: 0 0 .6rem; }
.is-dark .hcg-eyebrow { color: var(--hcg-gold); }
.is-dark, .is-dark h1, .is-dark h2, .is-dark h3, .is-dark p, .is-dark li { color: #fff; }
.is-dark a:not(.wp-block-button__link) { color: #fff; }
.hcg-lead { font-size: 1.12rem; opacity: .9; max-width: 760px; }
.hcg-stat { font-family: var(--wp--preset--font-family--heading); font-size: 2rem; font-weight: 600; color: var(--hcg-primary); margin: 0 0 .15rem; line-height: 1.1; }
.hcg-card { background: #fff; border: 1px solid var(--hcg-border); border-radius: 12px; padding: 1.5rem; height: 100%; }
.hcg-card > *:first-child { margin-top: 0; }
.hcg-card > *:last-child { margin-bottom: 0; }
.hcg-card ul { padding-left: 1.2rem; margin: .5rem 0 0; }
.hcg-card li { margin-bottom: .35rem; font-size: .94rem; }
.hcg-section .wp-block-columns { gap: 1.5rem; margin: 1.5rem 0 0; }
.wp-block-image img { border-radius: 12px; }
.wp-block-quote { border-left: 4px solid var(--hcg-gold); padding-left: 1.25rem; font-style: italic; font-size: 1.1rem; margin: 1.5rem 0; }
.hcg-hero { min-height: 78vh; padding: 5rem 1.5rem; }
.hcg-hero .wp-block-cover__inner-container { width: 100%; max-width: 1180px; margin: 0 auto; }
.hcg-hero .wp-block-cover__inner-container > * { margin-left: 0 !important; margin-right: auto !important; }
.hcg-hero h1 { color: #fff; max-width: 780px; }
.hcg-hero p { color: #fff; max-width: 700px; font-size: 1.12rem; }
.wp-block-button__link { padding: .75rem 1.4rem; }
.is-style-outline .wp-block-button__link { background: transparent; border: 1.5px solid currentColor; }
.hcg-section a { text-underline-offset: 3px; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th { border: 1px solid var(--hcg-border); padding: .6rem .8rem; }
.hcg-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.hcg-gallery figure { margin: 0; }
.hcg-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Contact form */
.hcg-form { display: grid; gap: 1rem; max-width: 720px; }
.hcg-form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.hcg-form input[type=text], .hcg-form input[type=email], .hcg-form select, .hcg-form textarea { width: 100%; padding: .7rem .85rem; border: 1px solid var(--hcg-border); border-radius: 8px; background: #fff; font: inherit; }
.hcg-form button { justify-self: start; background: var(--hcg-primary); color: #fff; border: 0; border-radius: 8px; padding: .8rem 1.6rem; font-weight: 600; cursor: pointer; }
.hcg-form .hcg-trap { position: absolute; left: -10000px; }
.hcg-notice { padding: .85rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.hcg-notice.ok { background: #e8f3ec; border: 1px solid #b6d8c3; }
.hcg-notice.err { background: #fbeaea; border: 1px solid #e7b8b8; }

@media (max-width: 781px) { .hcg-section { padding: 3rem 1.25rem; } .admin-bar .hcg-header { top: 46px; } }
