/* =============================================================
   BC HOME SERVICE — Subpage enhancements (v2.5)
   Adds: subpage hero contact form, enhanced nav with mobile menu,
   section animations, hover effects. Loaded AFTER main.css.
   ============================================================= */

/* ===== Root: ensure --svc-color / --svc-color-2 cascade from page ===== */
:root {
  --svc-color: #2E86DE;
  --svc-color-2: #00B4D8;
}

/* ===== Enhanced subpage NAV (desktop links + mobile hamburger) ===== */
.nav {
  position: sticky;
  top: var(--topbar-height, 0);
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 rgba(10,22,40,0.06);
  transition: all 0.3s ease;
}
.nav.scrolled {
  box-shadow: 0 2px 20px rgba(10,22,40,0.1);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo .logo-mark img {
  height: 44px;
  width: auto;
  border-radius: 10px;
  display: block;
}
.nav-logo .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav-logo .brand-name {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #D4AF37;
}
.nav-logo .brand-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: #D4AF37;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links > li > a,
.nav-links > li > button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1A1A2E;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-links > li > a:hover,
.nav-links > li > button:hover {
  background: #F0F7FF;
  color: var(--svc-color, #2E86DE);
}

/* Services dropdown */
.nav-links .has-dropdown {
  position: relative;
}
.nav-links .has-dropdown > button .chev {
  transition: transform 0.2s;
}
.nav-links .has-dropdown:hover > button .chev {
  transform: rotate(180deg);
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: -20px;
  width: 720px;
  max-width: 90vw;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(10,22,40,0.08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(10,22,40,0.18);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1));
  z-index: 10;
}
.nav-links .has-dropdown:hover .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-dropdown a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.nav-dropdown a:hover {
  background: #F0F7FF;
  border-color: rgba(46,134,222,0.19);
}
.nav-dropdown .dd-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-dropdown .dd-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1A1A2E;
}
.nav-dropdown .dd-desc {
  font-size: 0.78rem;
  color: #718096;
}

/* Nav actions (call + quote buttons) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Mobile hamburger button (hidden on desktop) */
.nav .mobile-menu-btn {
  display: none;
}

@media (max-width: 900px) {
  .nav-links,
  .nav-actions { display: none !important; }
  .nav .mobile-menu-btn { display: flex; }
  .nav .container { height: 60px; }
  .nav-logo .brand-name { font-size: 1rem; }
  .nav-logo .brand-sub { font-size: 0.58rem; }
}

