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

:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2840;
  --accent: #C8102E;
  --accent-hover: #A60D26;
  --text: #333333;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-dark: #0f2840;
  --border: #e0e4e8;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* ===== Navigation ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: all var(--transition);
}

#navbar.scrolled {
  background: var(--primary-dark);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: #fff;
}

.btn-nav {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: var(--radius);
}

.btn-nav:hover {
  background: var(--accent-hover);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all var(--transition);
}

/* ===== Hero ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2840 0%, #1a3a5c 50%, #2c5f8a 100%);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 120px 24px 80px;
  max-width: 800px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-content > p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.badge {
  text-align: center;
}

.badge strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
}

.badge span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Section Titles ===== */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 12px;
}

.section-title.text-left {
  text-align: left;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 48px;
}

/* ===== Services ===== */
#services {
  padding: 100px 0;
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== About ===== */
#about {
  padding: 100px 0;
  background: var(--bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image-placeholder {
  background: linear-gradient(135deg, #1a3a5c, #2c5f8a);
  border-radius: var(--radius);
  height: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
}

.about-image-placeholder span {
  font-size: 5rem;
  margin-bottom: 12px;
}

.about-content > p {
  color: var(--text-light);
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.about-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 2px;
}

.about-list li strong {
  color: var(--primary-dark);
  display: block;
  margin-bottom: 2px;
}

.about-list li p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== Projects ===== */
#projects {
  padding: 100px 0;
  background: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-info {
  padding: 20px;
  background: #fff;
}

.project-info h3 {
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.project-info p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.project-tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ===== Testimonials ===== */
#testimonials {
  padding: 100px 0;
  background: var(--bg-alt);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.stars {
  color: #f5a623;
  font-size: 1.2rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-card > p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.testimonial-author strong {
  display: block;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.testimonial-author span {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* ===== Contact ===== */
#contact {
  padding: 100px 0;
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info > p {
  color: var(--text-light);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

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

.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.5rem;
  min-width: 36px;
  text-align: center;
}

.contact-item strong {
  display: block;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.contact-item p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.contact-form-wrapper {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-success {
  text-align: center;
  padding: 48px 24px;
}

.form-success.hidden {
  display: none;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #27ae60;
  color: #fff;
  border-radius: 50%;
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.form-success h3 {
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.form-success p {
  color: var(--text-light);
}

/* ===== Footer ===== */
footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links li {
  font-size: 0.9rem;
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right var(--transition);
  }

  .nav-links.active {
    right: 0;
  }

  .hero-badges {
    gap: 24px;
  }

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

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image-placeholder {
    height: 280px;
  }

  .section-title.text-left {
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

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

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

  .contact-info {
    text-align: center;
  }

  .contact-item {
    justify-content: center;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ============================================================
   Quote-form iframe embed
   The form is a separate static site at quotes.<contractor>.com.
   It postMessages its height up to script.js, which sets the
   iframe height directly via inline style.
   ============================================================ */
.quote-iframe-wrapper {
  /* Override the padded card look — the iframe brings its own chrome. */
  padding: 0;
  background: transparent;
  overflow: hidden;
  border-radius: var(--radius);
}

.quote-iframe {
  display: block;
  width: 100%;
  height: 800px; /* fallback before postMessage lands */
  border: 0;
  background: var(--bg-alt);
}

