/* ===== Bells & Whistles ===== */

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--green));
  z-index: 999; transition: width .1s ease;
}

/* Back to top */
.back-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--amber); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: 0 8px 24px -4px rgba(47,127,224,.5);
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { background: var(--amber-deep); transform: translateY(-2px); }

/* Social proof popup */
.social-proof {
  position: fixed; bottom: 24px; left: 24px; z-index: 90;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 12px 40px -12px rgba(16,27,46,.2);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
  max-width: 320px;
}
.social-proof.show { opacity: 1; transform: translateY(0); }
.social-proof .sp-ic {
  width: 36px; height: 36px; border-radius: 50%; background: var(--green);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.social-proof .sp-ic svg { width: 18px; height: 18px; color: #fff; }
.social-proof .sp-text { font-size: 13px; color: var(--ink-soft); }
.social-proof .sp-text strong { color: var(--ink); }
.social-proof .sp-time { font-size: 11px; color: var(--ink-mute); }

/* FAQ accordion */
.faq-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.faq-q { padding: 20px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 16px; color: var(--ink); }
.faq-q .faq-ic { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; transition: transform .3s ease; color: var(--amber-deep); }
.faq-item.open .faq-ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 200px; }
.faq-a-inner { padding: 0 24px 20px; font-size: 15px; color: var(--ink-mute); line-height: 1.7; }

/* Before/after slider */
.ba-slider { position: relative; width: 100%; max-width: 600px; margin: 0 auto; aspect-ratio: 16/10; border-radius: 16px; overflow: hidden; }
.ba-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ba-before { background: url('images/gallery-skyline.jpg') center/cover; }
.ba-after { background: url('images/gallery-estate.jpg') center/cover; clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: #fff; transform: translateX(-50%); z-index: 2; cursor: ew-resize; }
.ba-handle::after { content: '⇔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--amber-deep); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.ba-label { position: absolute; bottom: 12px; z-index: 2; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0,0,0,.5); }
.ba-label-before { left: 12px; } .ba-label-after { right: 12px; }

/* Cost calculator */
.calc-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; }
.calc-row { margin-bottom: 20px; }
.calc-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--ink-soft); }
.calc-row select, .calc-row input[type="range"] { width: 100%; }
.calc-output { background: var(--cream-deep); border-radius: 14px; padding: 24px; text-align: center; margin-top: 20px; }
.calc-price { font-family: var(--serif); font-size: 42px; font-weight: 700; color: var(--amber-deep); }
.calc-price .small { font-size: 16px; color: var(--ink-mute); }
.calc-note { font-size: 12px; color: var(--ink-mute); margin-top: 8px; }

