/*
Theme Name: Green Planet (GeneratePress Child)
Text Domain: generatepress-child
Theme URI: https://greenplanet.computerjunkies.com
Description: Lightweight GeneratePress (free) child styles for the Green Planet Lawn & Tree Care rebuild. Sticky header with call + estimate buttons, sticky mobile call/quote bar, and brand colors pulled from the current mygreenplanetlawn.com logo and CSS.
Author: Green Planet rebuild
Template: generatepress
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
*/

/* Brand colors pulled from the live logo (bg.jpg wordmark + header.png slogan)
   and the current site stylesheet (styles.css):

   --gp-yellow      #F5E82E  Yellow GREEN PLANET lettering and
                             "Your lawn is our reputation" slogan
                             (sampled; nearby pixels #F7EF30 / #EBE039 / #F5E82E)
   --gp-green       #6BAB3D  Existing site button / accent green
   --gp-green-hover #4D7A2C  Existing darker green
   --gp-green-dark  #435E26  Existing dark green
   --gp-green-deep  #1B3D24  Deep tree/grass shade, used for the sticky header
                             so the existing logo (drawn on a night sky) still reads
   --gp-teal        #347694  Globe in the wordmark (average sampled teal)
   --gp-lime        #CAE085  Existing light lime
   --gp-navy        #002C74  Existing heading color
   --gp-text        #49453C  Existing body-text brown/gray
*/

:root {
  --gp-yellow: #F5E82E;
  --gp-yellow-ink: #1B3D24;
  --gp-green: #6BAB3D;
  --gp-green-hover: #4D7A2C;
  --gp-green-dark: #435E26;
  --gp-green-deep: #1B3D24;
  --gp-teal: #347694;
  --gp-lime: #CAE085;
  --gp-navy: #002C74;
  --gp-text: #49453C;
  --gp-muted: #666666;
  --gp-white: #FFFFFF;
  --gp-header-h: 72px;
  --gp-mobile-bar-h: 60px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--gp-green-deep);
  color: var(--gp-white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.site-header,
.site-header a,
.site-header .main-navigation a,
.site-header .menu-toggle {
  color: var(--gp-white);
}

.site-header .inside-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--gp-header-h);
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.site-header .site-logo img,
.site-header .header-image img {
  max-height: 72px;
  width: auto;
}

/* Header call + estimate buttons.
   Add two Custom Links in the primary menu (or a GP hook) with classes
   .gp-header-call and .gp-header-estimate
   Labels: "Call 810-742-5555" (tel:8107425555) and "Get a Free Estimate" (/contact/) */
.site-header .gp-header-call a,
.site-header .gp-header-estimate a,
.gp-header-ctas a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1.2;
}

.site-header .gp-header-call a,
.gp-header-ctas .gp-header-call {
  background: var(--gp-yellow);
  color: var(--gp-yellow-ink) !important;
}

.site-header .gp-header-call a:hover,
.gp-header-ctas .gp-header-call:hover {
  background: #ffe94a;
  color: var(--gp-yellow-ink) !important;
}

.site-header .gp-header-estimate a,
.gp-header-ctas .gp-header-estimate {
  background: var(--gp-green);
  color: var(--gp-white) !important;
}

.site-header .gp-header-estimate a:hover,
.gp-header-ctas .gp-header-estimate:hover {
  background: var(--gp-green-hover);
  color: var(--gp-white) !important;
}

.wp-block-button.gp-btn-estimate .wp-block-button__link {
  background-color: var(--gp-green);
  color: var(--gp-white);
  border-color: var(--gp-green);
}

.wp-block-button.gp-btn-estimate .wp-block-button__link:hover {
  background-color: var(--gp-green-hover);
  border-color: var(--gp-green-hover);
}

.wp-block-button.gp-btn-call .wp-block-button__link {
  background-color: var(--gp-yellow);
  color: var(--gp-yellow-ink);
  border-color: var(--gp-yellow);
}

