/* ===========================
   Carpet Country — Styles
   Mobile-first, 375px base
   =========================== */

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

:root {
  --navy: #2D3266;
  --navy-dark: #1A1D3E;
  --teal: #3B7A6A;
  --teal-light: #4A9A86;
  --gold: #C5873A;
  --gold-light: #D4A05C;
  --cream: #F7F5F0;
  --warm-white: #FDFCF9;
  --dark: #1C1C1C;
  --text: #2A2A2A;
  --text-light: #5A5A5A;
  --border: #E5E1DB;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal); }

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  color: var(--navy-dark);
  line-height: 1.2;
  font-weight: 400;
}

h1 { font-size: 2rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--navy);
  color: var(--white);
  padding: 8px 16px;
  z-index: 1000;
  font-size: 14px;
}
.skip-link:focus { top: 0; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--navy-dark);
  color: var(--white);
  padding: 6px 0;
  font-size: 13px;
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.header-top a { color: var(--white); }
.header-top a:hover { color: var(--gold-light); }
.header-top .phone-top {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-main {
  padding: 12px 0;
}
.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 44px;
  width: auto;
}

/* --- Navigation --- */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--navy-dark);
  transition: var(--transition);
  border-radius: 2px;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.main-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: right var(--transition);
  z-index: 105;
  padding: 80px 24px 24px;
  overflow-y: auto;
}
.main-nav.open { right: 0; }

.nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 102;
}
.nav-overlay.active { display: block; }

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-links li { border-bottom: 1px solid var(--border); }
.nav-links a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy-dark);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
}
.nav-links .nav-cta {
  margin-top: 16px;
  border-bottom: none;
}
.nav-links .nav-cta a {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
}
.nav-links .nav-cta a:hover {
  background: var(--gold-light);
  color: var(--white);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--navy-dark);
}
.hero-image-wrap {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 280px;
  flex-shrink: 0;
}
.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-image-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--navy-dark));
}
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 20px 40px;
  color: var(--white);
}
.hero-content h1 {
  color: var(--white);
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 12px;
}
.hero-content .hero-sub {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-actions .btn { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: inherit;
  min-height: 48px;
  min-width: 44px;
}
.btn-primary {
  background: var(--gold);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-secondary:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}
.btn-teal {
  background: var(--teal);
  color: var(--white);
}
.btn-teal:hover {
  background: var(--teal-light);
  color: var(--white);
}

/* --- Sections --- */
.section {
  padding: 60px 0;
}
.section-alt {
  background: var(--cream);
}
.section-dark {
  background: var(--navy-dark);
  color: var(--white);
}
.section-dark h2,
.section-dark h3 {
  color: var(--white);
}
.section-header {
  margin-bottom: 36px;
}
.section-header h2 {
  position: relative;
  padding-bottom: 16px;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}
.section-header.center { text-align: center; }
.section-header.center h2::after {
  left: 50%;
  transform: translateX(-50%);
}
.section-header p {
  color: var(--text-light);
  font-size: 16px;
  max-width: 600px;
  margin-top: 12px;
}
.section-header.center p {
  margin-left: auto;
  margin-right: auto;
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.service-card-body {
  padding: 24px 20px;
}
.service-card-body h3 {
  margin-bottom: 8px;
}
.service-card-body p {
  color: var(--text-light);
  font-size: 15px;
}
.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--teal);
}
.service-card-link:hover { color: var(--navy); }
.service-card-link::after {
  content: '\2192';
  transition: transform var(--transition);
}
.service-card-link:hover::after {
  transform: translateX(4px);
}

/* --- Why Choose Us / Features --- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.section-dark .feature-icon {
  background: rgba(255,255,255,0.1);
}
.feature-text h3 {
  margin-bottom: 4px;
  font-size: 1.1rem;
}
.feature-text p {
  color: var(--text-light);
  font-size: 15px;
}
.section-dark .feature-text p {
  color: rgba(255,255,255,0.75);
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.testimonial-card {
  background: var(--white);
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
}
.section-alt .testimonial-card {
  background: var(--white);
}
.testimonial-stars {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.testimonial-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
  margin-bottom: 16px;
}
.testimonial-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy-dark);
}
.testimonial-source {
  font-size: 12px;
  color: var(--text-light);
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--teal);
  padding: 48px 0;
  text-align: center;
  color: var(--white);
}
.cta-banner h2 {
  color: var(--white);
  margin-bottom: 12px;
}
.cta-banner p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-banner .btn-primary {
  background: var(--gold);
}
.cta-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 16px;
}
.cta-phone:hover { color: var(--gold-light); }

/* --- Page Hero (inner pages) --- */
.page-hero {
  position: relative;
  padding: 80px 0 60px;
  background: var(--navy-dark);
  color: var(--white);
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.page-hero .container {
  position: relative;
  z-index: 2;
}
.page-hero h1 {
  color: var(--white);
  font-size: 2rem;
}
.page-hero p {
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin-top: 12px;
}
.breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
}
.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: var(--white); }

/* --- Content Blocks --- */
.content-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
.content-block-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.content-block-img img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.content-block-text h2 {
  margin-bottom: 12px;
}
.content-block-text h2::after {
  display: none;
}
.content-block-text p {
  color: var(--text-light);
}
.content-block-text ul {
  list-style: none;
  margin: 16px 0;
}
.content-block-text ul li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--text-light);
  font-size: 15px;
}
.content-block-text ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

