/* =============================================================================
   /assets/css/page-system.css
   Єдина дизайн-система статичних сторінок NovaMax.Tech.

   Заміняє: aboutus_style.css, services_style.css,
            support_style.css, contact_style.css   (усі 4 можна видалити)

   Правила скоуповані в .pg (<main id="main" class="pg">), токени — теж.
   Це виключає протікання стилів у header / footer / catalog-menu
   і конфлікти з токенами styles.css.
   ========================================================================== */

/* ------------------------------------------------------------------ 1. Shell */

body.page {
  background: #f6fbfa;
  color: #0f172a;
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 20px;
  background: #0f172a;
  color: #fff;
  border-radius: 0 0 12px 0;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* ----------------------------------------------------------------- 2. Tokens */

.pg {
  /* колір */
  --accent: #00c3ff;
  --dark: #0f172a;
  --dark-2: #111827;
  --surface: #fff;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-soft: #cbd5e1;
  --text-on-dark: #e2e8f0;
  --num: #cbd5e1;
  --glass: rgba(255, 255, 255, .05);
  --hairline: rgba(255, 255, 255, .08);

  /* геометрія */
  --max: 1200px;
  --gap: 24px;
  --pad-section: clamp(56px, 7vw, 88px);
  --pad-card: clamp(24px, 3vw, 32px);
  --radius: 22px;
  --radius-sm: 12px;

  /* глибина */
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, .05);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, .06);
  --shadow-accent: 0 16px 35px rgba(0, 195, 255, .25);
  --ring: 0 0 0 3px rgba(0, 195, 255, .5);

  /* рух */
  --ease: .25s cubic-bezier(.4, 0, .2, 1);

  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ------------------------------------------------- 3. Локальний reset (:where
   = нульова специфічність, легко перекрити будь-яким класом) --------------- */

.pg :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote) {
  margin: 0;
}

.pg :where(img, iframe) {
  max-width: 100%;
  display: block;
}

.pg :where(*, *::before, *::after) {
  box-sizing: border-box;
}

/* ------------------------------------------------------------- 4. Типографія */

.pg :is(h1, h2, h3) {
  line-height: 1.15;
  text-wrap: balance;
}

.pg h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.pg h2 {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 20px;
}

.pg h3 {
  font-size: clamp(20px, 2.2vw, 24px);
  margin-bottom: 12px;
}

.pg p {
  color: var(--text-muted);
  margin-bottom: 16px;
  text-wrap: pretty;
}

.pg p:last-child {
  margin-bottom: 0;
}

.pg .lead {
  max-width: 760px;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--text-dim);
  margin-bottom: 40px;
}

.pg .u-center .lead,
.pg .lead.u-center {
  margin-inline: auto;
}

/* ----------------------------------------------------------------- 5. Layout */

.pg .container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}

.pg section {
  padding-block: var(--pad-section);
}

.pg .section--dark {
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
  color: #fff;
}

.pg .section--dark :is(h2, h3) {
  color: #fff;
}

.pg .section--dark :is(p, .lead) {
  color: var(--text-soft);
}

/* Один грід замість .grid-2/.grid-3/.grid-4/.cards3/.cards4/.process/.grid2/3/4.
   auto-fit + minmax дає плавні 1→2→3→4 колонки без медіазапитів
   і коректно розкладає «неповні» ряди (напр. 7 карток у 3 колонках). */
.pg .grid {
  display: grid;
  gap: var(--gap);
}

/* Семантичні <ul>/<ol> у ролі гріда — без маркерів та відступу браузера. */
.pg :is(ul, ol).grid {
  padding: 0;
  list-style: none;
}

.pg .grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); }
.pg .grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pg .grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); }

/* Текст + декоративний блок */
.pg .grid--split {
  display: grid;
  gap: clamp(24px, 3vw, 34px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  align-items: center;
}

/* ------------------------------------------------------------------- 6. Hero */

.pg .hero {
  padding-block: clamp(96px, 14vw, 170px);
  color: #fff;
  background:
    linear-gradient(rgba(15, 23, 42, .76), rgba(15, 23, 42, .84)),
    url('/assets/images/solar-power-plant-01.webp') center / cover no-repeat;
}

.pg .hero h1 {
  max-width: 940px;
  margin-bottom: 18px;
}

.pg .hero p {
  max-width: 780px;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-on-dark);
  margin-bottom: 28px;
}

