/* ============================================
   Preston Home Services — Custom Styles
   ============================================ */

:root {
  --navy:       #0D1F42;
  --navy-mid:   #162850;
  --navy-light: #1E3A6E;
  --gold:       #C9A84C;
  --gold-dark:  #A8872E;
  --white:      #FFFFFF;
  --gray-50:    #F9FAFB;
  --gray-100:   #F3F4F6;
  --gray-200:   #E5E7EB;
  --gray-400:   #9CA3AF;
  --gray-600:   #4B5563;
  --gray-800:   #1F2937;
  --text:       #111827;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

/* ---- Navbar ---- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.35s, box-shadow 0.35s;
}

#navbar.scrolled {
  background: var(--navy) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.nav-link {
  position: relative;
  color: rgba(255,255,255,0.88);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.25s;
}

.nav-link:hover { color: var(--white); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--gold); }
.nav-link.active::after { width: 100%; background: var(--gold); }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(201,168,76,0.3);
}
.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201,168,76,0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.7);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  transform: translateY(-1px);
}

.btn-navy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-navy:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13,31,66,0.97) 0%,
    rgba(13,31,66,0.75) 60%,
    rgba(13,31,66,0.5) 100%
  );
}

/* ---- Section ---- */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  color: var(--navy);
  margin: 0 0 1rem;
}

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

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 620px;
  margin: 0;
}

/* ---- Service Cards ---- */
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 2rem 1.75rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(13,31,66,0.12);
  border-color: var(--gold);
}
.service-card:hover .card-icon { background: var(--gold); color: var(--white); }

.card-icon {
  width: 54px; height: 54px;
  background: var(--gray-100);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: background 0.25s, color 0.25s;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.6;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: auto;
}

/* ---- Trust Badges (Why Choose Us) ---- */
.trust-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.trust-icon {
  width: 48px; height: 48px;
  background: rgba(201,168,76,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

/* ---- Stats Bar ---- */
.stat-item { text-align: center; }
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ---- CTA Band ---- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 4rem 0;
  text-align: center;
}

/* ---- Accordion (Service Detail) ---- */
.service-detail {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.service-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  cursor: pointer;
  transition: background 0.2s;
}
.service-detail-header:hover { background: var(--gray-50); }
.service-detail-body {
  padding: 0 1.5rem 1.5rem;
  background: var(--gray-50);
}

/* ---- Gallery ---- */
.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-200);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,31,66,0.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ---- Contact Form ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(30,58,110,0.1);
}
.form-control::placeholder { color: var(--gray-400); }

/* ---- Footer ---- */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
}
.footer-link {
  display: block;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.2rem 0;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--gold); }

/* ---- Mobile Menu ---- */
#mobile-menu {
  display: none;
  background: var(--navy);
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
#mobile-menu.open { display: block; }
.mobile-nav-link {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--gold); }

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ---- Divider ---- */
.gold-divider {
  width: 50px; height: 3px;
  background: var(--gold);
  margin: 1rem 0 1.5rem;
  border-radius: 2px;
}
.gold-divider.center { margin-left: auto; margin-right: auto; }

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,0.55); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: rgba(255,255,255,0.3); }

/* ---- Phone CTA ---- */
.phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}
.phone-badge:hover { background: rgba(255,255,255,0.14); }

/* ---- Trust bar ---- */
.trust-bar {
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ---- Upload area ---- */
.upload-area {
  border: 2px dashed var(--gray-200);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--gray-600);
}
.upload-area:hover {
  border-color: var(--navy-light);
  background: var(--gray-50);
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s ease both; }
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .hero { min-height: 100svh; }
  .stat-number { font-size: 2rem; }
}
