/* ===================================================
   AC By Hank — Main Stylesheet
   Veteran-Owned HVAC | Phoenix East Valley, AZ
   =================================================== */

/* --- CSS Variables --- */
:root {
  /* Primary palette — red/blue American theme */
  --red: #B22234;
  --red-dark: #8B1A2B;
  --red-light: #D4394B;
  --blue: #1E3A5F;
  --blue-dark: #0F2440;
  --blue-light: #2C5282;
  --white: #FFFFFF;
  --off-white: #F7F8FA;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --gold: #C5A147;
  
  /* Typography */
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing */
  --max-width: 1200px;
  --section-pad: 5rem 1.5rem;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--gray-900);
  line-height: 1.6;
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red); }

/* --- Top Bar --- */
.top-bar {
  background: var(--blue-dark);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.top-bar a { color: var(--white); }
.top-bar .phone { font-weight: 700; font-size: 1.05rem; }
.top-bar .phone i { margin-right: 0.4rem; }
.top-bar .badge-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.flag-wave {
  display: inline-block;
  font-size: 1.5rem;
  animation: wave-flag 2s ease-in-out infinite;
  transform-origin: 20% 80%;
  line-height: 1;
}
@keyframes wave-flag {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(4deg); }
}
.vet-badge {
  background: var(--red);
  color: var(--white);
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- Header / Nav --- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-dark);
}
.logo span { color: var(--red); }
.logo img { height: 50px; width: auto; }

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}
.nav-links a {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: var(--radius);
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--red-dark); color: var(--white) !important; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--blue-dark);
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 550px;
  color: var(--white);
  overflow: hidden;
}
.hero-text {
  background: var(--blue-dark);
  display: flex;
  align-items: center;
  padding: 4rem 3rem;
}
.hero-text-inner {
  max-width: 550px;
}
.hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-text .subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.5;
}
.hero-text .vet-line {
  display: inline-block;
  background: rgba(178,34,52,0.2);
  border: 1px solid var(--red);
  padding: 0.35rem 1rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.hero-image {
  position: relative;
  overflow: hidden;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 350px;
  }
  .hero-text { padding: 3rem 1.5rem; }
  .hero-image { order: -1; }
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-secondary {
  background: var(--white);
  color: var(--blue-dark);
  border: 2px solid var(--white);
}
.btn-secondary:hover { background: transparent; color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline:hover { background: var(--red); color: var(--white); }

/* --- Section Headings --- */
.section {
  padding: var(--section-pad);
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-alt {
  background: var(--off-white);
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--blue-dark);
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--red);
}
.service-card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--red);
}
.service-card h3 {
  font-family: var(--font-heading);
  color: var(--blue-dark);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}
.service-card p {
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- Trust Bar --- */
.trust-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding: 2rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.trust-item {
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-500);
}
.trust-item .icon { font-size: 1.75rem; margin-bottom: 0.35rem; color: var(--red); }
.trust-item strong { display: block; color: var(--gray-900); font-size: 0.95rem; }

/* --- About Section (homepage blurb) --- */
.about-blurb {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-blurb img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.about-blurb h2 {
  font-family: var(--font-heading);
  color: var(--blue-dark);
  font-size: 2rem;
  margin-bottom: 1rem;
}
.about-blurb p {
  color: var(--gray-500);
  margin-bottom: 1rem;
  line-height: 1.7;
}
.vet-flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue-dark);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.testimonial-card .stars { color: var(--gold); font-size: 1.1rem; margin-bottom: 0.75rem; }
.testimonial-card .quote { color: var(--gray-700); font-style: italic; line-height: 1.7; margin-bottom: 1rem; }
.testimonial-card .author { font-weight: 700; color: var(--blue-dark); }
.testimonial-card .source { color: var(--gray-500); font-size: 0.85rem; }

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: var(--section-pad);
}
.cta-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}
.cta-section p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-section .btn { margin: 0 0.5rem; }
.cta-section .btn-secondary { margin-top: 1rem; }

/* --- Footer --- */
.site-footer {
  background: var(--blue-dark);
  color: var(--gray-300);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer-col h4 {
  font-family: var(--font-heading);
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.footer-col p, .footer-col li { font-size: 0.9rem; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col a { color: var(--gray-300); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* --- Page Header (inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}
.page-hero p { opacity: 0.85; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* --- Bio Layout (About page) --- */
.bio-section {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
.bio-section.flip { grid-template-columns: 1.2fr 1fr; }
.bio-section img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.bio-section h2 {
  font-family: var(--font-heading);
  color: var(--blue-dark);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.bio-section p {
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.bio-section .highlight-box {
  background: var(--off-white);
  border-left: 4px solid var(--red);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.bio-section .highlight-box strong { color: var(--blue-dark); }

/* --- Service Detail (Services page) --- */
.service-detail {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.service-detail:last-child { border-bottom: none; }
.service-detail h3 {
  font-family: var(--font-heading);
  color: var(--blue-dark);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.service-detail p { color: var(--gray-500); line-height: 1.7; }
.service-detail ul {
  list-style: none;
  margin-top: 0.75rem;
}
.service-detail ul li {
  padding: 0.3rem 0;
  color: var(--gray-700);
}
.service-detail ul li::before {
  content: "✓";
  color: var(--red);
  font-weight: 700;
  margin-right: 0.5rem;
}
.service-detail .icon-lg { font-size: 3rem; color: var(--red); text-align: center; }

/* --- Free Services highlight --- */
.service-detail.free-services {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
}
.service-detail.free-services h3 { color: var(--blue-dark); }
.service-detail.free-services .icon-lg { color: var(--red); }

/* --- Estimate Form --- */
.form-container {
  max-width: 650px;
  margin: 0 auto;
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
.form-group .required::after {
  content: " *";
  color: var(--red);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-submit { width: 100%; }

/* --- Reviews Page --- */
.review-highlight {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.review-highlight .stars { color: var(--gold); font-size: 1.25rem; margin-bottom: 0.75rem; }
.review-highlight .body { color: var(--gray-700); font-size: 1.1rem; line-height: 1.7; font-style: italic; }
.review-highlight .attribution { margin-top: 1rem; color: var(--gray-500); font-size: 0.9rem; }

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-info h3 {
  font-family: var(--font-heading);
  color: var(--blue-dark);
  margin-bottom: 1rem;
}
.contact-info .info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.contact-info .info-item .icon { font-size: 1.5rem; color: var(--red); }
.contact-info .info-item strong { display: block; color: var(--gray-900); }
.contact-info .info-item p { color: var(--gray-500); }

/* --- Service Area --- */
.map-container {
  max-width: 900px;
  height: 500px;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.area-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 2rem 0;
}
.area-list li {
  background: var(--off-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  text-align: center;
  font-weight: 500;
  color: var(--blue-dark);
}

/* --- Gallery (About page) --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.gallery img {
  border-radius: var(--radius);
  height: 280px;
  width: 100%;
  object-fit: cover;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .top-bar { justify-content: center; text-align: center; }
  .mobile-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 3px solid var(--red);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .about-blurb,
  .bio-section,
  .bio-section.flip,
  .contact-grid,
  .service-detail { grid-template-columns: 1fr; }
  .hero { min-height: 450px; }
  .trust-bar { gap: 1.5rem; }
  .form-container { padding: 1.5rem; }
}

/* Utility: visually hidden */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
