/* ============================================================
   EA Duct Cleaning — Glassmorphism Design System
   Extends Bootstrap 5 with glassmorphism effects.
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --brand-primary: #0d9488;
  --brand-primary-rgb: 13, 148, 136;
  --brand-secondary: #6366f1;
  --brand-secondary-rgb: 99, 102, 241;
  --brand-accent: #22c55e;
  --glass-surface-1: rgba(255,255,255,0.12);
  --glass-surface-2: rgba(255,255,255,0.18);
  --glass-surface-3: rgba(255,255,255,0.25);
  --glass-surface-4: rgba(255,255,255,0.32);
  --glass-border: rgba(255,255,255,0.15);
  --glass-border-strong: rgba(255,255,255,0.25);
  --glass-highlight: rgba(255,255,255,0.35);
  --blur-sm: 8px;
  --blur-md: 16px;
  --blur-lg: 28px;
  --blur-xl: 48px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: #1e293b;
  background: #f8fafc;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Info strip - use dark text on light background */
.glass-soft a {
  color: var(--brand-primary);
  font-weight: 600;
}

.glass-soft .text-white {
  color: #475569 !important;
}

/* Animated subtle gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 15%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #f8fafc 100%);
  animation: meshShift 20s ease-in-out infinite alternate;
}

@keyframes meshShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Subtle grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

::selection {
  background: var(--brand-primary);
  color: #000;
}

/* ── Navbar ────────────────────────────────────────────────── */
.glass-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1050;
  /* Solid white for readability and clickability */
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* Scrolled state - more opaque for readability */
.glass-navbar.scrolled {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.glass-navbar .nav-link-glass {
  color: #334155;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.glass-navbar .nav-link-glass:hover {
  color: var(--brand-primary);
  background: rgba(13, 148, 136, 0.08);
}

.glass-navbar .navbar-brand {
  color: #1e293b;
}

.navbar-toggler {
  background: transparent;
  border: none;
  padding: 0.5rem;
}

.navbar-toggler span {
  display: block;
  width: 24px;
  height: 2px;
  background: #334155;
  position: relative;
  transition: all 0.2s ease;
}

.glass-navbar .navbar-brand img {
  height: 30px;
  width: auto;
}

/* Push content below fixed navbar */
.glass-navbar + * {
  margin-top: 65px;
}

/* Nav links */
.nav-link-glass {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link-glass:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* Mobile nav — hidden by CSS, not d-none class */
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0.5rem 0 1rem;
  gap: 0.15rem;
}

.mobile-nav.open {
  display: flex !important;
  animation: slideDown 0.25s ease;
}

.mobile-nav .nav-link-glass {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

/* Dropdown menu */
.nav-item.dropdown {
  position: relative;
}

.glass-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(13, 148, 136, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.nav-item.dropdown:hover .glass-dropdown,
.nav-item.dropdown.show .glass-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.glass-dropdown .dropdown-item {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.15s ease;
}

.glass-dropdown .dropdown-item:hover {
  background: rgba(13, 148, 136, 0.08);
  color: var(--brand-primary);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.glass-card {
  /* Solid white for form compatibility */
  background: #ffffff;
  border: 1px solid rgba(13, 148, 136, 0.12);
  border-radius: var(--radius-lg);
  transition: all 0.35s cubic-bezier(0.25,0.8,0.25,1);
  position: relative;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  color: #1e293b;
  z-index: 1;
}

/* Glass card pseudo-elements should not block clicks */
.glass-card::before,
.glass-card::after {
  pointer-events: none;
}

/* Ensure nested content is clickable */
.glass-card > * {
  position: relative;
  z-index: 2;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.3), rgba(99, 102, 241, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.3), transparent);
  pointer-events: none;
}

.glass-card:hover {
  border-color: rgba(13, 148, 136, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 0 20px rgba(13, 148, 136, 0.1);
}

.glass-soft {
  background: #f1f5f9;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
}

.glass-footer {
  position: relative;
  z-index: 1;
}

.glass-border-glow {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  color: #1e293b;
  z-index: 1;
}

.glass-border-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

.glass-border-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-surface-1);
  z-index: -1;
  pointer-events: none;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero-section {
  padding-top: 8rem;
  padding-bottom: 5rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 20%, rgba(0,0,0,0.1) 0%, transparent 40%);
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Hero buttons - ensure clickability */
.hero-section .btn-glow,
.hero-section .btn-glass {
  cursor: pointer;
  position: relative;
  z-index: 1;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-section .btn-glow:hover,
.hero-section .btn-glass:hover {
  text-decoration: none !important;
}

/* Hero badges */
.hero-section .ea-badge {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

/* ── Section Title ─────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--brand-primary);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-glow {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff !important;
  font-weight: 800;
  border-radius: var(--radius-full);
  border: none;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
  transition: all 0.25s ease;
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.45);
  color: #fff !important;
}

.btn-glow:active {
  transform: scale(0.97);
}

.btn-glass {
  background: var(--brand-primary);
  color: #fff !important;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
  transition: all 0.25s ease;
}

.btn-glass:hover {
  background: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.4);
  color: #fff !important;
}

.btn-glass:active {
  transform: scale(0.97);
}

/* ── Feature Icon ──────────────────────────────────────────── */
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,212,255,0.25);
  transition: all 0.35s ease;
}

.glass-card:hover .feature-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 12px 32px rgba(0,212,255,0.35);
}

/* ── Pricing Icon Wrapper ──────────────────────────────────── */
.pricing-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding-top: 24px;
}

