/* ================================================================
   TRADES TEMPLATE — AVA Site Builder
   Theme tokens (lines 10–20): override per business, nothing else changes.
   ================================================================ */

/* --- THEME TOKENS ------------------------------------------------- */
:root {
  --c-primary:      #2D3748;
  --c-primary-dark: #1A202C;
  --c-accent:       #3182CE;
  --c-accent-hover: #2B6CB0;
  --c-text:         #2D3748;
  --c-text-muted:   #718096;
  --c-bg:           #FFFFFF;
  --c-bg-alt:       #F7FAFC;
  --c-border:       #E2E8F0;
  --c-white:        #ffffff;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,.10);
  --max-w: 860px;
}

/* --- RESET --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--c-text);
  background: var(--c-bg);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-accent); }
a:hover { color: var(--c-accent-hover); }

/* --- LAYOUT -------------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
section { padding: 4rem 0; }
/* Trust and CTA sections carry their own backgrounds — exclude from alternating rule */
section:nth-child(even):not(.trust-section):not(.cta-section) { background: var(--c-bg-alt); }

/* --- TYPOGRAPHY ---------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font);
  line-height: 1.25;
  color: var(--c-primary);
}
h2 { font-size: 1.875rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.375rem; margin-bottom: .875rem; color: var(--c-text); }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* --- BUTTONS ------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: .8rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background .15s, transform .1s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--c-accent);
  color: var(--c-white);
}
.btn-primary:hover {
  background: var(--c-accent-hover);
  color: var(--c-white);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--c-white);
  border: 2px solid var(--c-white);
}
.btn-outline:hover {
  background: var(--c-white);
  color: var(--c-primary);
}
.btn-lg { padding: 1rem 2.25rem; font-size: 1.125rem; }

/* --- HEADER ------------------------------------------------------- */
.site-header {
  background: var(--c-primary);
  color: var(--c-white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--c-white);
  text-decoration: none;
  flex-shrink: 0;
}
.site-title:hover { color: var(--c-white); opacity: .9; }
.header-phone {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-white);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { opacity: .85; color: var(--c-white); }
.header-nav {
  background: var(--c-primary-dark);
  border-top: 1px solid rgba(255,255,255,.1);
}
.header-nav ul {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  gap: 0;
  list-style: none;
  overflow-x: auto;
}
.header-nav a {
  display: block;
  padding: .625rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  white-space: nowrap;
}
.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: var(--c-white);
  background: rgba(255,255,255,.08);
}

/* --- HERO --------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--c-primary-dark);
  max-height: 560px;
}
.hero-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15,35,56,.15) 0%,
    rgba(15,35,56,.72) 60%,
    rgba(15,35,56,.88) 100%
  );
  display: flex;
  align-items: flex-end;
}
.hero-content {
  padding: 2.5rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  color: var(--c-white);
}
.hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--c-white);
  margin-bottom: .75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero-content .hero-sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,.88);
  margin-bottom: 1.5rem;
  max-width: 560px;
}
.hero-content .hero-sub:last-child { margin-bottom: 0; }

/* --- INTRO -------------------------------------------------------- */
.intro-section .lead {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--c-text);
  max-width: 720px;
}

/* --- CONTENT ------------------------------------------------------ */
.content-section h3 { margin-top: 2rem; }
.content-section h3:first-child { margin-top: 0; }

/* --- OPTIONAL SECTIONS -------------------------------------------- */
.optional-section h3 {
  color: var(--c-primary);
  font-size: 1.4375rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--c-accent);
  margin-bottom: 1.25rem;
}

/* --- FAQ ---------------------------------------------------------- */
.faq-section h2 { margin-bottom: 1.75rem; }
.faq-list { display: flex; flex-direction: column; gap: .5rem; }
details {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
details + details { margin-top: 0; }
summary {
  padding: 1.125rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--c-bg);
  transition: background .12s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--c-accent);
  flex-shrink: 0;
  line-height: 1;
}
details[open] summary {
  background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-border);
}
details[open] summary::after { content: '−'; }
summary:hover { background: var(--c-bg-alt); }
.faq-answer {
  padding: 1.125rem 1.25rem;
  background: var(--c-bg);
  color: var(--c-text);
}
.faq-answer p { margin-bottom: 0; }

/* --- TRUST SIGNALS ------------------------------------------------ */
.trust-section { background: var(--c-primary); color: var(--c-white); }
.trust-section h2 { color: var(--c-white); margin-bottom: 2rem; text-align: center; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.trust-item {
  background: rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: .875rem;
}
.trust-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: .125rem;
}
.trust-label {
  font-weight: 700;
  font-size: .9375rem;
  color: var(--c-white);
  display: block;
  margin-bottom: .125rem;
}
.trust-detail {
  font-size: .875rem;
  color: rgba(255,255,255,.75);
}

/* --- REVIEWS SLOT ------------------------------------------------- */
.reviews-slot {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9375rem;
  color: rgba(255,255,255,.9);
  justify-content: center;
  margin-top: 1.75rem;
}
.stars { color: #f5c518; letter-spacing: .05em; }

/* --- CTA SECTION -------------------------------------------------- */
.cta-section {
  background: var(--c-bg-alt);
  text-align: center;
}
.cta-section h2 {
  margin-bottom: .75rem;
  font-size: 2rem;
}
.cta-section .cta-sub {
  color: var(--c-text-muted);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.cta-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-weight: 600;
  font-size: 1.0625rem;
}
.cta-contacts a {
  color: var(--c-primary);
  text-decoration: none;
}
.cta-contacts a:hover { text-decoration: underline; }

/* --- RELATED SERVICES --------------------------------------------- */
.related-section h2 { margin-bottom: 1.5rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.related-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  display: block;
  transition: border-color .15s, box-shadow .15s;
  background: var(--c-bg);
}
.related-card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow);
  color: var(--c-accent);
}
.related-card strong {
  display: block;
  color: var(--c-primary);
  font-size: 1rem;
  margin-bottom: .25rem;
}
.related-card span {
  color: var(--c-text-muted);
  font-size: .875rem;
}

/* --- FOOTER ------------------------------------------------------- */
.site-footer {
  background: var(--c-primary-dark);
  color: rgba(255,255,255,.8);
  padding: 3rem 1.25rem 2rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.footer-brand { font-weight: 700; font-size: 1rem; color: var(--c-white); }
.footer-nap { display: flex; flex-direction: column; gap: .375rem; font-size: .9375rem; }
.footer-nap a { color: rgba(255,255,255,.8); text-decoration: none; }
.footer-nap a:hover { color: var(--c-white); }
.footer-nav h3 {
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
  margin-bottom: .875rem;
}
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: .375rem; }
.footer-nav a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .9375rem; }
.footer-nav a:hover { color: var(--c-white); }
.footer-copy {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8125rem;
  color: rgba(255,255,255,.62); /* .45 failed WCAG AA (~4.3:1); .62 → ~5.5:1 */
  text-align: center;
}

/* --- RESPONSIVE --------------------------------------------------- */
@media (max-width: 600px) {
  section { padding: 2.75rem 0; }
  .hero-img { height: 320px; }
  .hero-content { padding: 1.75rem 1.25rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .cta-contacts { flex-direction: column; gap: .625rem; }
}
@media (max-width: 400px) {
  .trust-grid { grid-template-columns: 1fr; }
}
