/*
Theme Name:   Attesta Service Child
Theme URI:    https://www.attestaservice.com
Description:  Дочірня тема Twenty Twenty-Five для лендінгу AttestaService. Палітра та Inter з брифу, усі секції на стандартних блоках, власна форма заявки.
Author:       Kateryna Koval — Koval Design Studio
Template:     twentytwentyfive
Version:      0.5.0
Requires at least: 6.7
Text Domain:  attesta-child
License:      GPL-2.0-or-later
*/

/* Більшість стилів — у theme.json. Тут — те, чого theme.json не вміє. */

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

/* ---------- Типографіка ---------- */
body { font-size: 16px; line-height: 1.6; }
h1.wp-block-heading { font-size: clamp(34px, 1.3rem + 3.4vw, 56px); line-height: 1.1; letter-spacing: -0.02em; }
h2.wp-block-heading { font-size: clamp(28px, 1.2rem + 2.2vw, 40px); line-height: 1.15; letter-spacing: -0.015em; }
h3.wp-block-heading { font-size: clamp(18px, 1rem + 0.3vw, 20px); line-height: 1.3; font-weight: 700; letter-spacing: 0; }
.has-large-font-size { line-height: 1.6; }
.is-layout-grid > .wp-block-group p:not([class*="-font-size"]) { font-size: 15px; line-height: 1.6; }
.wp-block-heading + .has-large-font-size { max-width: 62ch; }
.has-text-align-center.has-large-font-size { margin-inline: auto; }

/* Видимий фокус */
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--wp--preset--color--gold);
  outline-offset: 2px;
}

/* Секції йдуть впритул, без смужок фону між ними */
.wp-site-blocks > *,
.wp-block-post-content > .alignfull,
.wp-block-post-content > .wp-block-group.alignfull { margin-block-start: 0 !important; margin-block-end: 0 !important; }
main.wp-block-group { margin-block: 0 !important; }

/* ---------- Хедер ---------- */
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > .wp-block-template-part:first-child { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part,
.admin-bar .wp-site-blocks > .wp-block-template-part:first-child { top: var(--wp-admin--admin-bar--height, 32px); }
.attesta-header { margin: 0 !important; }
.attesta-header > * { margin-block: 0 !important; }
.attesta-header-main { border-bottom: 1px solid var(--wp--preset--color--gray-100); }
.attesta-topbar .is-layout-flex { align-items: center; }

.attesta-legal-links { margin: 0; }
.attesta-legal-links a { color: var(--wp--preset--color--muted-on-dark); text-decoration: none; margin-right: 20px; }
.attesta-legal-links a:hover { color: var(--wp--preset--color--white); }

/* Перемикач мов: активна мова — золота «пігулка» */
.attesta-lang { gap: 4px !important; }
.attesta-lang .wp-block-button__link {
  background: transparent; color: var(--wp--preset--color--muted-on-dark);
  font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 6px;
  border: 1px solid transparent; min-height: 28px;
}
.attesta-lang .wp-block-button__link:hover { color: var(--wp--preset--color--white); border-color: rgba(255,255,255,.35); }
.attesta-lang .is-active .wp-block-button__link {
  background: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy-900);
}

/* Лого + назва + DNES IT Solutions */
.attesta-brand { align-items: center; }
.attesta-logo { margin: 0; }
.attesta-logo img { width: 44px; height: auto; display: block; }
.attesta-brand-name { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.attesta-brand-name a { color: inherit; text-decoration: none; }
.attesta-brand-sub { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: 0.04em; line-height: 1.3; }

.attesta-nav { font-size: 15px; font-weight: 500; gap: 28px; }
.attesta-nav a { color: var(--wp--preset--color--ink); text-decoration: none; }
.attesta-nav a:hover { color: var(--wp--preset--color--navy-700); }
.attesta-header-cta .wp-block-button__link { padding: 12px 22px; }

/* ---------- Темні секції ---------- */
:is(.has-navy-900-background-color, .has-navy-700-background-color, .has-ink-background-color) a:where(:not(.wp-element-button)) {
  color: var(--wp--preset--color--muted-on-dark);
}
:is(.has-navy-900-background-color, .has-navy-700-background-color, .has-ink-background-color) a:where(:not(.wp-element-button)):hover {
  color: var(--wp--preset--color--white);
}
:is(.has-navy-900-background-color, .has-navy-700-background-color) .is-style-outline > .wp-block-button__link {
  color: var(--wp--preset--color--white); border-color: var(--wp--preset--color--white); background: transparent;
}

/* ---------- Hero ---------- */
.attesta-badge {
  display: inline-block; width: fit-content; margin: 0;
  border: 1px solid var(--wp--preset--color--gold); border-radius: 999px;
  padding: 6px 14px; line-height: 1.3;
}
.attesta-hero__copy > * { margin: 0; }
.wp-block-group.is-layout-grid > .attesta-hero__media { align-self: center; height: auto !important; }
.attesta-hero__img { margin: 0; }
.attesta-hero__img img { display: block; width: 100%; height: auto; border-radius: 10px; }

/* ---------- Картки ---------- */
.wp-block-group.is-layout-grid > .wp-block-group { height: 100%; box-sizing: border-box; }
.wp-block-group.is-layout-grid > .wp-block-group > * { margin-block: 0; }
.attesta-soon { margin: 0; line-height: 1.4; white-space: nowrap; }

/* ---------- Скриншоти ---------- */
.attesta-shot { margin: 0; }
.attesta-shot img {
  display: block; width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--wp--preset--color--gray-100);
  box-shadow: 0 12px 32px rgba(7, 29, 56, .08);
}

