/* ROADMAP 3.9 — მუქი რეჟიმი + ხელმისაწვდომობა (static/js/a11y.js). */

/* მუქი თემა: მთელი გვერდის ფერების ინვერსია (ძველი და ახალი სტილები ერთნაირად) — ფოტოები, ვიდეო, რუკა, ლოგოები ბუნებრივ ფერებში რჩება */
html[data-theme="dark"]{background:#f5f3ef;filter:invert(.92) hue-rotate(180deg);color-scheme:dark}
html[data-theme="dark"] img,html[data-theme="dark"] video,html[data-theme="dark"] iframe,html[data-theme="dark"] canvas,
html[data-theme="dark"] picture,html[data-theme="dark"] [data-noinv],html[data-theme="dark"] .leaflet-marker-icon,
html[data-theme="dark"] .fx-hero video,html[data-theme="dark"] [style*="background-image"]{filter:invert(1) hue-rotate(180deg)}
html[data-theme="dark"] picture img,html[data-theme="dark"] [style*="background-image"] img{filter:none}
html[data-theme="dark"] .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.82) contrast(1.05)}
html[data-theme="dark"] .leaflet-tile-pane img{filter:none}
html[data-theme="dark"] .fx-cursor,html[data-theme="dark"] .fx-cursor-ring{display:none}
/* თავიდანვე მუქი ბლოკები (ნავიგაცია, ჰერო, ფუტერი) — რჩება ორიგინალ ფერებში, რომ არ „გაღიავდეს“ */
html[data-theme="dark"] :is(.footer,.sh-hero,.heroWrap,.priceCard,.contactCard){filter:invert(1) hue-rotate(180deg)}
html[data-theme="dark"] :is(.tn,.header,.footer,.sh-hero,.heroWrap,.priceCard,.contactCard) :is(img,video,picture,canvas,iframe,[style*="background-image"]){filter:none}
/* დესკტოპი: ზედა მენიუ და ძებნის ზოლი მთლიანად ორიგინალ ფერებში */
@media (min-width:981px){
  html[data-theme="dark"] .tn,html[data-theme="dark"] .header{filter:invert(1) hue-rotate(180deg)}
  html[data-theme="dark"] .tn .tn__dd{filter:invert(1) hue-rotate(180deg)}
  html[data-theme="dark"] .tn .tn__dd img{filter:invert(1) hue-rotate(180deg)}
}
/* მობილური: მენიუს/შეტყობინების პანელები position:fixed-ია — კონტეინერზე filter მათ ჩაკეტავდა, ამიტომ მხოლოდ ფონს ვცვლით
   (ინვერსიის შემდეგ ისევ ლურჯი ჩანს) და ხატულებს ვაბრუნებთ ორიგინალ ფერში */
@media (max-width:980px){
  html[data-theme="dark"] .tn{background:#d2fcff;border-bottom-color:rgba(0,0,0,.08)}
  html[data-theme="dark"] .header{background:#c2f5ff}
  html[data-theme="dark"] :is(.tn__burger,.tn__right>a,.tn__right>button,.tn__ntf>button,.tn__user>button,.tn__links){filter:invert(1) hue-rotate(180deg)}
}
html[data-theme="dark"] ::selection{background:#3a5ba0;color:#fff}

/* მაღალი კონტრასტი */
html.a11y-contrast{filter:contrast(1.18) saturate(1.05)}
html[data-theme="dark"].a11y-contrast{filter:invert(.95) hue-rotate(180deg) contrast(1.22)}
html.a11y-contrast body{text-shadow:none!important}

/* ტექსტის ზომა */
html[data-fs="l"] body{zoom:1.1}
html[data-fs="xl"] body{zoom:1.22}

/* ანიმაციის შემცირება */
html.a11y-motion *,html.a11y-motion *::before,html.a11y-motion *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
html.a11y-motion .fx-reveal,html.a11y-motion .fx-stagger>*{opacity:1!important;transform:none!important}

/* ბმულები / ინტერვალები */
html.a11y-links main a:not([class*="btn"]):not(.card):not(.fx-ico),html.a11y-links .fx-seo-foot a{text-decoration:underline!important;text-underline-offset:3px}
html.a11y-spacing body{letter-spacing:.03em!important;word-spacing:.1em}
html.a11y-spacing p,html.a11y-spacing li,html.a11y-spacing .descText{line-height:1.85!important}

/* კლავიატურა: ხილული ფოკუსი + „მთავარ შინაარსზე გადასვლა“ */
:focus-visible{outline:3px solid #c9a84c!important;outline-offset:2px!important}
.a11y-skip{position:fixed;left:10px;top:-80px;z-index:2147483600;background:#1a2744;color:#fff!important;padding:10px 16px;border-radius:10px;font-weight:700;text-decoration:none;transition:top .15s}
.a11y-skip:focus{top:10px}

/* პანელი */
.a11y{position:fixed;z-index:2147483500;top:70px;right:16px;width:min(340px,calc(100vw - 32px));max-height:calc(100vh - 90px);overflow:auto;background:#fff;color:#16191f;border:1px solid #e6e1d6;border-radius:16px;box-shadow:0 18px 50px rgba(26,39,68,.25);padding:14px 16px 12px;font-size:14px}
.a11y__h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.a11y__h b{font-size:15px;color:#1a2744}
.a11y__x{border:0;background:#f5f3ef;width:32px;height:32px;border-radius:50%;font-size:20px;line-height:1;cursor:pointer;color:#1a2744}
.a11y p{margin:12px 0 6px;font-size:12px;font-weight:700;color:#6b7280;text-transform:uppercase;letter-spacing:.04em}
.a11y__seg{display:flex;gap:4px;background:#f5f3ef;border-radius:12px;padding:4px}
.a11y__seg button{flex:1;border:0;background:transparent;border-radius:9px;padding:8px 4px;font:inherit;font-weight:600;cursor:pointer;color:#1a2744;min-height:38px}
.a11y__seg button.on{background:#1a2744;color:#fff;box-shadow:0 2px 8px rgba(26,39,68,.25)}
.a11y__chks{display:grid;gap:2px;margin-top:12px}
.a11y__chk{display:flex;align-items:center;gap:10px;padding:8px 4px;border-radius:8px;cursor:pointer}
.a11y__chk:hover{background:#f5f3ef}
.a11y__chk input{width:18px;height:18px;accent-color:#1a2744}
.a11y__f{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid #eee}
.a11y__f small{color:#6b7280;font-size:12px}
.a11y__f button{border:1px solid #d8d1c2;background:#fff;border-radius:9px;padding:6px 10px;cursor:pointer;font:inherit;font-size:13px;color:#1a2744}
.tn__ico[data-a11y-open] svg{width:20px;height:20px}
@media (max-width:640px){.a11y{top:auto;bottom:calc(70px + env(safe-area-inset-bottom));right:12px;left:12px;width:auto;max-height:70vh}}
