/* ============================================================
   BUILDERS SURPLUS — Flooring Consultation Landing Page
   styles.css
   ============================================================ */

/* ========================
   CSS CUSTOM PROPERTIES
   ======================== */
:root {
  /* Brand colors — match builderssurplus.us */
  --bs-navy:        #2d3d8e;   /* Primary brand navy blue */
  --bs-navy-dark:   #1e2f6e;   /* Darker navy (hover, shadows) */
  --bs-navy-light:  #3a52ab;   /* Lighter navy (accents) */
  --bs-yellow:      #d4e020;   /* Brand yellow/chartreuse accent */
  --bs-yellow-dark: #b8c400;   /* Darker yellow (hover) */

  /* Neutrals */
  --white:          #ffffff;
  --gray-50:        #f8f9fa;
  --gray-100:       #f0f2f5;
  --gray-200:       #e2e6ea;
  --gray-400:       #adb5bd;
  --gray-600:       #6c757d;
  --gray-800:       #343a40;
  --text-dark:      #1a1f36;

  /* Typography */
  --font-base:      'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;
  --line-height:    1.65;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;

  /* Layout */
  --max-width:  1200px;
  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.10);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.16);

  /* Transitions */
  --transition: 200ms ease;
}

/* ========================
   RESET & BASE
   ======================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--bs-navy);
  text-decoration: underline;
  transition: color var(--transition);
}
a:hover { color: var(--bs-navy-dark); }

address { font-style: normal; }

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

/* ========================
   UTILITY CLASSES
   ======================== */
.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bs-navy);
  margin-bottom: 0.5rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 640px;
  margin: 0.75rem auto 2rem;
}

.required { color: #c0392b; }
.optional { color: var(--gray-600); font-size: 0.85em; font-weight: 400; }

/* ========================
   BUTTONS
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8em 1.75em;
  font-family: var(--font-base);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--bs-yellow);
  outline-offset: 2px;
}

/* Primary — navy */
.btn--primary {
  background: var(--bs-navy);
  color: var(--white);
  border-color: var(--bs-navy);
}
.btn--primary:hover {
  background: var(--bs-navy-dark);
  border-color: var(--bs-navy-dark);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

/* Yellow accent */
.btn--yellow {
  background: var(--bs-yellow);
  color: var(--text-dark);
  border-color: var(--bs-yellow);
}
.btn--yellow:hover {
  background: var(--bs-yellow-dark);
  border-color: var(--bs-yellow-dark);
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
}

/* Outline white (for dark backgrounds) */
.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  color: var(--white);
}

/* Outline navy (for light backgrounds) */
.btn--outline-navy {
  background: transparent;
  color: var(--bs-navy);
  border-color: var(--bs-navy);
}
.btn--outline-navy:hover {
  background: var(--bs-navy);
  color: var(--white);
}

/* Header nav button */
.btn--header {
  background: var(--bs-yellow);
  color: var(--text-dark);
  border-color: var(--bs-yellow);
  font-size: 0.85rem;
  padding: 0.55em 1.25em;
}
.btn--header:hover {
  background: var(--bs-yellow-dark);
  border-color: var(--bs-yellow-dark);
  color: var(--text-dark);
}

/* Sizes */
.btn--large { padding: 1em 2.25em; font-size: 1.05rem; }
.btn--sm    { padding: 0.55em 1.1em; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* Submit state */
.btn--submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================
   UTILITY BAR
   ======================== */
.utility-bar {
  background: var(--bs-navy);
  padding: 0.5rem 1rem;
}
.utility-bar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.utility-bar__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--white);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}
.utility-bar__phone:hover { color: var(--bs-yellow); }

/* ========================
   SITE HEADER
   ======================== */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header__logo img {
  height: 56px;
  width: auto;
}
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-header__nav a:not(.btn) {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.site-header__nav a:not(.btn):hover { color: var(--bs-navy); }

/* ========================
   HERO
   ======================== */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  /* Fallback gradient if no image is provided */
  background-color: var(--bs-navy-dark);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(29, 47, 110, 0.88) 0%,
    rgba(29, 47, 110, 0.75) 55%,
    rgba(29, 47, 110, 0.55) 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) 1.5rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Hero content (left on desktop) */
