/* ===== Основни стойности ===== */
:root {
  --bg: #EEF1F3;
  --surface: #FFFFFF;
  --ink: #16202B;
  --muted: #5B6673;
  --accent: #2B59C3;
  --line: #D5DBE0;
  --error: #C0392B;
  --ok: #1E8449;
}

* { box-sizing: border-box; }

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


body {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3 {
  font-family: "Unbounded", "Arial Black", sans-serif;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h2 { font-size: 2em; }
h3 { font-size: 1.05em; }
p { margin: 0 0 1em; }

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

.wrap {
  width: 92%;
  max-width: 1180px;
  margin: 0 auto;
}

/* Clearfix за float колоните */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

section { padding: 4em 0; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  position: relative;
  height: 64px;
}
.logo {
  float: left;
  line-height: 64px;
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 1.1em;
  color: var(--ink);
  text-decoration: none;
}
.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: middle;
}
.logo img {
  display: inline-block;
  height: 36px;
  width: auto;
  vertical-align: middle;
}
.main-nav { float: right; }
.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav li { display: inline-block; }
.main-nav a {
  display: inline-block;
  line-height: 64px;
  padding: 0 0.9em;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.main-nav a:hover { color: var(--accent); }
.main-nav .nav-cta {
  line-height: 2.4em;
  margin-left: 0.5em;
  padding: 0 1.2em;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  vertical-align: middle;
}
.main-nav .nav-cta:hover { color: #fff; opacity: 0.85; }

.menu-btn {
  display: none;
  float: right;
  margin-top: 14px;
  padding: 0.4em 1em;
  font: inherit;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

/* ===== Hero: заглавие с „слоеве“ като при 3D печат ===== */
.hero {
  position: relative;
  padding: 6em 0 5em;
  /* За собствена снимка: сложи я в img/hero.jpg и смени пътя тук.
     Цветът отдолу се вижда, ако снимката липсва или още се зарежда. */
  background-color: #16202B;
  background-image: url("img/hero.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
/* Затъмняване, за да е четим текстът върху снимката */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    to right,
    rgba(10, 15, 22, 0.90) 0%,
    rgba(10, 15, 22, 0.75) 45%,
    rgba(10, 15, 22, 0.30) 100%
  );
}
.hero .wrap {
  position: relative;
  z-index: 1;
}
.hero-title {
  font-size: 5em;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  background: repeating-linear-gradient(
    to bottom,
    #FFFFFF 0,
    #FFFFFF 5px,
    #8FB4FF 5px,
    #8FB4FF 7px
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-text {
  max-width: 34em;
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.8em;
}

.btn {
  display: inline-block;
  padding: 0.9em 1.8em;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.88; }
.btn-light { margin-left: 0.6em; color: var(--ink); background: #fff; }

/* ===== Количка в шапката ===== */
.cart-link {
  float: right;
  position: relative;
  height: 64px;
  margin-left: 0.8em;
  line-height: 64px;
  color: var(--ink);
}
.cart-link svg { width: 26px; height: 26px; vertical-align: middle; }
.cart-link:hover { color: var(--accent); }
.cart-count {
  position: absolute;
  top: 10px;
  right: -9px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: var(--accent);
  border-radius: 9px;
}
.cart-count[hidden] { display: none; }

/* ===== Съобщение за бисквитките (малка карта в ъгъла) ===== */
.cookie-card {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: 340px;
  padding: 1em 1.2em;
  font-size: 0.9em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(22, 32, 43, 0.15);
}
.cookie-card p { margin: 0 0 0.8em; color: var(--muted); }
.cookie-card button {
  padding: 0.45em 1.2em;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.cookie-card a { margin-left: 0.8em; font-weight: 600; }

/* ===== Галерия (float колони) ===== */
.card {
  float: left;
  width: 31.33%;
  margin: 0 1% 2em;
}
.card figure {
  position: relative;
  margin: 0 0 0.8em;
  height: 260px;
  overflow: hidden;
  border-radius: 8px;
  /* фон, ако още няма снимка */
  background: repeating-linear-gradient(to bottom, #DDE3E8 0, #DDE3E8 6px, #E7ECEF 6px, #E7ECEF 8px);
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card img.missing { visibility: hidden; }
.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.15em 0.7em;
  font-size: 0.8em;
  font-weight: 700;
  background: var(--surface);
  border-radius: 4px;
}
.card p { color: var(--muted); }

/* ===== Услуги: main + aside ===== */
.services { background: var(--surface); }
.services-main {
  float: left;
  width: 66%;
}
.services-aside {
  float: right;
  width: 30%;
  padding: 1.5em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.services-aside ul { padding-left: 1.2em; }
.aside-note { font-size: 0.9em; color: var(--muted); margin: 0; }

.col {
  float: left;
  width: 31.33%;
  margin-right: 3%;
  padding: 0;
}
.col:last-child { margin-right: 0; }
.col p { color: var(--muted); }

/* ===== Стъпки ===== */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  float: left;
  width: 33.33%;
  padding-right: 2em;
}
.step-num {
  display: inline-block;
  width: 2.4em;
  height: 2.4em;
  line-height: 2.4em;
  text-align: center;
  font-family: "Unbounded", sans-serif;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: top;
}
.step-text {
  display: inline-block;
  width: 75%;
  margin-left: 0.8em;
  vertical-align: top;
}
.step-text p { color: var(--muted); }

/* ===== Форма ===== */
.order { background: var(--surface); }
#orderForm {
  max-width: 760px;
}
.field {
  float: left;
  width: 48%;
  margin: 0 4% 1.2em 0;
  padding: 0;
  border: 0;
}
.field:nth-of-type(even) { margin-right: 0; }
.field-wide {
  width: 100%;
  margin-right: 0;
  clear: both;
}
label, legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3em;
}
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="url"], select, textarea {
  width: 100%;
  padding: 0.7em;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 6px;
}
textarea { resize: vertical; }
.invalid { border-color: var(--error) !important; }

.choice {
  display: inline-block;
  margin-right: 1.2em;
  font-weight: 400;
}
.choice input {
  vertical-align: middle;
  margin: 0 0.3em 0 0;
}
.counter {
  display: block;
  text-align: right;
  font-size: 0.85em;
  color: var(--muted);
}
.error {
  display: block;
  min-height: 1.3em;
  font-size: 0.85em;
  color: var(--error);
}
#orderForm .btn { clear: both; }
.success {
  visibility: hidden;
  opacity: 0;
  margin-top: 1em;
  font-weight: 700;
  color: var(--ok);
  transition: opacity 0.3s;
}
.success.show { visibility: visible; opacity: 1; }
.send-error {
  display: none;
  margin-top: 1em;
  font-weight: 700;
  color: var(--error);
}
.send-error.show { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Footer ===== */
.site-footer {
  clear: both;
  padding: 2em 0;
  background: var(--ink);
  color: #C9D1D9;
}
.site-footer p { float: left; margin: 0; }
.site-footer p:last-child { float: right; }
.site-footer .wrap::after { content: ""; display: table; clear: both; }
.site-footer a { color: #fff; }

/* ======================================================
   Адаптивен дизайн – по фиг. №1
   1024+ | 1023–768 | 767–480 | до 479
   ====================================================== */

/* Таблет (хоризонтално): 768–1023px */
@media (max-width: 1023px) {
  .hero-title { font-size: 4em; }
  .card { width: 48%; }
  .services-main { width: 62%; }
  .services-aside { width: 34%; }
  .col { width: 100%; margin: 0 0 1em; }
  .steps li { width: 100%; padding-right: 0; margin-bottom: 1.5em; }
}

/* Меню: под 1024px се показва бутон „Меню“ (с „Магазин“ менюто не се побира) */
@media (max-width: 1023px) {
  .menu-btn { display: block; }
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    float: none;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
  }
  .main-nav.open { visibility: visible; opacity: 1; }
  .main-nav li { display: block; }
  .main-nav a { display: block; line-height: 3em; }
  .main-nav .nav-cta { margin: 0.5em 0.9em 1em; text-align: center; }
}

/* Таблет (вертикално) / голям телефон: 480–767px */
@media (max-width: 767px) {
  body { font-size: 15px; }
  section { padding: 3em 0; }
  h2 { font-size: 1.6em; }
  .hero { padding: 4em 0 3.5em; }
  /* на тесен екран текстът е на цялата ширина – затъмняваме равномерно */
  .hero::before {
    background: linear-gradient(
      to bottom,
      rgba(10, 15, 22, 0.88),
      rgba(10, 15, 22, 0.78)
    );
  }
  .hero-title { font-size: 3em; }


  .services-main, .services-aside { float: none; width: 100%; }
  .services-aside { margin-top: 2em; }
  .col { float: left; width: 100%; }

  .field { width: 100%; margin-right: 0; }
}

/* Телефон: до 479px */
@media (max-width: 479px) {
  .hero-title { font-size: 2.3em; }
  .hero-text { font-size: 1.05em; }
  .btn { display: block; width: 100%; text-align: center; }
  .btn-light { margin: 0.6em 0 0; }
  .cookie-card { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .card { width: 100%; margin: 0 0 2em; }
  .card figure { height: 220px; }
  .choice { display: block; margin-bottom: 0.3em; }
  .site-footer p, .site-footer p:last-child { float: none; margin-bottom: 0.3em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
/* Нов ред в галерията */
.card:nth-child(3n+1) { clear: left; }

@media (max-width: 1023px) {
  .card:nth-child(3n+1) { clear: none; }
  .card:nth-child(2n+1) { clear: left; }
}

@media (max-width: 479px) {
  .card:nth-child(2n+1) { clear: none; }
}

/* ===== Контакти ===== */
.contact-item {
  float: left;
  width: 23.5%;
  margin-right: 2%;
  padding: 1.5em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.contact-item:last-child { margin-right: 0; }
.contact-item p { margin: 0; }
.contact-item a { font-weight: 600; text-decoration: none; }

@media (max-width: 1023px) {
  .contact-item { width: 49%; margin: 0 2% 1em 0; }
  .contact-item:nth-child(2n) { margin-right: 0; }
  .contact-item:nth-child(2n+1) { clear: left; }
}

@media (max-width: 479px) {
  .contact-item { float: none; width: 100%; margin-right: 0; }
}
/* Стиловете за страниците „Новини“ са в news-style-add.css */