/* ===== Mobile nav overlay (full-screen) ===== */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 80px 20px 40px;
}
.mobile-nav.active {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 12px;
  text-align: center;
  width: 100%;
  max-width: 320px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateX(-30px);
}
.mobile-nav.active a {
  animation: mobileNavSlide 0.4s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1)) forwards;
}
.mobile-nav.active a:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav.active a:nth-child(2) { animation-delay: 0.10s; }
.mobile-nav.active a:nth-child(3) { animation-delay: 0.15s; }
.mobile-nav.active a:nth-child(4) { animation-delay: 0.20s; }
.mobile-nav.active a:nth-child(5) { animation-delay: 0.25s; }
.mobile-nav.active a:nth-child(6) { animation-delay: 0.30s; }
.mobile-nav.active a:nth-child(7) { animation-delay: 0.35s; }
.mobile-nav.active a:nth-child(8) { animation-delay: 0.40s; }
.mobile-nav.active a:nth-child(9) { animation-delay: 0.45s; }
.mobile-nav.active a:nth-child(10) { animation-delay: 0.50s; }
@keyframes mobileNavSlide {
  to { opacity: 1; transform: translateX(0); }
}
.mobile-nav a:hover {
  background: rgba(46, 134, 222, 0.15);
  transform: scale(1.02);
}
.mobile-nav .mn-call {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #48CAE4;
}
.mobile-nav .mn-quote {
  background: linear-gradient(135deg, var(--svc-color, #2E86DE), var(--svc-color-2, #00B4D8));
  color: #fff !important;
  font-size: 1.1rem;
  padding: 16px 40px;
  margin-top: 24px;
}

/* ===== Subpage HERO with contact form ===== */
.page-hero {
  position: relative;
  padding: clamp(60px, 8vw, 100px) 0 clamp(50px, 6vw, 80px);
  background: linear-gradient(135deg, #070F1E 0%, #0D1B33 30%, #1E3A5F 65%, #0A1A2E 100%);
  color: #fff;
  overflow: hidden;
}
.page-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
@media (max-width: 900px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
.page-hero-content {
  animation: heroFadeUp 0.8s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1)) both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 16px 0 16px;
  letter-spacing: -0.02em;
}
.page-hero h1 .grad {
  background: linear-gradient(135deg, var(--svc-color, #2E86DE), var(--svc-color-2, #00B4D8));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-hero .lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 520px;
}
.page-hero .hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.page-hero .hero-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.page-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}
.page-hero .hero-badge svg { color: var(--color-teal-light, #48CAE4); }

/* ===== Hero contact form card ===== */
.hero-form-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: heroFormSlide 0.8s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1)) 0.2s both;
  position: relative;
  overflow: hidden;
}
.hero-form-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--svc-color, #2E86DE), transparent 70%);
  opacity: 0.15;
  filter: blur(40px);
  pointer-events: none;
}
@keyframes heroFormSlide {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-form-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.hero-form-card .form-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
}
.hero-form-card .form-group {
  margin-bottom: 14px;
}
.hero-form-card label {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
  font-weight: 600;
}
.hero-form-card input,
.hero-form-card select,
.hero-form-card textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s;
}
.hero-form-card input::placeholder,
.hero-form-card textarea::placeholder {
  color: rgba(255,255,255,0.4);
}
.hero-form-card input:focus,
.hero-form-card select:focus,
.hero-form-card textarea:focus {
  outline: none;
  border-color: var(--svc-color, #2E86DE);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(46,134,222,0.15);
}
.hero-form-card select option {
  background: #0D1B33;
  color: #fff;
}
.hero-form-card textarea {
  resize: vertical;
  min-height: 80px;
}
.hero-form-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .hero-form-card .form-row { grid-template-columns: 1fr; }
}
.hero-form-card .btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--svc-color, #2E86DE), var(--svc-color-2, #00B4D8));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.hero-form-card .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,134,222,0.35);
}
.hero-form-card .btn-submit:active {
  transform: translateY(0);
}
.hero-form-card .form-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
}
.hero-form-card .form-trust svg {
  color: #2ECC71;
  flex-shrink: 0;
}

/* ===== Section reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1)),
              transform 0.7s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1));
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== Enhanced service cards ===== */
.service-card {
  transition: all 0.3s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1));
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(10,22,40,0.12);
}
.service-card .svc-icon {
  transition: transform 0.3s ease;
}
.service-card:hover .svc-icon {
  transform: scale(1.1) rotate(-5deg);
}

/* ===== Enhanced pricing table ===== */
.cost-table {
  transition: all 0.3s ease;
}
.cost-table tr {
  transition: background 0.2s ease;
}
.cost-table tbody tr:hover {
  background: rgba(46,134,222,0.04);
}

/* ===== Enhanced FAQ ===== */
.faq-item {
  transition: all 0.3s ease;
}
.faq-item:hover {
  border-color: var(--svc-color, #2E86DE);
}
.faq-question {
  cursor: pointer;
  transition: color 0.2s ease;
}
.faq-item:hover .faq-question {
  color: var(--svc-color, #2E86DE);
}

/* ===== CTA banner enhanced ===== */
.cta-banner {
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--svc-color, #2E86DE), transparent 70%);
  opacity: 0.1;
  filter: blur(60px);
  pointer-events: none;
  animation: ctaBlob 12s ease-in-out infinite alternate;
}
@keyframes ctaBlob {
  from { transform: translate(0, 0); }
  to { transform: translate(100px, 50px); }
}

/* ===== Floating action buttons smooth ===== */
.ai-chat-float,
.whatsapp-float {
  transition: all 0.3s ease;
}
.ai-chat-float:hover,
.whatsapp-float:hover {
  transform: scale(1.08);
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .page-hero-content,
  .hero-form-card,
  .cta-banner::before,
  .mobile-nav.active a {
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
