/*
Theme Name: Tenmile Creek Divi Child
Template: Divi
Version: 0.8.2
Description: Child theme for Tenmile Creek Excavating, LLC (Stabilization and Milling divisions).
Text Domain: tenmile-divi-child
*/

:root {
  --tce-red: #b03a3e;
  --tce-red-dark: #8c2b2f;
  --tce-ink: #1d1e21;
  --tce-charcoal: #2a2c30;
  --tce-steel: #5d6168;
  --tce-sand: #f4f1ec;
  --tce-line: #e1dcd3;
  --tce-white: #ffffff;
  --tce-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --tce-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --tce-wrap: 1180px;
}

/* ---------- Base (overrides Divi defaults) ---------- */
html, body.tce { background: var(--tce-white); }
body.tce { font-family: var(--tce-body); font-size: 17px; line-height: 1.65; color: var(--tce-charcoal); }
body.tce #page-container { padding-top: 0 !important; overflow: visible; }
body.tce #et-main-area, body.tce #main-content { background: transparent; }
body.tce h1, body.tce h2, body.tce h3, body.tce h4 { font-family: var(--tce-head); color: var(--tce-ink); font-weight: 700; line-height: 1.05; padding: 0; letter-spacing: .01em; }
body.tce h1 { font-size: clamp(42px, 6vw, 76px); text-transform: uppercase; }
body.tce h2 { font-size: clamp(32px, 4vw, 48px); text-transform: uppercase; }
body.tce h3 { font-size: 26px; }
body.tce p { padding-bottom: 0; margin: 0 0 1em; }
body.tce a { color: var(--tce-red); }
body.tce img { max-width: 100%; height: auto; }

.tce-wrap { width: min(100% - 32px, var(--tce-wrap)); margin-inline: auto; }
.tce-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--tce-ink); color: #fff !important; padding: 10px 16px; }
.tce-skip:focus { left: 8px; top: 8px; }
.tce-eyebrow { font-family: var(--tce-head); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: 15px; color: var(--tce-red); margin-bottom: 10px !important; }

