/*
Theme Name:   Greenhood Child
Theme URI:    https://greenhood.com.au
Description:  Avada child theme for Greenhood IT. Inherits Avada parent; overrides typography, colour tokens and page layouts only. Avada Fusion Builder and all forms remain fully functional.
Author:       Greenhood IT
Author URI:   https://greenhood.com.au
Template:     Avada
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  greenhood-child
*/

/* ============================================================
   DESIGN TOKENS
   All colours and radii are defined here as CSS custom
   properties so Avada elements that inherit cascade also pick
   them up, and so child-theme CSS never hard-codes hex values.
   ============================================================ */

:root {
  --gh-forest:        #0F3D2E;
  --gh-forest-deep:   #0A2C21;
  --gh-leaf:          #1FA15C;
  --gh-leaf-dark:     #157A45;
  --gh-mint:          #EAF5EE;
  --gh-mint-line:     #D3E8DA;
  --gh-paper:         #FAFBF8;
  --gh-ink:           #1E2A24;
  --gh-ink-soft:      #52645B;
  --gh-amber:         #E8A33D;
  --gh-white:         #FFFFFF;

  --gh-radius:        16px;
  --gh-radius-lg:     24px;
  --gh-shadow:        0 10px 30px rgba(15,61,46,.08);
  --gh-shadow-sm:     0 4px 14px rgba(15,61,46,.07);

  --gh-font-display:  'Bricolage Grotesque', system-ui, sans-serif;
  --gh-font-body:     'Inter', system-ui, sans-serif;
}

/* ============================================================
   BASE RESETS (gentle — avoids fighting Avada's own reset)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--gh-font-body);
  color: var(--gh-ink);
  background: var(--gh-paper);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gh-font-display);
  color: var(--gh-forest);
  line-height: 1.12;
  letter-spacing: -.015em;
}

p { color: var(--gh-ink-soft); }

a { color: var(--gh-leaf-dark); }
a:hover { color: var(--gh-forest); }

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

/* ============================================================
   AVADA HEADER OVERRIDES
   We override Avada's header colours without disabling its
   sticky/mobile behaviour. Uses !important only where Avada
   inlines its own values.
   ============================================================ */

#header-wrapper,
#header {
  background: rgba(250,251,248,.88) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gh-mint-line) !important;
}

/* Nav links */
#nav ul li a,
.fusion-navbar-nav > li > a {
  font-family: var(--gh-font-body) !important;
  font-size: .93rem !important;
  font-weight: 500 !important;
  color: var(--gh-ink-soft) !important;
}

#nav ul li a:hover,
.fusion-navbar-nav > li > a:hover,
#nav ul li.current-menu-item > a,
.fusion-navbar-nav > li.current-menu-item > a {
  color: var(--gh-forest) !important;
}

/* Avada mobile menu */
.fusion-mobile-nav-item a {
  color: var(--gh-forest) !important;
}

/* Mobile hamburger icon — make sure it's visible on our pale header.
   Covers both icon-font and line-based toggle markup across Avada versions. */
.fusion-mobile-menu-icons a,
.fusion-mobile-menu-icons a:before,
.fusion-mobile-menu-icons a i,
.fusion-icon-bars,
.fusion-icon-bars:before,
.awb-menu__main-toggle,
.awb-menu__main-toggle:before,
.awb-menu__open-nav-submenu_mobile {
  color: var(--gh-forest) !important;
  border-color: var(--gh-forest) !important;
}
.fusion-toggle-line,
.fusion-toggle-lines-wrapper span,
.awb-menu__main-toggle span {
  background-color: var(--gh-forest) !important;
}
/* Don't let the header hide the toggle */
.fusion-mobile-menu-icons { display: block; }

/* Footer menu — tidy the wrapping/spacing on small screens */
@media (max-width: 782px) {
  #footer .fusion-footer-widget-area ul.menu,
  .fusion-footer-widget-area ul.menu,
  #footer .fusion-menu,
  .footer-area .menu {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
    padding-left: 0;
  }
  #footer .fusion-footer-widget-area ul.menu > li,
  .fusion-footer-widget-area ul.menu > li,
  #footer .fusion-menu > li,
  .footer-area .menu > li {
    float: none;
    display: inline-block;
    margin: 0;
    border: 0 !important;
  }
}

