/* Conversion UI — added 2026-11-02 (see CHANGELOG.md). Remove the <link> to this file in header.inc.html to revert. */

/* ---- Hero: big phone + hours + call button ---- */
#slide .hero-phone { margin: 25px 0 0; }
#slide .hero-phone a { color: #fff; font-size: 30px; font-weight: bold; text-decoration: none; white-space: nowrap; }
#slide .hero-phone a:hover { color: #fdc140; }
#slide .hero-hours { display: block; color: #fcbe3e; font-size: 16px; margin-top: 4px; }
#slide .hero-cta { margin-top: 25px; }
#slide .hero-cta .link { margin: 0 10px 10px 0; }
/* 2026-11-19 step 3: darker green (white text >= 5:1, was 2.4-2.6:1), #c2410c outline CTA (5.2:1, was 3.1:1), neutral shadows instead of glows */
.link.call-btn { background: linear-gradient(to right, #146c43, #1a7f4b); }
.link.call-btn, .link.call-btn:hover, .link.call-btn:focus { color: #fff; }
.link.call-btn:hover { background: #146c43; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3); }
.link.link-alt { background: #fff; color: #c2410c; box-shadow: inset 0 0 0 2px #c2410c; }
.link.link-alt:hover, .link.link-alt:focus { background: #c2410c; color: #fff; box-shadow: inset 0 0 0 2px #c2410c, 0 8px 22px rgba(0, 0, 0, 0.3); }

/* ---- Compact phone in the dark mobile header ---- */
#header a.hdr-phone { float: right; color: #fff; font-weight: bold; font-size: 16px; text-decoration: none;
  margin: 17px 12px 0 0; padding: 3px 0 3px 24px; background: url(/img/phone.png) 0 50% no-repeat; background-size: 16px auto; }
/* 2026-11-19 step 2: 44px tall tap target, same visual centre as before (17px + 28px/2 = 9px + 44px/2) */
#header a.hdr-phone { min-height: 44px; line-height: 44px; margin-top: 9px; padding-top: 0; padding-bottom: 0; }

/* ---- Lead form ---- */
.lead-form .lead-note { color: #157347; font-weight: 600; margin: -5px 0 15px; }
.lead-form .lead-error { color: #c00; background: #fff0f0; border-left: 3px solid #c00; padding: 8px 12px; font-weight: 600; }
.lead-form input[type=tel] { padding: 15px; border: solid 1px #ddd; font-family: inherit; background-color: #f3f3f3; width: 100%; }
.lead-form input[type=tel]:focus { background-color: #fff; border: solid 1px #c3703e; outline: 0; }
.lead-form input.lead-bad { border-color: #c00 !important; background: #fff0f0 !important; }
.lead-form input[type=submit][disabled] { opacity: 0.7; }
.lead-form .lead-or { text-align: center; margin: 15px 0 0; font-size: 15px; }
.lead-form .lead-or a { color: #c2410c; font-weight: bold; white-space: nowrap; }
.lead-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---- Success screen (full screen, can't be missed) ---- */
.lead-ok { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10000; background: rgba(17, 17, 17, 0.85);
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.lead-ok-card { background: #fff; border-radius: 10px; border-top: 6px solid #38c172; max-width: 480px; width: 100%;
  padding: 30px 24px; text-align: center; max-height: 100%; overflow: auto; }
.lead-ok-icon { width: 72px; height: 72px; line-height: 72px; margin: 0 auto 10px; border-radius: 50%; background: #38c172;
  color: #fff; font-size: 40px; font-weight: bold; }
.lead-ok h2 { font-size: 28px !important; margin: 10px 0; padding: 0 !important; color: #333; }
.lead-ok .link { display: inline-block; padding: 18px 28px; font-size: 18px; }
.lead-ok-close { background: none; border: 0; color: #595959; text-decoration: underline; font-size: 15px; padding: 8px; }

/* ---- Ramp landing ---- */
.ramp-landing { margin-bottom: 20px; }
.ramp-landing .ramp-lead { font-size: 19px; line-height: 1.5; max-width: 820px; }
.ramp-landing .ramp-cta { margin: 25px 0 10px; }
#gallery .ramp-landing .ramp-cta .link { display: inline-block; margin: 0 10px 10px 0; padding: 20px 34px; }
.ramp-landing .ramp-cta-note { color: #666; font-size: 15px; }
.ramp-landing .ramp-price { font-size: 22px; font-weight: bold; color: #c2410c; }
.ramp-landing h2 { font-size: 28px; margin-top: 30px; }
.ramp-list { list-style: none; padding: 0; margin: 0; }
#content .ramp-list li { padding: 8px 0 8px 26px; font-size: 18px; border-bottom: 1px solid #eee; background-position: 0 15px; }
.ramp-form-wrap { max-width: 520px; margin: 30px 0 10px; }
.ramp-form-wrap .lead-form { padding: 30px 30px 25px; background: #fff; box-shadow: 0 5px 35px rgba(0, 0, 0, 0.15); border-radius: 5px; }
.ramp-form-wrap .lead-form h3 { margin-top: 0; }

/* ---- Fixed bottom bar on phones ---- */
.mob-bar { display: none; }
@media (max-width: 768px) {
  body { padding-bottom: 72px; }
  .mob-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; height: 64px;
    padding: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); height: auto;
    background: #111; box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.3); }
  .mob-bar a { flex: 1; display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 30px;
    color: #fff; font-weight: bold; font-size: 17px; text-decoration: none; text-transform: uppercase; }
  .mob-bar .mob-bar-call { flex: 1.6; background: linear-gradient(to right, #146c43, #1a7f4b); }
  .mob-bar .mob-bar-viber { background: #6a55e8; margin-left: 6px; font-size: 15px; }
  .mob-bar .mob-bar-tg { background: #1c78a8; margin-left: 6px; font-size: 15px; }
  .mob-bar a:hover, .mob-bar a:focus { color: #fff; }
}

@media (max-width: 767px) {
  #slide:not(.short) { height: auto; min-height: 500px; padding-bottom: 30px; }
  #slide .hero-phone a { font-size: 26px; }
  #slide .hero-cta .link { display: block; text-align: center; padding: 18px 20px; margin: 0 0 12px 0; }
  .ramp-landing h1 { font-size: 26px !important; padding-bottom: 10px; }
  .ramp-landing .ramp-lead { font-size: 17px; }
  #gallery .ramp-landing .ramp-cta .link { display: block; text-align: center; margin: 0 0 12px 0; padding: 18px 20px; }
  .ramp-landing h2 { font-size: 24px !important; padding-bottom: 5px; }
  .ramp-form-wrap .lead-form { padding: 20px 16px; }
}

/* Messenger links in the contacts block */
#contacts .messengers { clear: both; margin: 5px 0 15px; padding-top: 5px; }
#contacts .messengers a { display: inline-block; color: #fff; font-weight: bold; text-decoration: none; padding: 8px 18px; border-radius: 30px; margin: 0 8px 8px 0; }
#contacts .messengers .msg-viber { background: #6a55e8; }
#contacts .messengers .msg-tg { background: #1c78a8; }
/* step 3: hover darkens instead of fading (opacity .85 dropped white text below 4.5:1) */
#contacts .messengers a:hover, #contacts .messengers a:focus { color: #fff; }
#contacts .messengers .msg-viber:hover { background: #5641d4; }
#contacts .messengers .msg-tg:hover { background: #155f86; }

/* "Безкоштовний замір" badge next to call buttons (hero + ramp page) */
.free-measure { display: inline-block; vertical-align: middle; margin: 0 14px 10px 0; padding: 8px 16px; border-radius: 30px;
  font-weight: bold; font-size: 16px; white-space: nowrap; background: #e8f7ee; color: #1f7a45; border: 2px solid #38c172; }
#slide .free-measure { background: rgba(56, 193, 114, 0.18); color: #fff; }
@media (max-width: 767px) {
  .free-measure { display: block; text-align: center; margin: -4px 0 12px 0; }
}

/* ---- Homepage service strip, ramps first (added 2026-11-19, step 1 layout; markup at the top of #gallery in main.html) ---- */
.svc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: -10px 0 40px; position: relative; z-index: 2; }
.svc a { text-decoration: none; }
.svc a:focus { outline: none; }
.svc a:focus-visible { outline: 3px solid #e0561a; outline-offset: 3px; }
.svc-main { display: flex; flex-direction: column; background: #1b1714; color: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22); }
.svc-main:hover, .svc-main:focus { color: #fff; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38); }
.svc-main-img { display: block; width: 100%; height: 190px; object-fit: cover; }
.svc-main-body { display: flex; flex-direction: column; align-items: flex-start; padding: 18px 20px 20px; }
.svc-main-title { font-size: 26px; font-weight: 800; line-height: 1.1; margin-bottom: 10px; text-wrap: balance; }
.svc-main-text { color: #ddd5cd; font-size: 16px; line-height: 1.45; max-width: 34em; }
.svc-main-text + .svc-main-text { margin-top: 6px; }
.svc-more { display: inline-flex; align-items: center; margin-top: 16px; color: #fdc140; font-weight: bold; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.03em; }
.svc-more svg { margin-left: 8px; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.svc-main:hover .svc-more svg { transform: translateX(4px); }
.svc-list { list-style: none; margin: 0; padding: 4px 16px; background: #fff; border-radius: 10px; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1); }
#content .svc-list li { display: flex; align-items: center; margin: 0; padding: 8px 0; background: none; border-top: 1px solid #eee; }
#content .svc-list li:first-child { border-top: 0; }
.svc-list img { flex: none; width: 56px; height: 56px; object-fit: contain; margin-right: 14px; }
.svc-links { display: flex; flex-wrap: wrap; align-items: center; }
.svc-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; color: #222; font-weight: bold; font-size: 17px;
  text-transform: uppercase; text-decoration: underline; text-decoration-color: rgba(224, 86, 26, 0.45); text-decoration-thickness: 2px;
  text-underline-offset: 6px; }
.svc-links a:hover { color: #a5430f; text-decoration: underline; text-decoration-color: #e0561a; }
.svc-sep { color: #8f8780; padding: 0 8px; }
.svc-nw { white-space: nowrap; }
@media (min-width: 768px) {
  .svc { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
  .svc-main-img { height: 220px; }
  .svc-list { display: flex; flex-direction: column; justify-content: center; }
  #content .svc-list li { padding: 12px 0; }
  .svc-list img { width: 48px; height: 48px; margin-right: 12px; }
}
@media (min-width: 992px) {
  .svc { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
  .svc-list img { width: 64px; height: 64px; margin-right: 14px; }
  /* Pull the strip up into the empty bottom of the 900px desktop hero, so ramps show in the first screen. */
  .svc { margin-top: -260px; margin-bottom: 50px; }
  .svc-main { flex-direction: row; }
  .svc-main-img { width: 46%; height: auto; min-height: 270px; }
  .svc-main-body { flex: 1; justify-content: center; padding: 26px 28px; }
  .svc-main-title { font-size: 28px; }
}
@media (min-width: 1200px) {
  .svc-main-title { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-more svg { transition: none; }
  .svc-main:hover .svc-more svg { transform: none; }
}

/* ---- Phone fixes (added 2026-11-19, step 2 adapt; see CHANGELOG.md) ---- */

/* Catalog: equal-height cards per row, so a two-line name no longer leaves holes in the float grid */
#gallery .row { display: flex; flex-wrap: wrap; }
#gallery .row::before, #gallery .row::after { display: none; }
#gallery .row > [class*="col-"] { display: flex; }
#gallery a.photo { display: flex; flex-direction: column; width: 100%; }
#gallery a.photo img { flex-shrink: 0; }
/* Names come from the DB: size them to the card; only very long words (Металоконструкції) hyphenate */
#gallery a.photo .name { display: block; flex: 1 0 auto; padding: 0 8px; overflow-wrap: anywhere;
  -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 12 5 5; }
@media (max-width: 767px) {
  #gallery a.photo .name { padding-top: 10px; font-size: clamp(14px, 5.6vw - 3px, 20px); line-height: 1.25; }
  #gallery .link { margin-top: 12px; }
}
@media (min-width: 768px) and (max-width: 991px) { #gallery a.photo .name { font-size: 18px; } }
@media (min-width: 1200px) { #gallery a.photo .name { padding: 0 4px; } }

@media (max-width: 767px) {
  /* Benefits: "ІНДИВІДУАЛЬНИЙ" was wider than its half-width tile and pushed the whole page sideways */
  #benefits .item { padding: 40px 16px 24px; font-size: clamp(15px, 5.8vw - 4px, 20px); overflow-wrap: anywhere;
    -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 12 5 5; }

  /* Hero: show the craftsman from the same /img/slide.jpg (was cropped to the empty left edge);
     the left-to-right scrim keeps every hero text line at >= 5:1 */
  #slide:not(.short) {
    background-image: linear-gradient(90deg, rgba(18, 14, 12, 0.82) 0%, rgba(18, 14, 12, 0.6) 55%, rgba(18, 14, 12, 0.35) 100%), url(/img/slide.jpg);
    background-position: 0 0, 55% 0; background-size: cover; background-repeat: no-repeat;
  }
}

/* Hero value line: phones only, the desktop hero is unchanged */
#slide .hero-value { display: none; }
@media (max-width: 768px) {
  /* The fixed #mob-bar already has "Подзвонити"; the hero keeps its phone number link (click_location: hero) */
  #slide .hero-cta .link.call-btn { display: none !important; }
  #slide .hero-value { display: block; margin: 14px 0 0; color: #fff; font-size: clamp(15px, 4.4vw, 17px); font-weight: 600;
    line-height: 1.35; text-wrap: balance; }
}

/* Hamburger: 44x44 hit area around the 42x32 button, without changing how it looks (grows left: .navbar clips the right edge) */
#header .navbar-toggle::after { content: ""; position: absolute; top: -6px; right: 0; bottom: -6px; left: -2px; }

/* ---- Contrast and keyboard focus (added 2026-11-19, step 3 harden; see CHANGELOG.md) ---- */

/* Keyboard focus: defaults.css removes every outline. One forge-orange ring site-wide (>=3.4:1 on white/#f3f3f3,
   >=4.1:1 on charcoal/#111/#23232b); amber on the dark header, hero and phone bar (>=10:1). Mouse clicks show no ring. */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid #e0561a !important; outline-offset: 3px !important; }
/* site.css animates `all` on links/inputs for .5s; let the ring appear at once */
:focus-visible { transition-property: color, background-color, border-color, box-shadow, opacity, transform; }
/* Filled buttons on light sections: ink ring (an orange ring blends into the orange button) */
.link:focus-visible, input[type=submit]:focus-visible { outline-color: #2b1600 !important; }
#header :focus-visible, #slide :focus-visible, .mob-bar :focus-visible { outline-color: #fdc140 !important; }
.lead-form input:not([type=submit]):focus-visible, .lead-form textarea:focus-visible { outline-offset: 1px !important; }

/* Orange->amber CTAs (.link, catalog "Детальніше", form submit): same gradient, dark ink instead of white
   (white was 1.8-3.1:1; #2b1600 is 5.6:1 at the orange end, 10.6:1 at the amber end). Neutral elevation, no glow. */
.link, input[type=submit] { color: #2b1600; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.link:hover, .link:focus, input[type=submit]:hover, input[type=submit]:focus { color: #2b1600; text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3); }
/* Hamburger bars sit on the same gradient */
#header .navbar-toggle .icon-bar { background-color: #2b1600; }

/* Lead form placeholders: #666 on #f3f3f3 is 5.2:1 (#757575 was 4.2:1); opacity for Firefox */
.lead-form input::placeholder, .lead-form textarea::placeholder { color: #666; opacity: 1; }

/* ---- Distill (added 2026-11-19, step 4; see CHANGELOG.md) ---- */

/* Hero: "Безкоштовний замір" is reassurance text beside the one CTA, no longer a button-shaped pill */
#slide .hero-cta .link { vertical-align: middle; }
#slide .free-measure { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; margin: 0 0 10px 8px; padding: 0;
  background: none; border: 0; border-radius: 0; color: #fff; font-size: 17px; font-weight: 600; white-space: nowrap; }
#slide .free-measure svg { flex: none; color: #fdc140; }
@media (max-width: 767px) {
  #slide .free-measure { display: flex; justify-content: center; margin: 0; font-size: 16px; }
}

/* Catalog: the whole tile is the link; a quiet "Детальніше" + arrow replaces 12 orange buttons
   (#c2410c on #fff 5.2:1, hover #a5430f 6.9:1). The hero CTA and form submit stay the only orange buttons. */
#gallery a.photo .cat-more { display: inline-flex; align-items: center; align-self: center; gap: 6px; margin: 8px 0 18px; padding: 4px 2px;
  color: #c2410c; font-size: 15px; font-weight: bold; letter-spacing: 0.03em; line-height: 1.2; text-transform: uppercase; }
#gallery a.photo .cat-more svg { flex: none; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
#gallery a.photo:hover .cat-more, #gallery a.photo:focus-visible .cat-more { color: #a5430f; }
#gallery a.photo:hover .cat-more svg, #gallery a.photo:focus-visible .cat-more svg { transform: translateX(4px); }
#gallery a.photo:hover, #gallery a.photo:focus { text-decoration: none; }
@media (max-width: 767px) {
  #gallery a.photo .cat-more { font-size: 13px; margin: 6px 0 14px; }
}

/* Lead form right after the catalog (homepage, #home-form). Same contacts.html as the Контакти block. */
.lead-band { max-width: 980px; margin: 0 auto; }
.lead-band .lead-form { padding: 22px 18px 20px; background: #fff; border-radius: 10px; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1); }
.lead-band .lead-form h3 { margin: 0 0 10px; font-size: 24px; text-transform: none; }
.lead-band .lead-form .lead-note { margin: 0 0 14px; }
.lead-band .lead-form p { margin: 0 0 12px; }
.lead-band .lead-form textarea { display: block; height: 96px; resize: vertical; }
.lead-band .lead-form .lead-submit { margin: 4px 0 0; }
.lead-band .lead-form input[type=submit] { margin: 0; width: 100%; padding: 22px 30px; }
.lead-band .lead-form .lead-or { margin: 14px 0 0; }
@media (min-width: 768px) {
  .lead-band .lead-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    grid-template-areas: "head body" "or body"; grid-template-rows: auto 1fr; column-gap: 40px; padding: 32px 36px; }
  .lead-band .lead-head { grid-area: head; }
  .lead-band .lead-body { grid-area: body; }
  .lead-band .lead-form .lead-or { grid-area: or; align-self: end; margin: 0; text-align: left; }
  .lead-band .lead-form h3 { font-size: 30px; }
  .lead-band .lead-form input[type=submit] { width: auto; padding: 22px 44px; }
  .lead-band .lead-form .lead-submit { text-align: left; }
}
@media (min-width: 992px) {
  .lead-band .lead-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; }
  .lead-band .lead-f-msg, .lead-band .lead-submit { grid-column: 1 / -1; }
}

/* SEO article: intro stays visible, the rest folds into a disclosure (all text stays in the HTML); lines capped near 70ch */
#page .seo-text, #page .seo-more { max-width: 70ch; }
#page .seo-text > :last-child { margin-bottom: 0; }
#page .seo-more { margin-top: 18px; border-top: 1px solid #e6ddd3; border-bottom: 1px solid #e6ddd3; }
#page .seo-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px;
  padding: 10px 0; cursor: pointer; list-style: none; }
#page .seo-more > summary::-webkit-details-marker { display: none; }
#page .seo-more > summary h2 { margin: 0 !important; padding: 0 !important; font-size: clamp(20px, 4.6vw, 26px) !important; line-height: 1.2;
  text-align: left; transition: color 0.2s ease-out; }
#page .seo-more > summary::after { content: ""; flex: none; width: 11px; height: 11px; margin: 0 6px 5px 0;
  border-right: 3px solid #c2410c; border-bottom: 3px solid #c2410c; transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
#page .seo-more[open] > summary::after { transform: translateY(5px) rotate(-135deg); }
#page .seo-more > summary:hover h2 { color: #a5430f; }
#page .seo-more > .seo-text { padding: 6px 0 22px; }
@media (prefers-reduced-motion: reduce) {
  #gallery a.photo .cat-more svg, #page .seo-more > summary::after { transition: none; }
  #gallery a.photo:hover .cat-more svg, #gallery a.photo:focus-visible .cat-more svg { transform: none; }
}
