/* ============================================
   KS ROOF MASTER - DESIGN SYSTEM & STYLES
   ============================================ */

/* CSS Variables / Design Tokens */
:root {
  --primary: #b30104;
  --primary-light: #d42a2d;
  --primary-dark: #8a0103;
  --primary-fg: #ffffff;
  --secondary: #f5b400;
  --secondary-dark: #d99e00;
  --secondary-fg: #1a1a1a;
  --background: #ffffff;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --card-fg: #1a1a1a;
  --muted: #f4f4f4;
  --muted-fg: #666666;
  --border: #e0e0e0;
  --success: #16a34a;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --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 10px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1200px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.2; }
button, input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.875rem;
  border: none;
  outline: none;
}
button { cursor: pointer; }

/* Utilities */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.section-padding { padding: 5rem 1rem; }
.section-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--foreground);
  text-align: center;
}
.section-title .highlight { color: var(--primary); }
.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-fg);
  text-align: center;
  max-width: 600px;
  margin: 1rem auto 0;
}
.bg-muted { background: var(--muted); }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: center;
  border: none;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary { background: var(--secondary); color: var(--secondary-fg); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(245, 180, 0, 0.4); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,0.3); color: var(--primary-fg); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-white { background: var(--background); color: var(--primary); font-weight: 700; }
.btn-white:hover { box-shadow: var(--shadow-md); }
.btn-cta-red { background: var(--secondary); color: var(--secondary-fg); }
.btn-cta-outline { background: transparent; border: 2px solid rgba(255,255,255,0.3); color: var(--primary-fg); }
.btn-cta-outline:hover { background: rgba(255,255,255,0.1); }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 180, 0, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(245, 180, 0, 0); }
}
.btn-pulse { animation: pulseGlow 2s infinite; }

/* Form Styles */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--foreground); margin-bottom: 0.25rem; }
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(179, 1, 4, 0.1); }
.form-input::placeholder { color: #aaa; }
.form-input.error { border-color: #dc2626; }
.form-submit {
  width: 100%;
  padding: 0.875rem;
  background: var(--secondary);
  color: var(--secondary-fg);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}
.form-submit:hover { opacity: 0.9; }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-error { color: #dc2626; font-size: 0.75rem; margin-top: 0.25rem; display: none; }
.form-input.error + .form-error { display: block; }

/* Scroll Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
/* Fallback: If JS doesn't add .visible class, show elements after page load */
html:not(.js) .animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
}
/* When JS runs, it adds .animate-ready class to html */
html.animate-ready .animate-on-scroll:not(.visible) {
  opacity: 0;
  transform: translateY(30px);
}
html.animate-ready .animate-on-scroll.visible { 
  opacity: 1; 
  transform: translateY(0); 
}
.animate-on-scroll.fade-left { transform: translateX(-30px); }
.animate-on-scroll.fade-left.visible { transform: translateX(0); }
.animate-on-scroll.fade-right { transform: translateX(30px); }
.animate-on-scroll.fade-right.visible { transform: translateX(0); }
.animate-on-scroll.scale-in { transform: scale(0.9); }
.animate-on-scroll.scale-in.visible { transform: scale(1); }

/* Sticky Call Bar */
.call-bar {
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  position: relative;
  z-index: 1001;
}
.call-bar-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.call-bar .text { font-family: var(--font-heading); font-weight: 600; }
.call-bar .phone-link {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.call-bar .avail { opacity: 0.8; font-size: 0.75rem; }
.call-bar-btns { display: flex; gap: 0.5rem; }
.call-bar-btns a {
  padding: 0.375rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  transition: opacity 0.2s;
}
.call-bar-btns a:hover { opacity: 0.85; }
.call-bar-btns .cb-call { background: var(--secondary); color: var(--secondary-fg); }
.call-bar-btns .cb-insp { background: rgba(255,255,255,0.15); color: var(--primary-fg); border: 1px solid rgba(255,255,255,0.3); }

@media (max-width: 639px) {
  .call-bar .text, .call-bar .avail { display: none; }
}

/* Header / Navigation */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--primary);
}
.logo span { color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.nav-links a:hover { color: var(--primary); }

/* Mega Menu */
.mega-menu-container { position: relative; }
.mega-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  padding: 0;
}
.mega-menu-trigger:hover { color: var(--primary); }
.mega-menu-trigger svg { transition: transform 0.2s; }
.mega-menu-container:hover .mega-menu-trigger svg,
.mega-menu-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.mega-menu {
  position: fixed;
  top: auto;
  left: 0;
  right: 0;
  margin-left:10%;
  margin-right:10%;
  width: 80%;
  background: var(--card);
  border-radius: 0;
  box-shadow: var(--shadow-xl);
  border-top: 1px solid var(--border);
  border-bottom: 3px solid var(--primary);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  z-index: 100;
  margin-top: 0;
  transform: translateY(-10px);
}
.mega-menu-container:hover .mega-menu,
.mega-menu-trigger[aria-expanded="true"] + .mega-menu { 
  opacity: 1; 
  visibility: visible;
  transform: translateY(0);
}
.mega-menu-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  padding: 2rem;
  max-width: var(--container);
  margin: 0 auto;
}
.mega-menu-column { display: flex; flex-direction: column; gap: 0.5rem; }
.mega-menu-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}
.mega-menu-title svg { flex-shrink: 0; }
.mega-menu-link {
  font-size: 0.8125rem;
  color: var(--muted-fg);
  padding: 0.25rem 0;
  transition: color 0.15s, padding-left 0.15s;
}
.mega-menu-link:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

