/*
Theme Name: AutoBill & Building Construction
Theme URI: https://autobillconst.com
Author: AutoBill Construction
Description: A custom theme for sustainable buildings, resilient cities and climate action. Built for regular blogging, short-video promotion (YouTube and Facebook) and donor / partner outreach.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: autobillconst
*/

:root {
  --green-900: #0d3b2e;
  --green-700: #14694f;
  --green-500: #1f9d6f;
  --green-100: #e4f4ec;
  --sand: #f6f3ec;
  --ink: #17211d;
  --muted: #5c6b64;
  --accent: #ee7621;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(13, 59, 46, .12);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
a:hover { color: var(--green-500); }
.container { width: min(var(--max), 92%); margin-inline: auto; }
.section { padding: 72px 0; }
.section.alt { background: var(--sand); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 10px; color: var(--green-900); line-height: 1.2; }
.section-head p { margin: 0; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--green-500); margin-bottom: 8px; display: block; }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease; cursor: pointer; font-size: 1rem;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--green-900); }
.btn-primary:hover { background: #ffbc21; color: var(--green-900); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--green-900); }
.btn-green { background: var(--green-700); color: var(--white); }
.btn-green:hover { background: var(--green-900); color: var(--white); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid #e6ece8; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-900); font-weight: 800; font-size: 1.15rem; }
.brand .leaf { width: 34px; height: 34px; background: var(--green-500); border-radius: 50% 0 50% 0; display: inline-block; }
.brand img { max-height: 44px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.main-nav a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--green-100); color: var(--green-900); }
.nav-cta { background: var(--accent) !important; color: var(--green-900) !important; }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.7rem; cursor: pointer; color: var(--green-900); }

/* Hero */
.hero {
  position: relative; color: var(--white); padding: 120px 0 110px;
  background: linear-gradient(135deg, var(--green-900), var(--green-700) 60%, var(--green-500));
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(242,169,0,.25), transparent 40%);
  pointer-events: none;
}
.hero.has-image { background-size: cover; background-position: center right; }
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,43,33,.92) 0%, rgba(13,59,46,.7) 55%, rgba(13,59,46,.35) 100%); }
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-photo img { width: 100%; max-width: 420px; margin-left: auto; border-radius: 24px; border: 6px solid rgba(255,255,255,.9); box-shadow: 0 24px 60px rgba(0,0,0,.35); aspect-ratio: 4/5; object-fit: cover; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.9rem); line-height: 1.1; margin: 0 0 18px; }
.hero p { font-size: 1.2rem; max-width: 640px; opacity: .95; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Impact counters */
.stats { background: var(--green-900); color: var(--white); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; text-align: center; }
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat-label { font-size: .95rem; opacity: .9; }

/* Cards / grids */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.card h3 a { color: var(--green-900); text-decoration: none; }
.card h3 a:hover { color: var(--green-500); }
.card .meta { font-size: .82rem; color: var(--muted); }
.card .thumb { aspect-ratio: 16/10; background: var(--green-100); object-fit: cover; width: 100%; }
.card .thumb-fallback { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--green-500), var(--green-900)); }
.read-more { margin-top: auto; font-weight: 700; text-decoration: none; }

.pillar { padding: 28px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--green-500); }
.pillar .icon { font-size: 2rem; }
.pillar h3 { margin: 8px 0; color: var(--green-900); }
.pillar p { margin: 0; color: var(--muted); }

/* Video */
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: center; }
.social-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* Partner / donor band */
.partner-band { background: linear-gradient(135deg, var(--green-900), var(--green-700)); color: var(--white); border-radius: 22px; padding: 52px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; }
.partner-band h2 { margin: 0 0 12px; font-size: 2rem; }
.partner-band ul { padding-left: 20px; margin: 0; }

