/* ============================================
   BLD Locksmith & Window Repairs — site.css
   Supplements Tailwind CDN
   ============================================ */

/* --- Guaranteed colour classes (CDN purge prevention) --- */
.text-gold        { color: #D4AF37 !important; }
.bg-gold          { background-color: #D4AF37 !important; }
.border-gold      { border-color: #D4AF37 !important; }
.text-navy        { color: #001F3F !important; }
.bg-navy          { background-color: #001F3F !important; }
.border-navy      { border-color: #001F3F !important; }
.hover\:text-gold:hover { color: #D4AF37 !important; }
.hover\:bg-gold:hover   { background-color: #D4AF37 !important; }

/* --- z-index utilities (purged from compiled Tailwind) --- */
.z-40 { z-index: 40 !important; }
.z-50 { z-index: 50 !important; }

/* ── Responsive utilities missing from the compiled Tailwind build ────────────
   Tailwind was compiled against an earlier snapshot and is missing the classes
   below. These are the canonical Tailwind values for each utility.           */

/* sm – 640px */
@media (min-width: 640px) {
  .sm\:justify-end  { justify-content: flex-end; }
  .sm\:mt-24        { margin-top: 6rem; }
  .sm\:py-20        { padding-top: 5rem; padding-bottom: 5rem; }
  .sm\:text-4xl     { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-left    { text-align: left; }
}

/* lg – 1024px  ← CRITICAL: lg:hidden / lg:flex drive the entire nav layout */
@media (min-width: 1024px) {
  .lg\:hidden       { display: none   !important; }
  .lg\:flex         { display: flex   !important; }
  .lg\:inline-flex  { display: inline-flex !important; }
  .lg\:gap-0        { gap: 0; }
  .lg\:h-18         { height: 4.5rem; }          /* custom h-18 = 72px header */
  .lg\:pl-8         { padding-left: 2rem; }
  .lg\:pr-8         { padding-right: 2rem; }
  .lg\:border-r     { border-right-width: 1px; border-right-style: solid; }
  .lg\:border-white\/15 { border-color: rgba(255,255,255,0.15); }
  .lg\:text-6xl     { font-size: 3.75rem; line-height: 1; }
}

/* --- Hero gradient --- */
.hero-bg {
  background: linear-gradient(135deg, #001a35 0%, #001F3F 50%, #002d5a 100%);
  position: relative;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(212,175,55,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Section dark --- */
.section-dark {
  background-color: #001F3F;
}

/* --- CTA section (before footer) — distinct from footer navy --- */
.section-cta {
  background: linear-gradient(180deg, #0a1628 0%, #061020 100%);
  border-top: 1px solid rgba(212,175,55,0.15);
}

/* --- Sticky header --- */
#main-header {
  transition: box-shadow 0.3s ease;
}
#main-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
}

/* --- Nav dropdown animation --- */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}
.nav-group:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --- Mobile menu — fixed overlay, always above page content --- */
#mobile-menu {
  position: fixed;
  top: 64px;           /* sit flush below the 64px header */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 49;         /* below header (50) but above everything else */
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Hidden state */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* --- FAQ accordion --- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-answer.open {
  max-height: 600px;
}
.faq-chevron {
  transition: transform 0.3s ease;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

/* --- WhatsApp float pulse --- */
#wa-float {
  animation: wa-pulse 3s ease-in-out infinite;
}
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.3), 0 0 0 0 rgba(37,211,102,0.4); }
  50%       { box-shadow: 0 4px 20px rgba(37,211,102,0.3), 0 0 0 12px rgba(37,211,102,0); }
}

/* --- Job/gallery card images --- */
.job-card img,
.gallery-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* --- Image placeholders --- */
.img-placeholder {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

/* --- Process steps connector line (desktop) --- */
.steps-grid {
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 2.25rem;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    #D4AF37 0px, #D4AF37 8px,
    transparent 8px, transparent 16px
  );
  opacity: 0.4;
}
@media (max-width: 767px) {
  .steps-grid::before { display: none; }
}

/* --- Review card gold border accent --- */
.review-card {
  border-top: 3px solid #D4AF37;
}

/* --- Service card hover --- */
.service-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* --- Area pill hover --- */
.area-pill {
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.area-pill:hover {
  transform: translateY(-1px);
}

/* --- CTA button pulse (emergency red) --- */
.btn-emergency {
  background-color: #DC143C;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-emergency:hover {
  background-color: #b91032;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220,20,60,0.35);
}

/* --- WhatsApp button --- */
.btn-whatsapp {
  background-color: #25D366;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn-whatsapp:hover {
  background-color: #1da851;
  transform: translateY(-1px);
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
}
.breadcrumb a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumb a:hover {
  color: #D4AF37;
}
.breadcrumb-sep {
  color: rgba(255,255,255,0.25);
  margin: 0 6px;
}

/* --- Form inputs --- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.625rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem; /* 16px — prevents iOS Safari zoom on input focus */
  background: #fff;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.form-input:focus {
  border-color: #D4AF37;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
  font-family: 'Montserrat', sans-serif;
}

/* --- Success banner (contact form sent) --- */
#form-success {
  display: none;
  background: linear-gradient(135deg, #001F3F, #002d5a);
  border: 1px solid #D4AF37;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  color: #fff;
  text-align: center;
  margin-bottom: 1.5rem;
}
#form-success.show { display: block; }

/* --- Cookie banner --- */
#cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 480px;
  background: rgba(0,20,40,0.97);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: none;
}
#cookie-banner.show { display: block; }
@media (min-width: 640px) {
  #cookie-banner { left: auto; right: 1.5rem; bottom: 1.5rem; }
}

/* --- Animate on scroll (used with GSAP ScrollTrigger) --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
}
/* Safety: never hide content inside dark sections (GSAP fallback) */
.section-dark .animate-on-scroll {
  opacity: 1;
  transform: none;
}
.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* --- Section tag badge — gold pill, navy text, works on any background --- */
.section-tag {
  display: inline-block;
  background: #D4AF37;
  color: #001F3F !important;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  font-family: 'Montserrat', sans-serif;
}

/* --- Legacy eyebrow label badge fallback (nav pill style on dark sections) --- */
p.text-sm.font-bold.tracking-widest.uppercase[style*="D4AF37"] {
  display: inline-block !important;
  background-color: #D4AF37;
  color: #001F3F !important;
  padding: 3px 12px !important;
  border-radius: 999px;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
}

/* --- Sticky bar spacing (superseded by the safe-area block below — kept for non-mobile-bar pages but consolidated) --- */

/* --- Global font + smooth scroll --- */
html  { scroll-behavior: smooth; }
body  { font-family: 'Montserrat', sans-serif; }

/* --- Keyboard focus visibility (Tailwind preflight strips outlines) --- */
*:focus-visible {
  outline: 2px solid #D4AF37;
  outline-offset: 2px;
  border-radius: 2px;
}
.btn-emergency:focus-visible,
.btn-whatsapp:focus-visible {
  outline-offset: 3px;
}

/* --- Skip-to-content link --- */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: #001F3F;
  color: #D4AF37;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
  transition: top 0.15s ease;
}
.skip-to-content:focus {
  top: 0;
}

/* --- iOS safe-area for fixed bottom bar (notch / home indicator) --- */
#sticky-bar {
  padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width:1023px) {
  body { padding-bottom: 5rem; } /* extra clearance over previous 4rem to handle taller bars + safe-area */
}

/* --- Service-card accent (gold top border on hover) --- */
.service-card {
  border-top: 3px solid transparent;
}
.service-card:hover {
  border-top-color: #D4AF37;
}

/* --- Job-card colour accent --- */
.job-card {
  border-top: 3px solid #D4AF37;
}

/* --- Urgency-pill radio selector (contact form) --- */
.urgency-pill {
  cursor: pointer;
  display: block;
}
.urgency-pill-inner {
  display: block;
  text-align: center;
  padding: 0.7rem 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.625rem;
  background: #fff;
  color: #001F3F;
  transition: all 0.15s ease;
}
.urgency-pill:hover .urgency-pill-inner {
  border-color: #D4AF37;
  background: #FEF9EC;
}
.urgency-pill input:checked + .urgency-pill-inner {
  border-color: #D4AF37;
  background: #001F3F;
  color: #fff;
  box-shadow: 0 4px 12px rgba(212,175,55,0.25);
}
.urgency-pill input:focus-visible + .urgency-pill-inner {
  outline: 2px solid #D4AF37;
  outline-offset: 2px;
}
/* sr-only fallback */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Form submit button (gold→navy gradient hover) --- */
.form-submit {
  background: linear-gradient(135deg, #DC143C 0%, #b91032 100%);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.3s ease;
}
.form-submit:hover {
  background: linear-gradient(135deg, #001F3F 0%, #002a5c 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,31,63,0.35);
}
.form-submit:active {
  transform: translateY(0);
}

/* --- Bespoke / custom-section pills --- */
.bespoke-pill {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0,31,63,0.12);
  color: #001F3F;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: all 0.15s ease;
  cursor: default;
}
.bespoke-pill:hover {
  border-color: #D4AF37;
  background: #FEF9EC;
  transform: translateY(-1px);
}

/* --- Footer trust strip --- */
.footer-trust-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (min-width:640px) { .footer-trust-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width:1024px) { .footer-trust-row { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.footer-trust-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.footer-trust-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,0.12);
  color: #D4AF37;
}
.footer-trust-title { color: #fff; font-weight: 800; font-size: 0.8125rem; line-height: 1.2; }
.footer-trust-sub   { color: rgba(255,255,255,0.55); font-size: 0.75rem; margin-top: 0.125rem; }

/* --- Payment badges (footer bottom) --- */
.pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}
.pay-badge.visa  { color: #1a1f71; background: #fff; border-color: #fff; }
.pay-badge.mc    { color: #fff; background: linear-gradient(135deg,#eb001b 0%,#f79e1b 100%); border-color: transparent; }
.pay-badge.amex  { color: #fff; background: #006fcf; border-color: #006fcf; }
.pay-badge.apay  { color: #000; background: #fff; border-color: #fff; }
.pay-badge.gpay  { color: #fff; background: #4285F4; border-color: #4285F4; }
.pay-badge.cash  { color: #fff; background: #1f7a3d; border-color: #1f7a3d; }
.pay-badge.bank  { color: rgba(255,255,255,0.85); }

/* --- Quick-quote hero widget input overrides --- */
.quick-quote .form-input {
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}
.quick-quote .form-input:focus {
  border-color: #D4AF37;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.18);
}

/* --- Tip cards (What to do while you wait) --- */
.tip-card {
  border: 1px solid #f0ead8;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.tip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,31,63,0.10);
}
.tip-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* --- Trust badges row (above contact form) --- */
.trust-badges-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 2.5rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,55,0.18);
}
@media (min-width:640px) { .trust-badges-row { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width:1024px) { .trust-badges-row { grid-template-columns: repeat(6, 1fr); padding: 1.5rem; } }

.trust-badges-row.trust-badges-light {
  background: #FFFCF3;
  border-color: rgba(212,175,55,0.30);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.trust-badge-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: #D4AF37;
}
.trust-badges-row .trust-badge-title {
  color: #fff;
  font-weight: 800;
  font-size: 0.8125rem;
  line-height: 1.1;
}
.trust-badges-row .trust-badge-sub {
  color: rgba(255,255,255,0.55);
  font-size: 0.6875rem;
  margin-top: 0.125rem;
}
.trust-badges-row.trust-badges-light .trust-badge-title { color: #001F3F; }
.trust-badges-row.trust-badges-light .trust-badge-sub   { color: #6b7280; }

/* --- Recent-jobs ticker (small line above forms) --- */
.jobs-ticker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.25);
}
.jobs-ticker .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background-color: #22c55e;
  flex-shrink: 0;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.jobs-ticker.light {
  color: #001F3F;
  background: #f0fdf4;
  border-color: rgba(34,197,94,0.35);
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}

/* --- Before/After slider --- */
.bld-ba { position: relative; }
.bld-ba-frame {
  position: relative;
  aspect-ratio: 4/3;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background: #001F3F;
  user-select: none;
  cursor: ew-resize;
  box-shadow: 0 16px 36px rgba(0,31,63,0.18);
}
.bld-ba-after, .bld-ba-before {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  overflow: hidden;
}
.bld-ba-after  { right: 0; }
.bld-ba-before { width: 50%; }
.bld-ba-after img, .bld-ba-before img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.bld-ba-before img { width: calc(100vw); max-width: none; }
@media (min-width: 1024px) { .bld-ba-before img { width: 1024px; max-width: none; } }
.bld-ba-tag {
  position: absolute;
  top: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bld-ba-tag-before { left: 1rem; background: rgba(220,20,60,0.9);  color: #fff; }
.bld-ba-tag-after  { right: 1rem; background: rgba(34,197,94,0.9); color: #fff; }
.bld-ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: #D4AF37;
  left: 50%;
  transform: translateX(-50%);
  cursor: ew-resize;
  outline: none;
}
.bld-ba-handle:focus-visible {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.5);
}
.bld-ba-handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #D4AF37;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,31,63,0.30);
  pointer-events: none;
}
.bld-ba-tab {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
}
.bld-ba-tab:hover {
  border-color: #D4AF37;
  color: #001F3F;
}
.bld-ba-tab.active {
  border-color: #001F3F;
  background: #001F3F;
  color: #fff;
}

/* --- Mobile "Available now" pill (under header on small screens) --- */
#mobile-available-pill {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(-110%);
  pointer-events: none;   /* hidden state: never block taps above it */
  z-index: 39;
  background: #16a34a;
  color: #fff;
  padding: 0.4rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.25s ease;
  pointer-events: auto;
}
#mobile-available-pill.visible { transform: translateX(-50%) translateY(0); pointer-events: auto; }
#mobile-available-pill .pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@media (min-width: 1024px) { #mobile-available-pill { display: none !important; } }

/* --- Form skeleton (prevent flash-of-unstyled before icons load) --- */
.form-input {
  background: #fff;
  background-image: linear-gradient(90deg, transparent 0%, rgba(212,175,55,0) 100%);
}
.form-input:placeholder-shown {
  /* placeholder visible — give a subtle resting tint to avoid white flash */
}
.form-loading-skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: form-skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 0.625rem;
}
@keyframes form-skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* hide skeleton wrapper once form has been touched / page is ready */
.is-form-ready .form-loading-skeleton { display: none; }

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate-on-scroll { opacity: 1 !important; transform: none !important; }
  #wa-float { animation: none !important; }
}
