/* ============================================================
   Universal HVAC Contractors Philadelphia - Main Stylesheet
   Mobile-first responsive design
   ============================================================ */

:root {
  --primary: #0b3d91;
  --primary-dark: #072966;
  --accent: #ff6a00;
  --accent-dark: #e25a00;
  --cool: #0a8fd4;
  --hot: #d62828;
  --dark: #1a1a2e;
  --gray: #555;
  --light: #f5f7fb;
  --lighter: #ffffff;
  --border: #e2e8f0;
  --success: #2e7d32;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --radius: 10px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #333;
  background: #ffffff;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Top Bar ===== */
.topbar {
  background: var(--dark);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--accent); }
.topbar .tb-left span { margin-right: 18px; }
.topbar .tb-right a { margin-left: 16px; }

/* ===== Header ===== */
.site-header {
  background: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 20px;
}
.logo {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  font-weight: 600;
  padding: 8px;
  flex-shrink: 0;
}
.logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

.brand-info { display: none; }
@media (min-width: 768px) {
  .brand-info { display: block; }
}
.brand-info h1 { font-size: 20px; color: var(--primary); line-height: 1.2; }
.brand-info p { font-size: 13px; color: var(--gray); margin-top: 2px; }
.brand-info .lic { color: var(--accent); font-weight: 600; }