/* Newsletter */
.newsletter { text-align: center; }
.newsletter form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.newsletter input[type=email] { padding: 14px 18px; border-radius: 999px; border: 1px solid #cfd9d3; min-width: 280px; font-size: 1rem; }

/* Blog and pages */
.page-hero { background: var(--green-900); color: var(--white); padding: 64px 0; }
.page-hero h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-hero .meta { opacity: .85; margin-top: 8px; }
.content { max-width: 780px; margin-inline: auto; }
.content h2, .content h3 { color: var(--green-900); line-height: 1.25; }
.content img { border-radius: var(--radius); margin: 22px 0; }
.content blockquote { border-left: 5px solid var(--accent); margin: 24px 0; padding: 8px 20px; background: var(--sand); border-radius: 0 var(--radius) var(--radius) 0; }
.share { display: flex; gap: 10px; flex-wrap: wrap; margin: 36px 0; align-items: center; }
.share a { padding: 8px 16px; border-radius: 999px; background: var(--green-100); text-decoration: none; font-weight: 600; font-size: .9rem; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 9px 15px; border-radius: 10px; background: var(--green-100); text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--green-700); color: var(--white); }
.cat-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.cat-filter a { padding: 7px 16px; border-radius: 999px; background: var(--green-100); text-decoration: none; font-weight: 600; font-size: .9rem; }
.cat-filter a:hover { background: var(--green-500); color: var(--white); }

/* Footer */
.site-footer { background: #0a2b21; color: #cfe3d9; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: var(--white); margin: 0 0 12px; }
.site-footer a { color: #cfe3d9; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.copyright { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 18px; font-size: .88rem; text-align: center; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo img { margin: 0 auto; max-width: 320px; }
  .menu-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid #e6ece8; padding: 12px 4%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .video-split, .partner-band, .footer-grid { grid-template-columns: 1fr; }
  .partner-band { padding: 32px; }
  .hero { padding: 80px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Logo */
.site-logo { height: 56px; width: 56px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.45rem; color: var(--green-900); letter-spacing: -.5px; }
.brand-text small { font-size: .72rem; font-weight: 600; color: var(--green-700); letter-spacing: .3px; }
.custom-logo { max-height: 52px; width: auto; }
@media (max-width: 860px) { .site-logo { height: 44px; width: 44px; } .brand-text strong { font-size: 1.2rem; } .brand-text small { font-size: .62rem; } }

/* Photo pillars */
.pillar.has-img { padding: 0; overflow: hidden; }
.pillar.has-img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.pillar.has-img .pbody { padding: 24px 28px 28px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 230px; gap: 18px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery figure.big { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 18px 14px; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(8,43,33,.85)); }
.img-note { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 16px; }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; } .gallery figure.big { grid-column: span 2; grid-row: span 1; } }

/* Hero copy (single column) */
.hero-copy { max-width: 760px; }

/* About page */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.about-photo img { width: 100%; max-width: 440px; border-radius: 24px; box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; margin-inline: auto; }
.about-role { color: var(--green-700); font-weight: 700; margin: 4px 0 18px; }
.about-statement { font-size: 1.35rem; line-height: 1.45; font-weight: 700; color: var(--green-900); border-left: 5px solid var(--accent); padding: 4px 0 4px 20px; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip { background: var(--green-100); color: var(--green-900); padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

.video-placeholder { display: grid; place-items: center; text-align: center; color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--green-900), var(--green-700)); font-size: 1.3rem; }
.video-placeholder strong { font-size: 3.2rem; color: var(--accent); }
.video-placeholder:hover { color: #fff; filter: brightness(1.1); }

/* Social icons */
.social-icons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.soc { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255,255,255,.12); color: #fff !important; transition: transform .15s ease, background .15s ease; }
.soc svg { width: 22px; height: 22px; }
.soc:hover { transform: translateY(-3px); color: #fff !important; }
.soc-facebook:hover { background: #1877f2; }
.soc-youtube:hover { background: #ff0000; }
.soc-instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743 55%, #bc1888); }
.soc-threads:hover { background: #000; }
.soc-text { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.12); font-weight: 600; font-size: .9rem; }
.btn .soc-ico { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; }
.social-row .soc { background: var(--green-100); color: var(--green-900) !important; }
.social-row .soc:hover { color: #fff !important; }
