/* =========================================================
   main.css - ONE stylesheet for every page of
   nestthermostatsdubai.com (home, products, blog, services)
   Theme: light sky blue. Header + footer share one design.
   ========================================================= */

:root {
  --sky-50: #f3faff;
  --sky-100: #e4f3fd;
  --sky-200: #c9e7fb;
  --sky-300: #9ed3f5;
  --sky-600: #0b79c4;   /* buttons, accents  (white text = 4.6:1) */
  --sky-700: #085f9c;   /* links */
  --sky-800: #0b4a78;   /* strong headings / prices */
  --ink: #0e2a3f;
  --muted: #456079;
  --line: #d3e6f4;
  --white: #fff;
  --wa: #0e8a43;        /* WhatsApp action (white text = 4.9:1) */
  --amber: #c9830a;

  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--font-body);
  color: var(--ink);
  background: var(--sky-50);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--sky-700); text-underline-offset: 3px; }
a:hover { color: var(--sky-800); }
:focus-visible { outline: 3px solid var(--sky-600); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--sky-800); color: #fff; padding: 0.7rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- icons ---------- */
.i {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.75rem 1.3rem;
  border: 2px solid transparent; border-radius: 12px;
  font: 600 1rem/1.1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #0a7236; color: #fff; }
.btn-primary { background: var(--sky-600); color: #fff; }
.btn-primary:hover { background: var(--sky-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--sky-800); border-color: var(--sky-300); }
.btn-ghost:hover { background: var(--sky-100); color: var(--sky-800); }
.btn-sm { min-height: 40px; padding: 0.5rem 0.9rem; font-size: 0.92rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* =========================================================
   HEADER  (shared by every page)
   ========================================================= */
.topbar { background: var(--sky-100); border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 0.4rem; }
.topbar p { margin: 0; color: var(--muted); }
.topbar-info { display: flex; gap: 1.4rem; flex-wrap: wrap; color: var(--muted); }
.topbar-info a { color: var(--ink); text-decoration: none; display: inline-flex; gap: 0.4rem; align-items: center; }
.topbar-info a:hover { color: var(--sky-700); }

.social { display: flex; gap: 0.4rem; }
.social a {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--sky-800);
}
.social a:hover { background: var(--sky-600); color: #fff; border-color: var(--sky-600); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 0.55rem 0.8rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--sky-100); color: var(--sky-800); }
.header-cta { display: flex; align-items: center; gap: 0.5rem; }
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  border: 2px solid var(--sky-300); background: #fff; color: var(--sky-800); cursor: pointer;
}

/* =========================================================
   BREADCRUMB / PAGE BASICS
   ========================================================= */
.crumbs { padding: 1.1rem 0 0.9rem; font-size: 0.9rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--sky-300); }
.crumbs a { color: var(--muted); }

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-white { background: #fff; border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 1.8rem; }
.section-head p { color: var(--muted); }

/* =========================================================
   PRODUCT HERO
   ========================================================= */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
}
.gallery { position: sticky; top: 96px; }
.stage {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 32px; background: var(--sky-100);
  padding: clamp(1rem, 3vw, 2rem); aspect-ratio: 1;
}
/* concentric rings echo the circular dial of the thermostat */
.stage::before, .stage::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  border: 1.5px solid var(--sky-300);
}
.stage::before { inset: 3%; }
.stage::after { inset: -22%; }
.stage img {
  width: 100%; height: 100%; object-fit: contain;
  background: #fff; border-radius: 22px;
}
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin-top: 0.9rem; }
.thumbs button {
  padding: 0; aspect-ratio: 1; overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); border-radius: 14px; background: #fff;
}
.thumbs button[aria-pressed="true"] { border-color: var(--sky-600); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 54ch; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.75rem; margin: 1.2rem 0 0.3rem; }
.price { font: 700 2.5rem/1 var(--font-head); color: var(--sky-800); }
.price small { font-size: 1.05rem; font-weight: 600; }
.stock { font-weight: 600; color: var(--wa); display: inline-flex; align-items: center; gap: 0.35rem; }
.note { font-size: 0.92rem; color: var(--muted); }