.tce-btn { display: inline-block; background: var(--tce-red); color: #fff !important; font-family: var(--tce-head); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 17px; padding: 13px 26px; border-radius: 3px; text-decoration: none; transition: background .2s; }
.tce-btn:hover, .tce-btn:focus-visible { background: var(--tce-red-dark); }
.tce-btn-light { background: #fff; color: var(--tce-red) !important; }
.tce-btn-light:hover, .tce-btn-light:focus-visible { background: var(--tce-sand); }
.tce-btn-ghost { background: transparent; border: 2px solid currentColor; color: #fff !important; }
.tce-btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Missing-detail marker (dev only, disappears once data is entered) */
.tce-todo { display: inline-block; background: #fff4c2; color: #6b5200; border: 1px dashed #c9a400; font: 600 13px/1.3 var(--tce-body); padding: 3px 8px; border-radius: 3px; text-transform: none; letter-spacing: 0; }

/* ---------- Header ---------- */
.tce-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 1px 0 var(--tce-line); }
.admin-bar .tce-header { top: 32px; }
.tce-topbar { background: var(--tce-ink); color: #d9d6d1; font-size: 14px; }
.tce-topbar-inner { display: flex; justify-content: flex-end; gap: 28px; padding: 1px 0; flex-wrap: wrap; }
.tce-topbar-item strong { font-family: var(--tce-head); text-transform: uppercase; letter-spacing: .1em; color: #fff; font-weight: 600; margin-right: 6px; }
body.tce .tce-topbar a { color: #fff; text-decoration: none; display: inline-block; padding: 6px 2px; }
.tce-card .tce-phone { display: inline-block; padding: 6px 0; font: 700 26px/1.2 var(--tce-head); text-decoration: none; }
.tce-header-main { display: flex; align-items: center; gap: 24px; padding: 10px 0; }
.tce-brand { flex: 0 0 auto; display: block; line-height: 0; }
.tce-logo { width: 160px; height: auto; }
.tce-wordmark { font: 700 28px/1 var(--tce-head); text-transform: uppercase; color: var(--tce-red); }
.tce-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.tce-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.tce-menu li { list-style: none; }
body.tce .tce-menu a { display: block; padding: 10px 12px; font-family: var(--tce-head); font-weight: 600; font-size: 18px; text-transform: uppercase; letter-spacing: .06em; color: var(--tce-ink); text-decoration: none; border-bottom: 3px solid transparent; }
body.tce .tce-menu a:hover, body.tce .tce-menu .current-menu-item > a, body.tce .tce-menu .current_page_item > a { border-bottom-color: var(--tce-red); color: var(--tce-red); }
body.tce .tce-menu a, .tce-nav-cta { white-space: nowrap; } /* longer labels (Soil Stabilization, Asphalt Milling) stay on one line */
@media (min-width: 981px) and (max-width: 1120px) {
  body.tce .tce-menu a { padding: 10px 8px; font-size: 16px; letter-spacing: .04em; }
  .tce-nav { gap: 14px; }
  .tce-logo { width: 140px; }
}
.tce-menu-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--tce-ink); border-radius: 3px; padding: 8px 14px; font: 600 16px/1 var(--tce-head); text-transform: uppercase; letter-spacing: .08em; color: var(--tce-ink); cursor: pointer; align-items: center; gap: 10px; }
.tce-menu-bars, .tce-menu-bars::before, .tce-menu-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
.tce-menu-bars::before { position: absolute; top: -6px; }
.tce-menu-bars::after { position: absolute; top: 6px; }

/* ---------- Hero ---------- */
.tce-hero { position: relative; background: var(--tce-ink); color: #fff; overflow: hidden; }
.tce-hero::before { content: ""; position: absolute; inset: 0; background:
  repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px),
  radial-gradient(ellipse at 85% 20%, rgba(176,58,62,.45), transparent 55%); }
.tce-hero-inner { position: relative; padding: clamp(64px, 10vw, 128px) 0 clamp(56px, 8vw, 96px); max-width: 820px; }
body.tce .tce-hero h1 { color: #fff; margin-bottom: 18px; }
.tce-hero h1 em { font-style: normal; color: #f0b9b6; }
.tce-hero .tce-eyebrow { color: #f0b9b6; }
.tce-hero-lead { font-size: 20px; color: #e7e3dd; max-width: 640px; }
.tce-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.tce-page-hero .tce-hero-inner { padding: clamp(48px, 7vw, 88px) 0; }

/* ---------- Division split ---------- */
.tce-split { display: grid; grid-template-columns: 1fr 1fr; }
.tce-split-panel { padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px); color: #fff; position: relative; }
body.tce .tce-split-panel h2, body.tce .tce-split-panel .tce-eyebrow { color: #fff; }
.tce-split-panel .tce-eyebrow { opacity: .8; }
.tce-split-panel p { color: rgba(255,255,255,.88); max-width: 460px; }
.tce-split-stabilization { background: var(--tce-red); }
.tce-split-milling { background: var(--tce-charcoal); }
.tce-split-call > span:first-child { display: block; font: 600 14px/1.4 var(--tce-head); text-transform: uppercase; letter-spacing: .12em; opacity: .8; }
body.tce .tce-split-call .tce-phone { color: #fff; font: 700 32px/1.2 var(--tce-head); text-decoration: none; }
.tce-split-panel .tce-btn { background: #fff; color: var(--tce-ink) !important; }
.tce-split-panel .tce-btn:hover { background: var(--tce-sand); }

/* ---------- Content sections ---------- */
.tce-section { padding: clamp(56px, 8vw, 96px) 0; }
.tce-section-alt { background: var(--tce-sand); }
.tce-section-head { max-width: 720px; margin-bottom: 36px; }
/* Division pages: tighter space above the intro section and above the photo section */
.tce-page-hero + .tce-section:has(+ .tce-section-alt) { padding-top: clamp(36px, 5vw, 60px); padding-bottom: clamp(32px, 4vw, 48px); }
.tce-page-hero + .tce-section + .tce-section-alt { padding-top: clamp(32px, 4vw, 48px); background: rgba(178, 60, 62, .15); } /* logo red #b23c3e, 85% transparent */
.tce-page-hero + .tce-section + .tce-section-alt .tce-section-head { margin-bottom: 24px; }
.tce-two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.tce-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tce-card { background: #fff; border: 1px solid var(--tce-line); border-top: 4px solid var(--tce-red); padding: 26px 24px; border-radius: 3px; }
.tce-card h3 { margin-bottom: 10px; }
.tce-card p:last-child { margin-bottom: 0; }
.tce-list { list-style: none; padding: 0; margin: 0 0 1em; }
.tce-list li { position: relative; padding: 0 0 10px 26px; }
.tce-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; background: var(--tce-red); transform: rotate(45deg); }
.tce-contact-box { background: var(--tce-ink); color: #e7e3dd; padding: 32px 28px; border-radius: 3px; }
body.tce .tce-contact-box h3 { color: #fff; margin-bottom: 12px; }
body.tce .tce-contact-box .tce-phone { color: #fff; font: 700 30px/1.2 var(--tce-head); text-decoration: none; }
.tce-contact-box .tce-label { display: block; font: 600 13px/1.4 var(--tce-head); text-transform: uppercase; letter-spacing: .14em; color: #f0b9b6; margin-top: 16px; }
.tce-note { border-left: 4px solid var(--tce-red); background: #fff; padding: 18px 22px; margin-top: 8px; }
.tce-section-alt .tce-note { background: #fff; }

/* Long-form reading content (division SEO sections) */
.tce-prose { max-width: 860px; }

/* ---------- Photos ---------- */
.tce-split-panel { overflow: hidden; }
.tce-split-panel.has-photo { min-height: 460px; display: flex; align-items: flex-end; }
.tce-split-photo { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; }
.tce-split-panel.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29,30,33,.15) 0%, rgba(29,30,33,.88) 70%); }
.tce-split-stabilization.has-photo::after { background: linear-gradient(180deg, rgba(140,43,47,.2) 0%, rgba(140,43,47,.92) 70%); }
.tce-split-body { position: relative; z-index: 1; }
.tce-shot-needed { margin-top: 18px !important; }
.tce-hero-photo { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; opacity: .38; }
.tce-hero-shot { position: absolute; right: 16px; bottom: 12px; z-index: 2; margin: 0 !important; max-width: 60%; }
.tce-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.tce-gallery-item { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; background: var(--tce-line); }
.tce-gallery-item img { width: 100%; height: 100% !important; object-fit: cover; transition: transform .3s; }
a.tce-gallery-item:hover img, a.tce-gallery-item:focus-visible img { transform: scale(1.04); }
.tce-gallery-empty { aspect-ratio: auto; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px; border: 2px dashed #c9c2b6; background: #fff; }
.tce-gallery-empty > span:first-child { font: 600 17px/1.3 var(--tce-head); text-transform: uppercase; letter-spacing: .04em; color: var(--tce-ink); }
.tce-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(10,10,12,.92); display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.tce-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tce-lightbox-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }

/* ---------- CTA band + footer ---------- */
.tce-cta-band { background: var(--tce-red); color: #fff; }
.tce-cta-inner { display: grid; grid-template-columns: 1fr auto; gap: 12px 40px; align-items: center; padding: 48px 0; }
body.tce .tce-cta-inner h2 { color: #fff; margin: 0; grid-column: 1; }
.tce-cta-inner p { grid-column: 1; margin: 0; color: rgba(255,255,255,.9); }
.tce-cta-inner .tce-btn { grid-column: 2; grid-row: 1 / span 2; }
.tce-footer { background: var(--tce-ink); color: #bdb9b3; font-size: 15px; }
.tce-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr .8fr; gap: 36px; padding: 56px 0 40px; }
body.tce .tce-footer h3 { color: #fff; font-size: 20px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
body.tce .tce-footer a { color: #fff; text-decoration: none; }
body.tce .tce-footer a:hover { color: #f0b9b6; }
.tce-footer .tce-phone { font: 700 24px/1.2 var(--tce-head); }
.tce-footer-logo { display: block; width: 120px; margin-bottom: 4px; }
.tce-footer-apc-label { display: block; margin: 20px 0 8px; font: 600 12px/1.4 var(--tce-head); text-transform: uppercase; letter-spacing: .14em; color: #f0b9b6; }
.tce-footer-apc { display: inline-block; }
.tce-footer-apc img { display: block; width: 110px; height: auto; border-radius: 4px; }
.tce-footer-menu { list-style: none; margin: 0; padding: 0; }
.tce-footer-menu li { list-style: none; padding: 3px 0; }
.tce-footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 26px; font-size: 14px; }
.tce-dot { background: var(--tce-white); border-bottom: 1px solid var(--tce-line); }
.tce-dot-inner { padding: 48px 0 40px; }
body.tce .tce-dot h2 { margin: 0 0 22px; }
.tce-dot-states { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px 24px; margin: 0; }
.tce-dot-states li { font: 600 19px/1.3 var(--tce-head); color: var(--tce-ink); text-transform: uppercase; letter-spacing: .04em; }
.tce-dot-states li::before { top: .35em; }
@media (max-width: 980px) { .tce-dot-states { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tce-dot-states { grid-template-columns: repeat(2, 1fr); gap: 2px 16px; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .tce-menu-toggle { display: inline-flex; }
  .tce-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; box-shadow: 0 12px 24px rgba(0,0,0,.12); }
  .tce-header.is-open .tce-nav { display: flex; }
  .tce-header-main { position: relative; }
  .tce-menu { flex-direction: column; }
  .tce-menu a { border-bottom: 1px solid var(--tce-line); padding: 14px 4px; }
  .tce-nav-cta { margin-top: 14px; text-align: center; }
  .tce-two-col, .tce-cards { grid-template-columns: 1fr; }
  .tce-gallery { grid-template-columns: repeat(2, 1fr); }
  .tce-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body.tce { font-size: 16px; }
  .tce-topbar-inner { justify-content: space-between; gap: 6px 16px; font-size: 13px; }
  .tce-logo { width: 116px; }
  .tce-split { grid-template-columns: 1fr; }
  .tce-cta-inner { grid-template-columns: 1fr; }
  .tce-cta-inner .tce-btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .tce-footer-grid { grid-template-columns: 1fr; }
  .tce-hero-lead { font-size: 18px; }
  .tce-hero-shot { position: relative; right: auto; bottom: auto; max-width: none; padding: 12px 16px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Contact form (Contact Form 7) ---------- */
.tce-form-wrap { background: #fff; border: 1px solid #e3ded6; border-top: 4px solid var(--tce-red); border-radius: 3px; padding: 32px 28px; margin-top: 40px; scroll-margin-top: 120px; }
body.tce .tce-form-wrap h2 { font-size: 34px; margin-bottom: 8px; }
.tce-form-wrap > p { margin-bottom: 22px; max-width: 760px; }
.tce-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.tce-form-grid > p { margin: 0 0 16px; padding: 0; }
.tce-form-grid .tce-field-full { grid-column: 1 / -1; }
.tce-form-grid label { display: block; font: 600 15px/1.3 var(--tce-body); color: var(--tce-ink); }
.tce-form-grid .tce-req { color: var(--tce-red); }
.tce-form-grid .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.tce-form-grid input[type="text"], .tce-form-grid input[type="email"], .tce-form-grid input[type="tel"], .tce-form-grid select, .tce-form-grid textarea { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid #b9b2a8; border-radius: 3px; background: #fff; color: var(--tce-ink); font: 16px/1.4 var(--tce-body); }
.tce-form-grid textarea { height: 160px; resize: vertical; }
.tce-form-grid input:focus, .tce-form-grid select:focus, .tce-form-grid textarea:focus { outline: 2px solid var(--tce-red); outline-offset: 1px; border-color: var(--tce-red); }
.tce-form-grid .wpcf7-submit { border: 0; cursor: pointer; }
.tce-form-grid .wpcf7-not-valid { border-color: #a11d22; }
.tce-form-grid .wpcf7-not-valid-tip { color: #a11d22; font-size: 14px; margin-top: 4px; }
.tce-cf7 .wpcf7-response-output { margin: 8px 0 0 !important; padding: 12px 14px !important; border-radius: 3px; font-size: 16px; }
.tce-cf7.sent .wpcf7-response-output { border-color: #2e7d32 !important; background: #eef7ee; }
@media (max-width: 720px) {
  .tce-form-grid { grid-template-columns: 1fr; }
  .tce-form-wrap { padding: 24px 18px; }
}
.tce-form-grid input[type="file"] { display: block; width: 100%; box-sizing: border-box; padding: 10px; border: 1px dashed #b9b2a8; border-radius: 3px; background: var(--tce-sand); font: 15px/1.4 var(--tce-body); }
.tce-form-grid .tce-hint { display: block; font-weight: 400; font-size: 14px; color: #5b5d63; margin-top: 2px; }

/* Form spam trap: kept off screen, never shown to visitors. */
.tce-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
