/* ======================================================
   AMERICAN MASTER FLOORING — Main Stylesheet
   ====================================================== */

/* ---- CSS Variables ---- */
:root {
  --brand:      #003882;
  --brand-deep: #002460;
  --gold:       #c9a84c;
  --gold-hover: #a87e2d;
  --dark:       #111827;
  --dark-soft:  #1f2937;
  --cream:      #f8f5f0;
  --white:      #ffffff;
  --text:       #1f2937;
  --text-muted: #6b7280;
  --border:     #e5e0d8;
  --shadow-sm:  rgba(0,0,0,0.06);
  --shadow-md:  rgba(0,0,0,0.13);
  --radius:     12px;
  --radius-lg:  20px;
  --ease:       0.3s ease;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Nunito', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

ul { list-style: none; padding: 0; margin: 0; }

a { text-decoration: none; color: inherit; transition: var(--ease); }

p   { margin-bottom: 0; }
h1, h2, h3, h4, h5, h6 { margin-bottom: 0; line-height: 1.15; }

::selection { background: var(--gold); color: var(--white); }


/* ======================================================
   FADE-IN ANIMATIONS
   ====================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }


/* ======================================================
   SHARED COMPONENTS
   ====================================================== */

/* Section labels, titles, subtitles */
.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-title {
  font-size: 40px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 14px;
}
.section-title.light { color: var(--white); }
.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}
.section-subtitle.light { color: rgba(255,255,255,0.72); }
.section-header { text-align: center; margin-bottom: 60px; }

/* Shared buttons */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 30px;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.38);
}

.btn-outline-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 2px solid var(--brand);
  transition: var(--ease);
}
.btn-outline-brand:hover { background: var(--brand); color: var(--white); }


/* ======================================================
   HEADER
   ====================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.site-header.scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 24px var(--shadow-sm);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.nav-logo { flex-shrink: 0; }
.logo-img { width: 128px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links li a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  letter-spacing: 0.01em;
}
.nav-links li a:hover { color: var(--brand); background: rgba(0,56,130,0.06); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-estimate {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 2px solid var(--gold);
  transition: var(--ease);
  white-space: nowrap;
}
.btn-estimate:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--white);
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--ease);
}


/* ======================================================
   MOBILE MENU
   ====================================================== */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  backdrop-filter: blur(2px);
}
.mobile-menu-overlay.open { display: block; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: var(--white);
  z-index: 2000;
  padding: 24px;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  box-shadow: -4px 0 30px rgba(0,0,0,0.1);
}
.mobile-menu.open { right: 0; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.mobile-logo { width: 110px; }
.mobile-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}
.mobile-close:hover { color: var(--dark); }

.mobile-nav-links li { border-bottom: 1px solid var(--border); }
.mobile-nav-links li a {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding: 14px 0;
}
.mobile-nav-links li a:hover { color: var(--brand); }

.mobile-menu-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn-estimate-mobile,
.btn-call-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  transition: var(--ease);
}
.btn-estimate-mobile { background: var(--gold); color: var(--white); }
.btn-estimate-mobile:hover { background: var(--gold-hover); color: var(--white); }
.btn-call-mobile { background: transparent; border: 2px solid var(--brand); color: var(--brand); }
.btn-call-mobile:hover { background: var(--brand); color: var(--white); }


/* ======================================================
   HERO
   ====================================================== */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background-image: url('../img/hero-bg.png');
  background-size: cover;
  background-position: center center;
  padding-top: 76px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    140deg,
    rgba(0,18,56,0.78) 0%,
    rgba(0,0,0,0.42) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 80px 0 70px;
}

.hero-badge {
  display: inline-block;
  background: rgba(201,168,76,0.18);
  border: 1px solid rgba(201,168,76,0.6);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(38px, 5.5vw, 70px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin-bottom: 38px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-hero-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 32px;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  transition: var(--ease);
}
.btn-hero-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.4);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 32px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.55);
  transition: var(--ease);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
  color: var(--white);
}

/* Scroll arrow */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: hero-bounce 2.2s infinite ease-in-out;
}
.hero-scroll a {
  color: rgba(255,255,255,0.6);
  font-size: 22px;
  display: block;
}
.hero-scroll a:hover { color: var(--white); }

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(9px); }
}


/* ======================================================
   SERVICES
   ====================================================== */
.services-section {
  padding: 100px 0;
  background: var(--cream);
}

/* Carousel */
.services-carousel { position: relative; }

.services-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 10px 4px 22px;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
}
.services-track::-webkit-scrollbar { display: none; }   /* Chrome/Safari */

.service-slide {
  flex: 0 0 calc((100% - 56px) / 3);   /* 3 per view (two 28px gaps) */
  scroll-snap-align: start;
}
.service-slide .service-card { height: 100%; }

/* Carousel controls */
.services-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}
.svc-arrow {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ease);
}
.svc-arrow:hover:not(:disabled) { background: var(--brand); color: var(--white); }
.svc-arrow:disabled { opacity: 0.3; cursor: default; }

.svc-dots { display: flex; align-items: center; gap: 9px; }
.svc-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 56, 130, 0.22);
  cursor: pointer;
  transition: var(--ease);
}
.svc-dot.active { background: var(--gold); width: 26px; border-radius: 6px; }