.finish { border: 0; padding: 0; margin: 1.3rem 0 0; }
.finish legend { font-weight: 700; margin-bottom: 0.55rem; padding: 0; }
.finish-opts { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.finish-opts input { position: absolute; opacity: 0; pointer-events: none; }
.finish-opts label {
  display: inline-flex; align-items: center; gap: 0.55rem; cursor: pointer;
  padding: 0.55rem 1rem; border: 2px solid var(--line); border-radius: 999px;
  background: #fff; font-weight: 600;
}
.finish-opts input:checked + label { border-color: var(--sky-600); background: var(--sky-100); }
.finish-opts input:focus-visible + label { outline: 3px solid var(--sky-600); outline-offset: 2px; }
.dot { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); }
.dot-obsidian { background: #2b3138; }
.dot-silver { background: #d3d9df; }
.dot-gold { background: #d8b568; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.4rem 0; }
.facts { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 1.2rem; }
.facts li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.97rem; }
.facts .i { color: var(--sky-600); margin-top: 0.25rem; }

/* ---------- trust strip ---------- */
.trust {
  display: grid; grid-template-columns: 140px repeat(3, 1fr); gap: 1.2rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.2rem 1.6rem;
}
.trust-item { display: flex; gap: 0.9rem; align-items: center; font-weight: 600; line-height: 1.3; }
.trust-item img { width: 46px; height: 46px; flex: none; }

/* =========================================================
   ARTICLE LAYOUT  (also used by blog posts)
   ========================================================= */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
}
.prose { max-width: 740px; }
.prose h2 { margin-top: 2.4em; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5em; }

.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin-bottom: 2.2rem; }
.toc strong { display: block; margin-bottom: 0.4rem; font-family: var(--font-head); font-size: 1.1rem; }
.toc ol { columns: 2; column-gap: 2rem; margin: 0; padding-left: 1.2rem; font-size: 0.97rem; }
.toc li { margin-bottom: 0.3em; break-inside: avoid; }

.aside { position: sticky; top: 96px; display: grid; gap: 1rem; }
.buy-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; }
.buy-card h2 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.buy-card .price { font-size: 2rem; }
.buy-card ul { list-style: none; margin: 1rem 0; padding: 0; font-size: 0.95rem; }
.buy-card li { display: flex; gap: 0.5rem; margin-bottom: 0.45rem; }
.buy-card li .i { color: var(--sky-600); margin-top: 0.2rem; }
.buy-card .btn + .btn { margin-top: 0.6rem; }
.aside-note { background: var(--sky-100); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: 0.93rem; color: var(--muted); }
.aside-note a { font-weight: 600; }

/* callouts */
.callout {
  border-left: 5px solid var(--sky-600); background: var(--sky-100);
  border-radius: 0 14px 14px 0; padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}
.callout strong:first-child { display: block; margin-bottom: 0.25rem; font-family: var(--font-head); font-size: 1.05rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.warn { border-color: var(--amber); background: #fff6e0; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.2rem 0 1.8rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.97rem; }
caption { caption-side: top; text-align: left; padding: 0.85rem 1rem; font-weight: 700; font-family: var(--font-head); }
th, td { padding: 0.8rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { background: var(--sky-200); position: sticky; top: 0; }
tbody tr:nth-child(even) { background: var(--sky-50); }
tbody th { font-weight: 600; width: 30%; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.hl, tr.hl th { background: var(--sky-100) !important; }

/* numbered steps (real sequences only) */
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 3rem; margin-bottom: 1.1rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--sky-600); color: #fff; display: grid; place-items: center; font-weight: 700;
}

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.6rem 0; }
.duo figure { margin: 0; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.duo figcaption { display: flex; gap: 0.8rem; align-items: center; padding: 0.9rem 1.1rem; background: var(--sky-600); color: #fff; font-weight: 600; line-height: 1.25; }
.duo figcaption img { width: 44px; height: 44px; flex: none; padding: 6px; background: #fff; border-radius: 50%; }

.wide-figure { margin: 1.8rem 0; }
.wide-figure img { width: 100%; border-radius: 22px; border: 1px solid var(--line); background: #fff; }
.wide-figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }

/* FAQ (native details = works without JS) */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 0.7rem; }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 1.05rem 3rem 1.05rem 1.25rem; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.15rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; line-height: 1; color: var(--sky-600); }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { color: var(--sky-800); }
.faq .ans { padding: 0 1.25rem 1.1rem; color: var(--muted); }
.faq .ans p:last-child { margin-bottom: 0; }

/* related cards (also used for blog post lists) */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.rel { display: block; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: inherit; text-decoration: none; }
.rel:hover { border-color: var(--sky-300); }
.rel img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--sky-100); }
.rel div { padding: 1rem 1.15rem 1.2rem; }
.rel h3 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.rel .p { color: var(--sky-800); font-weight: 700; }

/* blog helpers */
.post-head { padding: 1.2rem 0 1.5rem; max-width: 820px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--muted); font-size: 0.92rem; margin-top: 0.8rem; }
.author-box { display: flex; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 2rem; }
.author-box p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* closing call-to-action band */
.cta-band {
  padding: clamp(2.8rem, 6vw, 4.5rem) 0; text-align: center;
  background: linear-gradient(rgba(201, 231, 251, 0.93), rgba(201, 231, 251, 0.93)),
    url("../img/slider/slider_bg.png") center / cover no-repeat;
}
.cta-band p { max-width: 56ch; margin-inline: auto; color: var(--muted); }
.cta-band .cta-row { justify-content: center; }

