/* ============================================================
   Техникъл Съпорт ЕООД — стилове
   Цветовете са взети от оригиналния tst.bg. За да смените цвят,
   редактирайте само променливите в :root по-долу.
   ============================================================ */

:root {
  /* Цветове от tst.bg */
  --primary: #1C7464;        /* основно зелено */
  --primary-dark: #145a4e;   /* по-тъмно зелено за посочване */
  --secondary: #349484;      /* второстепенно тюркоазено */
  --dark-green: #0A2622;     /* тъмнозелено (hero и футър) */
  --background: #f9f9f9;     /* светъл фон */
  --foreground: #333333;     /* цветът на текста */
  --card: #ffffff;           /* фон на картите */
  --muted-foreground: #6b7280; /* сив текст */
  --border: rgba(51, 51, 51, 0.12);
  --radius: 12px;
  --glow: 0 0 40px -8px rgba(28, 116, 100, 0.45);
  --danger: #b42318;

  --font-headings: "Montserrat", "Open Sans", sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
}

/* ============ Основни настройки ============ */
* { margin: 0; padding: 0; box-sizing: border-box; border-color: var(--border); }

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.6;
  padding-top: 64px; /* място за залепеното меню */
}

h1, h2, h3 { font-family: var(--font-headings); }

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

.icon { width: 1em; height: 1em; flex-shrink: 0; }
.icon-lg { font-size: 3rem; }
.icon-primary { color: var(--primary); font-size: 1.5rem; }
.text-secondary { color: var(--secondary); }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

/* ============ Бутони ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: all 0.2s ease;
}
.btn-primary { background: var(--primary); color: #fff; border: none; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--glow); }
.btn-outline-white { border: 1px solid rgba(255,255,255,0.7); color: #fff; background: transparent; }
.btn-outline-white:hover { background: #fff; color: var(--foreground); }

/* ============ Меню (залепено горе) ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(249, 249, 249, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 1rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; text-decoration: none; color: var(--foreground); }
.brand-logo { height: 36px; width: auto; }
.brand-name { font-family: var(--font-headings); font-weight: 700; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-green { color: var(--primary); }

.nav-desktop { display: none; align-items: center; gap: 1.5rem; }
.nav-desktop a { color: var(--muted-foreground); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-desktop a:hover { color: var(--foreground); }
.btn-nav { padding: 0.5rem 1rem; font-size: 0.9rem; color: #fff !important; }

.burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent; color: var(--foreground);
  cursor: pointer; font-size: 1.25rem; transition: border-color 0.2s;
}
.burger:hover { border-color: var(--primary); }

.nav-mobile { border-top: 1px solid var(--border); background: var(--background); }
.nav-mobile .mobile-link {
  display: block; margin: 0 1rem; padding: 0.75rem 0.75rem; border-radius: 10px;
  color: var(--foreground); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav-mobile .mobile-link:hover { background: rgba(28, 116, 100, 0.1); color: var(--primary); }
.btn-mobile-call { margin: 0.5rem 1rem 1rem; width: calc(100% - 2rem); }

/* на компютър: менюто е хоризонтално, бутонът за телефон се вижда */
@media (min-width: 1024px) {
  .nav-desktop { display: flex; }
  .burger, .nav-mobile { display: none !important; }
}

/* ============ Hero (горната секция със снимка) ============ */
.hero { position: relative; display: flex; align-items: center; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,38,34,0.7), rgba(10,38,34,0.88)); }
.hero-content { position: relative; max-width: 72rem; margin: 0 auto; padding: 4rem 1rem; color: #fff; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;
  padding: 0.375rem 1rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.1);
  font-size: 0.875rem; font-weight: 600;
}
.hero h1 {
  max-width: 48rem; font-size: 2.25rem; font-weight: 800; line-height: 1.15; letter-spacing: 0;
}
.hero-text { margin-top: 1.5rem; max-width: 36rem; font-size: 1.125rem; color: rgba(255,255,255,0.8); }
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }

@media (min-width: 768px) {
  .hero h1 { font-size: 3.75rem; }
  .hero-content { padding: 5rem 1rem; }
}

