/* Midland Door Pros - Production Static Site Styles */
:root {
  --navy: #0f2744;
  --navy-light: #1a3a5c;
  --charcoal: #2d3436;
  --slate: #4a5568;
  --slate-light: #718096;
  --gray-100: #f7fafc;
  --gray-200: #edf2f7;
  --gray-300: #e2e8f0;
  --white: #ffffff;
  --accent: #e53e3e;
  --accent-hover: #c53030;
  --accent-green: #38a169;
  --warning-bg: #fff5f5;
  --warning-border: #fc8181;
  --snippet-bg: #ebf8ff;
  --snippet-border: #4299e1;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --mobile-bar-height: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--white);
  padding-bottom: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent);
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.875rem; margin-top: 2.5rem; }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); margin-bottom: 0.625rem; margin-top: 1.5rem; }

p { margin-bottom: 1rem; }

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li { margin-bottom: 0.5rem; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--gray-100);
}

.section--dark {
  background: var(--navy);
  color: var(--gray-200);
}

.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  height: var(--header-height);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-logo__img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
}

.site-logo span {
  color: var(--accent);
}

.site-nav {
  display: none;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 500;
  font-size: 0.9375rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.header-phone {
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 900px) {
  .site-nav { display: block; }
  .header-phone { display: inline-flex; }
  .nav-toggle { display: none; }
}

.site-nav.is-open {
  display: block;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: 1rem 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.site-nav.is-open ul {
  flex-direction: column;
  gap: 0.75rem;
}

/* Buttons & CTAs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  line-height: 1.2;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--white);
}

.btn--secondary {
  background: var(--navy);
  color: var(--white);
}

.btn--secondary:hover {
  background: var(--navy-light);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn--outline:hover {
  background: var(--white);
  color: var(--navy);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn--block {
  width: 100%;
}

/* Hero — full-width background slideshow */
.hero {
  position: relative;
  color: var(--white);
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .hero {
    min-height: 560px;
    padding: 5rem 0;
  }
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--navy);
}

.hero__bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero__bg-slide.is-active {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__overlay--light {
  background: linear-gradient(
    to top,
    rgba(15, 39, 68, 0.72) 0%,
    rgba(15, 39, 68, 0.25) 45%,
    rgba(15, 39, 68, 0.08) 100%
  );
}

.hero__content-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__content {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero__subtitle {
  font-size: 1.1875rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.hero__phone {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
}

.hero__phone:hover {
  color: var(--gray-300);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}


@media (prefers-reduced-motion: reduce) {
  .hero__bg-slide {
    transition: none;
  }
}

.badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Brand hero with logo */
.hero--brand {
  min-height: 480px;
  background: var(--navy);
}

.hero__overlay--solid {
  background: linear-gradient(
    135deg,
    rgba(15, 39, 68, 0.97) 0%,
    rgba(26, 58, 92, 0.92) 100%
  );
}

.hero__logo {
  width: min(200px, 45vw);
  height: auto;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius);
}

.footer-tagline {
  font-size: 0.9375rem;
  margin-top: 0.5rem;
}

/* Cards & Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
}

.card__link {
  font-weight: 600;
  text-decoration: none;
}

/* AEO Snippet Box */
.snippet-box {
  background: var(--snippet-bg);
  border-left: 4px solid var(--snippet-border);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.snippet-box p {
  margin: 0;
  font-weight: 600;
  color: var(--navy);
}

/* Safety Warning Box */
.warning-box {
  background: var(--warning-bg);
  border: 2px solid var(--warning-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.warning-box h3,
.warning-box h4 {
  color: var(--accent);
  margin-top: 0;
}

.warning-box p:last-child {
  margin-bottom: 0;
}

/* Service Section */
.service-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.service-section:last-child {
  border-bottom: none;
}

/* Image Placeholder */
.media-block {
  background: var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.media-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--gray-300);
  padding: 1.5rem 0;
}

.faq-item:first-child {
  padding-top: 0;
}

.faq-item h2 {
  font-size: 1.25rem;
  margin-top: 0;
}

/* Contact Form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--navy);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.15);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.875rem;
  color: var(--slate);
}

/* Contact Hero Phone */
.contact-phone-display {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  display: block;
  margin: 1rem 0;
}

.contact-phone-display:hover {
  color: var(--accent-hover);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--slate);
  margin-bottom: 1.5rem;
  padding-top: 1.5rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.25rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--slate-light);
}

.breadcrumb a {
  color: var(--slate);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* Area Blocks */
.area-block {
  margin-bottom: 2.5rem;
}

.area-block h2 {
  margin-top: 0;
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: var(--gray-300);
  padding: 3rem 0 1.5rem;
}

.site-footer a {
  color: var(--gray-300);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-banner {
  margin-bottom: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.footer-banner img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--slate-light);
}

/* Mobile Sticky Call Bar */
.mobile-call-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--accent);
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-call-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 800;
  text-decoration: none;
}

@media (min-width: 900px) {
  .mobile-call-bar {
    display: none;
  }
}

@media (max-width: 899px) {
  body {
    padding-bottom: var(--mobile-bar-height);
  }
}

/* Page Header */
.page-header {
  background: var(--gray-100);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--slate);
  margin-bottom: 0;
  max-width: 720px;
}

/* Internal Links */
.content-links {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.content-links h3 {
  margin-top: 0;
  font-size: 1rem;
}

.content-links ul {
  margin-bottom: 0;
}

/* Hours Table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.hours-table td:last-child {
  text-align: right;
  font-weight: 600;
}

/* Table of Contents */
.section--compact {
  padding: 2rem 0;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-300);
}

.toc__title {
  font-size: 1.125rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.toc__list {
  display: grid;
  gap: 0.5rem 1.5rem;
  list-style: decimal;
  padding-left: 1.25rem;
  margin-bottom: 0;
  columns: 1;
}

@media (min-width: 640px) {
  .toc__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.toc__list a {
  text-decoration: none;
  font-weight: 500;
  color: var(--navy-light);
}

.toc__list a:hover {
  color: var(--accent);
}

/* People Also Ask grid */
.paa-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .paa-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.paa-item h3 {
  font-size: 1.0625rem;
  margin-top: 0;
}

.paa-item .snippet-box {
  margin-bottom: 0;
}

/* Glossary definition list */
dl.glossary {
  margin-bottom: 2rem;
}

dl.glossary dt {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.0625rem;
  margin-top: 1.25rem;
  margin-bottom: 0.375rem;
}

dl.glossary dt:first-child {
  margin-top: 0;
}

dl.glossary dd {
  margin-left: 0;
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--gray-300);
  color: var(--charcoal);
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Form success */
.form-success {
  background: #f0fff4;
  border: 1px solid var(--accent-green);
  color: #22543d;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: none;
}

.form-success.is-visible {
  display: block;
}
