/* =========================================================
   Errolla Mahesh Electrical Services
   Modern • Blue / Yellow / White theme
   ========================================================= */

:root {
  --blue-900: #0B2A5B;
  --blue-800: #0D2A55;
  --blue-700: #102F60;
  --blue-600: #173C7A;
  --blue-500: #1E4E96;
  --sky: #38B6FF;
  --yellow: #FFC107;
  --yellow-light: #FFD54F;
  --yellow-dark: #E6A700;
  --white: #ffffff;
  --gray-50: #F5F8FC;
  --gray-100: #EEF2F8;
  --gray-600: #5A6B82;
  --gray-800: #22303F;
  --green: #25D366;
  --green-dark: #1EBE57;
  --red: #E53935;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(11, 42, 91, 0.12);
  --shadow-lg: 0 20px 45px rgba(11, 42, 91, 0.18);
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Poppins', 'Inter', sans-serif; line-height: 1.25; color: var(--blue-900); }

img, svg { max-width: 100%; display: block; }

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

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-sm { padding: 9px 18px; font-size: 0.86rem; }

.btn-call { background: var(--blue-900); color: #fff; box-shadow: 0 8px 20px rgba(11,42,91,.3); }
.btn-call:hover { background: var(--blue-600); }

.btn-whatsapp { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(37,211,102,.35); }
.btn-whatsapp:hover { background: var(--green-dark); }

.btn-primary { background: var(--yellow); color: var(--blue-900); box-shadow: 0 8px 20px rgba(255,193,7,.4); }
.btn-primary:hover { background: var(--yellow-light); }

.btn-outline { background: transparent; color: var(--blue-900); border-color: var(--blue-900); }
.btn-outline:hover { background: var(--blue-900); color: #fff; }

/* ===================== Top Bar ===================== */
.topbar { background: var(--blue-900); color: #dbe6f5; font-size: 0.85rem; padding: 8px 0; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar-tagline { font-weight: 500; letter-spacing: .3px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-link { color: var(--yellow-light); font-weight: 600; }
.topbar-link:hover { color: var(--yellow); text-decoration: underline; }
.topbar-sep { opacity: .4; }
.topbar-hours { display: flex; align-items: center; gap: 6px; }
.topbar-hours::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; display: inline-block; }

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
  height: var(--header-h);
}
.site-header.scrolled { box-shadow: 0 6px 20px rgba(11,42,91,.12); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { display: inline-flex; }
.brand-logo svg { box-shadow: var(--shadow); border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--blue-900); }
.brand-sub { font-size: .78rem; color: var(--yellow-dark); font-weight: 600; letter-spacing: .4px; }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  font-weight: 500;
  font-size: .95rem;
  color: var(--gray-800);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--blue-600); background: var(--gray-50); }
.nav-links a.active { color: var(--blue-900); font-weight: 600; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; border-radius: 3px; background: var(--blue-900); transition: transform .3s, opacity .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===================== Hero ===================== */
.hero { position: relative; background: var(--blue-900); color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; opacity: .95; }
.hero-illustration { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; }
.hero-illustration svg { width: 100%; height: 100%; object-fit: cover; }

.hero-content {
  position: relative;
  z-index: 2;
  padding: 90px 0 110px;
  max-width: 700px;
}
.badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--blue-900);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; margin-bottom: 18px; }
.hero h1 .accent { color: var(--yellow); }
.hero-sub { font-size: 1.08rem; color: #dbe6f5; max-width: 620px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-points { display: flex; gap: 22px; flex-wrap: wrap; font-size: .9rem; color: #c9d8ef; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: "✓"; color: var(--yellow); font-weight: 800; }

/* ===================== Stats ===================== */
.stats { background: var(--yellow); padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { display: block; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--blue-900); }
.stat-label { font-weight: 600; font-size: .9rem; color: var(--blue-800); }

/* ===================== Sections ===================== */
.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-tag {
  display: inline-block;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-600);
  background: var(--gray-100);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; margin-bottom: 12px; }