/* =========================================================
   FOOTER  (same design language as header)
   ========================================================= */
.site-footer { background: #fff; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding: 3.2rem 0 2.2rem; }
.site-footer h2 { font-size: 1.05rem; margin: 0 0 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--sky-700); text-decoration: underline; }
.site-footer .brand img { height: 48px; margin-bottom: 0.9rem; }
.foot-about { color: var(--muted); font-size: 0.97rem; max-width: 36ch; }
.foot-contact li { display: flex; gap: 0.6rem; align-items: flex-start; }
.foot-contact .i { margin-top: 0.3rem; color: var(--sky-600); }
.foot-bottom { background: var(--sky-100); border-top: 1px solid var(--line); padding: 1rem 0; font-size: 0.9rem; color: var(--muted); text-align: center; }
.foot-bottom a { color: var(--sky-800); }

/* floating WhatsApp button */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.2rem; border-radius: 999px;
  background: var(--wa); color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 20px rgba(14, 138, 67, 0.35);
}
.wa-float:hover { background: #0a7236; color: #fff; }
.wa-float .i { width: 1.5em; height: 1.5em; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1020px) {
  .menu-btn { display: inline-flex; }
  .nav-wrap {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); padding: 0.8rem 1rem 1rem;
  }
  .nav-wrap.is-open { display: block; }
  .nav { flex-direction: column; }
  .header-cta .btn-label { display: none; }
}
@media (max-width: 980px) {
  .hero-grid, .layout { grid-template-columns: 1fr; }
  .gallery, .aside { position: static; }
  .toc ol { columns: 1; }
  .trust { grid-template-columns: 1fr; }
  .trust > img { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .topbar p { display: none; }
  .topbar .container { justify-content: center; }
  .facts, .duo, .foot-grid { grid-template-columns: 1fr; }
  .thumbs { gap: 0.45rem; }
  .wa-float span { display: none; }
  .wa-float { padding: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .topbar, .wa-float, .aside, .cta-band { display: none; }
}

/* =========================================================
   HOMEPAGE ADDITIONS (same file, so every page shares one CSS)
   ========================================================= */
.home-hero {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    linear-gradient(rgba(228, 243, 253, 0.94), rgba(243, 250, 255, 0.97)),
    url("../img/slider/slider_bg.png") center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.home-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.home-hero h1 { text-wrap: balance; }
.hero-points { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-weight: 600; }
.hero-points li { display: flex; gap: 0.45rem; align-items: center; }
.hero-points .i { color: var(--sky-600); }
.stage-link { display: block; }

.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.pcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.pcard > a:first-child img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--sky-100); }
.pcard .body { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; padding: 1rem 1.15rem 1.2rem; }
.pcard h3 { font-size: 1.08rem; margin: 0; }
.pcard h3 a { color: inherit; text-decoration: none; }
.pcard h3 a:hover { color: var(--sky-700); text-decoration: underline; }
.pcard p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.pcard .row { margin-top: auto; padding-top: 0.7rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.pcard .p { font: 700 1.25rem/1 var(--font-head); color: var(--sky-800); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split > img { width: 100%; border-radius: 24px; border: 1px solid var(--line); background: #fff; }
.ticks { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
.ticks li { display: flex; gap: 0.5rem; }
.ticks .i { color: var(--sky-600); margin-top: 0.3rem; }
.narrow { max-width: 760px; }

.reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 2.4rem; margin-top: 1.6rem; }
.reason { border-top: 3px solid var(--sky-300); padding-top: 0.9rem; }
.reason h3 { margin-bottom: 0.35rem; }
.reason p { margin: 0; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.2rem, 3vw, 2rem); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field textarea {
  width: 100%; padding: 0.8rem 1rem; font: inherit; color: var(--ink);
  background: var(--sky-50); border: 2px solid var(--line); border-radius: 12px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sky-600); box-shadow: 0 0 0 3px var(--sky-200); background: #fff; }
.contact-list { list-style: none; margin: 1.2rem 0; padding: 0; }
.contact-list li { display: flex; gap: 0.7rem; margin-bottom: 0.9rem; align-items: flex-start; }
.contact-list .i { color: var(--sky-600); margin-top: 0.3rem; }

@media (max-width: 980px) {
  .home-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .pgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .pgrid, .reasons, .ticks { grid-template-columns: 1fr; }
}
