/* 
  Global Design System for HVAC Template
  Driven by CSS Variables initialized in template-engine.js
*/

:root {
  /* Fallbacks - overridden by template-engine.js */
  --primary: #005A9C;
  --secondary: #D32F2F;
  --accent: #FFC107;
  --bg: #F5F7FA;
  --text: #333333;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius: 8px;
  --shadow: 0 10px 25px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }

/* UTILITIES */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

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

.btn {
  display: inline-block;
  padding: 14px 34px;
  background: linear-gradient(135deg, var(--secondary), #b91c1c); /* Hardcoded deeper red gradient assuming secondary is red, fallback if they change it is fine */
  color: white;
  font-weight: 700;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1.15rem;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}
.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}
.btn-primary { 
  background: linear-gradient(135deg, var(--primary), #1e3a8a); 
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

/* HEADER */
header {
  background: white;
  box-shadow: 0 4px 30px rgba(0,0,0,0.08); /* Softer, wider shadow for premium feel */
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--primary); /* Adds a strong base line */
}
.top-bar {
  background-color: var(--primary);
  color: white;
  font-size: 0.9rem;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  font-weight: 500;
  letter-spacing: 0.5px;
}
nav.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}
.logo:hover {
  transform: scale(1.02);
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  font-weight: 700;
}
.nav-links a {
  position: relative;
  color: var(--text);
  padding-bottom: 6px;
  transition: color 0.3s ease;
  font-size: 1.05rem;
}
.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background-color: var(--secondary);
  transition: width 0.3s ease;
  border-radius: 2px;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }

.header-contact { display: flex; align-items: center; gap: 1.5rem; }
.header-phone-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-phone-wrapper svg {
  fill: var(--secondary);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.header-phone { font-size: 1.3rem; font-weight: 800; color: var(--primary); }

/* HERO SECTION */
.hero {
  position: relative;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)), url('./images/hero.png') center/cover no-repeat;
  color: white;
  padding: 120px 0;
  min-height: 80vh;
  display: flex;
  align-items: center;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: white;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V120H0V95.8C59.71,118,137,117.89,200.74,96.34C242.06,82.47,282.8,70.51,321.39,56.44Z'/%3E%3C/svg%3E") no-repeat center bottom / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V120H0V95.8C59.71,118,137,117.89,200.74,96.34C242.06,82.47,282.8,70.51,321.39,56.44Z'/%3E%3C/svg%3E") no-repeat center bottom / 100% 100%;
}
.hero .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 2;
}
.hero-content { flex: 1; }
.hero h1 {
  font-size: 3.5rem;
  color: white;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}
.hero-form-box {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
  color: var(--text);
  width: 400px;
  max-width: 100%;
}
.hero-form-box h3 { color: var(--primary); margin-bottom: 1rem; text-align: center; }
.ghl-iframe {
  height: 580px;
  min-height: 580px;
  transition: height 0.3s ease;
}
.ghl-placeholder {
  background: var(--bg);
  border: 2px dashed #ccc;
  padding: 2rem;
  text-align: center;
  color: #777;
  border-radius: var(--radius);
  font-weight: bold;
}

/* TRUST BANNER */
.trust-banner {
  background: white;
  padding: 4rem 0 4rem 0;
  position: relative;
  z-index: 10;
}
.badges-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--bg);
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* SERVICES SECTION */
.services {
  padding: 5rem 0;
  background-color: var(--bg);
}
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 { font-size: 2.5rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.bento-large, .bento-wide {
  border: none;
}
.service-card {
  background: padding-box linear-gradient(180deg, #ffffff, #fdfdfd), border-box #ffffff;
  padding: 3rem 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.04);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease, border-color 0.5s ease;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.95) 100%);
  z-index: -1;
  pointer-events: none;
}
.service-card:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.2);
}
.service-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 16px;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  margin-top: auto;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04), 0 4px 10px rgba(0,0,0,0.03);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.service-card:hover .service-icon {
  transform: scale(1.05) translateY(-3px);
}

