/* =============================================================
   Maynard Electrical — Home Page Template Styles
   ============================================================= */

/* ---- Tokens ---- */
:root {
  --mec-navy:    #1a2e4a;
  --mec-green:   #6aaa2a;
  --mec-green-d: #5a9020;
  --mec-white:   #ffffff;
  --mec-bg:      #f6f8fa;
  --mec-text:    #3a4655;
  --mec-muted:   #6b7a8d;
  --mec-radius:  10px;
  --mec-shadow:  0 4px 24px rgba(26,46,74,0.10);
}

/* ---- Reset & base ---- */
#mec-home *,
#mec-home *::before,
#mec-home *::after { box-sizing: border-box; }

#mec-home {
  font-family: 'Open Sans', sans-serif;
  color: var(--mec-text);
}

/* ---- Layout helpers ---- */
.mec-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.mec-section {
  padding: 88px 0;
}

.mec-section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.mec-section-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--mec-navy);
  margin: 8px 0 16px;
  line-height: 1.2;
}

.mec-section-header p {
  color: var(--mec-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.mec-label {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mec-green);
  background: rgba(106,170,42,0.10);
  padding: 4px 14px;
  border-radius: 20px;
}

/* ---- Buttons ---- */
.mec-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 32px;
  border-radius: var(--mec-radius);
  border: 2px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
}

.mec-btn--primary {
  background: var(--mec-green);
  color: var(--mec-white);
  border-color: var(--mec-green);
  box-shadow: 0 6px 20px rgba(106,170,42,0.30);
}
.mec-btn--primary:hover {
  background: var(--mec-green-d);
  border-color: var(--mec-green-d);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(106,170,42,0.40);
  color: var(--mec-white);
}

.mec-btn--outline {
  background: transparent;
  color: var(--mec-navy);
  border-color: var(--mec-navy);
}
.mec-btn--outline:hover {
  background: var(--mec-navy);
  color: var(--mec-white);
  transform: translateY(-2px);
}

.mec-btn--white {
  background: var(--mec-white);
  color: var(--mec-navy);
  border-color: var(--mec-white);
}
.mec-btn--white:hover {
  background: var(--mec-green);
  border-color: var(--mec-green);
  color: var(--mec-white);
  transform: translateY(-2px);
}

.mec-btn--outline-white {
  background: transparent;
  color: var(--mec-white);
  border-color: rgba(255,255,255,0.7);
}
.mec-btn--outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--mec-white);
  transform: translateY(-2px);
}

/* =============================================================
   HERO
   ============================================================= */
.mec-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 100px 0 80px;
}

.mec-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(26,46,74,0.82) 0%,
    rgba(26,46,74,0.55) 55%,
    rgba(0,0,0,0.20) 100%
  );
}

.mec-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.mec-hero__eyebrow {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mec-green);
  background: rgba(106,170,42,0.15);
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.mec-hero__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: var(--mec-white);
  line-height: 1.15;
  margin: 0 0 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.30);
}

.mec-hero__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--mec-green);
  border-radius: 2px;
  margin-top: 18px;
}

.mec-hero__sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  margin: 0 0 32px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.20);
}

.mec-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.mec-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.80);
  font-family: 'Montserrat', sans-serif;
}

/* Fade-up entrance */
@keyframes mecFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mec-hero__inner { animation: mecFadeUp 0.75s ease both; }

/* =============================================================
   SERVICES
   ============================================================= */
.mec-services { background: var(--mec-bg); }

.mec-services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.mec-card {
  background: var(--mec-white);
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid #e4eaf1;
  box-shadow: var(--mec-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.mec-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(26,46,74,0.14);
  border-color: var(--mec-green);
}

.mec-card__img-wrap {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.mec-card__img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--mec-green);
  z-index: 1;
}

.mec-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.mec-card:hover .mec-card__img-wrap img {
  transform: scale(1.05);
}

.mec-card__body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mec-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--mec-navy);
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 4px solid var(--mec-green);
  line-height: 1.3;
}

.mec-card__text {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--mec-muted);
  margin: 0 0 20px;
  flex: 1;
}

.mec-card__link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mec-green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease, color 0.2s ease;
  align-self: flex-start;
}

.mec-card__link:hover {
  color: var(--mec-green-d);
  gap: 12px;
}

/* =============================================================
   WHY CHOOSE US
   ============================================================= */
.mec-why { background: var(--mec-white); }

.mec-why__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.mec-why__content .mec-label { margin-bottom: 12px; }

.mec-why__content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--mec-navy);
  margin: 0 0 16px;
  line-height: 1.25;
}

.mec-why__content > p {
  color: var(--mec-muted);
  line-height: 1.8;
  margin: 0 0 28px;
}

.mec-why__list {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mec-why__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mec-navy);
}

.mec-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(106,170,42,0.12);
  color: var(--mec-green);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}

.mec-why__visual {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mec-why__photo-wrap {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--mec-shadow);
  aspect-ratio: 16/9;
}

.mec-why__photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mec-why__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mec-stat {
  background: var(--mec-bg);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  border: 1.5px solid #e4eaf1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mec-stat:hover {
  border-color: var(--mec-green);
  box-shadow: 0 8px 24px rgba(106,170,42,0.12);
}

.mec-stat__num {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--mec-navy);
  line-height: 1;
  margin-bottom: 8px;
}

.mec-stat__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mec-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =============================================================
   CTA BANNER
   ============================================================= */
.mec-cta {
  background: linear-gradient(120deg, var(--mec-navy) 0%, #253d5e 100%);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.mec-cta::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: rgba(106,170,42,0.08);
  border-radius: 50%;
}

.mec-cta::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: rgba(106,170,42,0.06);
  border-radius: 50%;
}

.mec-cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.mec-cta__text h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--mec-white);
  margin: 0 0 10px;
}

.mec-cta__text p {
  color: rgba(255,255,255,0.75);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.mec-cta__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* =============================================================
   TESTIMONIALS
   ============================================================= */
.mec-testimonials { background: var(--mec-bg); }

.mec-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mec-review {
  background: var(--mec-white);
  border-radius: 14px;
  padding: 32px 28px;
  border: 1.5px solid #e4eaf1;
  box-shadow: var(--mec-shadow);
  margin: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.mec-review:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,46,74,0.12);
}

.mec-review::before {
  content: '\201C';
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 4rem;
  color: rgba(106,170,42,0.15);
  font-family: Georgia, serif;
  line-height: 1;
}

.mec-review__stars {
  color: #f5a623;
  font-size: 1rem;
  letter-spacing: 2px;
  margin: 0 0 14px;
}

.mec-review__text {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--mec-muted);
  margin: 0 0 20px;
  font-style: italic;
}

.mec-review__author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid #e4eaf1;
}

.mec-review__author strong {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--mec-navy);
}

.mec-review__author span {
  font-size: 0.80rem;
  color: var(--mec-muted);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 900px) {
  .mec-why__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .mec-testimonials__grid {
    grid-template-columns: 1fr 1fr;
  }
  .mec-cta__inner {
    flex-direction: column;
    text-align: center;
  }
  .mec-cta__actions {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .mec-services__grid,
  .mec-testimonials__grid,
  .mec-why__stats {
    grid-template-columns: 1fr;
  }
  .mec-hero__ctas {
    flex-direction: column;
  }
  .mec-section { padding: 60px 0; }
}