/* ---------------------------------------------------------------- 7. Кнопки */

.pg .btn {
  display: inline-block;
  padding: 16px 30px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-accent);
  transition: transform var(--ease), box-shadow var(--ease);
}

.pg .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 195, 255, .32);
}

.pg .btn:active {
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------- 8. Картки
   Один базовий .card замінює .card / .feature / .service / .check / .faq-item.
   На темній секції автоматично перемикається у «скляний» вигляд. ---------- */

.pg .card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: var(--pad-card);
  box-shadow: var(--shadow-md);
}

.pg .section--dark .card {
  background: var(--glass);
  border-color: var(--hairline);
  box-shadow: none;
  color: #fff;
}

.pg .card :is(h2, h3):last-child {
  margin-bottom: 0;
}

.pg .card--flat {
  box-shadow: var(--shadow-sm);
}

.pg .card--center {
  text-align: center;
}

.pg .card--check {
  font-weight: 600;
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.pg .card__icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 14px;
}

/* Метрика (aboutus) */
.pg .metric__value {
  display: block;
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
  line-height: 1;
}

/* Крок процесу */
.pg .step__num {
  display: block;
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 800;
  color: var(--num);
  line-height: 1;
  margin-bottom: 10px;
}

/* --------------------------------------------------- 9. Декоративний візуал */

.pg .visual {
  min-height: clamp(300px, 40vw, 460px);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
}

.pg .visual::before,
.pg .visual::after {
  content: "";
  position: absolute;
}

.pg .visual::before {
  inset: -100px;
  background: radial-gradient(circle, rgba(0, 195, 255, .32), transparent 55%);
}

.pg .visual::after {
  inset: 0;
  background: url('/assets/images/hero_01.png') center / contain no-repeat;
  opacity: .32;
}

/* ---------------------------------------------------------------- 10. Мапа */

.pg .map {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 7;      /* фіксує висоту до завантаження → без CLS */
  background: var(--glass);
}

.pg .map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .pg .map {
    aspect-ratio: 4 / 3;
  }
}

/* ----------------------------------------------------------------- 11. CTA */

.pg .cta {
  text-align: center;
}

.pg .cta p {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 26px;
}

/* --------------------------------------------- 12. Статус форми (contact.php)
   Класи ставить /assets/js/send-contact-form.js.
   Якщо ці правила вже є в contact-form.css — блок можна прибрати. -------- */

.pg .form-status {
  margin-top: 15px;
  font-weight: 600;
}

.pg .form-status.success { color: #22c55e; }
.pg .form-status.error   { color: #ef4444; }
.pg .form-status.loading { color: var(--accent); }

/* ----------------------------------------------------------- 13. Утиліти */

.pg .u-center { text-align: center; }

.pg .u-small {
  color: var(--text-dim);
  font-size: 15px;
}

/* Заголовок для скрінрідера / структури документа, невидимий на екрані. */
.pg .u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.pg .section--dark .u-small { color: var(--text-soft); }

/* --------------------------------------------------- 14. Фокус і доступність
   Був відсутній у всіх 4 файлах — керування з клавіатури було невидиме. --- */

.pg :is(a, button, [tabindex]):focus-visible,
.skip-link:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .pg *,
  .pg *::before,
  .pg *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }

  .pg .btn:hover,
  .pg .btn:active {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* =============================================================================
   15. КОНТЕНТНІ КОМПОНЕНТИ
   Додано під розширений контент: хлібні крихти, довгий текст, таблиці,
   акордеон FAQ, блоки внутрішньої перелінковки, чек-листи.
   ========================================================================== */

/* --- Хлібні крихти -------------------------------------------------------- */

.pg .breadcrumbs {
  padding: 18px 0 0;
  font-size: 14px;
}

.pg .breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 0;
  list-style: none;
}

.pg .breadcrumbs li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--text-dim);
}