.header-phone {
  text-align: right;
  flex-shrink: 0;
}
.header-phone .call-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 16px;
}
.header-phone .call-btn:hover { background: var(--accent-dark); color: #fff; }
.header-phone .small { display: block; font-size: 12px; color: var(--gray); margin-top: 2px; }

/* ===== Navigation ===== */
.nav-wrap { background: var(--primary); }
.nav-toggle {
  display: block;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  padding: 12px 20px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.nav-toggle span { font-weight: 600; margin-left: 8px; }
.main-nav { display: none; list-style: none; }
.main-nav.open { display: block; }
.main-nav > li { position: relative; }
.main-nav > li > a {
  display: block;
  color: #fff;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.main-nav > li > a:hover,
.main-nav > li.active > a { background: var(--primary-dark); color: #fff; }
.main-nav .submenu { display: none; list-style: none; background: var(--primary-dark); }
.main-nav .submenu.open { display: block; }
.main-nav .submenu a {
  display: block;
  padding: 12px 36px;
  color: #fff;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.main-nav .submenu a:hover { background: var(--accent); color: #fff; }
.submenu-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  padding: 6px 12px;
  cursor: pointer;
}

@media (min-width: 992px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }
  .main-nav > li > a { border-bottom: none; padding: 16px 22px; }
  .main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    display: none;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 8px 8px;
    z-index: 100;
  }
  .main-nav > li:hover > .submenu { display: block; }
  .main-nav .submenu a { padding: 12px 20px; }
  .submenu-toggle { display: none; }
}

/* ===== Sticky Call Bar (mobile + desktop) ===== */
.sticky-call {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--accent);
  color: #fff;
  text-align: center;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  padding: 12px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.sticky-call a {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sticky-call .pulse {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  70% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
body { padding-bottom: 56px; }
@media (min-width: 768px) { body { padding-bottom: 0; } .sticky-call { display: none; } }

/* Floating call button (desktop) */
.float-call {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  background: var(--accent);
  color: #fff;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  font-size: 26px;
}
@media (min-width: 768px) { .float-call { display: flex; } }
.float-call:hover { background: var(--accent-dark); color: #fff; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, rgba(7,41,102,0.92), rgba(10,143,212,0.85)),
    url('https://images.unsplash.com/photo-1581094288338-2314dddb7ece?auto=format&fit=crop&w=1600&q=60') center/cover no-repeat;
  color: #fff;
  padding: 70px 0;
}
.hero h1 {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 16px;
  max-width: 700px;
}
.hero p { font-size: 17px; margin-bottom: 24px; max-width: 640px; opacity: 0.95; }
.hero .hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 16px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #fff; color: var(--accent); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }
.btn-cool { background: var(--cool); color: #fff; }
.btn-cool:hover { background: var(--primary); color: #fff; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  font-size: 14px;
}
.hero-badges span { display: flex; align-items: center; gap: 6px; }
.hero-badges strong { color: #ffd700; }

@media (min-width: 992px) {
  .hero { padding: 90px 0; }
  .hero h1 { font-size: 44px; }
}

/* ===== Section general ===== */
section { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 {
  font-size: 28px;
  color: var(--primary);
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.section-title h2::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 70px;
  height: 4px;
  background: var(--accent);
  border-radius: 4px;
}
.section-title p { color: var(--gray); margin-top: 14px; max-width: 700px; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .section-title h2 { font-size: 34px; } }

/* ===== Services grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 560px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.service-card .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cool), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.service-card h3 { color: var(--primary); font-size: 20px; margin-bottom: 10px; }
.service-card p { color: var(--gray); font-size: 15px; margin-bottom: 16px; }
.service-card .learn { color: var(--accent); font-weight: 600; }

/* ===== Why choose us / features ===== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 560px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature {
  text-align: center;
  padding: 22px;
}
.feature .f-icon {
  font-size: 44px;
  margin-bottom: 12px;
  display: block;
}
.feature h3 { color: var(--primary); margin-bottom: 8px; font-size: 18px; }
.feature p { color: var(--gray); font-size: 14px; }

.bg-light { background: var(--light); }

/* ===== Stats bar ===== */
.stats {
  background: var(--primary);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 32px 16px; border-right: 1px solid rgba(255,255,255,0.15); }
.stat:last-child { border-right: none; }
.stat .num { font-size: 36px; font-weight: 800; color: var(--accent); }
.stat .label { font-size: 14px; margin-top: 4px; opacity: 0.9; }

/* ===== Service area ===== */
.area-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 768px) { .area-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.area-list { columns: 2; font-size: 15px; gap: 8px; }
.area-list li { margin-bottom: 6px; list-style: none; padding-left: 22px; position: relative; }
.area-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ===== Reviews ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 560px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }
.review-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
}
.review-card .stars { color: #ffb400; font-size: 18px; margin-bottom: 10px; }
.review-card .r-text { color: #444; font-style: italic; margin-bottom: 14px; }
.review-card .r-author { font-weight: 700; color: var(--primary); }
.review-card .r-meta { font-size: 13px; color: var(--gray); }

.rating-summary {
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  display: inline-block;
}
.rating-summary .big { font-size: 50px; font-weight: 800; color: var(--accent); }
.rating-summary .stars { color: #ffb400; font-size: 22px; }

/* ===== Forms ===== */
.form-wrap {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  max-width: 640px;
  margin: 0 auto;
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--dark); font-size: 14px; }
.form-group label .req { color: var(--hot); }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,61,145,0.12); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-message {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  display: none;
  font-weight: 600;
}
.form-message.success { display: block; background: #e8f5e9; color: var(--success); border: 1px solid #a5d6a7; }
.form-message.error { display: block; background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.g-recaptcha { margin-bottom: 18px; }

.estimate-cta {
  background: linear-gradient(135deg, var(--primary), var(--cool));
  color: #fff;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.estimate-cta h2 { color: #fff; font-size: 26px; margin-bottom: 12px; }
.estimate-cta p { opacity: 0.95; margin-bottom: 22px; max-width: 600px; margin-left: auto; margin-right: auto; }
.estimate-cta .btn { background: #fff; color: var(--primary); }
.estimate-cta .btn:hover { background: var(--accent); color: #fff; }

/* ===== Page banner (inner pages) ===== */
.page-banner {
  background: linear-gradient(135deg, rgba(7,41,102,0.93), rgba(10,143,212,0.88));
  color: #fff;
  padding: 50px 0;
  text-align: center;
}
.page-banner h1 { font-size: 28px; margin-bottom: 10px; }
.page-banner .breadcrumb { font-size: 14px; opacity: 0.9; }
.page-banner .breadcrumb a { color: #ffd700; }
@media (min-width: 768px) { .page-banner h1 { font-size: 38px; } }

/* ===== Content article ===== */
.article { max-width: 820px; margin: 0 auto; }
.article h2 { color: var(--primary); margin: 28px 0 14px; font-size: 24px; }
.article h3 { color: var(--primary-dark); margin: 22px 0 10px; font-size: 19px; }
.article p { margin-bottom: 16px; color: #444; }
.article ul { margin: 0 0 16px 22px; }
.article ul li { margin-bottom: 8px; }
.article .lead { font-size: 18px; color: #555; }
.article .callout {
  background: var(--light);
  border-left: 5px solid var(--accent);
  padding: 20px;
  border-radius: 8px;
  margin: 24px 0;
}
.article .callout p { margin: 0; }
.callout-now {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  margin: 28px 0;
}
.callout-now h3 { color: #fff; margin-bottom: 8px; }
.callout-now a { color: #fff; font-size: 26px; font-weight: 800; }

.service-sidebar {
  background: var(--light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.service-sidebar h3 { color: var(--primary); margin-bottom: 12px; font-size: 18px; }
.service-sidebar ul { list-style: none; }
.service-sidebar ul li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.service-sidebar ul li:last-child { border-bottom: none; }
.service-sidebar ul li a { font-size: 14px; }

.content-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 992px) { .content-grid { grid-template-columns: 2fr 1fr; } }

/* ===== Map ===== */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 30px; }
.map-wrap iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ===== Contact info cards ===== */
.contact-cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 30px; }
@media (min-width: 560px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .contact-cards { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.contact-card .c-icon { font-size: 34px; color: var(--accent); margin-bottom: 10px; }
.contact-card h3 { color: var(--primary); margin-bottom: 6px; font-size: 18px; }
.contact-card p, .contact-card a { color: #444; font-size: 15px; word-break: break-word; }
.contact-card a:hover { color: var(--accent); }

/* ===== Hours table ===== */
.hours-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.hours-table td { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.hours-table td:last-child { text-align: right; font-weight: 600; }

/* ===== CTA strip ===== */
.cta-strip {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 36px 0;
}
.cta-strip h2 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.cta-strip p { margin-bottom: 18px; }
.cta-strip .btn { background: #fff; color: var(--accent); }
.cta-strip .btn:hover { background: var(--primary); color: #fff; }

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: #cdd4e0; padding: 50px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
@media (min-width: 560px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h3 { color: #fff; font-size: 17px; margin-bottom: 16px; position: relative; padding-bottom: 8px; }
.footer-col h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--accent); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #cdd4e0; font-size: 14px; }
.footer-col a:hover { color: var(--accent); padding-left: 4px; }
.footer-col p { font-size: 14px; margin-bottom: 8px; }
.footer-col .nap strong { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
}
.footer-bottom a { color: var(--accent); }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.list-check { list-style: none; }
.list-check li { padding-left: 26px; position: relative; margin-bottom: 10px; }
.list-check li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