/* WHY US & ABOUT */
.split-section {
  display: flex;
  align-items: center;
  gap: 6rem;
  padding: 8rem 0;
}
.split-image {
  flex: 1;
  border-radius: 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.split-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
}
.experience-badge {
  position: absolute;
  bottom: -30px;
  right: -30px;
  background: var(--primary);
  color: white;
  padding: 1.5rem 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,90,156,0.3);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 6px solid white;
  z-index: 2;
  transition: transform 0.4s ease;
}
.experience-badge:hover { transform: translateY(-10px); }
.experience-badge .years {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.experience-badge .exp-text {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.split-content { flex: 1; }
.pre-heading {
  display: inline-block;
  color: var(--secondary);
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 0.95rem;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.about-lead {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: #555;
  line-height: 1.8;
}
.why-us-list { margin-top: 1.5rem; margin-bottom: 2.5rem; }
.why-us-list li {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
  font-weight: 600;
  background: #f8fafc;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.why-us-list li:hover {
  transform: translateX(10px);
  background: white;
  border-color: rgba(0,90,156, 0.2);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* TESTIMONIALS SECTION */
.testimonials {
  background-color: var(--primary);
  color: white;
  padding: 6rem 0;
  position: relative;
}
.testimonials .section-title h2 { color: white; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}
.review-card {
  background: white;
  color: var(--text);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}
.review-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.review-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  right: 20px;
  font-family: Georgia, serif;
  font-size: 180px;
  color: var(--primary);
  opacity: 0.05;
  line-height: 1;
  z-index: -1;
}
.stars { 
  margin-bottom: 1.5rem; 
  display: flex;
  gap: 4px;
}
.review-text { 
  font-style: italic; 
  margin-bottom: 2rem; 
  font-size: 1.15rem;
  line-height: 1.8;
  color: #444;
  flex-grow: 1;
}
.review-author { 
  font-weight: 800; 
  color: var(--primary); 
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.05rem;
}

/* CTA SECTION */
.cta-section {
  background: var(--secondary);
  color: white;
  text-align: center;
  padding: 5rem 0;
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V95.8C59.71,118,137,117.89,200.74,96.34C242.06,82.47,282.8,70.51,321.39,56.44Z'/%3E%3C/svg%3E") no-repeat center bottom / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V95.8C59.71,118,137,117.89,200.74,96.34C242.06,82.47,282.8,70.51,321.39,56.44Z'/%3E%3C/svg%3E") no-repeat center bottom / 100% 100%;
}
.cta-section h2 { color: white; font-size: 2.5rem; margin-bottom: 1rem; }
.cta-section .btn { background: white; color: var(--secondary); margin-top: 1.5rem; font-size: 1.2rem;}

/* FOOTER */
footer {
  background: linear-gradient(180deg, #111111, #000000);
  color: #fff;
  padding: 6rem 0 2rem 0;
  border-top: 4px solid var(--primary);
  box-shadow: inset 0 10px 30px rgba(0,0,0,0.5);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4rem;
  margin-bottom: 4rem;
}
.footer-col h4 {
  color: white;
  margin-bottom: 2rem;
  font-size: 1.4rem;
  position: relative;
  display: inline-block;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 3px;
  background-color: var(--secondary);
  border-radius: 2px;
}
.footer-col p {
  color: #94a3b8;
  line-height: 1.8;
}
.footer-col ul li {
  margin-bottom: 1rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
}
.footer-col ul li a {
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}
.footer-col ul li:hover a {
  transform: translateX(8px);
  color: var(--accent);
}
.footer-bottom {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  font-size: 0.95rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero .container { flex-direction: column; text-align: center; }
  .hero-form-box { width: 100%; padding: 1.5rem; }
  .split-section { flex-direction: column; gap: 4rem; padding: 4rem 0; text-align: center; }
  .experience-badge { right: 0; bottom: -20px; }
  .nav-links { display: none; } /* Simple hiding for demo */
  .services-grid { grid-template-columns: 1fr; }
  .ghl-iframe { height: 800px !important; }
}

/* REVEAL ANIMATIONS */
.reveal-up {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

/* FORM FLASH ANIMATION */
@keyframes highlight-flash {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); transform: scale(1.02); }
  50% { box-shadow: 0 0 0 30px rgba(220, 38, 38, 0); transform: scale(1); border-color: rgba(220, 38, 38, 0.8); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); transform: scale(1); border-color: rgba(255, 255, 255, 0.4); }
}
.flash-attention {
  animation: highlight-flash 1.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  border: 2px solid var(--secondary) !important;
}