/* ---------- Тарифи ---------- */
.attesta-plan.is-featured { border-width: 2px !important; }
.attesta-plan__head { align-items: center; }
.attesta-plan__head > * { margin: 0; }
.attesta-plan p.attesta-price { margin: 0; font-size: clamp(30px, 1.4rem + 1vw, 36px) !important; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.attesta-plan p.attesta-price .attesta-price__period { font-size: 15px !important; font-weight: 500; }
.attesta-plan ul.wp-block-list { margin: 0; padding-left: 20px; }
.attesta-plan ul.wp-block-list li + li { margin-top: 6px; }
.attesta-plan > .wp-block-buttons:last-child { margin-top: auto !important; width: 100%; padding-top: 8px; }
.attesta-plan > .wp-block-buttons > .wp-block-button { flex: 1 1 100%; width: 100%; }
.attesta-plan > .wp-block-buttons .wp-block-button__link { width: 100%; box-sizing: border-box; text-align: center; }

/* ---------- FAQ ---------- */
.attesta-faq__item > summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px; font-weight: 600; font-size: 17px; line-height: 1.4;
  color: var(--wp--preset--color--navy-900);
}
.attesta-faq__item > summary::-webkit-details-marker { display: none; }
.attesta-faq__item > summary::after { content: "+"; font-size: 22px; line-height: 1; flex: none; }
.attesta-faq__item[open] > summary::after { content: "−"; }
.attesta-faq__item > summary + * { margin-top: 12px; }

/* ---------- Форма ---------- */
.attesta-form { color: var(--wp--preset--color--ink); }
.attesta-form p { margin: 0; }
.attesta-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.attesta-form__field { display: flex; flex-direction: column; gap: 6px; }
.attesta-form__field--full { grid-column: 1 / -1; }
.attesta-form label { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--navy-900); }
.attesta-form input[type="text"], .attesta-form input[type="email"], .attesta-form select, .attesta-form textarea {
  font: inherit; font-size: 16px; color: var(--wp--preset--color--ink);
  padding: 12px 14px; min-height: 46px; box-sizing: border-box; width: 100%;
  border: 1px solid #C9D1DB; border-radius: 8px; background: var(--wp--preset--color--white);
}
.attesta-form textarea { resize: vertical; }
.attesta-form :is(input, select, textarea):focus { border-color: var(--wp--preset--color--navy-700); outline: 2px solid rgba(18,52,90,.18); outline-offset: 0; }
.attesta-form__consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px !important; }
.attesta-form__consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--wp--preset--color--navy-700); }
.attesta-form__consent label { font-weight: 400; font-size: 13px; color: var(--wp--preset--color--gray-500); line-height: 1.5; }
.attesta-form__consent a { color: var(--wp--preset--color--navy-700) !important; }
.attesta-form__submit { margin-top: 20px !important; }
.attesta-form__submit button { width: 100%; cursor: pointer; border: 0; }
.attesta-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.attesta-form__notice { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px !important; font-size: 14px; }
.attesta-form__notice.is-success { background: #E6F4EA; color: #1E5E33; }
.attesta-form__notice.is-error { background: #FDECEA; color: #8A1C12; }

/* ---------- Футер ---------- */
.attesta-footer .attesta-logo img { width: 36px; }
.attesta-footer .attesta-brand-name { font-size: 18px; }
.attesta-footer p { margin: 0; line-height: 1.7; }
.attesta-footer-title { font-weight: 700; }
.attesta-dnes-logo { margin: 0; }
.attesta-dnes-logo img { width: 120px; height: auto; display: block; }
.attesta-copy { border-top: 1px solid #3A424B; padding-top: 20px; margin-top: 40px !important; max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto !important; }

/* ---------- Адаптив ---------- */
@media (min-width: 600px) and (max-width: 1100px) {
  /* без «сиріт» в останньому рядку сітки */
  .attesta-problems { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .attesta-steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .attesta-pricing { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 16px !important; }
  .attesta-pricing .attesta-plan { padding: 24px !important; }
  .attesta-mainbar .attesta-nav { order: 3; flex-basis: 100%; justify-content: center; }
  .attesta-mainbar .attesta-nav .wp-block-navigation__container { justify-content: center; row-gap: 8px; }
}

@media (max-width: 781px) {
  .attesta-form__grid { grid-template-columns: 1fr; }
}

@media (max-width: 599px) {
  :root { --wp--preset--spacing--40: 16px; }
  .attesta-topbar .is-layout-flex { justify-content: center !important; row-gap: 4px; }
  .attesta-legal-links { font-size: 12px !important; text-align: center; width: 100%; }
  .attesta-legal-links a { margin: 0 6px; display: inline-block; padding: 4px 0; }
  .attesta-header-cta { display: none !important; }
  .attesta-brand-name { font-size: 18px; }
  .attesta-logo img { width: 38px; }

  .attesta-hero-ctas { width: 100%; }
  .attesta-hero-ctas > .wp-block-button { flex: 1 1 100%; }
  .attesta-hero-ctas .wp-block-button__link { width: 100%; box-sizing: border-box; }

  .is-layout-grid { gap: 12px !important; }
  .is-layout-grid > .wp-block-group[style*="padding"] { padding: 20px !important; }
  .attesta-plan { padding: 24px !important; }
  .attesta-steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .attesta-faq__item { padding: 16px 18px !important; }
  .attesta-faq__item > summary { font-size: 16px; }
  .attesta-copy { margin-top: 28px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
