/* David Brumbaugh Home Improvements - Theme */
:root {
  --primary: #c0392b;
  --primary-dark: #a93226;
  --navy: #1b1d21;
  --navy-light: #2a2d33;
  --text: #333333;
  --text-muted: #666666;
  --white: #ffffff;
  --gray-bg: #f5f5f5;
  --border: #e5e5e5;
  --font: "Montserrat", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.top-bar {
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  padding: 10px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}

.top-social {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-shrink: 0;
}

.top-social a {
  color: var(--white);
  opacity: 0.85;
}

.top-social a:hover {
  opacity: 1;
  color: var(--white);
}

.top-links {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.top-links a {
  color: rgba(255, 255, 255, 0.9);
}

.top-links a:hover {
  color: var(--white);
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container.header-inner {
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 8px 0 12px;
  gap: 12px;
}

.logo-wrap {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.logo-badge {
  background: var(--primary);
  padding: 14px 18px 20px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 100%, 0% 100%, 0% 25%);
  margin-top: -8px;
  line-height: 0;
}

.logo-badge img,
.logo-badge svg {
  width: 48px;
  height: 48px;
  display: block;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.main-nav a {
  color: var(--navy);
  font-weight: 600;
  font-size: clamp(11px, 1.05vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 8px clamp(5px, 0.7vw, 10px);
  white-space: nowrap;
  flex-shrink: 0;
}

.header-cta {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 12px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font);
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
}

.btn-outline-light {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--navy);
  margin: 5px 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(27, 29, 33, 0.75) 0%, rgba(27, 29, 33, 0.35) 50%, rgba(27, 29, 33, 0.2) 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  max-width: 560px;
  margin-left: auto;
  text-align: right;
  padding: 60px 0;
}

.hero-content h1 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 16px;
  line-height: 1.2;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
}

.hero-form-card {
  background: var(--white);
  padding: 28px 32px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}

.hero-form-card h3 {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 20px;
}

.hero-form-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 16px;
  align-items: start;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-gray {
  background: var(--gray-bg);
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title .sub {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 8px;
}

.section-dark .section-title .sub {
  color: #e74c3c;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  color: inherit;
}

.section-title p {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--text-muted);
}

.section-dark .section-title p {
  color: rgba(255, 255, 255, 0.75);
}

/* About block */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-images {
  position: relative;
  min-height: 360px;
}

.about-images .img-main {
  border-radius: 4px;
  width: 75%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.about-images .img-secondary {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 55%;
  border: 6px solid var(--white);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.about-text .sub {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
}

.about-text h2 {
  font-size: 32px;
  margin: 12px 0 20px;
  color: var(--navy);
}

/* Stats */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: -1px;
}

.stat-block {
  padding: 36px 24px;
  text-align: center;
  color: var(--white);
}

.stat-block:nth-child(odd) {
  background: var(--navy);
}

.stat-block:nth-child(even) {
  background: var(--primary);
}

.stat-block strong {
  display: block;
  font-size: 36px;
  margin-bottom: 8px;
}

.stat-block span {
  font-size: 14px;
  opacity: 0.95;
}

/* Service cards */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--navy-light);
  overflow: hidden;
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-body {
  padding: 24px;
}

.service-card h3 {
  color: var(--white);
  margin: 0 0 12px;
  font-size: 18px;
}

.service-card .read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

.service-card .read-more::after {
  content: " →";
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.feature-item {
  text-align: center;
  padding: 20px;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 24px;
}

.feature-item h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.feature-item p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-item {
  position: relative;
  overflow: hidden;
}

.project-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.4s;
}

.project-item:hover img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(27, 29, 33, 0.9));
  color: var(--white);
}

