/* Wolf Wood Works — shared UX layer (sab pages par). Page ka apna design nahi badalta. */
:root { --ww-teal: #12b1b8; --ww-dark: #173136; --ww-ok: #15803d; --ww-err: #b91c1c; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Accessibility */
.ww-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; }
.ww-skip { position: fixed; left: 12px; top: -60px; z-index: 100001; padding: 10px 16px; border-radius: 8px; background: var(--ww-dark); color: #fff !important; font: 600 14px/1.2 system-ui, sans-serif; text-decoration: none; transition: top .2s; }
.ww-skip:focus { top: 12px; outline: 3px solid var(--ww-teal); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--ww-teal) !important; outline-offset: 2px; }
#main-content:focus { outline: none; }

/* Hover states (halka sa, design ke saath) */
a, button, .btn, [role="button"], input[type="submit"] { transition: color .18s, background-color .18s, border-color .18s, box-shadow .18s, transform .18s, opacity .18s; }
button:not(:disabled):hover, .btn:hover, input[type="submit"]:not(:disabled):hover { filter: brightness(1.06); }
button:not(:disabled):active, .btn:active { transform: translateY(1px); }

/* Sticky header par scroll ke baad shadow */
.header-wrapper.ww-scrolled { box-shadow: 0 6px 22px rgba(0, 0, 0, .12); }

/* Scroll progress bar */
.ww-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100000; pointer-events: none; }
.ww-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--ww-teal), #b98a52); }