/* ============ Секции ============ */
.section { padding: 6rem 0; }
.section-alt { background: rgba(255, 255, 255, 0.4); border-top: 1px solid var(--border); }
.section-label {
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--primary);
}
.section-title { margin-top: 0.75rem; font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; }
@media (min-width: 768px) { .section-title { font-size: 2.25rem; } }

/* ============ Карти (услуги, сертификати, новини) ============ */
.grid-3 { margin-top: 3rem; display: grid; gap: 1.5rem; }
@media (min-width: 640px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.5rem; transition: all 0.2s ease; color: var(--foreground);
}
.card:hover { transform: translateY(-4px); border-color: rgba(28, 116, 100, 0.5); }
.card h3 { margin-top: 1.25rem; font-size: 1.1rem; font-weight: 600; }
.card p { margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted-foreground); }

.card-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(28, 116, 100, 0.1); color: var(--primary); font-size: 1.5rem;
  transition: all 0.2s ease;
}
.card:hover .card-icon { background: var(--primary); color: #fff; }

.card-meta { margin-top: 0.25rem !important; }

/* Сертификати */
.cert-icon {
  display: flex; align-items: center; justify-content: center;
  height: 10rem; border-radius: 12px;
  background: rgba(28, 116, 100, 0.1); color: var(--primary);
}
.cert-img { height: 14rem; width: 100%; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid rgba(10,38,34,.12); }

/* Галерия */
.gallery-item {
  margin: 0; overflow: hidden; border-radius: 16px;
  border: 1px solid var(--border); background: var(--card, #fff);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.gallery-item:hover { transform: translateY(-4px); border-color: var(--primary); }
.gallery-icon {
  display: flex; align-items: center; justify-content: center;
  height: 14rem;
  background: rgba(28, 116, 100, 0.1); color: var(--primary);
}
.gallery-img { height: 14rem; width: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.gallery-item:hover .gallery-img { transform: scale(1.05); }
.gallery-item figcaption { padding: 1rem; font-size: 0.875rem; font-weight: 500; }

/* Новини */
.card-flex { display: flex; flex-direction: column; }
.card-flex h3 { line-height: 1.35; }
.card-flex p { flex: 1; }

/* ============ ЗА НАС + стъпки ============ */
.about-text { margin-top: 1.5rem; max-width: 48rem; font-size: 1.125rem; color: var(--muted-foreground); }

.grid-4 { margin-top: 3rem; display: grid; gap: 1.5rem; }
@media (min-width: 640px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-num { font-family: var(--font-headings); font-size: 1.75rem; font-weight: 700; color: rgba(28, 116, 100, 0.25); }

/* ============ ЧЕСТО ЗАДАВАНИ ВЪПРОСИ ============ */
.faq-list { margin-top: 2.5rem; display: grid; gap: 0.75rem; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem; cursor: pointer; list-style: none;
  font-family: var(--font-headings); font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { color: var(--primary); font-size: 1.25rem; transition: transform 0.2s ease; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item p { padding: 0 1.5rem 1.25rem; color: var(--muted-foreground); font-size: 0.9rem; }

/* ============ ФОРМА „ЗАЯВКА ЗА ОГЛЕД" ============ */
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
@media (min-width: 768px) { .form-card { padding: 2rem; } }
.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.field { display: block; }
.field span { display: block; font-weight: 600; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  margin-top: 0.5rem; width: 100%; padding: 0.75rem 1rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground);
  font-family: var(--font-body); font-size: 1rem;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(28, 116, 100, 0.2);
}
.form-error {
  display: none; margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 10px;
  border: 1px solid rgba(180, 35, 24, 0.4); background: rgba(180, 35, 24, 0.08);
  color: var(--danger); font-size: 0.9rem;
}
.form-note { margin-top: 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
.form-note a { color: var(--primary); font-weight: 600; }
.form-fallback { display: none; margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.form-fallback a { color: var(--primary); font-weight: 600; }
.section-text { margin-top: 1rem; max-width: 42rem; color: var(--muted-foreground); }
.section-text a { color: var(--primary); font-weight: 600; }

/* ============ Контакти ============ */
.contact-card { text-decoration: none; }
.contact-card h3 { margin-top: 1rem; }
.contact-card p { margin-top: 0.25rem; }

.contacts-bottom { margin-top: 1.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .contacts-bottom { grid-template-columns: 2fr 1fr; } }
.map-frame { width: 100%; min-height: 320px; border: 1px solid var(--border); border-radius: 16px; }
.hours-list { margin-top: 1rem; list-style: none; font-size: 0.9rem; }
.hours-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.5rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}
.hours-list li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.hours-list .day { color: var(--muted-foreground); }
.hours-list .time { font-weight: 600; }

/* ============ Футър ============ */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 1rem; font-size: 0.9rem; color: var(--muted-foreground);
}
.footer-social { display: flex; gap: 1.5rem; }
@media (min-width: 768px) { .footer-inner { flex-direction: row; } }

/* ============ Лента „Бърз контакт" ============ */
body { padding-bottom: 76px; }
.quickbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(249,249,249,.95); border-top: 1px solid var(--border);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding-bottom: env(safe-area-inset-bottom);
}
.quickbar-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem; padding: .6rem .25rem; border-right: 1px solid var(--border);
  font-size: .66rem; font-weight: 600; text-transform: uppercase;
  text-decoration: none; transition: background .15s;
}
.quickbar-item:last-child { border-right: 0; }
.quickbar-item:hover { background: rgba(28,116,100,.1); }
.quickbar-item .icon { width: 20px; height: 20px; }
.quickbar-phone, .quickbar-mail { color: var(--primary); }
.quickbar-whatsapp { color: #25D366; }
.quickbar-viber { color: #7360F2; }
.quickbar-telegram { color: #229ED9; }
@media (min-width: 640px) {
  .quickbar-item { flex-direction: row; gap: .5rem; font-size: .8rem; padding: .75rem .5rem; letter-spacing: .04em; }
}

/* Сертификатите: без снимки на малки екрани */
@media (max-width: 639px) {
  .cert-visual, .cert-icon { display: none !important; }
  #sertifikati .card h3 { margin-top: 0; }
}

/* ===== Подменю „Услуги“ в десктоп менюто ===== */
/* ===== Подточки „Услуги“ в мобилното меню ===== */
/* ===== Карта на услуга като връзка (същият адрес като в подменюто) ===== */
a.card { display: block; text-decoration: none; color: inherit; scroll-margin-top: 96px; }

/* Подробни страници за услугите */
.service-breadcrumb { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:32px; font-size:.875rem; }
.service-breadcrumb a { color:inherit; }
.service-hero .hero-content { width:100%; padding:3rem 1rem; }
.service-hero h1 { font-size:2.25rem; }
.service-section { padding-top:3.5rem; padding-bottom:3.5rem; }
.service-section h2 { font-size:1.5rem; line-height:1.4; }
.service-section p { max-width:56rem; margin-top:1.25rem; color:var(--muted-foreground); }
.service-intro { font-size:1.125rem; margin-bottom:3rem; }
.service-activities { display:grid; column-gap:2.5rem; margin-top:1.5rem; }
.service-activities article { border-bottom:1px solid var(--border); padding:1.5rem 0; }
.service-activities h3 { font-size:1.125rem; }
.service-band { background:var(--card); border-block:1px solid var(--border); }
.service-band a:not(.btn), .service-other a, .service-more { color:var(--primary); }
.service-band .btn { margin-top:1.5rem; }
.service-questions { margin-top:1.5rem; max-width:56rem; }
.service-questions details { padding:1.25rem 0; border-bottom:1px solid var(--border); }
.service-questions summary { font-weight:600; font-size:1.125rem; cursor:pointer; }
.service-other div { display:flex; flex-wrap:wrap; gap:1rem 2rem; margin-top:1.25rem; }
.service-more { display:block; margin-top:1rem; font-size:.875rem; font-weight:600; }
@media(min-width:768px) { .service-activities { grid-template-columns:1fr 1fr; } .service-hero h1 { font-size:3rem; } .service-hero .hero-content { padding:4rem 1rem; } .service-section h2 { font-size:1.875rem; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *, *::before, *::after { transition:none !important; } }

@media(max-width:639px) { .service-hero h1 { font-size:1.5rem; } }

/* Отделна цветова схема за всяка услуга */
:root {
  /* Цветове на услугите — сменете съответната двойка акцент / тъмен фон. */
  --service-video: oklch(0.48 0.085 175);
  --service-video-dark: oklch(0.26 0.04 175);
  --service-sot: oklch(0.48 0.18 260);
  --service-sot-dark: oklch(0.26 0.065 260);
  --service-access: oklch(0.48 0.16 305);
  --service-access-dark: oklch(0.26 0.055 305);
  --service-fire: oklch(0.52 0.19 35);
  --service-fire-dark: oklch(0.27 0.065 35);
  --service-network: oklch(0.46 0.085 220);
  --service-network-dark: oklch(0.25 0.04 220);
  --service-support: oklch(0.46 0.09 125);
  --service-support-dark: oklch(0.25 0.04 125);
}
[data-service="videonablyudenie"] { --service-accent: var(--service-video); --service-hero: var(--service-video-dark); }
[data-service="sot-sistemi"] { --service-accent: var(--service-sot); --service-hero: var(--service-sot-dark); }
[data-service="kontrol-dostap"] { --service-accent: var(--service-access); --service-hero: var(--service-access-dark); }
[data-service="pozharoizvestyavane"] { --service-accent: var(--service-fire); --service-hero: var(--service-fire-dark); }
[data-service="it-mrezhi"] { --service-accent: var(--service-network); --service-hero: var(--service-network-dark); }
[data-service="poddrazhka"] { --service-accent: var(--service-support); --service-hero: var(--service-support-dark); }

/* Локална тема: фирменото меню и контактите остават непроменени. */
[data-service] {
  --primary: var(--service-accent);
  --primary-foreground: var(--card);
  --secondary: color-mix(in oklch, var(--service-accent) 12%, var(--card));
  --secondary-foreground: var(--service-accent);
  --ring: var(--service-accent);
  --border: color-mix(in oklch, var(--service-accent) 20%, var(--card));
}
.service-theme {
  --background: color-mix(in oklch, var(--service-accent) 3%, var(--card));
  --muted: color-mix(in oklch, var(--service-accent) 9%, var(--card));
}
.service-theme section:not(:first-child) h2 { color: var(--service-accent); }


[data-service] { --primary-dark: var(--service-hero); --glow: 0 0 30px -8px color-mix(in oklch, var(--primary) 35%, transparent); }
a.card[data-service] { background: color-mix(in oklch, var(--primary) 5%, var(--card)); border-top:4px solid var(--primary); }
a.card[data-service]:hover { border-color:var(--primary); }
a.card[data-service] .card-icon { background:color-mix(in oklch, var(--primary) 10%, var(--card)); }
a.card[data-service]:hover .card-icon { background:var(--primary); }
.service-theme { background:var(--background); }
.service-theme .hero-overlay { background:color-mix(in oklch, var(--service-hero) 85%, transparent); }
.service-theme .service-band { background:var(--muted); }

/* ===== ПАРТНЬОРИ =====
   Логата са в images/partners/; списъкът се редактира в index.html (секция #partnyori). */
.partners-grid { margin-top: 2.5rem; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px)  { .partners-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .partners-grid { grid-template-columns: repeat(6, 1fr); } }
.partner-card {
  align-items: center; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; display: flex; height: 7rem; justify-content: center;
  padding: 1rem; text-decoration: none; transition: transform .2s, border-color .2s;
}
.partner-card:hover { border-color: rgba(28,116,100,.4); transform: translateY(-4px); }
.partner-logo {
  filter: grayscale(1); height: auto; max-height: 3.5rem; max-width: 100%;
  object-fit: contain; opacity: .6; transition: filter .2s, opacity .2s; width: auto;
}
.partner-card:hover .partner-logo { filter: grayscale(0); opacity: 1; }