/* ============================================================
   AVADA BUTTON OVERRIDES
   Maps Avada's default button classes to our palette so
   Fusion Builder button elements pick up the right colours.
   ============================================================ */

.fusion-button.button-default,
.fusion-button.button-medium {
  background: var(--gh-leaf) !important;
  border-color: var(--gh-leaf) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-family: var(--gh-font-body) !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 18px rgba(31,161,92,.35) !important;
  transition: background .15s ease, transform .15s ease !important;
}

.fusion-button.button-default:hover,
.fusion-button.button-medium:hover {
  background: var(--gh-leaf-dark) !important;
  transform: translateY(-2px) !important;
}

.fusion-button.button-border {
  background: transparent !important;
  border-color: var(--gh-mint-line) !important;
  color: var(--gh-forest) !important;
  border-radius: 999px !important;
}

.fusion-button.button-border:hover {
  border-color: var(--gh-leaf) !important;
  transform: translateY(-2px) !important;
}

/* ============================================================
   UTILITY CLASSES
   Available inside Avada Builder elements via Custom CSS class
   ============================================================ */

.gh-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gh-leaf-dark);
  background: var(--gh-mint);
  border: 1px solid var(--gh-mint-line);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.gh-section-dark {
  background: var(--gh-forest) !important;
  color: #fff;
}

.gh-section-dark h1,
.gh-section-dark h2,
.gh-section-dark h3 {
  color: #fff !important;
}

.gh-section-dark p { color: rgba(255,255,255,.78) !important; }

.gh-section-mint {
  background: var(--gh-mint) !important;
  border-top: 1px solid var(--gh-mint-line);
  border-bottom: 1px solid var(--gh-mint-line);
}

.gh-section-white {
  background: var(--gh-white) !important;
  border-top: 1px solid var(--gh-mint-line);
  border-bottom: 1px solid var(--gh-mint-line);
}

/* Hood-arc top bar on cards */
.gh-card {
  position: relative;
  background: var(--gh-paper);
  border: 1px solid var(--gh-mint-line);
  border-radius: var(--gh-radius);
  padding: 28px 24px;
  overflow: hidden;
  box-shadow: var(--gh-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}

.gh-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  border-radius: 0 0 100% 100% / 0 0 100% 100%;
  background: linear-gradient(90deg, var(--gh-leaf), var(--gh-forest));
}

.gh-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--gh-shadow);
}

.gh-card.optional::before {
  background: linear-gradient(90deg, var(--gh-amber), #C07820);
}

.gh-card.excluded::before {
  background: linear-gradient(90deg, #D95555, #B02020);
}

/* Icon box */
.gh-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gh-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* Reveal on scroll */
.gh-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.gh-reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .gh-reveal { opacity: 1; transform: none; }
}

/* ============================================================
   HERO ARC — applied via page-specific body classes
   ============================================================ */

.page-template-page-home .fusion-page-title-bar,
.home .fusion-page-title-bar { display: none; }  /* hide Avada breadcrumb bar on home */

/* Page hero section rendered by our template-part */
.gh-page-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 64px;
  background:
    radial-gradient(120% 90% at 50% -30%, var(--gh-mint) 0%, rgba(234,245,238,0) 62%),
    var(--gh-paper);
  text-align: center;
}

/* Home hero with photo background (paper scrim keeps the dark heading readable) */
.gh-hero-photo {
  background:
    radial-gradient(120% 90% at 50% -30%, rgba(234,245,238,.55) 0%, rgba(234,245,238,0) 60%),
    linear-gradient(180deg, rgba(250,251,248,.90) 0%, rgba(250,251,248,.70) 45%, rgba(250,251,248,.93) 100%),
    url("../img/hero-office.jpg") center 34% / cover no-repeat;
}

/* Bold alternative: dark overlay + white text.
   To use this instead of the light scrim, in page-home.php swap the hero
   class "gh-hero-photo" for "gh-hero-dark" (swap back to revert). */