/* Liquid fill loader (sirf session ke pehle page par) */
.ww-loader { display: none; }
html.ww-first .ww-loader { position: fixed; inset: 0; z-index: 100002; display: grid; place-items: center; background: #f7f3ec; transition: opacity .45s ease, visibility .45s; }
html.ww-first .ww-loader.ww-done { opacity: 0; visibility: hidden; }
.ww-liquid { position: relative; width: min(320px, 72vw); text-align: center; }
.ww-liquid svg { width: 100%; height: auto; display: block; }
.ww-liquid-empty { fill: #e3dbcf; }
.ww-wave { fill: var(--ww-dark); transform: translateY(var(--ww-fill, 52px)); transition: transform .35s ease-out; animation: ww-wave 1.6s linear infinite; }
@keyframes ww-wave { from { transform: translate(0, var(--ww-fill, 52px)); } to { transform: translate(-100px, var(--ww-fill, 52px)); } }
.ww-loader-pct { display: block; margin-top: 10px; color: var(--ww-dark); font: 600 13px/1 system-ui, sans-serif; letter-spacing: 2px; }

/* Floating buttons */
.ww-fab { position: fixed; z-index: 8000; width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); font-size: 18px; color: #fff; text-decoration: none; }
.ww-fab:hover { transform: translateY(-2px); }
.ww-top { left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); background: var(--ww-dark); opacity: 0; visibility: hidden; transform: translateY(10px); }
.ww-top.ww-show { opacity: 1; visibility: visible; transform: none; }
.ww-contact { right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); width: 52px; height: 52px; background: #25d366; font-size: 25px; }
.ww-contact-menu { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 62px); z-index: 8001; display: none; min-width: 210px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); }
.ww-contact-menu.ww-open { display: block; }
.ww-contact-menu a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 10px; color: #1f2937; text-decoration: none; font: 500 14px/1.2 system-ui, sans-serif; }
.ww-contact-menu a:hover { background: #f1f5f9; }
.ww-contact-menu i { width: 20px; text-align: center; }
@media (max-width: 991px) {
    .ww-top, .ww-contact { bottom: calc(170px + env(safe-area-inset-bottom)); }
    .ww-contact-menu { bottom: calc(232px + env(safe-area-inset-bottom)); }
}

/* Dark mode toggle (header me) */
.ww-theme-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(0, 0, 0, .12); border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 15px; }
@media (max-width: 991px) { .ww-theme-btn.ww-theme-desk { display: none; } }
.ww-theme-btn.ww-theme-floating { position: fixed; top: 14px; right: 14px; z-index: 9000; background: #fff; }

/* Dark mode — poori site ke liye ek filter, photos asli rang me */
html[data-theme="dark"] { filter: invert(.9) hue-rotate(180deg); background: #fff; }
html[data-theme="dark"] img, html[data-theme="dark"] video, html[data-theme="dark"] picture, html[data-theme="dark"] iframe, html[data-theme="dark"] canvas,
html[data-theme="dark"] [style*="background-image"], html[data-theme="dark"] .swiper-slide img, html[data-theme="dark"] .fa-whatsapp, html[data-theme="dark"] .ww-loader { filter: invert(1) hue-rotate(180deg); }
html[data-theme="dark"] picture img { filter: none; }

/* Cookie banner */
.ww-cookie { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 99990; width: min(560px, calc(100% - 24px)); transform: translateX(-50%); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--ww-dark); color: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); font: 14px/1.45 system-ui, sans-serif; }
.ww-cookie p { margin: 0; flex: 1 1 260px; }
.ww-cookie a { color: #9fe7ea; }
.ww-cookie div { display: flex; gap: 8px; }
.ww-cookie button { padding: 9px 14px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
.ww-cookie button.ww-accept { background: var(--ww-teal); border-color: var(--ww-teal); }
@media (max-width: 991px) { .ww-cookie { bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* Toasts (alert() ki jagah) */
.ww-toasts { position: fixed; top: 16px; left: 50%; z-index: 100003; display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); transform: translateX(-50%); pointer-events: none; }
.ww-toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #fff; color: #111827; border-left: 5px solid var(--ww-ok); box-shadow: 0 14px 34px rgba(0, 0, 0, .18); font: 14px/1.45 system-ui, sans-serif; pointer-events: auto; animation: ww-in .25s ease-out; }
.ww-toast.ww-error { border-left-color: var(--ww-err); }
.ww-toast button { margin-left: auto; border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: #6b7280; }
@keyframes ww-in { from { opacity: 0; transform: translateY(-8px); } }

/* Confirm modal */
.ww-modal { position: fixed; inset: 0; z-index: 100004; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.ww-modal-box { width: min(400px, 100%); padding: 22px; border-radius: 16px; background: #fff; color: #111827; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); font: 15px/1.5 system-ui, sans-serif; animation: ww-in .2s ease-out; }
.ww-modal-box h3 { margin: 0 0 6px; font-size: 18px; }
.ww-modal-box p { margin: 0 0 18px; color: #4b5563; white-space: pre-line; }
.ww-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.ww-modal-actions button { padding: 10px 16px; border-radius: 10px; border: 1px solid #d1d5db; background: #fff; font-weight: 600; cursor: pointer; }
.ww-modal-actions .ww-danger { background: var(--ww-err); border-color: var(--ww-err); color: #fff; }

/* Password eye */
.ww-pw { position: relative; display: block; }
.ww-pw input { padding-right: 46px !important; width: 100%; box-sizing: border-box; }
.ww-pw-btn { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: #6b7280; cursor: pointer; font-size: 15px; }

/* Form states */
.ww-invalid { border-color: var(--ww-err) !important; box-shadow: 0 0 0 3px rgba(185, 28, 28, .12) !important; }
.ww-field-error { display: block; margin-top: 4px; color: var(--ww-err); font: 12.5px/1.3 system-ui, sans-serif; }
.ww-loading { position: relative; pointer-events: none; opacity: .75; }
.ww-loading::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ww-spin .7s linear infinite; }
@keyframes ww-spin { to { transform: rotate(360deg); } }

/* Copy button */
.ww-copy { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 3px 8px; border: 1px solid rgba(0, 0, 0, .15); border-radius: 7px; background: rgba(255, 255, 255, .85); color: #374151; font: 600 11.5px/1.4 system-ui, sans-serif; cursor: pointer; vertical-align: middle; }
.ww-copy.ww-copied { border-color: var(--ww-ok); color: var(--ww-ok); }

/* Last updated */
.ww-updated { margin: 0; padding: 8px 16px 12px; text-align: center; font: 12px/1.4 system-ui, sans-serif; opacity: .7; }

/* Expandable FAQ (faq.php + kahin bhi details.ww-faq) */
.ww-faq { border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; margin: 0 0 10px; }
.ww-faq summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; font-weight: 600; }
.ww-faq summary::-webkit-details-marker { display: none; }
.ww-faq summary::after { content: "+"; font-size: 20px; line-height: 1; transition: transform .2s; }
.ww-faq[open] summary::after { transform: rotate(45deg); }
.ww-faq .ww-faq-a { padding: 0 18px 16px; color: #4b5563; line-height: 1.65; }

/* Print */
@media print {
    .header-wrapper, header, nav, footer, .ww-progress, .ww-loader, .ww-fab, .ww-contact-menu, .ww-cookie, .ww-toasts, .ww-skip, .ww-copy, .ww-theme-btn, .mobile-drawer, .overlay, .search-modal, .wa, .announcement, #ww-scroll-progress, .swiper-button-next, .swiper-button-prev, .swiper-pagination, iframe, video { display: none !important; }
    html, body { background: #fff !important; color: #000 !important; filter: none !important; }
    * { box-shadow: none !important; text-shadow: none !important; animation: none !important; }
    main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 85%; }
    img { max-width: 100% !important; page-break-inside: avoid; }
    h1, h2, h3 { page-break-after: avoid; }
    .ww-updated { display: block !important; }
}
