/* =============================================================================
   PLACENCIA CONTRACTING — SITE STYLESHEET
   =============================================================================
   Table of contents (search for these headings to jump around):
     1. CSS variables (colors, fonts, spacing) — change the look here
     2. Reset & base styles
     3. Layout helpers (containers, sections, buttons)
     4. Header & navigation
     5. Hero
     6. Stats bar
     7. Process steps
     8. Services grid
     9. Pillars / Why choose us / Values
    10. FAQ accordion
    11. Comparison table (service pages)
    12. Timeline (about page)
    13. Contact page
    14. CTA band
    15. Footer
    16. 404 page
    17. Quote quiz (/quote/ page)
    18. Reviews (homepage)
    19. Responsive (mobile) overrides
============================================================================= */


/* -----------------------------------------------------------------------
   1. CSS VARIABLES
   Change colors/fonts here and the whole site updates.
----------------------------------------------------------------------- */
:root {
  /* Brand colors: Navy & Safety Orange */
  --color-navy: #0F2A47;
  --color-navy-dark: #0A1D33;
  --color-orange: #F26522;
  --color-orange-dark: #D9550F;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-light-gray: #F4F6F8;
  --color-gray: #6B7280;
  --color-border: #E2E5E9;
  --color-text: #1A1A1A;

  /* Status colors (form feedback) */
  --color-success: #1E7B34;
  --color-error: #C4351C;

  /* Typography */
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Roboto', sans-serif;

  /* Layout */
  --container-width: 1160px;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(15, 42, 71, 0.08);
}


/* -----------------------------------------------------------------------
   2. RESET & BASE STYLES
----------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-white);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--color-orange);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

ul { list-style: none; }

/* Visually hidden but still readable by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}


/* -----------------------------------------------------------------------
   3. LAYOUT HELPERS
----------------------------------------------------------------------- */
.section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: 760px;
}

.section-inner h2 {
  text-align: center;
}

.center { text-align: center; }

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-orange-dark); }

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.btn-outline:hover { background: var(--color-navy); color: var(--color-white); }

.btn-outline-light {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-outline-light:hover { background: var(--color-white); color: var(--color-navy); }


/* -----------------------------------------------------------------------
   4. HEADER & NAVIGATION
----------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-navy);
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }

.logo-mark {
  color: var(--color-orange);
  font-size: 1.6rem;
}

.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list > li > a,
.dropdown-toggle {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: var(--color-navy);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
}
.nav-list > li > a:hover,
.dropdown-toggle:hover { color: var(--color-orange); text-decoration: none; }

.has-dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
}

/* Desktop: hover OR the JS "open" class shows the dropdown */
@media (min-width: 769px) {
  .has-dropdown:hover .dropdown-menu,
  .has-dropdown.open .dropdown-menu {
    display: block;
  }
}
/* Mobile/touch/keyboard: only the JS "open" class shows it */
.has-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  text-transform: none;
  font-weight: 400;
  color: var(--color-text);
}
.dropdown-menu li a:hover {
  background: var(--color-light-gray);
  text-decoration: none;
}

.chevron { transition: transform 0.15s ease; }
.has-dropdown.open .chevron { transform: rotate(180deg); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  white-space: nowrap;
}

.header-phone {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-navy);
}
.header-phone:hover { color: var(--color-orange); text-decoration: none; }

/* Mobile hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
}


/* -----------------------------------------------------------------------
   5. HERO
----------------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
  color: var(--color-white);
  padding: 6rem 1.5rem;
  text-align: center;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.hero h1 { color: var(--color-white); }

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 1rem auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Slightly shorter hero on interior pages (service/about/contact) */
.hero-page,
.hero-service {
  padding: 4rem 1.5rem;
}


/* -----------------------------------------------------------------------
   6. STATS BAR
----------------------------------------------------------------------- */
.stats-bar {
  background: var(--color-orange);
}

.stats-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--color-white);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
}


/* -----------------------------------------------------------------------
   7. PROCESS STEPS
----------------------------------------------------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.process-step {
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 1rem;
}


/* -----------------------------------------------------------------------
   8. SERVICES GRID
----------------------------------------------------------------------- */
.services-section { background: var(--color-light-gray); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  color: var(--color-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.service-card h3 { color: var(--color-navy); }
.service-card p { color: var(--color-gray); font-size: 0.95rem; }

.service-link {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--color-orange);
}


/* -----------------------------------------------------------------------
   9. PILLARS / WHY CHOOSE US / VALUES
----------------------------------------------------------------------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.pillar {
  border-top: 3px solid var(--color-orange);
  padding-top: 1rem;
}


/* -----------------------------------------------------------------------
   10. FAQ ACCORDION
   Uses native <details>/<summary> — no JS needed.
----------------------------------------------------------------------- */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.faq-item summary {
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  color: var(--color-navy);
  list-style: none; /* hide default arrow in supporting browsers */
}
.faq-item summary::-webkit-details-marker { display: none; }

/* Custom plus/minus indicator */
.faq-item summary {
  position: relative;
  padding-right: 1.5rem;
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.2rem;
  color: var(--color-orange);
}
.faq-item[open] summary::after {
  content: "\2212"; /* minus sign */
}

.faq-item p {
  margin-top: 0.75rem;
  margin-bottom: 0;
  color: var(--color-gray);
}


/* -----------------------------------------------------------------------
   11. COMPARISON TABLE (service pages)
----------------------------------------------------------------------- */
.table-scroll {
  overflow-x: auto; /* prevents page overflow on narrow screens */
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.compare-table th {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--color-white);
  background: var(--color-navy);
}

.compare-table tbody tr:nth-child(even) {
  background: var(--color-light-gray);
}


/* -----------------------------------------------------------------------
   12. TIMELINE (about page)
----------------------------------------------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  border-left: 3px solid var(--color-orange);
  padding-left: 1.25rem;
}

.timeline-year {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-navy);
}


/* -----------------------------------------------------------------------
   13. CONTACT PAGE
----------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
}

.contact-details li { margin-bottom: 0.5rem; }

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--color-border);
}

address { font-style: normal; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  width: 100%;
}

.contact-form button {
  margin-top: 1.25rem;
  align-self: flex-start;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Honeypot spam trap: invisible to real visitors (and skipped by screen
   readers via aria-hidden on the wrapper), but present in the HTML for
   bots that auto-fill every field. See functions/api/contact.js. */
.honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-gray);
}