@media (max-width: 1023px) {
  .mega-menu-container { display: none; }
}
.header-ctas { display: flex; align-items: center; gap: 0.75rem; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}
.header-btn {
  background: var(--secondary);
  color: var(--secondary-fg);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
}
.mobile-toggle {
  display: none;
  background: none;
  font-size: 1.5rem;
  color: var(--foreground);
  cursor: pointer;
  padding: 0.5rem;
}
.mobile-nav {
  display: none;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1rem;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
}
.mobile-nav a:hover { color: var(--primary); }

/* Mobile Service Menu */
.mobile-service-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0;
  background: none;
  border: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
}
.mobile-service-toggle svg { transition: transform 0.2s; }
.mobile-service-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.mobile-service-list {
  padding-left: 1rem;
  margin-top: 0.5rem;
}
.mobile-service-list a {
  display: block;
  padding: 0.375rem 0;
  font-size: 0.875rem;
  color: var(--muted-fg);
}
.mobile-service-list a:hover { color: var(--primary); }
.mobile-service-category {
  display: block;
  padding: 0.5rem 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

@media (max-width: 1023px) {
  .nav-links, .header-ctas { display: none; }
  .mobile-toggle { display: block; }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(20,20,20,0.92) 0%, rgba(20,20,20,0.75) 50%, rgba(20,20,20,0.45) 100%);
}
.hero-inner {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 1rem;
}
.hero-content { color: var(--primary-fg); }
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-content h1 .highlight { color: var(--secondary); }
.hero-content .subtitle { font-size: 1.125rem; opacity: 0.85; margin-bottom: 1.5rem; }
.hero-bullets { margin-bottom: 1.5rem; }
.hero-bullets li { display: flex; align-items: center; gap: 0.75rem; font-size: 1rem; margin-bottom: 0.75rem; }
.hero-bullets li i { color: var(--secondary); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; opacity: 0.8; }
.hero-badge { background: rgba(255,255,255,0.1); padding: 0.375rem 0.875rem; border-radius: 50px; font-size: 0.8125rem; }
.hero-form-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xl);
}
.hero-form-card h2 { font-size: 1.375rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.25rem; }
.hero-form-card .form-desc { font-size: 0.8125rem; color: var(--muted-fg); margin-bottom: 1.25rem; }