/* --- Carpet Type Cards --- */
.type-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.type-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.type-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.type-card-body {
  padding: 24px 20px;
}
.type-card-body h3 { margin-bottom: 8px; }
.type-card-body p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 12px;
}
.type-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--cream);
  color: var(--text-light);
  font-size: 13px;
  border-radius: 20px;
}

/* --- Process Steps --- */
.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  counter-reset: step;
}
.process-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  counter-increment: step;
}
.step-number {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.4rem;
}
.step-content h3 {
  margin-bottom: 6px;
}
.step-content p {
  color: var(--text-light);
  font-size: 15px;
}

/* --- Contact / Form --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.contact-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.contact-info-item h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  margin-bottom: 2px;
}
.contact-info-item p,
.contact-info-item a {
  color: var(--text-light);
  font-size: 15px;
}

.contact-form {
  background: var(--white);
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: var(--warm-white);
  transition: border-color var(--transition);
  min-height: 48px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(59,122,106,0.1);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.form-submit {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}
.form-success {
  display: none;
  text-align: center;
  padding: 32px 16px;
}
.form-success.show { display: block; }
.form-success h3 { color: var(--teal); margin-bottom: 8px; }

/* --- Hours Table --- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.hours-table tr { border-bottom: 1px solid var(--border); }
.hours-table td {
  padding: 8px 0;
}
.hours-table td:first-child {
  font-weight: 600;
  color: var(--navy-dark);
  width: 45%;
}
.hours-table td:last-child {
  color: var(--text-light);
}

/* --- Footer --- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col p {
  font-size: 14px;
  line-height: 1.6;
}
.footer-col a {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
}
.footer-col a:hover { color: var(--gold-light); }
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-phone {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white) !important;
}
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}
.footer-badges img {
  height: 36px;
  width: auto;
  opacity: 0.8;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--white); }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Guarantee Badge --- */
.guarantee-bar {
  background: var(--cream);
  padding: 20px 0;
  text-align: center;
}
.guarantee-bar .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.guarantee-bar img {
  width: 60px;
  height: 60px;
}
.guarantee-bar p {
  font-size: 14px;
  color: var(--text-light);
}
.guarantee-bar strong {
  color: var(--navy-dark);
}

/* --- Brand Logos Row --- */
.brands-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}
.brands-row img {
  height: 40px;
  width: auto;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all var(--transition);
}
.brands-row img:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* ==============================
   Responsive — Tablet (768px+)
   ============================== */
@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.4rem; }

  .container { padding: 0 32px; }
  .section { padding: 80px 0; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }

  .content-block { grid-template-columns: 1fr 1fr; gap: 40px; }
  .content-block.reverse .content-block-img { order: 2; }
  .content-block-img img { height: 320px; }

  .type-card {
    grid-template-columns: 280px 1fr;
  }
  .type-card-img { height: 100%; min-height: 220px; }

  .process-steps { gap: 40px; }

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

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }

  .page-hero { padding: 100px 0 80px; }
  .page-hero h1 { font-size: 2.5rem; }

  .hero-actions { flex-direction: row; }

  .guarantee-bar .container { flex-direction: row; justify-content: center; }
}

/* ==============================
   Responsive — Desktop (1024px+)
   ============================== */
@media (min-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }

  /* Desktop nav */
  .nav-toggle { display: none; }
  .nav-overlay { display: none !important; }

  .main-nav {
    position: static;
    width: auto;
    height: auto;
    box-shadow: none;
    padding: 0;
    overflow: visible;
    background: transparent;
  }
  .nav-links {
    flex-direction: row;
    gap: 0;
    align-items: center;
  }
  .nav-links li { border-bottom: none; }
  .nav-links a {
    padding: 8px 16px;
    font-size: 15px;
  }
  .nav-links .nav-cta { margin-top: 0; }
  .nav-links .nav-cta a { padding: 10px 20px; font-size: 14px; }

  .hero {
    flex-direction: row;
    min-height: 80vh;
  }
  .hero-image-wrap {
    width: 55%;
    height: auto;
    min-height: 80vh;
    order: 2;
  }
  .hero-image-wrap::after {
    width: 40%;
    height: 100%;
    top: 0; bottom: 0;
    right: auto;
    background: linear-gradient(to right, var(--navy-dark), transparent);
  }
  .hero-content {
    width: 45%;
    padding: 60px 48px;
    order: 1;
  }
  .hero-content h1 { font-size: 2.8rem; }

  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }

  .content-block { gap: 60px; }
  .content-block-img img { height: 380px; }

  .type-card { grid-template-columns: 320px 1fr; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }

  .section { padding: 100px 0; }
  .page-hero { padding: 120px 0 100px; }
}

/* ==============================
   Responsive — Large (1440px+)
   ============================== */
@media (min-width: 1440px) {
  .hero-content { padding: 80px 64px; }
  .hero-content h1 { font-size: 3.2rem; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .nav-toggle, .cta-banner { display: none; }
  .hero { min-height: auto; }
  body { font-size: 12pt; }
}
