/* ============================================
   Sandoval Home Improvement — Styles
   Lowe's × Home Depot professional aesthetic
   ============================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  scroll-behavior: smooth;
}

/* ---- Navigation (dark) ---- */
.site-header {
  background-color: #0f172a; /* slate-900 */
}
.nav-link {
  position: relative;
  color: #cbd5e1; /* slate-300 */
  transition: color 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-link:hover { color: #ffffff; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ea580c; /* orange-600 */
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: #ffffff; font-weight: 600; }

/* Logo pill */
.logo-pill {
  background: white;
  border-radius: 8px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
}

/* Logo link — flex row containing pill + wordmark */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

/* Company name wordmark beside logo */
.logo-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-wordmark .wm-primary {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.25rem;
}
.logo-wordmark .wm-secondary {
  color: #fb923c !important;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Mobile nav open */
#nav-menu.open {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #0f172a;
  border-top: 1px solid #1e293b;
}
#nav-menu.open a {
  padding: 0.75rem 1rem;
  color: #cbd5e1;
  display: block;
  border-bottom: 1px solid #1e293b;
}
#nav-menu.open a:hover { color: #fff; background: #1e293b; }

/* ---- Hero (full-screen image) ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
  background-color: #1a2035;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 20, 40, 0.78) 0%,
    rgba(10, 20, 40, 0.55) 60%,
    rgba(20, 40, 80, 0.45) 100%
  );
  z-index: 1;
}
.hero-section .hero-content {
  position: relative;
  z-index: 2;
}


/* ---- Page Banner (inner pages) ---- */
.page-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,20,40,0.82) 0%, rgba(10,30,60,0.65) 100%);
  z-index: 1;
}
.page-banner .banner-content {
  position: relative;
  z-index: 2;
}

/* ---- Service Image Cards ---- */
.service-img-card {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.service-img-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.25);
}
.service-img-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.service-img-card:hover img {
  transform: scale(1.06);
}
.service-img-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.35) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}
.service-img-card .card-tag {
  display: inline-block;
  background: #ea580c;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  width: fit-content;
}

/* ---- Stats bar ---- */
.stats-bar {
  background: #0f172a;
}
.stat-item {
  border-right: 1px solid #1e293b;
}
.stat-item:last-child { border-right: none; }

/* ---- Section dark ---- */
.section-dark {
  background: #0f172a;
}
.section-dark-alt {
  background: #1e293b;
}

/* ---- Mid-page CTA (photo bg) ---- */
.cta-photo {
  position: relative;
  background-size: cover;
  background-position: center;
}
.cta-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 40, 0.78);
}
.cta-photo .cta-content {
  position: relative;
  z-index: 1;
}

/* ---- Orange CTA Banner ---- */
.cta-orange {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

/* ---- Service detail cards (services page) ---- */
.service-detail-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}
.service-detail-card .card-header-img {
  height: 180px;
  object-fit: cover;
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}
.service-detail-card:hover .card-header-img {
  transform: scale(1.04);
}

/* ---- Gallery ---- */
.gallery-item {
  overflow: hidden;
  cursor: pointer;
  border-radius: 0.75rem;
}
.gallery-item img {
  transition: transform 0.4s ease;
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.filter-btn.active {
  background-color: #ea580c;
  color: white;
  border-color: #ea580c;
}

/* ---- Lightbox ---- */
#lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 1rem;
}
#lightbox-overlay.active { display: flex; }
#lightbox-img {
  max-width: 90vw;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}
#lightbox-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 90vw;
}
.lb-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 3px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.lb-thumb img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.lb-thumb span {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  line-height: 1;
  padding-bottom: 2px;
}
.lb-thumb.active {
  border-color: #ea580c;
}
.lb-thumb.active span {
  color: #ea580c;
}
.lb-thumb:not(.active):hover {
  border-color: rgba(255,255,255,0.5);
}
#lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: white;
  font-size: 1.75rem;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#lightbox-close:hover { background: #ea580c; }
#lightbox-caption {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  text-align: center;
  padding: 0 2rem;
}

/* ---- Testimonials Carousel ---- */
.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.carousel-slide { min-width: 100%; padding: 0 1rem; }
.stars { color: #f59e0b; letter-spacing: 3px; }

/* ---- Floating Call Button ---- */
#float-call {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ea580c;
  color: white;
  padding: 0.85rem 1.4rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulse-orange 2.5s infinite;
}
#float-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(234, 88, 12, 0.65);
  animation: none;
}
@keyframes pulse-orange {
  0%, 100% { box-shadow: 0 4px 20px rgba(234, 88, 12, 0.5); }
  50% { box-shadow: 0 6px 30px rgba(234, 88, 12, 0.8); }
}

/* ---- Scroll Animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.32s; }
.fade-up:nth-child(6) { transition-delay: 0.4s; }

/* ---- Form Focus (orange) ---- */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
  border-color: #ea580c !important;
}

/* ---- Trust Badges ---- */
.trust-badge { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

/* ---- Orange section divider accent ---- */
.accent-bar {
  display: block;
  width: 56px;
  height: 4px;
  background: #ea580c;
  border-radius: 2px;
  margin: 0.75rem auto 0;
}
.accent-bar-left {
  display: block;
  width: 56px;
  height: 4px;
  background: #ea580c;
  border-radius: 2px;
  margin: 0.75rem 0 0;
}

/* Footer */
.site-footer { background: #020817; }
.site-footer a:hover { color: #fb923c; }

/* ---- Learn More link hover animation ---- */
.learn-more-link {
  display: inline-flex;
  align-items: center;
  transition: gap 0.2s ease, color 0.2s ease;
}
.learn-more-link svg {
  transition: transform 0.2s ease;
}
.learn-more-link:hover svg {
  transform: translateX(4px);
}

/* ---- Mobile Sticky Call Bar ---- */
#mobile-call-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: #ea580c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 -2px 12px rgba(234, 88, 12, 0.4);
}
#mobile-call-sticky:hover { background: #c2410c; color: white; }
@media (min-width: 768px) {
  #mobile-call-sticky { display: none; }
}
@media (max-width: 767px) {
  body { padding-bottom: 58px; }
  #float-call { display: none; }
}