@media (max-width: 991px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 1rem; padding-bottom: 2rem; }
}

/* Problems Section */
.problems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.problem-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.problem-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.problem-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(179,1,4,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
  font-size: 1.125rem;
}
.problem-card span { font-family: var(--font-heading); font-weight: 600; font-size: 0.9375rem; color: var(--foreground); }

@media (max-width: 767px) { .problems-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .problems-grid { grid-template-columns: 1fr; } }

/* Counters Section */
.counters-section { background: var(--primary); padding: 3.5rem 1rem; }
.counters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}
.counter-item .number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--secondary);
}
.counter-item .label { font-size: 0.9375rem; color: var(--primary-fg); opacity: 0.9; margin-top: 0.25rem; font-weight: 500; }

@media (max-width: 767px) { .counters-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }

/* Trust Section */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.trust-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
}
.trust-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.trust-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(179, 1, 4, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: 1.375rem;
}
.trust-card h3 { font-size: 0.9375rem; font-weight: 600; color: var(--foreground); margin-bottom: 0.5rem; }
.trust-card p { font-size: 0.8125rem; color: var(--muted-fg); }

@media (max-width: 991px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 639px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  text-align: left;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.service-card:hover { border-color: rgba(179,1,4,0.3); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: rgba(179, 1, 4, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: 1.25rem;
  transition: background 0.3s, color 0.3s;
}
.service-card:hover .service-icon { background: var(--primary); color: var(--primary-fg); }
.service-card h3 { font-size: 1.0625rem; font-weight: 600; color: var(--foreground); margin-bottom: 0.5rem; }
.service-card p { font-size: 0.8125rem; color: var(--muted-fg); margin-bottom: 1rem; }
.service-card .learn-more { font-size: 0.8125rem; font-weight: 600; color: var(--primary); }
.service-card .learn-more:hover { text-decoration: underline; }

@media (max-width: 991px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .services-grid { grid-template-columns: 1fr; } }

/* Materials Section */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.material-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.3s, transform 0.3s;
}
.material-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.material-card .mat-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(179,1,4,0.08), rgba(245,180,0,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary);
  font-size: 1.5rem;
}
.material-card h3 { font-family: var(--font-heading); font-weight: 700; font-size: 1.0625rem; color: var(--foreground); margin-bottom: 0.5rem; }
.material-card p { font-size: 0.8125rem; color: var(--muted-fg); line-height: 1.6; }

@media (max-width: 767px) { .materials-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .materials-grid { grid-template-columns: 1fr; } }

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.gallery-item { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.gallery-img-wrap { overflow: hidden; height: 280px; position: relative; }
.gallery-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover .gallery-img-wrap img { transform: scale(1.1); }
.gallery-img-wrap .badge-overlay { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; gap: 0.375rem; }
.badge-overlay .tag { background: var(--primary); color: var(--primary-fg); font-size: 0.6875rem; font-weight: 600; padding: 0.25rem 0.625rem; border-radius: 50px; }
.gallery-item .caption { background: var(--card); padding: 1rem 1.25rem; }
.gallery-item .caption h3 { font-family: var(--font-heading); font-weight: 600; font-size: 0.9375rem; color: var(--foreground); margin-bottom: 0.375rem; }
.gallery-item .caption .project-meta { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--muted-fg); }
.gallery-item .caption .project-meta span { display: flex; align-items: center; gap: 0.25rem; }

@media (max-width: 639px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-img-wrap { height: 220px; }
}