.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bs-yellow);
  margin-bottom: 0.5rem;
}
.hero__headline {
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 1rem;
}
.hero__sub {
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 1.5rem;
}

.hero__trust {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hero__trust li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
}
.hero__trust li svg { color: var(--bs-yellow); flex-shrink: 0; }

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero form card (right on desktop, hidden on mobile — teaser only) */
.hero__form-card {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  display: none; /* Hidden on mobile; shown on desktop */
}
.form-card__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bs-navy);
  margin-bottom: 0.5rem;
}
.form-card__headline {
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}
.form-card__sub {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

/* ========================
   FORM SECTION
   ======================== */
.form-section {
  background: var(--gray-50);
  padding: var(--space-xl) 1.5rem;
  border-top: 4px solid var(--bs-yellow);
}
.form-section__inner {
  max-width: 820px;
  margin: 0 auto;
}
.form-section__intro {
  text-align: center;
  margin-bottom: 2.5rem;
}
.form-section__intro h2 { margin-bottom: 0.75rem; }
.form-section__intro p {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Form layout */
.consultation-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
}

.form-row {
  margin-bottom: 1.25rem;
}
.form-row--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-field label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-800);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-base);
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--bs-navy);
  box-shadow: 0 0 0 3px rgba(45, 61, 142, 0.15);
}
.form-field input.error,
.form-field select.error,
.form-field textarea.error {
  border-color: #c0392b;
}
.field-error {
  font-size: 0.8rem;
  color: #c0392b;
  font-weight: 600;
  min-height: 1em;
}

.form-required-note {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
}

/* Form success state */
.form-success {
  background: #e8f5e9;
  border: 2px solid #4caf50;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}
.form-success__icon { color: #2e7d32; margin-bottom: 1rem; }
.form-success__icon svg { margin: 0 auto; }
.form-success h3 { color: #1b5e20; margin-bottom: 0.75rem; font-size: 1.4rem; }
.form-success p { color: #2e7d32; }
.form-success a { color: var(--bs-navy); font-weight: 700; }

/* ========================
   FLOORING TYPE CARDS
   ======================== */
.flooring-types {
  background: var(--white);
  padding: var(--space-xl) 1.5rem;
}
.flooring-types__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.flooring-types__inner > h2 { margin-bottom: 0.75rem; }

.flooring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  text-align: left;
}

.flooring-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.flooring-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.flooring-card__image-wrap { aspect-ratio: 16/9; overflow: hidden; background: var(--gray-100); }
.flooring-card__image { width: 100%; height: 100%; object-fit: cover; }

.flooring-card__icon {
  padding: 1.5rem 1.5rem 0.5rem;
  color: var(--bs-navy);
}
.flooring-card h3 {
  padding: 0 1.5rem 0.5rem;
  font-size: 1.1rem;
}
.flooring-card p {
  padding: 0 1.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  flex: 1;
}
.flooring-card__link {
  display: inline-block;
  margin: 1rem 1.5rem 1.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--bs-navy);
  text-decoration: none;
}
.flooring-card__link:hover { text-decoration: underline; color: var(--bs-navy-dark); }

/* CTA card variant */
.flooring-card--cta {
  background: var(--bs-navy);
  border-color: var(--bs-navy);
  color: var(--white);
  align-items: flex-start;
  padding-bottom: 1.5rem;
}
.flooring-card--cta .flooring-card__icon { color: var(--bs-yellow); }
.flooring-card--cta h3 { color: var(--white); }
.flooring-card--cta p { color: rgba(255,255,255,0.82); }
.flooring-card--cta .btn {
  margin: 1rem 1.5rem 0;
}

/* ========================
   CTA BANNER
   ======================== */
.cta-banner {
  background: var(--bs-navy);
  padding: var(--space-lg) 1.5rem;
}
.cta-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: center;
}
.cta-banner__inner p {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 600;
}

/* ========================
   WHY SECTION
   ======================== */
.why-section {
  background: var(--gray-100);
  padding: var(--space-xl) 1.5rem;
}
.why-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.why-section__inner > h2 { margin-bottom: 2rem; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  text-align: left;
  margin-bottom: 2.5rem;
}
.why-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.why-card:hover { box-shadow: var(--shadow-md); }
.why-card__icon {
  color: var(--bs-navy);
  margin-bottom: 1rem;
}
.why-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}
.why-card p { font-size: 0.9rem; color: var(--gray-600); }