.gh-hero-dark {
  background:
    linear-gradient(180deg, rgba(15,61,46,.80) 0%, rgba(15,61,46,.55) 55%, rgba(15,61,46,.82) 100%),
    url("../img/hero-office.jpg") center 34% / cover no-repeat;
}
.gh-hero-dark h1 { color: #fff; }
.gh-hero-dark h1 .accent { color: var(--gh-mint); }
.gh-hero-dark .gh-hero-sub { color: rgba(255,255,255,.86); }
.gh-hero-dark .gh-eyebrow {
  color: #eaf5ee;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
}
.gh-hero-dark .gh-btn-ghost {
  color: #fff;
  background: transparent;
  border-color: rgba(255,255,255,.45);
}
.gh-hero-dark .gh-btn-ghost:hover { border-color: #fff; }

.gh-page-hero::before {
  content: "";
  position: absolute;
  left: 50%; top: -50vw;
  transform: translateX(-50%);
  width: 130vw; height: 70vw;
  min-width: 1400px; min-height: 760px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: linear-gradient(180deg, rgba(31,161,92,.14), rgba(31,161,92,0) 70%);
  pointer-events: none;
}

.gh-page-hero .gh-hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.gh-page-hero h1 .accent { color: var(--gh-leaf-dark); }

.gh-hero-chips {
  margin-top: 32px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.gh-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--gh-mint-line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gh-forest);
}

/* ============================================================
   STAT BAND
   ============================================================ */

.gh-stat-band {
  background: var(--gh-forest);
}

.gh-stat-band .gh-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.08);
}

.gh-stat-band .gh-stat {
  background: var(--gh-forest);
  padding: 44px 28px;
  text-align: center;
}