/* Side widget — Call + Free Inspection only (chat uses original launcher) */
.side-widget { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; padding: 12px 8px; }
.side-btn { width: 48px; height: 48px; border-radius: 14px 6px 6px 14px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px -4px rgba(16,27,46,.25); transition: transform .25s ease, width .25s ease; position: relative; overflow: hidden; }
.side-btn:hover { transform: translateX(-4px); width: 130px; }
.side-btn svg { width: 22px; height: 22px; color: #fff; flex: none; }
.side-btn .label { position: absolute; left: 40px; white-space: nowrap; color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .2s ease .05s; }
.side-btn:hover .label { opacity: 1; }
.side-btn.call { background: #25a667; }
.side-btn.inspect { background: #2f7fe0; }
@media (max-width: 700px) { .side-widget { bottom: 80px; top: auto; transform: none; flex-direction: row; right: 8px; padding: 4px; } .side-btn { border-radius: 50%; width: 40px; height: 40px; } .side-btn:hover { width: 40px; transform: none; } .side-btn .label { display: none; } }

/* Chat widget */
.chat-window { position: fixed; bottom: 24px; right: 80px; z-index: 95; width: 340px; max-height: 500px; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px -16px rgba(16,27,46,.3); display: none; flex-direction: column; overflow: hidden; }
.chat-window.open { display: flex; }
.chat-header { background: var(--amber-deep); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 10px; }
.chat-header .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(37,166,103,.2); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; background: var(--cream); }
.chat-msg { margin-bottom: 12px; max-width: 82%; }
.chat-msg.bot .bubble { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.chat-msg.user { margin-left: auto; }
.chat-msg.user .bubble { background: var(--amber); color: #fff; }
.chat-msg .bubble { padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.chat-chips { padding: 8px 12px; display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); background: #fff; }
.chat-chips .chip { font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--cream); cursor: pointer; transition: border-color .2s; }
.chat-chips .chip:hover { border-color: var(--amber); color: var(--amber-deep); }
.chat-input { padding: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; background: #fff; }
.chat-input input { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; outline: none; }
.chat-input input:focus { border-color: var(--amber); }
.chat-input button { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--amber); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12,26,46,.9); display: none; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 85vh; border-radius: 12px; }
.lightbox .lb-close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 32px; cursor: pointer; }

/* 1. Emergency banner */
.emergency-banner { position: sticky; top: 0; z-index: 99; background: linear-gradient(90deg,#dc2626,#f59e0b); color: #fff; padding: 10px 20px; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 14px; font-weight: 600; }
.emergency-banner .eb-close { background: rgba(255,255,255,.2); border: none; color: #fff; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; margin-left: 8px; }
.emergency-banner a { text-decoration: underline; }

/* 2. Service area map */
.area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.area-map { border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px -16px rgba(16,27,46,.2); }
.area-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.area-chip { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--cream-deep); border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: background .2s; cursor: pointer; }
.area-chip:hover { background: var(--amber-soft); color: var(--amber-deep); }
.area-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }

/* 3. Booking calendar */
.booking-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; max-width: 560px; }
.booking-slots { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 16px; }
.booking-day { text-align: center; padding: 14px 8px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .2s; background: var(--cream); }
.booking-day:hover { border-color: var(--amber); }
.booking-day.selected { border-color: var(--amber); background: var(--amber-soft); }
.booking-day .bd-day { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--ink-mute); }
.booking-day .bd-num { font-size: 22px; font-weight: 700; color: var(--ink); }
.booking-day .bd-month { font-size: 11px; color: var(--ink-mute); }
.booking-times { display: none; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.booking-times.show { display: flex; }
.booking-time { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all .2s; }
.booking-time:hover, .booking-time.selected { background: var(--amber); color: #fff; border-color: var(--amber); }

/* 4. Insurance claim tracker */
.claim-tracker { display: flex; align-items: center; justify-content: space-between; max-width: 760px; margin: 0 auto; position: relative; }
.claim-track-line { position: absolute; top: 24px; left: 5%; right: 5%; height: 3px; background: var(--line); z-index: 0; }
.claim-track-fill { position: absolute; top: 24px; left: 5%; height: 3px; background: var(--amber); z-index: 1; transition: width 1s ease; }
.claim-step { text-align: center; position: relative; z-index: 2; flex: 1; }
.claim-step .cs-dot { width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 18px; color: var(--ink-mute); transition: all .3s; }
.claim-step.done .cs-dot { background: var(--green); border-color: var(--green); color: #fff; }
.claim-step.active .cs-dot { background: var(--amber); border-color: var(--amber); color: #fff; box-shadow: 0 0 0 6px rgba(47,127,224,.15); }
.claim-step .cs-label { font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.claim-step.done .cs-label, .claim-step.active .cs-label { color: var(--ink); }
.claim-input { text-align: center; margin-top: 24px; }
.claim-input input { padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; width: 200px; text-align: center; }
.claim-input button { margin-left: 8px; }

/* 5. Drone measurement tool */
.drone-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; max-width: 560px; text-align: center; }
.drone-result { display: none; margin-top: 20px; padding: 24px; background: var(--cream-deep); border-radius: 14px; }
.drone-result.show { display: block; }
.drone-sqft { font-family: var(--serif); font-size: 36px; font-weight: 700; color: var(--amber-deep); }

/* 6. Photo timeline */
.timeline { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.timeline-card { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 30px -12px rgba(16,27,46,.15); }
.timeline-card img { width: 100%; height: 200px; object-fit: cover; }
.timeline-card .tc-body { padding: 16px; background: #fff; }
.timeline-card .tc-phase { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-deep); }
.timeline-card .tc-date { font-size: 13px; color: var(--ink-mute); }

/* 7. Warranty portal */
.warranty-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; max-width: 560px; text-align: center; }
.warranty-cert { display: none; margin-top: 20px; padding: 24px; background: linear-gradient(135deg,var(--dark),var(--dark-2)); border-radius: 14px; color: #fff; text-align: center; }
.warranty-cert.show { display: block; }
.warranty-cert h4 { font-family: var(--serif); font-size: 22px; margin-bottom: 8px; }
.warranty-cert .wc-scope { font-size: 14px; color: rgba(255,255,255,.6); margin-bottom: 12px; }
.warranty-cert .wc-id { font-size: 12px; color: rgba(255,255,255,.4); }

/* 8. Enhanced calculator (monthly payments) */
.calc-monthly { display: flex; gap: 12px; margin-top: 16px; }
.calc-plan { flex: 1; padding: 14px; border-radius: 10px; background: var(--cream); text-align: center; }
.calc-plan .cp-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--ink-mute); }
.calc-plan .cp-monthly { font-size: 20px; font-weight: 700; color: var(--amber-deep); }

/* 9. Weather widget */
.weather-widget { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--cream-deep); border-radius: 999px; font-size: 14px; }
.weather-widget .ww-icon { font-size: 20px; }
.weather-widget .ww-alert { color: #dc2626; font-weight: 600; }

/* 10. Video testimonials */
.video-testimonials { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.vt-card { border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.vt-thumb { position: relative; aspect-ratio: 16/9; background: var(--dark); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vt-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.vt-play { position: absolute; width: 56px; height: 56px; border-radius: 50%; background: rgba(47,127,224,.9); display: flex; align-items: center; justify-content: center; }
.vt-play svg { width: 24px; height: 24px; color: #fff; }
.vt-body { padding: 16px; }
.vt-body .vt-name { font-weight: 600; font-size: 14px; }
.vt-body .vt-loc { font-size: 12px; color: var(--ink-mute); }

/* 11. Busy indicator */
.busy-indicator { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(37,166,103,.1); border: 1px solid rgba(37,166,103,.3); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--green-deep); }
.busy-indicator .bi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s ease-in-out infinite; }

/* 12. Call tracking */
.call-track-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-mute); margin-top: 4px; }

/* 13. SMS opt-in */
.sms-optin { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--ink-mute); }
.sms-optin input { width: auto; }

/* 14. Seasonal hero text — no CSS needed, JS swap */

/* 15. Instagram feed */
.ig-feed { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.ig-post { aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; position: relative; }
.ig-post img { width: 100%; height: 100%; object-fit: cover; }
.ig-post::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 60%,rgba(16,27,46,.4)); }

/* 16. Portfolio filters */
.portfolio-filters { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.pf-btn { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; font-weight: 500; transition: all .2s; }
.pf-btn.active, .pf-btn:hover { background: var(--amber); color: #fff; border-color: var(--amber); }

/* 17. FAQ search */
.faq-search { width: 100%; max-width: 560px; padding: 14px 20px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; margin-bottom: 24px; }
.faq-search:focus { outline: none; border-color: var(--amber); }

@media(max-width:900px){.area-grid,.timeline,.video-testimonials{grid-template-columns:1fr}.ig-feed{grid-template-columns:repeat(2,1fr)}.booking-slots{grid-template-columns:repeat(2,1fr)}.claim-tracker{flex-direction:column;gap:20px}.claim-track-line,.claim-track-fill{display:none}}

/* Hero carousel */
.hero-carousel { position: absolute; inset: 0; z-index: 4; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24px; }
.hero-slide.active { opacity: 1; }
.hero-slide-bg { position: absolute; inset: 0; z-index: -1; }
.hero-dots { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 7; display: flex; gap: 8px; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.3); cursor: pointer; transition: background .3s; }
.hero-dot.active { background: #fff; }

/* Tabbed panels */
.tab-panel { background: #fff; border-radius: 20px; box-shadow: 0 12px 40px -16px rgba(16,27,46,.12); overflow: hidden; }
.tab-nav { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-nav button { flex: 1; min-width: 100px; padding: 16px 12px; background: none; border: none; cursor: pointer; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink-mute); transition: all .2s; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab-nav button.active { color: var(--amber-deep); border-bottom-color: var(--amber); }
.tab-content { padding: 40px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Reviews ticker */
.rv-ticker { background: var(--dark); padding: 16px 0; overflow: hidden; position: relative; }
.rv-ticker-track { display: flex; gap: 40px; animation: ticker 40s linear infinite; white-space: nowrap; }
.rv-ticker:hover .rv-ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.rv-tick-item { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.8); font-size: 14px; }
.rv-tick-item .stars { color: #f5a623; }
.rv-tick-item .author { color: var(--amber); font-weight: 600; }

/* Quick actions floating bar */
.quick-actions { position: fixed; bottom: 0; left: 0; right: 0; z-index: 95; background: rgba(255,255,255,.95); backdrop-filter: blur(20px); border-top: 1px solid var(--line); padding: 8px 12px; display: none; gap: 8px; justify-content: center; box-shadow: 0 -4px 20px -8px rgba(16,27,46,.1); }
@media (max-width: 700px) { .quick-actions { display: flex; } body { padding-bottom: 60px; } }
.qa-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 14px; border: none; background: none; cursor: pointer; font-size: 10px; font-weight: 600; color: var(--ink-soft); }
.qa-btn svg { width: 20px; height: 20px; color: var(--amber-deep); }
