/* =====================================================
   CROFTS & CO SOLAR — STYLESHEET
   Color palette inspired by logo:
     Blue:    #3d6eaa (primary)
     Dark:    #1a2a3a
     Sage:    #5a6e5e
     Amber:   #f0a500 (solar accent)
     Light:   #f5f7fa
===================================================== */

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

:root {
  --blue:    #3d6eaa;
  --blue-dk: #2b4f7e;
  --dark:    #1a2a3a;
  --sage:    #5a6e5e;
  --amber:   #f0a500;
  --amber-lt:#ffd166;
  --light:   #f5f7fa;
  --white:   #ffffff;
  --gray:    #6b7280;
  --gray-lt: #e5e9ee;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(0,0,0,.12);
  --trans:   .3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

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

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

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: var(--dark);
  font-weight: 700;
  font-size: .95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  box-shadow: 0 4px 14px rgba(240,165,0,.35);
}
.btn-primary:hover {
  background: var(--amber-lt);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240,165,0,.45);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid rgba(255,255,255,.6);
  cursor: pointer;
  transition: all var(--trans);
}
.btn-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--white);
}
.full-width { width: 100%; justify-content: center; }

/* ── SECTION HEADERS ── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}
.section-sub {
  margin-top: 14px;
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   DISCOUNT BANNER
============================================ */
#discount-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #1a2a3a 0%, #2b4f7e 50%, #1a2a3a 100%);
  padding: 10px 16px;
  border-bottom: 3px solid var(--amber);
}
.banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.banner-fire { font-size: 1.2rem; }
.banner-text {
  color: var(--white);
  font-size: .9rem;
  text-align: center;
}
#countdown {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  background: rgba(240,165,0,.15);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--amber);
}
.banner-cta {
  background: var(--amber);
  color: var(--dark);
  font-weight: 700;
  font-size: .82rem;
  padding: 7px 18px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--trans);
}
.banner-cta:hover { background: var(--amber-lt); }
.banner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 1rem;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
  line-height: 1;
  transition: color var(--trans);
}
.banner-close:hover { color: var(--white); }

/* Expired state */
#discount-banner.expired #countdown { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,.1); }
#discount-banner.expired .banner-text::after { content: ' — Offer has ended'; color: #f87171; font-weight: 600; }

/* ============================================
   HEADER
============================================ */
#header {
  position: fixed;
  top: 44px; /* height of banner */
  left: 0; right: 0;
  z-index: 900;
  padding: 14px 0;
  transition: background var(--trans), box-shadow var(--trans), top var(--trans);
  background: transparent;
}
#header.scrolled {
  background: rgba(26,42,58,.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
#header.banner-hidden { top: 0; }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo img {
  height: 36px;
  width: auto;
  border-radius: 4px;
}
nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color var(--trans), background var(--trans);
}
nav a:hover { color: var(--white); background: rgba(255,255,255,.1); }
nav a.nav-cta {
  background: var(--amber);
  color: var(--dark);
  font-weight: 700;
  margin-left: 8px;
}
nav a.nav-cta:hover { background: var(--amber-lt); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--trans);
}

/* ============================================
   HERO
============================================ */
#hero {
  min-height: 100vh;
  background: url('images/pexels-kindelmedia-9800003.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,42,58,.88) 0%, rgba(43,79,126,.75) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 680px;
  padding: 60px 20px;
}
.hero-tag {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}
.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-content h1 span { color: var(--amber); }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat strong {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
}
.stat span {
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.5);
  font-size: 1.4rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   WHY SOLAR
============================================ */
#why-solar {
  padding: 100px 0;
  background: var(--light);
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.benefit-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--amber);
  transition: transform var(--trans), box-shadow var(--trans);
}
.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0,0,0,.14);
}
.benefit-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.benefit-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}
.benefit-card p {
  color: var(--gray);
  font-size: .95rem;
  line-height: 1.65;
}