.form-note-success { color: var(--color-success); }
.form-note-error { color: var(--color-error); }


/* -----------------------------------------------------------------------
   14. CTA BAND
----------------------------------------------------------------------- */
.cta-band {
  background: var(--color-navy);
  color: var(--color-white);
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.cta-band h2 { color: var(--color-white); }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin-bottom: 1.5rem; }

.cta-inner { max-width: 600px; margin: 0 auto; }


/* -----------------------------------------------------------------------
   15. FOOTER
----------------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.85);
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 2rem;
}

.footer-col h3,
.footer-col h4 {
  color: var(--color-white);
  margin-bottom: 1rem;
}

.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: rgba(255, 255, 255, 0.75); }
.footer-col a:hover { color: var(--color-orange); }

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
}


/* -----------------------------------------------------------------------
   16. 404 PAGE
----------------------------------------------------------------------- */
.not-found {
  padding: 6rem 1.5rem;
}
.not-found h1 { margin-bottom: 1rem; }
.not-found p { margin-bottom: 2rem; color: var(--color-gray); }


/* -----------------------------------------------------------------------
   17. QUOTE QUIZ (/quote/ page)
----------------------------------------------------------------------- */
.quote-section { padding-top: 2rem; }

.quiz {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
}

.quiz-progress {
  height: 6px;
  background: var(--color-light-gray);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.quiz-progress-bar {
  height: 100%;
  width: 0%; /* set by quote.js as the visitor answers each question */
  background: var(--color-orange);
  transition: width 0.25s ease;
}

.quiz-step-label {
  font-size: 0.85rem;
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

/* Only the active step is visible — quote.js toggles this class */
.quiz-step { display: none; }
.quiz-step.quiz-step-active { display: block; }

.quiz-step h2 {
  text-align: left;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-option {
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.quiz-option:hover {
  border-color: var(--color-orange);
}

.quiz-option-selected {
  border-color: var(--color-orange);
  background: var(--color-light-gray);
  font-weight: 500;
}

.quiz-nav {
  margin-top: 1.5rem;
}

/* Hidden (not display:none) so its layout space stays reserved on step 1 —
   avoids the page jumping when Back appears on later steps. */
#quizBackBtn {
  visibility: hidden;
}

.quiz-alt-path {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-gray);
}


/* -----------------------------------------------------------------------
   18. REVIEWS (homepage)
----------------------------------------------------------------------- */
.reviews-summary {
  font-family: var(--font-heading);
  color: var(--color-navy);
  margin-bottom: 2rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.review-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.review-text {
  color: var(--color-text);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.review-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
}

.review-name { color: var(--color-navy); font-weight: 600; }
.review-date { color: var(--color-gray); }

.reviews-cta { display: inline-block; }


/* -----------------------------------------------------------------------
   19. RESPONSIVE (MOBILE) OVERRIDES
----------------------------------------------------------------------- */
@media (max-width: 900px) {
  .stats-inner,
  .process-grid,
  .pillars-grid,
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Hamburger menu takes over from the horizontal nav */
  .nav-toggle { display: flex; }

  .main-nav {
    justify-content: flex-end;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
  }

  .nav-list.nav-open { display: flex; }

  .nav-list > li { width: 100%; }
  .nav-list > li > a,
  .dropdown-toggle {
    width: 100%;
    padding: 0.75rem 0;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
  }
  .has-dropdown.open .dropdown-menu { display: block; }

  .header-actions .header-phone { display: none; } /* keep header tidy on small screens */

  /* Shrink logo + header padding/gaps so logo + hamburger + button
     all fit without pushing the page wider than the screen. */
  .header-inner { gap: 0.75rem; padding: 0.75rem 1rem; }
  .logo { font-size: 1rem; gap: 0.35rem; }
  .logo-mark { font-size: 1.25rem; }
  .header-actions { gap: 0.75rem; }
  .header-actions .btn { padding: 0.55rem 0.85rem; font-size: 0.8rem; }
}

@media (max-width: 600px) {
  .stats-inner,
  .process-grid,
  .pillars-grid,
  .reviews-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .hero { padding: 4rem 1.25rem; }
  .section { padding: 3rem 1.25rem; }

  .quiz { padding: 1.5rem 1.25rem; }
  .quiz-step h2 { font-size: 1.2rem; }
}
