/*
Theme Name:   Ironwood Tree Co
Theme URI:    https://ironwoodtreeco.com
Description:  Child theme for Ironwood Tree Co — built on Kadence. Mobile first.
Author:       Ironwood Tree Co
Template:     kadence
Version:      1.1.1
*/

/* ─── Brand Tokens ─────────────────────────────────────────────────────────── */
:root {
  --iw-orange:   #F16700;
  --iw-orange-d: #d45800;
  --iw-dark:     #1f2124;
  --iw-dark2:    #2a2d31;
  --iw-olive:    #95976B;
  --iw-light:    #f8f8f8;
  --iw-white:    #ffffff;
  --iw-text:     #333333;
  --iw-gray:     #555555;

  --global-palette1: #F16700;
  --global-palette2: #d45800;
  --global-palette3: #1f2124;
  --global-palette4: #95976B;
  --global-palette5: #f8f8f8;
  --global-palette6: #ffffff;
  --global-palette7: #333333;
  --global-palette8: #555555;
  --global-palette9: #888888;
}

/* ─── Base (mobile) ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--iw-text);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--iw-orange); }
a:hover { color: var(--iw-orange-d); }

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

/* ─── Header — mobile first ─────────────────────────────────────────────────── */
#masthead,
.site-header,
.site-top-header-wrap,
.site-main-header-wrap {
  background-color: var(--iw-dark) !important;
}

/* Top bar — hidden on small phones, shown at tablet+ */
.site-top-header-wrap {
  display: none;
}
@media (min-width: 600px) {
  .site-top-header-wrap {
    display: block;
    background-color: #161819 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .site-top-header-inner-wrap {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
}

/* Mobile: tap-to-call is visible in hero and footer instead of top bar */

/* Nav links */
#site-navigation .nav-menu > li > a,
.site-main-header-wrap .site-header-item a.nav-link {
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1rem;
}
#site-navigation .nav-menu > li > a:hover,
#site-navigation .nav-menu > li.current-menu-item > a {
  color: var(--iw-orange) !important;
}

/* Mobile nav drawer */
.kadence-mobile-nav,
.mobile-navigation a {
  color: #ffffff !important;
  font-size: 1.1rem;
  padding: 14px 20px;
  min-height: 48px; /* thumb-friendly touch target */
  display: flex;
  align-items: center;
}

/* Hamburger toggle — easy to tap on mobile */
.menu-toggle-open,
.mobile-menu-toggle {
  color: #ffffff !important;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Header CTA button */
.header-button-wrap .header-button,
.header-button-wrap a.header-button {
  background-color: var(--iw-orange) !important;
  color: #ffffff !important;
  border-color: var(--iw-orange) !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  padding: 10px 18px !important;
  font-size: 0.95rem !important;
  white-space: nowrap;
  min-height: 44px;
}
.header-button-wrap .header-button:hover,
.header-button-wrap a.header-button:hover {
  background-color: var(--iw-orange-d) !important;
  border-color: var(--iw-orange-d) !important;
}

/* Dropdown menus */
.nav-drop-wrap .dropdown-nav-list {
  background-color: var(--iw-dark) !important;
  border-top: 3px solid var(--iw-orange);
}
.nav-drop-wrap .dropdown-nav-list a {
  color: #ffffff !important;
  padding: 12px 20px !important;
  min-height: 44px;
}
.nav-drop-wrap .dropdown-nav-list a:hover {
  color: var(--iw-orange) !important;
  background-color: var(--iw-dark2) !important;
}

/* Logo */
.site-logo img,
.custom-logo {
  max-height: 48px;
  width: auto;
}
@media (min-width: 768px) {
  .site-logo img,
  .custom-logo {
    max-height: 60px;
  }
}

/* ─── Buttons — mobile first ─────────────────────────────────────────────────── */
/* Touch target: minimum 44px tall */
.wp-block-button__link,
.wp-element-button {
  border-radius: 4px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 14px 24px !important;
  min-height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
  text-decoration: none !important;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: var(--iw-orange);
  color: #ffffff !important;
  border: 2px solid var(--iw-orange);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--iw-orange-d) !important;
  border-color: var(--iw-orange-d) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  border: 2px solid currentColor;
}

/* On mobile, buttons in a row stack vertically and go full-width */
.wp-block-buttons {
  gap: 12px;
}
.wp-block-buttons .wp-block-button {
  width: 100%;
}
.wp-block-buttons .wp-block-button__link {
  width: 100%;
  text-align: center;
}