.why-section__cta { margin-top: 1rem; }

/* ========================
   STORES SECTION
   ======================== */
.stores-section {
  background: var(--white);
  padding: var(--space-xl) 1.5rem;
}
.stores-section__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.stores-section__inner > h2 { margin-bottom: 0.75rem; }

.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  text-align: left;
}
.store-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.store-card:hover {
  border-color: var(--bs-navy);
  box-shadow: var(--shadow-md);
}
.store-card__icon { color: var(--bs-navy); }
.store-card h3 { font-size: 1.2rem; }
.store-card address p { color: var(--gray-600); font-size: 0.95rem; }
.store-card__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--bs-navy);
  text-decoration: none;
}
.store-card__phone:hover { color: var(--bs-navy-dark); text-decoration: underline; }
.store-card .btn { align-self: flex-start; margin-top: 0.25rem; }

/* ========================
   FAQ SECTION
   ======================== */
.faq-section {
  background: var(--gray-50);
  padding: var(--space-xl) 1.5rem;
}
.faq-section__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.faq-section__inner > h2 { margin-bottom: 2rem; }

.faq-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.faq-item {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
}
.faq-question:hover { background: var(--gray-50); color: var(--bs-navy); }
.faq-question[aria-expanded="true"] { color: var(--bs-navy); background: var(--gray-50); }
.faq-icon {
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--gray-600);
}
.faq-answer p + p { margin-top: 0.75rem; }

/* ========================
   FINAL CTA
   ======================== */
.final-cta {
  background: var(--bs-navy);
  padding: var(--space-xl) 1.5rem;
  text-align: center;
}
.final-cta__inner { max-width: 700px; margin: 0 auto; }
.final-cta h2 { color: var(--white); margin-bottom: 1rem; }
.final-cta > .final-cta__inner > p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}
.final-cta__sub {
  margin-top: 1.25rem !important;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}
.final-cta__sub a {
  color: var(--bs-yellow);
  text-decoration: none;
  font-weight: 700;
}
.final-cta__sub a:hover { text-decoration: underline; }

/* ========================
   SITE FOOTER
   ======================== */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: var(--space-lg) 1.5rem;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-footer__logo img { opacity: 0.85; }
.site-footer__info p { font-size: 0.85rem; margin-bottom: 0.3rem; }
.site-footer__info a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}
.site-footer__info a:hover { color: var(--bs-yellow); }

/* ========================
   MOBILE STICKY CTA
   ======================== */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  display: none; /* Shown by JS on mobile */
}
.mobile-sticky-cta.is-visible { display: block; }

/* ========================
   RESPONSIVE — TABLET (≥768px)
   ======================== */
@media (min-width: 768px) {
  .form-row--split {
    grid-template-columns: 1fr 1fr;
  }
  .utility-bar__inner { justify-content: flex-start; }
}

/* ========================
   RESPONSIVE — DESKTOP (≥1024px)
   ======================== */
@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 420px;
    align-items: center;
    gap: 3rem;
  }
  .hero__form-card { display: block; }

  /* On large screens, hide the mobile sticky CTA */
  .mobile-sticky-cta { display: none !important; }

  /* Navigation fully visible */
  .site-header__nav { display: flex; }

  .consultation-form { padding: 3rem; }
}

/* ========================
   RESPONSIVE — MOBILE-ONLY
   ======================== */
@media (max-width: 767px) {
  .site-header__nav a:not(.btn) { display: none; }
  .consultation-form { padding: 1.5rem; }
  .hero { min-height: 450px; }
  .hero__inner { padding: var(--space-lg) 1rem; }
}

/* ========================
   PRINT
   ======================== */
@media print {
  .utility-bar, .site-header__nav .btn, .mobile-sticky-cta,
  .cta-banner, .final-cta { display: none; }
  .hero { min-height: 0; }
  .hero__bg, .hero__overlay { display: none; }
  .hero__content { color: var(--text-dark); }
  .hero__headline, .hero__sub, .hero__trust li { color: var(--text-dark); }
}