.pg .breadcrumbs a {
  color: var(--text-dim);
  text-decoration: none;
}

.pg .breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.pg .breadcrumbs [aria-current] {
  color: var(--text);
}

/* --- Надзаголовок --------------------------------------------------------- */

.pg .eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Довгий текст --------------------------------------------------------- */

.pg .prose {
  max-width: 100ch;
}

.pg .prose :is(h3, h4) {
  margin-top: 28px;
}

.pg .prose :is(ul, ol) {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-muted);
}

.pg .prose li + li {
  margin-top: 8px;
}

.pg .prose strong {
  color: var(--text);
}

.pg .section--dark .prose strong {
  color: #fff;
}

/* --- Чек-лист ------------------------------------------------------------- */

.pg .checklist {
  padding: 0;
  list-style: none;
  margin: 0 0 16px;
}

.pg .checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--text-muted);
}

.pg .checklist li + li {
  margin-top: 12px;
}

.pg .checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 16px;
  height: 9px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.pg .section--dark .checklist li {
  color: var(--text-soft);
}

/* --- Виноска / акцентний блок --------------------------------------------- */

.pg .callout {
  border-left: 4px solid var(--accent);
  background: rgba(0, 195, 255, .06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.pg .callout p:last-child {
  margin-bottom: 0;
}

.pg .section--dark .callout {
  background: var(--glass);
}

/* --- Таблиця -------------------------------------------------------------- */

.pg .table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

.pg .section--dark .table-wrap {
  background: var(--glass);
  border: 1px solid var(--hairline);
  box-shadow: none;
}

.pg table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}

.pg :is(th, td) {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 23, 42, .07);
}

.pg th {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.pg td {
  color: var(--text-muted);
}

.pg tbody tr:last-child :is(th, td) {
  border-bottom: 0;
}

.pg .section--dark :is(th, td) {
  border-bottom-color: var(--hairline);
}

.pg .section--dark th { color: #fff; }
.pg .section--dark td { color: var(--text-soft); }

/* --- FAQ-акордеон --------------------------------------------------------- */

.pg .faq {
  display: grid;
  gap: 12px;
}

.pg .faq__item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pg .faq__item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  list-style: none;
}

.pg .faq__item summary::-webkit-details-marker {
  display: none;
}

.pg .faq__item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
  color: var(--accent);
  transition: transform var(--ease);
}

.pg .faq__item[open] summary::after {
  transform: rotate(45deg);
}

.pg .faq__answer {
  padding: 0 24px 22px;
}

.pg .section--dark .faq__item {
  background: var(--glass);
  border: 1px solid var(--hairline);
  box-shadow: none;
}

.pg .section--dark .faq__item summary {
  color: #fff;
}

/* --- Блок внутрішньої перелінковки ---------------------------------------- */

.pg .linkcard {
  display: block;
  padding: 22px 24px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: transform var(--ease), border-color var(--ease);
}

.pg .linkcard:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 195, 255, .4);
}

.pg .linkcard strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  color: var(--text);
}

.pg .linkcard span {
  font-size: 15px;
  color: var(--text-dim);
}

.pg .linkcard::after {
  content: " →";
  color: var(--accent);
  font-weight: 700;
}

.pg .section--dark .linkcard {
  background: var(--glass);
  border-color: var(--hairline);
}

.pg .section--dark .linkcard strong { color: #fff; }
.pg .section--dark .linkcard span   { color: var(--text-soft); }

/* --- Пігулки (міста, теги) ------------------------------------------------ */

.pg .pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.pg .pills a {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: color var(--ease), box-shadow var(--ease);
}

.pg .pills a:hover {
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow-sm);
}

.pg .section--dark .pills a {
  background: var(--glass);
  color: #fff;
  box-shadow: none;
  border: 1px solid var(--hairline);
}

/* --- Модифікатори секцій -------------------------------------------------- */

.pg .section--tight {
  padding-block: clamp(40px, 5vw, 60px);
}

.pg .u-mt { margin-top: 32px; }

.pg .u-updated {
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-dim);
}