.wp-block-button.gp-btn-call .wp-block-button__link:hover {
  background-color: #ffe94a;
  color: var(--gp-yellow-ink);
}

/* Sticky mobile call / quote bar. Markup is in wp/mobile-bar.html */
.gp-mobile-bar {
  display: none;
}

@media (max-width: 768px) {
  .gp-mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    height: calc(var(--gp-mobile-bar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--gp-green-deep);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
  }

  .gp-mobile-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }

  .gp-mobile-bar__call {
    background: var(--gp-yellow);
    color: var(--gp-yellow-ink);
  }

  .gp-mobile-bar__quote {
    background: var(--gp-green);
    color: var(--gp-white);
  }

  body {
    padding-bottom: calc(var(--gp-mobile-bar-h) + env(safe-area-inset-bottom, 0px));
  }

  .site-header .gp-header-call,
  .site-header .gp-header-estimate {
    display: none;
  }
}

h1, h2, h3, .gp-hero h1 {
  color: var(--gp-navy);
  font-weight: 700;
}

.gp-hero h1,
.gp-hero p,
.gp-page-hero h1 {
  color: var(--gp-white);
}

.gp-hero .wp-block-button__link,
.gp-page-hero .wp-block-button__link {
  font-weight: 700;
}

body,
.entry-content {
  color: var(--gp-text);
}

.gp-service-cards .wp-block-column,
.gp-gallery .wp-block-column {
  background: #f7faf2;
  padding: 0.75rem;
  border-top: 3px solid var(--gp-green);
}

.gp-reviews-placeholder {
  background: #f4f1c8;
  border: 2px dashed var(--gp-green-dark);
  padding: 1.5rem;
}

.gp-final-cta,
.gp-why,
.gp-service-area {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.site-footer {
  background: var(--gp-green-deep);
  color: var(--gp-lime);
}

.site-footer a {
  color: var(--gp-yellow);
}


/* ==========================================================================
   Layout additions (v1.0.0)
   ========================================================================== */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  background: #ffffff;
}

a { color: var(--gp-green-hover); }
a:hover, a:focus { color: var(--gp-green-dark); }

/* Header: logo left, CTAs right */
.site-header .inside-header { justify-content: space-between; flex-wrap: wrap; }
.site-header .site-branding .main-title a { color: var(--gp-yellow); }
.gp-header-ctas { display: flex; gap: 0.6rem; align-items: center; margin-left: auto; }
.gp-header-ctas a { font-size: 0.95rem; }