/* Mobile: 1 card per view, finger swipe (arrows hidden) */
@media (max-width: 767px) {
  .service-slide { flex: 0 0 100%; }
  .svc-arrow { display: none; }
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  height: 100%;
  box-shadow: 0 2px 12px var(--shadow-sm);
  border-bottom: 3px solid transparent;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 44px var(--shadow-md);
  border-bottom-color: var(--gold);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--brand) 0%, #0057c4 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--white);
  margin-bottom: 20px;
}

.service-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.service-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.services-cta {
  text-align: center;
  margin-top: 52px;
}


/* ======================================================
   ABOUT
   ====================================================== */
.about-section {
  padding: 100px 0;
  background: var(--white);
}

.about-text-col .section-title { margin-top: 8px; }

.about-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.78;
  margin-bottom: 30px;
}

.trust-grid {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 34px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.trust-item i { color: var(--gold); font-size: 16px; flex-shrink: 0; }

.about-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* About image column */
.about-img-col { padding-left: 44px; }

.about-img-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

.about-img {
  border-radius: var(--radius-lg);
  width: 100%;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}

.about-badge {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: linear-gradient(135deg, var(--gold) 0%, #a87e2d 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 16px 24px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(201,168,76,0.45);
}
.badge-number {
  display: block;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}
.badge-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-top: 5px;
}


/* ======================================================
   GALLERY
   ====================================================== */
.gallery-section {
  padding: 100px 0 0;
  background: var(--dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--ease);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { color: var(--white); font-size: 15px; font-weight: 600; }


/* ======================================================
   PROCESS
   ====================================================== */
.process-section {
  padding: 100px 0;
  background: var(--cream);
}

.process-steps { row-gap: 40px; }

.process-step {
  text-align: center;
  padding: 40px 20px;
}

.step-number {
  font-size: 70px;
  font-weight: 900;
  color: rgba(201,168,76,0.16);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.04em;
}

.step-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--brand) 0%, #0057c4 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--white);
  margin: 0 auto 20px;
  box-shadow: 0 8px 22px rgba(0,56,130,0.28);
}

.step-title { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }

.step-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
  margin: 0 auto;
}


/* ======================================================
   CONTACT / FORM
   ====================================================== */
.contact-section {
  padding: 100px 0;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/contact-bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
}

.contact-row { align-items: flex-start; gap: 52px 0; }

.contact-heading {
  font-size: 34px;
  font-weight: 800;
  color: var(--dark);
  margin: 10px 0 14px;
}
.contact-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 36px;
}

.contact-details { display: flex; flex-direction: column; gap: 22px; }

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--cream);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--brand);
  flex-shrink: 0;
}
.detail-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.detail-value { font-size: 15px; font-weight: 600; color: var(--text); }
a.detail-value:hover { color: var(--brand); }

/* Form card */
.estimate-form-wrap {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 44px 42px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.16);
}

.form-title { font-size: 24px; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.form-subtitle { font-size: 14px; color: rgba(255,255,255,0.58); margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.required { color: var(--gold); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
  padding: 12px 16px;
  outline: none;
  transition: border-color var(--ease), background var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.28); }
.form-group select option { background: #1f2937; color: var(--white); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.1);
}
.form-group input.field-error,
.form-group select.field-error,
.form-group textarea.field-error { border-color: #f87171; }
.form-group textarea { resize: vertical; min-height: 112px; }

/* Custom select arrow */
.form-group 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='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  background-color: rgba(255,255,255,0.07);
  padding-right: 40px;
}
.form-group select:focus {
  background-color: rgba(255,255,255,0.1);
}

.recaptcha-wrap { margin-top: 4px; }

/* Submit button */
.form-submit { margin-top: 8px; }
.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 10px;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn-submit:hover:not(:disabled) {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(201,168,76,0.42);
}
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* Response messages */
.form-message {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.form-message.msg-success {
  background: rgba(52,211,153,0.14);
  border: 1px solid rgba(52,211,153,0.4);
  color: #6ee7b7;
}
.form-message.msg-error {
  background: rgba(248,113,113,0.14);
  border: 1px solid rgba(248,113,113,0.4);
  color: #fca5a5;
}
.form-message a { color: inherit; text-decoration: underline; }


/* ======================================================
   FOOTER
   ====================================================== */
.site-footer {
  background: var(--dark);
  padding: 72px 0 0;
}

.footer-row { padding-bottom: 52px; gap: 40px 0; }

.footer-logo {
  width: 118px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}
.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.52);
  line-height: 1.75;
  max-width: 270px;
}

.footer-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.footer-links li { margin-bottom: 9px; }
.footer-links li a {
  font-size: 14px;
  color: rgba(255,255,255,0.58);
}
.footer-links li a:hover { color: var(--white); }

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 13px;
  font-size: 14px;
  color: rgba(255,255,255,0.58);
}
.footer-contact-list i { color: var(--gold); font-size: 13px; margin-top: 3px; flex-shrink: 0; }
.footer-contact-list a { color: rgba(255,255,255,0.58); }
.footer-contact-list a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 22px 0;
  text-align: center;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.38); }


/* ======================================================
   SCROLL TO TOP
   ====================================================== */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  background: var(--brand);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--ease), transform var(--ease), background var(--ease);
  pointer-events: none;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover { background: var(--gold); color: var(--white); }
