/* === Shaw Electrical Services — Modern Static Site Styles === */

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

:root {
  --green: #61B305;
  --green-dark: #4e9004;
  --blue: #236DA3;
  --blue-dark: #1b5780;
  --dark: #222;
  --gray: #333;
  --gray-light: #666;
  --gray-lighter: #f5f5f5;
  --white: #fff;
  --radius: 8px;
  --radius-lg: 30px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);
  --transition: 0.3s ease;
  --container: 1140px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Questrial', Arial, sans-serif;
  color: var(--gray);
  line-height: 1.7;
  font-size: 16px;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: 'Lexend', Arial, sans-serif;
  color: var(--blue);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  transition: background var(--transition);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}

.nav-logo img {
  height: 60px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: 'Lexend', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--green);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-phone {
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green);
  white-space: nowrap;
}

.nav-phone:hover { color: var(--green-dark); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 26px; height: 3px;
  background: var(--gray);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(35,109,163,0.8), rgba(34,34,34,0.6));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 40px;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(97,179,5,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--blue);
}

.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.btn-blue:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(35,109,163,0.3);
}

/* --- Sections --- */
section {
  padding: 80px 0;
}

.section-light {
  background: var(--gray-lighter);
}

.section-dark {
  background: var(--dark);
  color: var(--white);
}

.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.section-header p {
  margin-top: 12px;
  color: var(--gray-light);
  font-size: 1.05rem;
}

.section-dark .section-header p {
  color: rgba(255,255,255,0.7);
}

/* Readable prose column (e.g. Who We Are) */
.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h2 {
  color: var(--blue);
  margin-bottom: 20px;
}

.prose h2::after {
  content: '';
  display: block;
  width: 60px; height: 3px;
  background: var(--green);
  margin: 16px 0 0;
  border-radius: 2px;
}

.prose p {
  color: var(--gray-light);
  line-height: 1.75;
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.prose p:last-child { margin-bottom: 0; }

/* Accent line under headings */
.section-header h2::after {
  content: '';
  display: block;
  width: 60px; height: 3px;
  background: var(--green);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  gap: 28px;
}

.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  margin-bottom: 10px;
  color: var(--blue);
}

.card p {
  color: var(--gray-light);
  font-size: 0.95rem;
}

.card-icon {
  width: 48px; height: 48px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--white);
  border-radius: 12px;
  font-size: 1.3rem;
}

/* --- Flip cards (Services) --- */
.card.flip {
  background: transparent;
  box-shadow: none;
  padding: 0;
  min-height: 252px;
  perspective: 1000px;
  cursor: pointer;
}

.card.flip:hover { transform: none; box-shadow: none; }

.card.flip:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 252px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card.flip.is-flipped .flip-inner { transform: rotateY(180deg); }

.flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-front img { max-width: 78%; height: auto; }

.flip-hint {
  margin-top: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
}

.flip-back { transform: rotateY(180deg); }
.flip-back p { color: var(--gray-light); font-size: 0.95rem; }

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

.two-col img {
  border-radius: var(--radius-lg);
  object-fit: cover;
  width: 100%;
}

/* --- Service List --- */
.service-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
}

.service-list li {
  position: relative;
  padding-left: 24px;
  font-size: 1rem;
  line-height: 1.8;
}

.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  color: var(--green);
  font-weight: 700;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(35,109,163,0.0);
  transition: background var(--transition);
}

.gallery-item:hover::after {
  background: rgba(35,109,163,0.2);
}

/* --- Contact Info Bar --- */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.info-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--green);
}

.info-card h4 {
  color: var(--blue);
  margin-bottom: 8px;
}

.info-card p, .info-card a {
  color: var(--gray-light);
  font-size: 0.95rem;
}

.info-card a { color: var(--green); font-weight: 600; }

/* --- Contact Form --- */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow);
}

.contact-form h2 {
  margin-bottom: 8px;
}

.contact-form > p {
  margin-bottom: 28px;
  color: var(--gray-light);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius);
  font-family: 'Questrial', sans-serif;
  font-size: 1rem;
  color: var(--gray);
  transition: border-color var(--transition);
  background: var(--gray-lighter);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-submit:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(97,179,5,0.3);
}

/* --- Footer --- */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
}

.footer-brand img {
  height: 54px;
  margin-bottom: 16px;
  border-radius: 4px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 360px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a,
.footer-col p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--green);
}

.footer-col p {
  line-height: 1.9;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  padding: 60px 0;
  text-align: center;
  color: var(--white);
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 12px;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
  font-size: 1.1rem;
}

.cta-phone {
  font-family: 'Lexend', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  display: block;
  margin-bottom: 24px;
}

.cta-phone:hover { color: var(--green); }

/* --- Badges / Affiliations --- */
.badge-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.badge-row img {
  height: 60px;
  width: auto;
  border-radius: var(--radius);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* --- Responsive --- */
@media (max-width: 991px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px; left: 0; right: 0;
    background: var(--white);
    padding: 24px;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .two-col.reverse { direction: ltr; }
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .info-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .service-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  section { padding: 56px 0; }
  .hero { min-height: 400px; padding: 100px 20px 60px; }
  .card-grid.cols-2,
  .card-grid.cols-3,
  .card-grid.cols-4 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 20px; }
  .nav-wrap { height: 68px; }
  .nav-logo img { height: 42px; }
}

/* --- Scroll-to-top button --- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition), visibility var(--transition);
  z-index: 1100;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.scroll-top:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.scroll-top svg { width: 22px; height: 22px; display: block; }

/* --- Services accordion --- */
.accordion { border-top: 1px solid #e6e6e6; }
.accordion-item { border-bottom: 1px solid #e6e6e6; }

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--blue);
  text-align: left;
  transition: color var(--transition);
}

.accordion-header:hover { color: var(--green-dark); }
.accordion-header:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.accordion-chevron {
  width: 22px; height: 22px;
  color: var(--green);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.accordion-item.is-open .accordion-chevron { transform: rotate(180deg); }

.accordion-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}

.service-rows { list-style: none; margin: 0; padding: 0 0 16px; }

.service-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 6px;
  border-top: 1px solid #f0f0f0;
}

.service-row:first-child { border-top: none; }
.service-badge { width: 160px; height: auto; flex-shrink: 0; }
.service-row > p { margin: 0; color: var(--gray-light); font-size: 0.98rem; line-height: 1.6; }

.service-row.no-badge h4 {
  width: 160px;
  flex-shrink: 0;
  margin: 0;
  color: var(--blue);
  font-size: 1.02rem;
}

@media (max-width: 768px) {
  .accordion-header { font-size: 1.15rem; }
  .service-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .service-badge { width: 150px; }
  .service-row.no-badge h4 { width: auto; }
}
