/* ==========================================================================
   ИНТЕРПОЛИС ЕООД — база
   Нулиране, цветова палитра, типография, бутони, общи елементи.
   Всички цветове и отстояния се задават ТУК, в секция :root.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. ШРИФТОВЕ  —  локални (не от Google), за да са еднакви на всяка страница
   и менюто да не „подскача“ при смяна на шрифта. Променливи шрифтове:
   един файл покрива всички дебелини. Кирилица + латиница.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/playfair-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/playfair-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   1. ПАЛИТРА И ПРОМЕНЛИВИ  —  промени цветовете на сайта оттук
   -------------------------------------------------------------------------- */
:root {
  /* Акцент — зелено */
  --brand:        #81d742;
  --brand-dark:   #5f9f2e;   /* текстови линкове — по-тъмно зелено за четимост */
  --brand-darker: #1f3745;   /* hover на бутони и линкове */
  --brand-tint:   #e4f3fc;

  /* Тъмен петролено-син */
  --dark:    #1f3745;
  --dark-2:  #142935;

  /* Текст и неутрални */
  --ink:      #141430;
  --ink-soft: #5f6b72;
  --ink-mute: #79848a;
  --line:     #d9e3e9;
  --bg:       #ffffff;
  --bg-alt:   #e4f3fc;
  --bg-dark:  #1f3745;

  /* Типография */
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', 'Segoe UI', Tahoma, sans-serif;

  --fs-h1:    clamp(1.9rem, 1.35rem + 2.4vw, 3.1rem);
  --fs-h2:    clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  --fs-h3:    clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  --fs-body:  clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --fs-small: 0.9rem;

  /* Отстояния */
  --gap:        1.5rem;
  --section-y:  clamp(3rem, 2rem + 5vw, 6rem);
  --container:  1180px;

  /* Форма и сянка */
  --radius:    15px;
  --radius-sm: 10px;
  --shadow:    0 6px 24px rgba(31, 55, 69, 0.08);
  --shadow-lg: 0 18px 44px rgba(31, 55, 69, 0.16);

  --header-h:  84px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. НУЛИРАНЕ
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  /* Място за скролбара и на къси страници — иначе съдържанието и менюто
     се местят хоризонтално при преход между страниците */
  scrollbar-gutter: stable;
}

/* Плавен преход между страниците; header-ът остава неподвижен (виж layout.css) */
@view-transition { navigation: auto; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--bg);
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 400;
  /* Дълги думи да не излизат извън тесен екран */
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-dark); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--brand-darker); }
/* Дългите имейли да се пренасят на много тесен екран */
a[href^="mailto:"] { overflow-wrap: anywhere; }

/* Изключително тесен екран (напр. силно свит прозорец с DevTools):
   всяка дълга дума може да се пренесе, за да не се появява бяла ивица отстрани */
@media (max-width: 240px) {
  body { overflow-wrap: anywhere; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
}

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: 0.45em; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Видим фокус за клавиатурна навигация */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   3. ЛЕЙАУТ ПОМОЩНИЦИ
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section       { padding-block: var(--section-y); }
.section--alt  { background: var(--bg-alt); }
.section--tight{ padding-block: calc(var(--section-y) * 0.6); }

/* Заглавие на секция с акцентна чертичка отдолу */
.section-head { margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.2rem); }
.section-head--center { text-align: center; }

.section-head h1,
.section-head h2 {
  margin-bottom: 0.7rem;
}

/* h1 в секция изглежда като h2 — заглавната лента вече носи едрия размер */
.section-head h1 { font-size: var(--fs-h2); }

.section-head h1::after,
.section-head h2::after {
  content: "";
  display: block;
  width: 62px;
  height: 3px;
  margin-top: 0.85rem;
  background: var(--brand);
  border-radius: 2px;
}

.section-head--center h1::after,
.section-head--center h2::after { margin-inline: auto; }

.section-head p {
  max-width: 62ch;
  color: var(--ink-mute);
}
.section-head--center p { margin-inline: auto; }

.lead { font-size: 1.1em; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   4. БУТОНИ
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.8em 2.2em;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  max-width: 100%;
  border-radius: var(--radius);
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
              transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
              border-color 0.22s var(--ease);
}

@media (max-width: 360px) { .btn { padding-inline: 1.4em; } }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand);
  color: #fff;
}
.btn--primary:hover {
  background: var(--dark);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--brand);
}
.btn--ghost:hover { background: var(--brand); color: #fff; }

.btn--light {
  background: #fff;
  color: var(--dark);
}
.btn--light:hover { background: var(--brand); color: #fff; }

/* Стрелка след текста на бутона */
.btn--arrow::after {
  content: "→";
  font-size: 1.05em;
  transition: transform 0.22s var(--ease);
}
.btn--arrow:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   5. СПИСЪК С ОТМЕТКИ  —  използва се в страниците с услуги
   -------------------------------------------------------------------------- */
.check-list { list-style: none; padding: 0; margin: 0; }

.check-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.85rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  background: var(--brand);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   6. ПОЯВЯВАНЕ ПРИ СКРОЛ  (включва се от js/reveal.js)
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Достъпност: прескачане към съдържанието */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  max-width: calc(100% - 2rem);
  padding: 0.75rem 1.25rem;
  background: var(--brand-darker);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Уважаваме системната настройка за намалено движение */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
