/*
Theme Name: VC Earthmoving
Theme URI: https://vcearthmoving.com
Description: Custom child theme for VC Earthmoving (Vic Chiapetta General Engineering) — a Petaluma, CA excavation, grading & general engineering contractor. Built on Twenty Twenty-Four.
Author: Built for Vic Chiapetta
Template: twentytwentyfour
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: vcearthmoving
*/

/* Light supplemental styles — most styling lives in theme.json. */

/* Sticky, tidy header */
.wp-site-blocks .site-header,
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--wp--preset--color--border, #e4e0d8);
}

/* Eyebrow / small-caps label */
.vc-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Service / feature cards */
.vc-card {
  background: #ffffff;
  border: 1px solid var(--wp--preset--color--border, #e4e0d8);
  border-radius: 10px;
  height: 100%;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.vc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(20,22,26,0.10);
  border-color: var(--wp--preset--color--primary, #d9820e);
}

/* Amber top-rule accent under headings */
.vc-rule:after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: var(--wp--preset--color--primary, #d9820e);
  margin-top: 0.7rem;
}
.vc-rule.has-text-align-center:after { margin-left: auto; margin-right: auto; }

/* Make nav links a touch bolder */
.wp-block-navigation .wp-block-navigation-item__content { font-weight: 600; }

/* Don't show a hard focus outline after a mouse click; keep it for keyboard users */
.wp-block-navigation a:focus:not(:focus-visible),
.wp-block-navigation .wp-block-navigation-item__content:focus:not(:focus-visible),
.wp-block-site-title a:focus:not(:focus-visible),
.wp-block-button__link:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}
.wp-block-navigation a:focus-visible,
.wp-block-navigation .wp-block-navigation-item__content:focus-visible,
.wp-block-site-title a:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary, #d9820e);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Hero: keep the background full-bleed, but align the text to the same 1180
   content column as the header/nav (instead of hugging the far-left edge). */
.wp-block-cover__inner-container .vc-hero-content {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.wp-block-cover__inner-container .vc-hero-content > * {
  max-width: 720px;
  margin-left: 0;
  margin-right: 0;
}

/* Gallery: force uniform grid tiles (override WordPress's variable-height flex
   gallery layout, which otherwise gives uneven rows and stretches a lone last image). */
.vc-gallery.wp-block-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.vc-gallery.wp-block-gallery .wp-block-image {
  margin: 0 !important;
  width: 100% !important;
}
.vc-gallery.wp-block-gallery .wp-block-image img {
  width: 100% !important;
  height: 260px !important;
  object-fit: cover !important;
  border-radius: 8px;
}
@media (max-width: 900px) { .vc-gallery.wp-block-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .vc-gallery.wp-block-gallery { grid-template-columns: 1fr; } }

/* Buttons: subtle lift */
.wp-block-button__link { transition: transform .12s ease, filter .12s ease; }
.wp-block-button__link:hover { filter: brightness(0.94); transform: translateY(-1px); }

/* Respect reduced-motion preference — suppress non-essential animation. */
@media (prefers-reduced-motion: reduce) {
  .vc-card, .wp-block-button__link, .vce-faq__q::after {
    transition: none !important;
  }
  .vc-card:hover, .wp-block-button__link:hover { transform: none !important; }
}

/* Interior pages: left-align readable-width blocks so their left edge lines up
   with the full-width (alignwide) cards, instead of floating centered.
   Overrides WordPress's constrained-layout auto-centering (which uses !important). */
.wp-block-post-content > :not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright) {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Service page "What's included" — full-width checklist grid */
.vc-includes ul {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem 2.5rem;
}
.vc-includes li {
  position: relative;
  padding-left: 1.9rem;
  font-size: 1.05rem;
  line-height: 1.5;
}
.vc-includes li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--wp--preset--color--primary, #d9820e);
  font-weight: 700;
}
@media (max-width: 900px) { .vc-includes ul { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .vc-includes ul { grid-template-columns: 1fr; } }

/* Contact form (Contact Form 7) — larger, full-width fields */
.wpcf7-form p { margin-bottom: 1.15rem; }
.wpcf7-form label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.wpcf7-form input[type=text],
.wpcf7-form input[type=email],
.wpcf7-form input[type=tel],
.wpcf7-form input[type=url],
.wpcf7-form input[type=number],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  line-height: 1.4;
  border: 1px solid var(--wp--preset--color--border, #e4e0d8);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.wpcf7-form textarea { min-height: 175px; resize: vertical; }
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  outline: 2px solid var(--wp--preset--color--primary, #d9820e);
  outline-offset: 1px;
  border-color: var(--wp--preset--color--primary, #d9820e);
}
.wpcf7-form .wpcf7-submit {
  width: auto;
  background: var(--wp--preset--color--primary, #d9820e);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.95rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s ease;
}
.wpcf7-form .wpcf7-submit:hover { background: var(--wp--preset--color--primary-dark, #b56a08); }

/* FAQ accordions */
.vce-faq { max-width: 820px; margin: 0 auto; }
.vce-faq__item {
  border: 1px solid var(--wp--preset--color--border, #e4e0d8);
  border-radius: 10px;
  margin-bottom: 0.8rem;
  background: #fff;
  overflow: hidden;
}
.vce-faq__q {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.3rem;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.vce-faq__q::-webkit-details-marker { display: none; }
.vce-faq__q::after {
  content: "+";
  color: var(--wp--preset--color--primary, #d9820e);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  transition: transform .2s ease;
}
.vce-faq__item[open] .vce-faq__q::after { transform: rotate(45deg); }
.vce-faq__item[open] .vce-faq__q { border-bottom: 1px solid var(--wp--preset--color--border, #e4e0d8); }
.vce-faq__a { padding: 1rem 1.3rem 1.2rem; }
.vce-faq__a p { margin: 0; line-height: 1.65; }
