﻿/* ===== Re-Dial Plumbing & Heating | Premium Custom Styles ===== */

:root {
  --rd-navy: #0b1e3f;
  --rd-navy-2: #0f172a;
  --rd-blue: #1e40af;
  --rd-blue-light: #3b82f6;
  --rd-red: #dc2626;
  --rd-red-dark: #b91c1c;
  --rd-orange: #f97316;
  --rd-light: #f8fafc;
  --rd-gray: #64748b;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #0f172a;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* ===== Glass Navbar ===== */
.glass-nav {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
}
.glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.12);
}
.nav-link {
  position: relative;
  font-weight: 500;
  color: #1e293b;
  transition: color 0.25s ease;
}
.nav-link:hover { color: var(--rd-blue); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--rd-blue), var(--rd-red));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after { width: 28px; }

/* ===== Hero ===== */
.hero-bg {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 100%, rgba(220, 38, 38, 0.14), transparent 55%),
    linear-gradient(135deg, #0b1e3f 0%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.08); }
}

/* ===== Buttons ===== */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  background: linear-gradient(135deg, var(--rd-red) 0%, var(--rd-red-dark) 100%);
  color: white;
  font-weight: 600;
  border-radius: 9999px;
  box-shadow: 0 10px 30px -10px rgba(220, 38, 38, 0.55);
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.6s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(220, 38, 38, 0.65); }
.btn-primary:hover::after { left: 130%; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: white;
  font-weight: 600;
  border-radius: 9999px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.45); transform: translateY(-2px); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: 1.5px solid var(--rd-navy);
  color: var(--rd-navy);
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
}
.btn-outline:hover { background: var(--rd-navy); color: white; transform: translateY(-2px); }

/* Pulse ring for emergency badge */
.pulse-ring {
  position: relative;
}
.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: rgba(220, 38, 38, 0.5);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ===== Service Cards ===== */
.service-card {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 2rem 1.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rd-blue), var(--rd-red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.18);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card .icon-wrap {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--rd-blue);
  margin-bottom: 1.25rem;
  transition: all 0.4s ease;
}
.service-card:hover .icon-wrap {
  background: linear-gradient(135deg, var(--rd-blue), var(--rd-navy));
  color: white;
  transform: rotate(-6deg) scale(1.05);
}

/* ===== Why Choose Us boxes ===== */
.feature-box {
  background: white;
  border-radius: 18px;
  padding: 1.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: all 0.4s ease;
}
.feature-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -20px rgba(30, 64, 175, 0.25);
}
.feature-icon {
  width: 58px; height: 58px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--rd-red), var(--rd-orange));
  color: white;
  box-shadow: 0 10px 25px -8px rgba(220, 38, 38, 0.5);
}

/* ===== Counter ===== */
.counter-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(2.25rem, 4vw, 3rem);
  background: linear-gradient(135deg, var(--rd-blue), var(--rd-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Process Timeline ===== */
.process-step {
  position: relative;
}
.process-step .step-num {
  width: 70px; height: 70px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: white;
  border: 2px solid #e2e8f0;
  font-weight: 800; font-size: 1.5rem;
  color: var(--rd-navy);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}
.process-step:hover .step-num {
  background: var(--rd-red);
  color: white;
  border-color: var(--rd-red);
  transform: scale(1.08);
}

/* ===== Testimonial card ===== */
.testimonial-card {
  background: white;
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 20px 40px -25px rgba(15, 23, 42, 0.12);
}

/* ===== Gallery ===== */
.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img { transition: transform 0.6s cubic-bezier(.4,0,.2,1); }
.gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 30, 63, 0.85) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover::after { opacity: 1; }
.gallery-item .gallery-caption {
  position: absolute;
  left: 1.25rem; right: 1.25rem; bottom: 1rem;
  color: white; font-weight: 600;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 2;
}
.gallery-item:hover .gallery-caption { transform: translateY(0); opacity: 1; }

/* ===== FAQ Accordion ===== */
.faq-item {
  background: white;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-item.open { border-color: var(--rd-blue); box-shadow: 0 10px 30px -15px rgba(30, 64, 175, 0.3); }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--rd-navy);
}
.faq-question .chev { transition: transform 0.3s ease; }
.faq-item.open .faq-question .chev { transform: rotate(180deg); color: var(--rd-red); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  color: #475569;
  padding: 0 1.5rem;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 1.5rem 1.4rem; }

/* ===== Emergency Banner ===== */
.emergency-banner {
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(11, 30, 63, 0.92)),
    url('../images/photo-1581578731548-c64695cc6952.jpg') center/cover;
  background-attachment: fixed;
}

/* ===== Floating Contact Button ===== */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--rd-red), var(--rd-red-dark));
  color: white;
  box-shadow: 0 15px 40px -10px rgba(220, 38, 38, 0.65);
  transition: transform 0.3s ease;
}
.floating-cta:hover { transform: scale(1.1) rotate(8deg); }
.floating-cta::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--rd-red);
  animation: pulse 2s ease-out infinite;
}

/* ===== Footer ===== */
.footer-link { color: #cbd5e1; transition: all 0.25s ease; }
.footer-link:hover { color: white; transform: translateX(4px); }

.social-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transition: all 0.3s ease;
}
.social-icon:hover { background: var(--rd-red); transform: translateY(-3px); }

/* ===== Page hero (sub pages) ===== */
.page-hero {
  background:
    linear-gradient(135deg, rgba(11, 30, 63, 0.92), rgba(15, 23, 42, 0.9)),
    url('../images/page-hero-bg.jpg') center/cover;
}

/* Swiper customization */
.swiper-pagination-bullet { background: var(--rd-blue); opacity: 0.4; }
.swiper-pagination-bullet-active { background: var(--rd-red); opacity: 1; width: 28px; border-radius: 4px; }

/* Mobile menu */
.mobile-menu { transition: transform 0.4s cubic-bezier(.4,0,.2,1); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(11, 30, 63, 0.92);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--rd-blue), var(--rd-red));
  z-index: 100; width: 0;
  transition: width 0.05s linear;
}

/* Decorative wave divider */
.wave-divider svg { display: block; width: 100%; height: auto; }