.section-head p { color: var(--gray-600); font-size: 1.02rem; }
.section-head.light h2 { color: #fff; }
.section-head.light p { color: #c9d8ef; }
.section-head.light .section-tag { background: rgba(255,255,255,.12); color: var(--yellow-light); }

/* ===================== About ===================== */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; }

.about-visual { display: flex; justify-content: center; }
.about-card {
  background: linear-gradient(160deg, var(--blue-800), var(--blue-900));
  color: #fff;
  border-radius: var(--radius);
  padding: 44px 40px;
  text-align: center;
  width: min(360px, 100%);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.about-card::before {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,193,7,.35), transparent 70%);
  top: -70px; right: -70px;
  border-radius: 50%;
}
.about-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.about-logo svg { box-shadow: 0 12px 30px rgba(0,0,0,.3); border-radius: 16px; }
.about-card h3 { color: #fff; font-size: 1.5rem; }
.about-card p { color: var(--yellow-light); font-weight: 600; margin-bottom: 18px; }
.about-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.about-badges span {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
}

.about-text .section-tag { margin-bottom: 12px; }
.about-text h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 18px; }
.about-text p { color: var(--gray-600); margin-bottom: 14px; }
.about-text strong { color: var(--blue-800); }
.about-checks { margin: 20px 0 26px; display: grid; gap: 12px; }
.about-checks li { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--gray-800); }
.about-checks li::before {
  content: "✓";
  flex: 0 0 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yellow); color: var(--blue-900);
  border-radius: 50%;
  font-weight: 800; font-size: .85rem;
}
.about-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===================== Services ===================== */
.services { background: var(--gray-50); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.service-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--yellow);
}
.service-icon {
  font-size: 2rem;
  line-height: 1;
  background: var(--gray-50);
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  margin-bottom: 4px;
  transition: background .25s;
}
.service-card:hover .service-icon { background: var(--yellow-light); }
.service-card h3 { font-size: 1.05rem; }
.service-card p { color: var(--gray-600); font-size: .92rem; flex: 1; }
.service-card-emergency { background: linear-gradient(160deg, var(--blue-700), var(--blue-900)); border-color: var(--blue-700); }
.service-card-emergency h3 { color: #fff; }
.service-card-emergency p { color: #c9d8ef; }
.service-card-emergency:hover { border-color: var(--yellow); }

/* ===================== Why Us ===================== */
.why { background: linear-gradient(150deg, var(--blue-900), var(--blue-700)); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex; gap: 14px;
  align-items: flex-start;
  transition: background .25s, transform .25s;
}
.why-item:hover { background: rgba(255,255,255,.12); transform: translateY(-4px); }
.why-icon {
  flex: 0 0 34px; height: 34px;
  background: var(--yellow);
  color: var(--blue-900);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
}
.why-item h3 { color: #fff; font-size: 1.02rem; margin-bottom: 4px; }
.why-item p { color: #c9d8ef; font-size: .9rem; }

/* ===================== Service Areas ===================== */
.areas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 44px; }
.area-card {
  text-align: center;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 34px 24px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.area-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--yellow); }
.area-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.area-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.area-card p { color: var(--gray-600); font-size: .95rem; }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  background: var(--gray-100);
  line-height: 0;
}
.map-wrap iframe { width: 100%; height: 380px; border: 0; }

/* ===================== Reviews ===================== */
.reviews { background: var(--gray-50); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .25s;
}
.review-card:hover { transform: translateY(-5px); }
.stars { color: var(--yellow-dark); font-size: 1.4rem; letter-spacing: 3px; margin-bottom: 16px; text-shadow: 0 2px 6px rgba(255,193,7,.3); }
.review-card blockquote { font-size: 1.02rem; color: var(--gray-800); font-style: italic; margin-bottom: 16px; }
.review-card figcaption { font-weight: 600; color: var(--blue-600); font-size: .9rem; }

/* ===================== CTA band ===================== */
.cta-band {
  background: linear-gradient(120deg, var(--yellow), var(--yellow-light));
  padding: 60px 0;
  text-align: center;
}
.cta-band h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: 8px; }
.cta-band p { color: var(--blue-800); font-weight: 500; margin-bottom: 24px; }
.cta-band .hero-cta { justify-content: center; margin-bottom: 0; }

/* ===================== Contact ===================== */
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 40px; align-items: start; }
.contact-form {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; color: var(--blue-900); margin-bottom: 7px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .95rem;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(30,78,150,.12);
  background: #fff;
}
.form-status { font-size: .9rem; font-weight: 600; min-height: 1.2em; margin-bottom: 8px; }
.form-status.ok { color: var(--green-dark); }
.form-status.err { color: var(--red); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.contact-info { background: var(--blue-900); color: #fff; border-radius: var(--radius); padding: 34px 28px; box-shadow: var(--shadow-lg); }
.contact-info h3 { color: #fff; font-size: 1.3rem; margin-bottom: 20px; }
.contact-info ul { display: grid; gap: 20px; }
.contact-info li { display: flex; gap: 14px; align-items: flex-start; }
.ci-icon {
  flex: 0 0 42px; height: 42px;
  background: rgba(255,255,255,.1);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.contact-info li strong { display: block; font-size: .85rem; color: var(--yellow-light); text-transform: uppercase; letter-spacing: .5px; }
.contact-info li a, .contact-info li span { color: #fff; font-weight: 500; }
.contact-info li a:hover { color: var(--yellow); }
.contact-banner {
  margin-top: 26px;
  background: var(--yellow);
  color: var(--blue-900);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}
.contact-banner p { font-weight: 700; margin-bottom: 12px; }
.contact-banner .btn-call { background: var(--blue-900); }
.contact-banner .btn-call:hover { background: var(--blue-600); }

/* ===================== Footer ===================== */
.footer { background: #081F45; color: #b7c7e0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 40px; padding: 60px 0 40px; }
.footer .brand-name { color: #fff; }
.footer .brand-sub { color: var(--yellow); }
.footer-brand p { font-size: .95rem; margin-top: 16px; }
.footer-serving { font-weight: 600; color: var(--yellow-light); }
.footer-serving span { font-weight: 500; color: #fff; }
.footer-col h3 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: .95rem; color: #b7c7e0; transition: color .2s; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; text-align: center; font-size: .9rem; }
.footer-bottom p { margin: 3px 0; }
.footer-bottom p:last-child { color: #7f94b3; font-size: .83rem; }

/* ===================== Floating WhatsApp ===================== */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 90;
  width: 60px; height: 60px;
  background: var(--green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(37,211,102,.45);
  transition: transform .25s, box-shadow .25s;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 14px 30px rgba(37,211,102,.55); }

/* ===================== Scroll reveal ===================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 5%;
    box-shadow: 0 18px 30px rgba(11,42,91,.15);
    border-bottom: 1px solid var(--gray-100);
    transform: translateY(-130%);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .nav-links a { display: block; padding: 12px; font-size: 1rem; }
  .nav-toggle { display: flex; }
  .nav-call { display: none; }

  .topbar-hours, .topbar-sep { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .hero-content { padding: 60px 0 80px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .topbar-tagline { display: none; }
  .topbar-inner { justify-content: center; }
}