/* Primary nav bar under the header, sticky */
.main-navigation,
.main-navigation .inside-navigation { background: var(--gp-green); }
.main-navigation { position: sticky; top: 0; z-index: 998; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items { color: #ffffff; font-weight: 600; }
.main-navigation .main-nav ul li a { padding-left: 9px; padding-right: 9px; line-height: 52px; font-size: 14px; }
.main-navigation .main-nav ul li.menu-item-has-children > a { padding-right: 0; }
.main-navigation .main-nav ul li.menu-item-has-children .dropdown-menu-toggle { padding-left: 4px; padding-right: 8px; }
.main-navigation .inside-navigation.grid-container { max-width: 1280px; padding-left: 10px; padding-right: 10px; }
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus > a,
.main-navigation .main-nav ul li.sfHover > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a { background: var(--gp-green-hover); color: #ffffff; }
.main-navigation ul ul { background: var(--gp-green-deep); }
.main-navigation .main-nav ul ul li a { line-height: 1.4; padding: 12px 16px; color: #ffffff; }
.main-navigation .main-nav ul ul li:hover > a,
.main-navigation .main-nav ul ul li[class*="current-menu-"] > a { background: var(--gp-green-dark); }
.main-navigation .inside-navigation { justify-content: center; }
@media (max-width: 1180px) {
  .main-navigation .main-nav ul li a { line-height: 48px; font-size: 16px; padding-left: 20px; }
  .main-navigation .inside-navigation { justify-content: center; }
  .main-navigation .menu-toggle { color: #fff; font-weight: 700; }
  .main-navigation .main-nav ul ul { background: var(--gp-green-hover); }
}

/* Full-width pages: covers bleed edge to edge, everything else is contained */
.full-width-content .site-content .content-area,
.full-width-content .site-main { margin: 0; }
.full-width-content .inside-article { padding: 0; }
.full-width-content .entry-content > *:not(.gp-hero):not(.gp-page-hero):not(.alignfull) {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}
.full-width-content .entry-content > .wp-block-columns { padding-left: 20px; padding-right: 20px; }
.entry-content > .gp-hero,
.entry-content > .gp-page-hero { margin-top: 0; margin-bottom: 2.5rem; }
.full-width-content .entry-content > :last-child { margin-bottom: 3rem; }
.full-width-content .entry-content > h1:first-child { margin-top: 2.5rem; }
.gp-hero .wp-block-cover__inner-container,
.gp-page-hero .wp-block-cover__inner-container { max-width: 900px; margin: 0 auto; }
.gp-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.gp-hero p { font-size: 1.15rem; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.gp-page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-shadow: 0 2px 8px rgba(0,0,0,.45); }

h1, h2, h3 { line-height: 1.25; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2rem; }
h3 { font-size: 1.25rem; }

.entry-content img { height: auto; max-width: 100%; }
.gp-service-cards .wp-block-column { border-radius: 4px; }
.gp-service-cards figure a { display: block; }
.gp-service-cards figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.wp-block-button__link { border-radius: 3px; font-weight: 700; }
.wp-block-button.is-style-outline .wp-block-button__link { border: 2px solid var(--gp-green); color: var(--gp-green-hover); background: transparent; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--gp-green); color: #fff; }
.gp-hero .wp-block-button.is-style-outline.gp-btn-call .wp-block-button__link { background: var(--gp-yellow); color: var(--gp-yellow-ink); border-color: var(--gp-yellow); }
.wp-block-details { border: 1px solid #e3e8da; border-radius: 4px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; background: #fbfcf8; }
.wp-block-details summary { font-weight: 700; color: var(--gp-navy); cursor: pointer; }

/* Footer */
.gp-footer { background: var(--gp-green-deep); color: var(--gp-lime); padding: 3rem 20px 2rem; }
.gp-footer__inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.gp-footer h2 { color: var(--gp-yellow); font-size: 1.1rem; margin: 0 0 0.75rem; text-transform: uppercase; letter-spacing: .04em; }
.gp-footer p, .gp-footer li { color: #e9f2d8; font-size: 0.95rem; margin: 0 0 0.4rem; }
.gp-footer ul { list-style: none; margin: 0; padding: 0; }
.gp-footer a { color: var(--gp-yellow); text-decoration: none; }
.gp-footer a:hover { text-decoration: underline; }
.gp-footer__phone { font-size: 1.35rem; font-weight: 700; }
.gp-footer__logo img { max-width: 220px; height: auto; margin-bottom: 0.75rem; }
.site-footer .site-info { background: #12291a; color: #b9c9a6; font-size: 0.85rem; }
.site-footer .site-info a { color: var(--gp-lime); }
@media (max-width: 768px) {
  .gp-footer__inner { grid-template-columns: 1fr; }
  .gp-header-ctas { display: none; }
  .site-header .inside-header { justify-content: center; }
}

.screen-reader-text:focus { clip: auto; height: auto; width: auto; }

/* Third-party embeds (Formsite estimate form, PayPal button) */
.gp-embed { margin: 1rem 0 2rem; }
.gp-embed iframe { width: 100%; max-width: 100%; border: 0; }
@media (min-width: 1181px) and (max-width: 1279px) {
  .main-navigation .main-nav ul li a { padding-left: 6px; padding-right: 6px; font-size: 13px; }
  .main-navigation .main-nav ul li.menu-item-has-children .dropdown-menu-toggle { padding-left: 2px; padding-right: 6px; }
}