.pricing-badge-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  white-space: nowrap;
  z-index: 2;
}

/* ── Service Images ────────────────────────────────────────── */
.service-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* ── Pricing ───────────────────────────────────────────────── */
.pricing-price {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--brand-primary);
}

.pricing-featured {
  background: #fff !important;
  border: 2px solid rgba(13, 148, 136, 0.4) !important;
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
  z-index: 1;
}

.pricing-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
  z-index: 1;
  pointer-events: none;
}

.pricing-featured::after {
  display: none;
}

.pricing-featured:hover::before {
  opacity: 1;
}

.glass-card.pricing-featured:hover::before {
  opacity: 0;
}

.pricing-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.875rem;
  color: #475569;
}

.pricing-list li:last-child { border-bottom: none; }

.pricing-list li span:last-child {
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

/* ── Badges ────────────────────────────────────────────────── */
.ea-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f1f5f9;
  color: #475569;
}

.ea-badge.solid-success {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.3);
  color: #16a34a;
}

.ea-badge.solid-warning {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.3);
  color: #d97706;
}

.ea-badge.solid-primary {
  background: rgba(13, 148, 136, 0.15);
  border-color: rgba(13, 148, 136, 0.3);
  color: var(--brand-primary);
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-item {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.6rem;
  transition: border-color 0.25s ease;
}

.faq-item:hover { border-color: var(--brand-primary); }

.faq-item summary {
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  user-select: none;
  color: #1e293b;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: #64748b;
}

.faq-item[open] summary .chevron { transform: rotate(180deg); }
.faq-item[open] summary { color: var(--brand-primary); }

.faq-answer {
  padding: 0 1.25rem 1.1rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Modals ────────────────────────────────────────────────── */
.glass-modal {
  border: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 560px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  color: #1e293b;
  box-shadow: 0 32px 80px rgba(0,0,0,0.2);
  z-index: 2000;
  /* Center the dialog - works with native showModal() */
  margin: 0 auto;
  position: relative;
}

.glass-modal[open] {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  right: auto;
  bottom: auto;
}

.glass-modal::backdrop {
  background: rgba(0,0,0,0.4);
  position: fixed;
  inset: 0;
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.modal-close-btn:hover { background: #e2e8f0; }

.modal-summary {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1rem;
}

.modal-summary > div {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.875rem;
}

/* ── Floating Bar ──────────────────────────────────────────── */
.floating-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1060;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

/* Add padding to footer to prevent floating bar from covering it */
.glass-footer {
  background: #1e293b;
  border-top: none;
  color: #e2e8f0;
  padding-bottom: 7rem; /* Extra padding for floating bar */
}

.glass-footer a { color: #e2e8f0; transition: color 0.15s ease; }
.glass-footer a:hover { color: var(--brand-primary); }

.glass-footer h6 { color: #fff; }

.footer-social-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  border: none;
  font-size: 1.1rem;
  color: #fff;
  transition: all 0.2s ease;
}

.footer-social-link:hover {
  background: var(--brand-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Floating Bar ──────────────────────────────────────────── */
.floating-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1060;
  background: #fff;
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.floating-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #475569;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.floating-btn:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
  color: #1e293b;
}

.floating-btn.cta {
  background: linear-gradient(135deg, var(--brand-primary), #0f766e);
  color: #fff;
  border-color: transparent;
}

.floating-btn.cta:hover {
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.3);
  color: #fff;
}

/* ── Scroll Reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Override some Bootstrap defaults for light theme ──── */
.form-control,
.form-select {
  background: #f8fafc !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #1e293b !important;
  border-radius: var(--radius-sm) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder { color: #94a3b8 !important; }

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-primary) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15) !important;
  color: #1e293b !important;
}

.ea-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.4rem;
}

/* Quote Form */
.glass-form {
  background: transparent;
}

.cta-btn-main {
  background: linear-gradient(135deg, var(--brand-primary), #0f766e) !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  padding: 0.875rem 1.75rem;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.35);
  transition: all 0.25s ease;
  width: 100%;
}

.cta-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.45);
  background: linear-gradient(135deg, #0f766e, #115e59) !important;
  color: #fff !important;
}

.cta-btn-main:active {
  transform: scale(0.98);
}

/* ── Scroll margin for anchored sections ───────────────────── */
section[id] {
  scroll-margin-top: 70px;
}

/* ── Utility weights ───────────────────────────────────────── */
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── Responsive tweaks ─────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 6rem;
    min-height: 70vh;
  }
  .floating-bar .floating-btn span {
    display: none;
  }
  .glass-modal {
    padding: 3rem 1.5rem 1.5rem;
  }
}