.project-overlay h4 {
  margin: 0;
  font-size: 16px;
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.process-step {
  text-align: center;
}

.process-icon {
  width: 72px;
  height: 72px;
  background: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
}

.process-card {
  background: var(--white);
  padding: 24px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  min-height: 140px;
}

.process-card h4 {
  margin: 0 0 10px;
  color: var(--navy);
}

.process-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.team-card {
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
}

.team-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.team-card-body {
  padding: 24px;
}

.team-card h4 {
  margin: 0 0 6px;
  color: var(--navy);
}

.team-card .role {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Testimonials */
.testimonial-slider {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: var(--white);
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-top: 3px solid var(--primary);
}

.testimonial-card .stars {
  color: #f1c40f;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.testimonial-card cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-weight: 600;
  color: var(--navy);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.pricing-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 40px 32px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(192, 57, 43, 0.15);
  transform: scale(1.02);
}

.pricing-card h3 {
  margin: 0 0 8px;
  color: var(--navy);
}

.pricing-card .price {
  font-size: 42px;
  font-weight: 700;
  color: var(--primary);
  margin: 20px 0;
}

.pricing-card .price small {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  text-align: left;
}

.pricing-card li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.pricing-card li::before {
  content: "✓ ";
  color: var(--primary);
  font-weight: 700;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--navy);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
  border-color: var(--primary);
  background: #fdf2f2;
}

.field-error {
  color: var(--primary);
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

.field-error.visible {
  display: block;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
  flex-wrap: wrap;
}

.checkbox-group .field-error {
  flex-basis: 100%;
  margin-left: 32px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
}

.form-success {
  display: none;
  padding: 20px;
  background: #d5f5e3;
  color: #1e8449;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  margin-top: 16px;
}

.form-success.visible {
  display: block;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.page-hero {
  background: var(--navy);
  padding: 60px 0;
  text-align: center;
  color: var(--white);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
}

.page-hero .breadcrumb {
  margin-top: 12px;
  font-size: 14px;
  opacity: 0.85;
}

.page-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
}

.content-prose {
  max-width: 900px;
  margin: 0 auto;
}

.content-prose h2 {
  color: var(--navy);
  margin-top: 40px;
  font-size: 22px;
}

.content-prose h3 {
  font-size: 18px;
  margin-top: 28px;
}

.content-prose p,
.content-prose li {
  color: var(--text-muted);
}

.content-prose ul,
.content-prose ol {
  padding-left: 24px;
}

/* Partners */
.partners-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  opacity: 0.6;
  filter: grayscale(100%);
  padding: 40px 0;
}

.partner-placeholder {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-about .logo-text {
  color: var(--white);
}

.footer-about .logo-text span {
  color: #e74c3c;
}

.footer-about p {
  font-size: 14px;
  line-height: 1.8;
  margin: 20px 0;
}

.footer-subscribe {
  display: flex;
  gap: 0;
  margin-top: 16px;
}

.footer-subscribe input {
  flex: 1;
  padding: 12px 14px;
  border: none;
  font-family: var(--font);
}

.footer-subscribe button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 700;
}

.footer h4 {
  color: var(--white);
  margin: 0 0 20px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-post {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  align-items: center;
}

.footer-post img {
  width: 70px;
  height: 55px;
  object-fit: cover;
  flex-shrink: 0;
}

.footer-post a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.4;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}

.footer-bottom .footer-social {
  display: flex;
  gap: 14px;
}

.footer-bottom .footer-social a {
  color: var(--white);
  opacity: 0.85;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.two-col-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.card-box {
  background: var(--white);
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

@media (max-width: 992px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .header-cta {
    display: none;
  }

  .about-grid,
  .contact-grid,
  .two-col-content {
    grid-template-columns: 1fr;
  }

  .hero-form-card {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .hero-form-fields {
    grid-template-columns: 1fr;
  }

  .stats-bar,
  .service-cards,
  .features-grid,
  .projects-grid,
  .process-grid,
  .team-grid,
  .testimonial-slider,
  .pricing-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-content {
    text-align: left;
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .stats-bar,
  .service-cards,
  .features-grid,
  .projects-grid,
  .process-grid,
  .team-grid,
  .testimonial-slider,
  .pricing-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 56px 0;
  }

  .about-images .img-main,
  .about-images .img-secondary {
    width: 100%;
    position: static;
  }

  .pricing-card.featured {
    transform: none;
  }
}