/* Genesis Construction CMS — theme layer v2.1.8.19 (loaded last).
   1) "Подробнее" card CTA button (both themes)
   2) Clickable card media links
   3) Dark theme (body.theme-dark) with contrast-checked palette      */

/* ---------- 1) Card CTA button ---------- */
.construction-front .card-link{
  display:inline-flex;align-items:center;gap:9px;margin-top:14px;
  padding:9px 18px;border:1.5px solid var(--brand-primary,#C8922A);border-radius:999px;
  background:transparent;color:var(--brand-primary,#C8922A);
  font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;
  text-decoration:none;cursor:pointer;line-height:1.2;
  transition:background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.construction-front .card-link span{display:inline-block;transition:transform .18s ease}
.construction-front .card-link:hover{
  background:var(--brand-primary,#C8922A);color:#fff;transform:translateY(-2px);
  box-shadow:0 12px 26px -12px color-mix(in srgb,var(--brand-primary,#C8922A) 65%,transparent);
}
.construction-front .card-link:hover span{transform:translateX(4px)}
.construction-front .card-link:focus-visible{outline:2px solid var(--brand-accent,#D4A017);outline-offset:2px}

/* ---------- 2) Clickable card media ---------- */
.construction-front .card-media-link{display:block;position:relative;text-decoration:none;color:inherit}
.construction-front .card-media-link:focus-visible{outline:2px solid var(--brand-accent,#D4A017);outline-offset:-3px}
.construction-front .card-media-link img{display:block;transition:transform .28s ease,filter .28s ease}
.construction-front .card-media-link:hover img{transform:scale(1.045)}
.construction-front .card-media-link:hover .service-image,
.construction-front .card-media-link:hover .article-placeholder{filter:brightness(1.12)}
.construction-front .work-media .card-media-link{height:100%}

/* ---------- Theme toggle ---------- */
.construction-front .theme-toggle{
  width:34px;height:34px;flex:0 0 auto;display:grid;place-items:center;
  border-radius:999px;border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.06);
  color:#fff;cursor:pointer;padding:0;
  transition:border-color .18s ease,color .18s ease,transform .18s ease,background .18s ease;
}
.construction-front .theme-toggle svg{width:16px;height:16px;display:block}
.construction-front .theme-toggle:hover{border-color:var(--brand-accent,#D4A017);color:var(--brand-accent,#D4A017);transform:rotate(14deg)}
.construction-front .theme-toggle:focus-visible{outline:2px solid var(--brand-accent,#D4A017);outline-offset:2px}

/* ---------- 3) Dark theme ---------- */
body.construction-front.theme-dark{
  --text:#E9EEF4;
  --muted:#B4C2CF;
  --line:#28343F;
  --soft:#0C161F;
  --construction-mist:#0C161F;
  --construction-stone:#0F1A24;
  --construction-line:#28343F;
  --construction-muted:#B4C2CF;
  color-scheme:dark;
  color:var(--text);
  background:
    radial-gradient(1200px 480px at 8% -10%, rgba(212,160,23,.08), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(42,54,66,.35), transparent 55%),
    linear-gradient(180deg,#0B1117 0%,#0D141C 100%);
}
body.construction-front.theme-dark::selection{background:rgba(212,160,23,.4)}

/* Cards & tiles */
body.construction-front.theme-dark .service-card,
body.construction-front.theme-dark .article-card,
body.construction-front.theme-dark .work-card,
body.construction-front.theme-dark .mini-card,
body.construction-front.theme-dark .how-grid article,
body.construction-front.theme-dark .service-detail-card{
  background:#111C26;border-color:var(--line);
  box-shadow:0 1px 2px rgba(0,0,0,.4),0 18px 44px -22px rgba(0,0,0,.55);
}
body.construction-front.theme-dark .problem-grid a{
  background:#111C26;border-color:var(--line);color:var(--text);
  box-shadow:0 14px 34px rgba(0,0,0,.35);
}
body.construction-front.theme-dark .problem-grid a:hover{border-color:var(--brand-primary)}
body.construction-front.theme-dark .article-page{color:var(--text)}
body.construction-front.theme-dark .article-page .lead,
body.construction-front.theme-dark .service-detail-content{color:#D0D9E1!important}
body.construction-front.theme-dark .service-detail-block{border-top-color:var(--line)}

/* Sections */
body.construction-front.theme-dark .how-section,
body.construction-front.theme-dark .auto-section.muted{background:var(--soft)}

/* Footer (light footer variant) — high specificity: construction-refresh.css
   paints the light footer with :not(.auto-footer--dark) rules that out-rank
   plain theme-dark selectors, so every text color here is !important-guarded. */
body.construction-front.theme-dark .auto-footer{
  background:#0B1117;border-top-color:var(--line);color:var(--text);
}
body.construction-front.theme-dark .auto-footer a{color:inherit}
body.construction-front.theme-dark .auto-footer a:hover{color:var(--brand-accent,#D4A017)}
body.construction-front.theme-dark .auto-footer .footer-about b,
body.construction-front.theme-dark .auto-footer .footer-contact b,
body.construction-front.theme-dark .auto-footer .footer-hours b{color:#F5C84C!important}
body.construction-front.theme-dark .auto-footer .footer-about h3{color:#F2F6FA!important}
body.construction-front.theme-dark .auto-footer .footer-about p,
body.construction-front.theme-dark .auto-footer .footer-contact p,
body.construction-front.theme-dark .auto-footer .footer-hours p,
body.construction-front.theme-dark .auto-footer .footer-idno{color:#C6D0DA!important}
body.construction-front.theme-dark .auto-footer .footer-brand strong{color:#fff!important}
body.construction-front.theme-dark .auto-footer .footer-brand small{color:#E8B923!important}
body.construction-front.theme-dark .auto-footer .footer-pages a{color:#D8DEE6!important}
body.construction-front.theme-dark .auto-footer .footer-pages a:hover{color:#fff!important}
body.construction-front.theme-dark .auto-footer .product-credit{color:rgba(233,238,244,.75)!important;border-top-color:rgba(255,255,255,.14)!important}
body.construction-front.theme-dark .auto-footer .product-credit a{color:#E9EEF4!important}

/* Forms */
body.construction-front.theme-dark .booking-band input,
body.construction-front.theme-dark .booking-band textarea,
body.construction-front.theme-dark .booking-band select{
  background:#0D1720;border-color:rgba(255,255,255,.18);color:#E9EEF4;
}
body.construction-front.theme-dark .booking-band input::placeholder,
body.construction-front.theme-dark .booking-band textarea::placeholder{color:#8494A3}
body.construction-front.theme-dark .contact-form input,
body.construction-front.theme-dark .contact-form textarea,
body.construction-front.theme-dark .contact-form select{background:#111C26;border-color:var(--line);color:var(--text)}

/* Alerts, notices, banners */
body.construction-front.theme-dark .front-alert{background:rgba(46,160,90,.16);color:#7CE0A6;border-bottom:1px solid rgba(46,160,90,.3)}
body.construction-front.theme-dark .front-alert.error{background:rgba(220,80,80,.16);color:#FFA3A3}
body.construction-front.theme-dark .pwa-install-banner{
  background:#111C26;color:#E9EEF4;border-color:var(--line);
  box-shadow:0 24px 60px rgba(0,0,0,.5);
}
body.construction-front.theme-dark .pwa-install-close{background:#1B2833;color:#E9EEF4}
body.construction-front.theme-dark .pwa-install-close:hover{background:#24333F}

/* Partner cards: names/description readable on dark tiles */
body.construction-front.theme-dark .partner-card b{color:#F2F6FA!important}
body.construction-front.theme-dark .partner-card p{color:#C6D0DA!important}

/* Work card badges */
body.construction-front.theme-dark .work-photos-badge{
  background:rgba(8,14,20,.82);color:#fff;border-color:rgba(255,255,255,.14);
}

/* Share buttons */
body.construction-front.theme-dark .share-buttons{border-top-color:var(--line)}
body.construction-front.theme-dark .share-buttons__label{color:var(--muted)}
body.construction-front.theme-dark .share-btn{background:#16222D;border-color:var(--line);color:#D7DEE6}
body.construction-front.theme-dark .share-btn:hover{border-color:var(--brand-primary);color:#fff}

/* Floating contacts & back-to-top keep their dark accents; ensure readable labels */
body.construction-front.theme-dark .back-to-top{background:#16222D;color:#E9EEF4;border-color:var(--line)}

/* Header stays dark in both themes; keep nav/social readable (no change needed).
   Mobile action bar already dark. Cookie consent banner is inline-styled and
   stays light glass — acceptable in dark theme (overlay on top of content). */

@media(max-width:900px){
  .construction-front .theme-toggle{width:32px;height:32px}
}


/* Footer company name: refresh.css paints it dark for the light footer */
body.construction-front.theme-dark .auto-footer .footer-company-name{color:#E9EEF4!important}