.gh-stat-band .gh-stat .num {
  font-family: var(--gh-font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  color: var(--gh-amber);
  line-height: 1;
}

.gh-stat-band .gh-stat .lbl {
  margin-top: 10px;
  font-size: .88rem;
  color: rgba(255,255,255,.78);
}

.gh-stat-band .gh-stats-note {
  padding: 14px 24px 18px;
  text-align: center;
  font-size: .74rem;
  color: rgba(255,255,255,.45);
}

@media (max-width: 880px) { .gh-stat-band .gh-stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .gh-stat-band .gh-stats-grid { grid-template-columns: 1fr; } }

/* ============================================================
   BLOG TEMPLATES
   ============================================================ */

.gh-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

@media (max-width: 880px) { .gh-blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gh-blog-grid { grid-template-columns: 1fr; } }

.gh-post-card {
  background: #fff;
  border: 1px solid var(--gh-mint-line);
  border-radius: var(--gh-radius);
  overflow: hidden;
  box-shadow: var(--gh-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}

.gh-post-card:hover { transform: translateY(-4px); box-shadow: var(--gh-shadow); }

.gh-post-card .thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.gh-post-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.gh-post-card:hover .thumb img { transform: scale(1.04); }

.gh-post-card .card-body {
  padding: 24px 22px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gh-post-card .cat {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gh-leaf-dark);
  margin-bottom: 10px;
}

.gh-post-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  flex: 1;
}

.gh-post-card h3 a {
  color: var(--gh-forest);
  text-decoration: none;
}

.gh-post-card h3 a:hover { color: var(--gh-leaf-dark); }

.gh-post-card .excerpt {
  font-size: .9rem;
  margin-bottom: 16px;
}

.gh-post-card .read-more {
  font-size: .88rem;
  font-weight: 700;
  color: var(--gh-leaf-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gh-post-card .read-more:hover { color: var(--gh-forest); }

/* Single post */
.gh-single-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.gh-single-post .post-meta {
  font-size: .85rem;
  color: var(--gh-ink-soft);
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.gh-single-post .post-meta .cat-tag {
  background: var(--gh-mint);
  color: var(--gh-leaf-dark);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.gh-single-post .featured-img {
  width: 100%;
  border-radius: var(--gh-radius);
  margin-bottom: 36px;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.gh-single-post .post-content h2 { font-size: 1.5rem; margin: 32px 0 12px; }
.gh-single-post .post-content h3 { font-size: 1.18rem; margin: 28px 0 10px; }
.gh-single-post .post-content p  { margin-bottom: 18px; font-size: 1.02rem; line-height: 1.7; }
.gh-single-post .post-content ul,
.gh-single-post .post-content ol { margin: 0 0 18px 20px; }
.gh-single-post .post-content li { margin-bottom: 8px; font-size: 1rem; color: var(--gh-ink-soft); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.gh-contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  margin-top: 48px;
}

@media (max-width: 880px) { .gh-contact-grid { grid-template-columns: 1fr; } }

.gh-contact-details { display: flex; flex-direction: column; gap: 24px; }

.gh-contact-detail-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--gh-mint-line);
  border-radius: var(--gh-radius);
  padding: 22px 20px;
  box-shadow: var(--gh-shadow-sm);
}

.gh-contact-detail-item .det-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--gh-mint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gh-contact-detail-item .det-icon svg {
  width: 20px; height: 20px;
  stroke: var(--gh-leaf-dark);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gh-contact-detail-item h4 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gh-ink-soft);
  margin-bottom: 4px;
}

.gh-contact-detail-item p, .gh-contact-detail-item a {
  font-size: .97rem;
  color: var(--gh-forest);
  font-weight: 600;
  text-decoration: none;
}

/* Map embed */
.gh-map {
  border-radius: var(--gh-radius);
  overflow: hidden;
  border: 1px solid var(--gh-mint-line);
  box-shadow: var(--gh-shadow-sm);
  aspect-ratio: 4/3;
}

.gh-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */

#footer { background: var(--gh-forest-deep, #0A2C21) !important; }

.gh-footer-wrap {
  padding: 64px 0 32px;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
}

.gh-foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 880px) { .gh-foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .gh-foot-grid { grid-template-columns: 1fr; } }

.gh-foot-grid h4 {
  font-family: var(--gh-font-display);
  color: #fff !important;
  font-size: .95rem;
  margin-bottom: 14px;
}

.gh-foot-grid ul { list-style: none; padding: 0; }
.gh-foot-grid li { margin-bottom: 9px; }
.gh-foot-grid a { text-decoration: none; color: rgba(255,255,255,.7); }
.gh-foot-grid a:hover { color: #fff; }

.gh-foot-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}

.gh-foot-bottom a { color: rgba(255,255,255,.55); text-decoration: none; }
.gh-foot-bottom a:hover { color: #fff; }

/* ============================================================
   LOGO MARK (CSS — replace with SVG/PNG in production)
   ============================================================ */

.gh-logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px 10px 14px 14px;
  background: linear-gradient(160deg, var(--gh-leaf), var(--gh-forest));
  position: relative;
  flex-shrink: 0;
  display: inline-block;
}

.gh-logo-mark::after {
  content: "";
  position: absolute;
  inset: 7px 9px 0 9px;
  border-radius: 50% 50% 0 0;
  background: rgba(255,255,255,.92);
}

/* ============================================================
   AVADA FUSION BUILDER COMPATIBILITY
   These overrides restore our font/colour tokens inside
   Fusion Builder containers, without breaking builder UI.
   ============================================================ */

.fusion-fullwidth { background-color: transparent; }

/* Avada separator */
.fusion-separator .sep-line { border-color: var(--gh-mint-line) !important; }

/* Avada title element */
.fusion-title .title-heading-left,
.fusion-title .title-heading-center {
  font-family: var(--gh-font-display) !important;
  color: var(--gh-forest) !important;
}

/* Avada text block */
.fusion-text { font-family: var(--gh-font-body) !important; }

/* Avada accordion (used for FAQ on Contact page) */
.fusion-accordian .fusion-panel {
  border-color: var(--gh-mint-line) !important;
  border-radius: var(--gh-radius) !important;
  margin-bottom: 12px;
  box-shadow: var(--gh-shadow-sm);
}

.fusion-accordian .fusion-panel-heading button {
  font-family: var(--gh-font-display) !important;
  font-weight: 700 !important;
  color: var(--gh-forest) !important;
  background: #fff !important;
}

.fusion-accordian .fusion-panel-body {
  background: #fff !important;
  color: var(--gh-ink-soft) !important;
}

/* ============================================================
   RESPONSIVE WRAP
   ============================================================ */

.gh-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