/* ============================================
   SERVICES
============================================ */
#services {
  padding: 100px 0;
  background: var(--dark);
}
#services .section-header h2 { color: var(--white); }
#services .section-tag { color: var(--amber); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.service-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 36px 32px;
  color: var(--white);
  position: relative;
  transition: transform var(--trans), border-color var(--trans);
}
.service-card:hover { transform: translateY(-4px); border-color: rgba(240,165,0,.5); }
.service-card.featured {
  border-color: var(--amber);
  background: rgba(240,165,0,.08);
}
.service-badge {
  position: absolute;
  top: -12px; right: 24px;
  background: var(--amber);
  color: var(--dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
}
.service-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--amber);
  margin-bottom: 12px;
}
.service-card p {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  margin-bottom: 20px;
  line-height: 1.65;
}
.service-card ul {
  list-style: none;
  margin-bottom: 28px;
}
.service-card ul li {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.service-card .btn-outline {
  color: var(--amber);
  border-color: var(--amber);
}
.service-card .btn-outline:hover {
  background: rgba(240,165,0,.15);
}

/* ============================================
   GALLERY
============================================ */
#gallery {
  padding: 100px 0;
  background: var(--light);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--gray-lt);
}
.gallery-item:nth-child(1) { grid-column: span 2; }
.gallery-item:nth-child(5) { grid-column: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,42,58,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--trans);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(240,165,0,.85);
  padding: 8px 20px;
  border-radius: 20px;
}

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
#lightbox.active { display: flex; }
#lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,0,0,.8);
}
.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--trans);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; }

/* ============================================
   CONTACT
============================================ */
#contact {
  padding: 100px 0;
  background: var(--white);
}
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}
.contact-info .section-tag { text-align: left; }
.contact-info h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  line-height: 1.2;
}
.contact-info > p {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}
.contact-details { margin-bottom: 32px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--dark);
  font-size: .95rem;
}
.c-icon { font-size: 1.1rem; flex-shrink: 0; }

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--trans), transform var(--trans);
  box-shadow: 0 4px 14px rgba(37,211,102,.35);
}
.whatsapp-btn:hover {
  background: #1fb855;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,.45);
}

/* ── FORM ── */
.contact-form {
  background: var(--light);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  letter-spacing: .03em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-lt);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(61,110,170,.12);
}
.form-note {
  text-align: center;
  font-size: .8rem;
  color: var(--gray);
  margin-top: 12px;
}

/* ── FORM SUCCESS ── */
.form-success {
  text-align: center;
  padding: 40px 20px;
}
.form-success .success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.form-success h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 10px;
}
.form-success p {
  color: var(--gray);
  font-size: .95rem;
}

/* ============================================
   FOOTER
============================================ */
#footer {
  background: var(--dark);
  padding: 64px 0 0;
  color: rgba(255,255,255,.7);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-logo img {
  height: 32px;
  width: auto;
  border-radius: 4px;
  margin-bottom: 14px;
}
.footer-logo p { font-size: .9rem; line-height: 1.6; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4, .footer-contact h4 {
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.footer-links a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .9rem;
  transition: color var(--trans);
}
.footer-links a:hover { color: var(--amber); }
.footer-contact p { font-size: .9rem; }
.footer-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: var(--white);
  font-weight: 600;
  font-size: .85rem;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  width: fit-content;
  margin-top: 6px;
  transition: background var(--trans);
}
.footer-wa:hover { background: #1fb855; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
}

/* ============================================
   FLOATING WHATSAPP
============================================ */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 800;
  background: #25d366;
  color: var(--white);
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.5);
  transition: transform var(--trans), box-shadow var(--trans);
  text-decoration: none;
}
.wa-float:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 30px rgba(37,211,102,.65);
}
.wa-float::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,.4);
  animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse {
  0%, 100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.2); opacity: 0; }
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(5) { grid-column: span 1; }
}

@media (max-width: 768px) {
  /* Banner */
  .banner-text { font-size: .8rem; }
  .banner-close { margin-left: 0; }

  /* Nav */
  #header { top: 56px; }
  .burger { display: flex; }
  nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100dvh;
    background: rgba(26,42,58,.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    z-index: 800;
  }
  nav.open { display: flex; }
  nav a {
    font-size: 1.3rem;
    padding: 14px 24px;
    text-align: center;
  }
  nav a.nav-cta { margin: 12px auto 0; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(5) { grid-column: span 1; }

  /* Contact */
  .contact-wrap { grid-template-columns: 1fr; gap: 36px; }
  .contact-form { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }

  /* Lightbox arrows */
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

@media (max-width: 480px) {
  #discount-banner { padding: 8px 10px; }
  #header { top: 60px; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .services-grid { grid-template-columns: 1fr; }
  .wa-float { bottom: 18px; right: 18px; width: 52px; height: 52px; }
}