/* Steps Section */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 2.25rem;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: var(--border);
}
.step-item { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.step-circle {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(179, 1, 4, 0.3);
  z-index: 2;
}
.step-label { font-family: var(--font-heading); font-weight: 600; font-size: 0.8125rem; color: var(--secondary); margin-bottom: 0.25rem; }
.step-item h3 { font-size: 1.25rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.5rem; }
.step-item p { font-size: 0.875rem; color: var(--muted-fg); max-width: 280px; }

@media (max-width: 767px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
}

/* Areas Section */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.area-item { display: flex; align-items: center; gap: 0.75rem; background: var(--card); border-radius: var(--radius-lg); padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); }
.area-item i { color: var(--primary); font-size: 1rem; }
.area-item span { font-family: var(--font-heading); font-weight: 600; font-size: 0.9375rem; color: var(--foreground); }
.map-wrapper { margin-top: 2.5rem; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); max-width: 900px; margin-left: auto; margin-right: auto; }
.map-wrapper iframe { display: block; width: 100%; }
.area-note { margin-top: 1.5rem; font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: var(--primary); }

@media (max-width: 639px) { .areas-grid { grid-template-columns: repeat(2, 1fr); } }

/* Reviews Section */
.reviews-header { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.reviews-header .google-logo { font-size: 1.5rem; font-weight: 700; font-family: var(--font-heading); }
.reviews-header .google-logo .g-blue { color: #4285F4; }
.reviews-header .google-logo .g-red { color: #EA4335; }
.reviews-header .google-logo .g-yellow { color: #FBBC05; }
.reviews-header .google-logo .g-green { color: #34A853; }
.reviews-rating-summary { display: flex; align-items: center; gap: 0.5rem; }
.reviews-rating-summary .big-number { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: var(--foreground); }
.reviews-rating-summary .stars-text { text-align: left; }
.reviews-rating-summary .stars-text .stars { color: var(--secondary); font-size: 1rem; margin-bottom: 0; }
.reviews-rating-summary .stars-text .count { font-size: 0.75rem; color: var(--muted-fg); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; max-width: 900px; margin-left: auto; margin-right: auto; }
.review-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.5rem; text-align: left; }
.review-card .review-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.review-card .review-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(179,1,4,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.875rem;
}
.review-card .review-name { font-family: var(--font-heading); font-weight: 600; font-size: 0.875rem; color: var(--foreground); }
.review-card .review-loc { font-size: 0.75rem; color: var(--muted-fg); }
.review-card .stars { color: var(--secondary); font-size: 0.875rem; margin-bottom: 0.5rem; }
.review-card blockquote { font-size: 0.8125rem; color: var(--foreground); line-height: 1.6; font-style: italic; }

@media (max-width: 767px) { .reviews-grid { grid-template-columns: 1fr; } }

/* Pricing Section */
.pricing-table-wrap { max-width: 600px; margin: 3rem auto 0; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.pricing-table { width: 100%; border-collapse: collapse; }
.pricing-table thead { background: var(--primary); color: var(--primary-fg); }
.pricing-table th { padding: 1rem 1.5rem; font-family: var(--font-heading); font-weight: 600; font-size: 0.875rem; text-align: left; }
.pricing-table td { padding: 0.875rem 1.5rem; font-size: 0.875rem; border-bottom: 1px solid var(--border); color: var(--foreground); }
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:nth-child(even) { background: var(--muted); }
.pricing-table .price { font-family: var(--font-heading); font-weight: 700; color: var(--primary); }
.pricing-table .free-tag { background: var(--success); color: #fff; padding: 0.25rem 0.75rem; border-radius: 50px; font-family: var(--font-heading); font-weight: 700; font-size: 0.75rem; }
.pricing-note { margin-top: 1rem; font-size: 0.8125rem; color: var(--muted-fg); font-style: italic; }

/* Certs Section */
.certs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.cert-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem 1rem; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius-xl); transition: border-color 0.3s; }
.cert-card:hover { border-color: var(--primary); }
.cert-card .cert-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-fg);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.cert-card h3 { font-family: var(--font-heading); font-weight: 600; font-size: 0.875rem; color: var(--foreground); }

@media (max-width: 639px) { .certs-grid { grid-template-columns: repeat(2, 1fr); } }

/* Emergency CTA Section */
.emergency-cta { background: var(--primary); padding: 5rem 1rem; text-align: center; position: relative; overflow: hidden; }
.emergency-cta::before { content: ''; position: absolute; top: -100px; left: -100px; width: 300px; height: 300px; background: var(--secondary); border-radius: 50%; opacity: 0.08; }
.emergency-cta::after { content: ''; position: absolute; bottom: -150px; right: -100px; width: 400px; height: 400px; background: var(--secondary); border-radius: 50%; opacity: 0.08; }
.emergency-cta .content { position: relative; z-index: 2; }
.emergency-cta .icon { font-size: 2.5rem; color: var(--secondary); margin-bottom: 1rem; }
.emergency-cta h2 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; color: var(--primary-fg); margin-bottom: 0.75rem; }
.emergency-cta .sub { font-size: 1.125rem; color: rgba(255,255,255,0.8); margin-bottom: 2rem; }
.emergency-btns { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.emergency-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.emergency-list span { background: rgba(255,255,255,0.1); padding: 0.5rem 1.25rem; border-radius: 50px; color: var(--primary-fg); font-family: var(--font-heading); font-weight: 600; font-size: 0.875rem; display: flex; align-items: center; gap: 0.5rem; }

/* Lead Magnet Section */
.lead-magnet { background: linear-gradient(135deg, var(--foreground) 0%, #2a2a2a 100%); padding: 4rem 1rem; color: var(--primary-fg); }
.lead-magnet-inner { max-width: 800px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.lead-magnet h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 0.5rem; }
.lead-magnet h2 .highlight { color: var(--secondary); }
.lead-magnet .lm-sub { opacity: 0.8; margin-bottom: 1.5rem; font-size: 0.9375rem; }
.lead-magnet .lm-features li { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; font-size: 0.9375rem; }
.lead-magnet .lm-features li i { color: var(--secondary); }
.lm-form { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-xl); padding: 2rem; }
.lm-form h3 { font-family: var(--font-heading); font-weight: 700; margin-bottom: 1rem; font-size: 1.125rem; }
.lm-form .form-input { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: var(--primary-fg); }
.lm-form .form-input::placeholder { color: rgba(255,255,255,0.5); }
.lm-form .form-label { color: rgba(255,255,255,0.8); }

@media (max-width: 767px) { .lead-magnet-inner { grid-template-columns: 1fr; } }

/* FAQ Section */
.faq-list { max-width: 700px; margin: 3rem auto 0; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--foreground);
  text-align: left;
  border: none;
  background: none;
}
.faq-question i { transition: transform 0.3s; color: var(--muted-fg); font-size: 0.75rem; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--muted-fg);
  font-size: 0.875rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 200px; padding: 0 1.5rem 1.25rem; }

/* Final CTA Section */
.final-cta { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 5rem 1rem; text-align: center; position: relative; overflow: hidden; }
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 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%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.final-cta .content { position: relative; z-index: 2; }
.final-cta h2 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; color: var(--primary-fg); margin-bottom: 0.75rem; }
.final-cta .sub { font-size: 1.125rem; color: rgba(255,255,255,0.8); margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.final-cta-btns { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* Footer */
.site-footer { background: var(--foreground); color: var(--primary-fg); padding: 3rem 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: var(--container); margin: 0 auto; }
.footer-col h4 { font-family: var(--font-heading); font-weight: 600; margin-bottom: 1rem; }
.footer-col p, .footer-col li, .footer-col a { font-size: 0.875rem; opacity: 0.7; line-height: 1.8; }
.footer-col a:hover { opacity: 1; color: var(--secondary); }
.footer-contact li { display: flex; align-items: flex-start; gap: 0.5rem; }
.footer-contact li i { margin-top: 0.3rem; }
.footer-bottom { max-width: var(--container); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.8125rem; opacity: 0.5; }
.social-icons { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-icons a { width: 2rem; height: 2rem; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; opacity: 0.7; transition: opacity 0.2s, background 0.2s; font-size: 0.875rem; }
.social-icons a:hover { opacity: 1; background: rgba(255,255,255,0.2); }

@media (max-width: 767px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) { .footer-grid { grid-template-columns: 1fr; } }

/* Sticky CTAs */
.sticky-call {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 999;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  animation: pulseGlow 2s infinite;
}
.sticky-book {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--secondary);
  color: var(--secondary-fg);
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8125rem;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.2s;
}
.sticky-book:hover { opacity: 0.9; }
.sticky-book .label { display: inline; }
.sticky-whatsapp {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  z-index: 999;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s;
}
.sticky-whatsapp:hover { transform: scale(1.1); }

@media (max-width: 767px) {
  .sticky-call { display: flex; }
  .sticky-book .label { display: none; }
  .sticky-whatsapp { bottom: 5rem; }
}

/* Exit Intent Popup */
.exit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.exit-overlay.show { display: flex; }
.exit-popup {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.3s ease-out;
}
.exit-popup .close-popup {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  font-size: 1.25rem;
  color: var(--muted-fg);
  cursor: pointer;
  border: none;
}
.exit-popup .popup-icon { font-size: 3rem; color: var(--secondary); margin-bottom: 1rem; }
.exit-popup h3 { font-size: 1.375rem; font-weight: 800; color: var(--foreground); margin-bottom: 0.5rem; }
.exit-popup p { font-size: 0.9375rem; color: var(--muted-fg); margin-bottom: 1.5rem; }
.exit-popup .btn { width: 100%; }
.exit-popup .no-thanks { display: block; margin-top: 0.75rem; font-size: 0.8125rem; color: var(--muted-fg); cursor: pointer; background: none; border: none; font-family: var(--font-body); }

/* Contact Form Card */
.contact-form-card { max-width: 640px; margin: 2.5rem auto 0; background: var(--card); border-radius: var(--radius-xl); padding: 2.5rem; box-shadow: var(--shadow-lg); }

/* Icon using SVG fallback for Font Awesome */
.icon-svg { display: inline-flex; align-items: center; justify-content: center; }

/* Performance: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll { opacity: 1; transform: none; }
}

/* Print Styles */
@media print {
  .call-bar, .site-header, .sticky-call, .sticky-book, .sticky-whatsapp, .exit-overlay { display: none !important; }
.hero { min-height: auto; }
  .hero-overlay { background: none; }
  .hero-content { color: var(--foreground); }
}

/* Logo Switching for Dark/Light Backgrounds */
.logo img.logo-dark { display: block; }
.logo img.logo-light { display: none; }

/* Show light logo on dark backgrounds */
.hero .logo img.logo-dark,
.bg-dark .logo img.logo-dark,
.dark-overlay .logo img.logo-dark,
.emergency-cta .logo img.logo-dark,
.service-hero .logo img.logo-dark,
.final-cta .logo img.logo-dark {
  display: none;
}
.hero .logo img.logo-light,
.bg-dark .logo img.logo-light,
.dark-overlay .logo img.logo-light,
.emergency-cta .logo img.logo-light,
.service-hero .logo img.logo-light,
.final-cta .logo img.logo-light {
  display: block;
}

/* ============================================
   POPUP MODAL - Form Success/Error Messages
   ============================================ */
.ks-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
}

.ks-modal.ks-modal-show {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ks-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.ks-modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ks-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ks-modal-close:hover {
  background: #f3f4f6;
}

.ks-modal-close svg {
  color: #6b7280;
}

.ks-modal-icon {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

.ks-modal-icon svg {
  width: 80px;
  height: 80px;
}

.ks-modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
}

.ks-modal-message {
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.ks-modal-message a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.ks-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2.5rem;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  min-width: 140px;
}

.ks-modal-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.ks-modal-btn:active {
  transform: translateY(0);
}

/* Mobile responsiveness for modal */
@media (max-width: 480px) {
  .ks-modal-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
  
  .ks-modal-icon svg {
    width: 64px;
    height: 64px;
  }
  
  .ks-modal-title {
    font-size: 1.25rem;
  }
}