/* At tablet+, buttons sit side by side again */
@media (min-width: 600px) {
  .wp-block-buttons .wp-block-button {
    width: auto;
  }
  .wp-block-buttons .wp-block-button__link {
    width: auto;
  }
}

/* ─── Hero — mobile first ────────────────────────────────────────────────────── */
.ironwood-hero,
.ironwood-hero.wp-block-cover {
  min-height: 520px !important;
  padding: 60px 16px !important;
}
.ironwood-hero .wp-block-cover__inner-container {
  padding: 0;
  width: 100%;
  max-width: 100%;
  text-align: center;
}
.ironwood-hero h1 {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  margin-bottom: 16px !important;
}
.ironwood-hero p {
  font-size: 1rem !important;
}

@media (min-width: 600px) {
  .ironwood-hero h1 {
    font-size: 2.4rem !important;
  }
}
@media (min-width: 1024px) {
  .ironwood-hero,
  .ironwood-hero.wp-block-cover {
    min-height: 680px !important;
    padding: 100px 24px !important;
  }
  .ironwood-hero .wp-block-cover__inner-container {
    max-width: 860px;
    margin: 0 auto;
  }
  .ironwood-hero h1 {
    font-size: 3.2rem !important;
  }
  .ironwood-hero p {
    font-size: 1.2rem !important;
  }
}

/* Trust badge line in hero — readable on small screens */
.ironwood-hero .ironwood-trust-badges {
  font-size: 0.9rem !important;
  line-height: 2 !important;
}
@media (min-width: 600px) {
  .ironwood-hero .ironwood-trust-badges {
    font-size: 1rem !important;
  }
}

/* ─── Sections — mobile first ────────────────────────────────────────────────── */
/*
 * Outer alignfull groups: NO left/right padding.
 * Backgrounds must bleed edge-to-edge. Horizontal spacing is handled
 * entirely by .wp-block-group__inner-container (see below), using the
 * same CSS vars Kadence uses for the header — so they always match.
 */
.wp-block-group.alignfull {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.wp-block-group.alignfull[style*="padding-top"] {
  padding-top: 48px !important;
  padding-bottom: 48px !important;
}
@media (min-width: 768px) {
  .wp-block-group.alignfull[style*="padding-top"] {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }
}
@media (min-width: 1024px) {
  .wp-block-group.alignfull[style*="padding-top"] {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
  }
}

/* Section headings — mobile first */
.wp-block-heading {
  line-height: 1.25;
}
h1.wp-block-heading { font-size: 1.8rem; }
h2.wp-block-heading { font-size: 1.5rem; }
h3.wp-block-heading { font-size: 1.2rem; }

@media (min-width: 768px) {
  h1.wp-block-heading { font-size: 2.2rem; }
  h2.wp-block-heading { font-size: 1.8rem; }
  h3.wp-block-heading { font-size: 1.3rem; }
}
@media (min-width: 1024px) {
  h1.wp-block-heading { font-size: 2.8rem; }
  h2.wp-block-heading { font-size: 2rem; }
  h3.wp-block-heading { font-size: 1.4rem; }
}

/* ─── Columns — override inline flex-basis on mobile ────────────────────────── */
/* WordPress columns stack by default on mobile — enforce it */
.wp-block-columns {
  flex-wrap: wrap;
  gap: 16px;
}

/* About section — portrait photo on mobile stays centered */
.ironwood-about-section .wp-block-image {
  margin: 0 auto 32px;
  text-align: center;
  max-width: 280px;
}
@media (min-width: 1024px) {
  .ironwood-about-section .wp-block-image {
    margin: 0;
    max-width: 100%;
  }
}

/* Stats row — horizontal even on mobile */
.ironwood-about-section .wp-block-columns.stats-row .wp-block-column {
  flex-basis: calc(33% - 8px) !important;
  min-width: 0 !important;
  text-align: center;
}

/* ─── Service Cards — mobile first ──────────────────────────────────────────── */
.ironwood-service-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 24px 20px;
  margin-bottom: 16px;
  /* Full width on mobile — column block is already 100% */
}
@media (min-width: 1024px) {
  .ironwood-service-card {
    padding: 32px 24px;
    transition: box-shadow 0.2s, transform 0.2s;
  }
  .ironwood-service-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
  }
}

.ironwood-service-card h3 {
  color: var(--iw-dark);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.ironwood-service-card p {
  color: var(--iw-gray);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.ironwood-service-card .wp-block-button__link {
  color: var(--iw-orange) !important;
  border-color: var(--iw-orange) !important;
  font-size: 0.9rem !important;
  padding: 10px 18px !important;
  min-height: 44px !important;
}
.ironwood-service-card .wp-block-button__link:hover {
  background-color: var(--iw-orange) !important;
  color: #ffffff !important;
}

/* ─── Why Cards — mobile first ───────────────────────────────────────────────── */
.ironwood-why-card {
  padding: 20px 18px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.ironwood-why-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.ironwood-why-card p {
  font-size: 0.9rem;
}

/* ─── Testimonial Cards — mobile first ──────────────────────────────────────── */
.ironwood-testimonial-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 24px 20px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.ironwood-testimonial-card p:first-child {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

/* ─── FAQ Accordion — mobile first ──────────────────────────────────────────── */
.ironwood-faq-item {
  border-bottom: 1px solid #e8e8e8;
}
.ironwood-faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  /* Minimum touch target */
  min-height: 48px;
}
.ironwood-faq-item summary::-webkit-details-marker { display: none; }
.ironwood-faq-item summary::after {
  content: '+';
  color: var(--iw-orange);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.ironwood-faq-item[open] summary::after { content: '−'; }
.ironwood-faq-item p {
  padding-bottom: 16px;
  color: var(--iw-gray);
  font-size: 0.95rem;
}

/* ─── Service page hero — mobile first ──────────────────────────────────────── */
.ironwood-service-hero {
  padding: 56px 16px !important;
  text-align: center;
}
.ironwood-service-hero h1 {
  font-size: 1.6rem !important;
  line-height: 1.2 !important;
}
.ironwood-service-hero p {
  font-size: 0.95rem !important;
}
@media (min-width: 768px) {
  .ironwood-service-hero {
    padding: 72px 24px !important;
  }
  .ironwood-service-hero h1 {
    font-size: 2.2rem !important;
  }
  .ironwood-service-hero p {
    font-size: 1.1rem !important;
  }
}
@media (min-width: 1024px) {
  .ironwood-service-hero {
    padding: 96px 24px !important;
  }
  .ironwood-service-hero h1 {
    font-size: 2.8rem !important;
  }
  .ironwood-service-hero p {
    font-size: 1.2rem !important;
  }
}

/* ─── Stats row in About section — mobile first ──────────────────────────────── */
.ironwood-stats-row .wp-block-column {
  text-align: center;
  /* 3 across even on mobile */
  flex-basis: calc(33% - 8px) !important;
  min-width: 0 !important;
}

/* ─── Footer — mobile first ─────────────────────────────────────────────────── */
.site-footer,
#colophon {
  background-color: var(--iw-dark) !important;
  color: #cccccc;
  padding: 40px 16px 20px;
  font-size: 0.95rem;
}
.site-footer a { color: var(--iw-orange); }
.site-footer a:hover { color: var(--iw-orange-d); }
.site-footer p { color: #cccccc; margin-bottom: 8px; }

.site-footer-row-wrap.footer-below-row {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .site-footer,
  #colophon {
    padding: 48px 24px 24px;
  }
}

/* ─── Service Areas grid — mobile first ──────────────────────────────────────── */
.ironwood-area-pill {
  /* Pills that wrap naturally */
  display: inline-block;
  background: var(--iw-dark2);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 0.95rem;
  margin: 4px;
}

/* ─── Free Estimate page — mobile first ─────────────────────────────────────── */
.ironwood-estimate-card {
  padding: 28px 20px;
  border-radius: 8px;
}
@media (min-width: 768px) {
  .ironwood-estimate-card {
    padding: 40px;
  }
}

/* ─── Phone link — always full-width tap target on mobile ────────────────────── */
a[href^="tel"] {
  white-space: nowrap;
}

/* ─── Constrained content width — matches header exactly ─────────────────────── */
/*
 * Uses the same Kadence CSS vars the header uses:
 *   --global-content-width:        1290px  (same as .site-container)
 *   --global-content-edge-padding: 1.5rem  (24px side gutter)
 * On screens < 1290px the container is 100% width with 1.5rem gutters;
 * on wider screens it centers at 1290px — perfectly aligned with the header.
 */
.entry-content,
.wp-block-group .wp-block-group__inner-container {
  max-width: var(--global-content-width, 1290px);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding-left: var(--global-content-edge-padding, 1.5rem);
  padding-right: var(--global-content-edge-padding, 1.5rem);
  box-sizing: border-box;
}
