/* =========================================================
   Translate Group — стилі
   Кольори та шрифти зняті з поточного сайту translate-group.com
   ========================================================= */

:root {
  --color-text: #252525;
  --color-accent: #0345bf;      /* сині цифри статистики, лінки */
  --color-accent-2: #3366ff;    /* акцентні елементи/кнопки */
  --color-topbar: #333333;
  --color-footer: #171717;
  --color-border: #e6e6e6;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --container-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  line-height: 1.5;
  background: #fff;
}

/* ===== PAGE LOADER =====
   Brief fade-out overlay shown until the page (and the critical hero image)
   has finished loading, so visitors on a slow connection see a simple spinner
   instead of a blank flash of white. Hidden automatically by js/script.js;
   also has a no-JS fallback below so it never gets stuck on screen. */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity .4s ease, visibility .4s ease;
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.page-loader-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #e5e5e5;
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: page-loader-spin .7s linear infinite;
}
@keyframes page-loader-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .page-loader-spinner { animation: none; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

h2 {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 32px;
}

/* ===== TOP BAR ===== */
.topbar {
  background: var(--color-topbar);
  color: #fff;
  font-size: 14px;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 20px;
}
.topbar-social { display: flex; gap: 12px; }
.topbar-social a { color: #fff; display: inline-flex; opacity: .85; }
.topbar-social a:hover { opacity: 1; }
.topbar-social-soon { color: #fff; display: inline-flex; opacity: .35; cursor: default; }
.topbar-contacts { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar-contacts a:hover { color: var(--color-accent-2); }
.topbar-hours { opacity: .8; }

/* ===== HEADER ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.logo img { border-radius: 4px; }

.main-nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a { font-weight: 500; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.main-nav a:hover,
.main-nav a.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--color-text); }

/* ===== HERO ===== */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 410;
  max-height: 420px;
  overflow: hidden;
  background: #eee;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .8s ease;
}
.hero-slide.active { opacity: 1; }
.hero-caption {
  position: absolute;
  left: 0;
  bottom: 56px;
  z-index: 5;
  max-width: 560px;
  margin: 0 20px;
  padding: 20px 24px;
  background: rgba(0,0,0,.5);
  color: #fff;
  border-radius: 10px;
}
.hero-caption h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; }
.hero-caption p { margin: 0 0 14px; font-size: 15px; opacity: .95; }
.hero-cta {
  display: inline-block;
  background: var(--color-accent-2);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
}
.hero-cta:hover { background: var(--color-accent); }
.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 0;
}
.hero-dot.active { background: #fff; }

/* ===== STATS ===== */
.stats { padding: 48px 0; border-bottom: 1px solid var(--color-border); }
.stats-grid {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
  text-align: center;
}
.stat-number {
  font-size: 44px;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}
.stat-label { margin-top: 8px; color: #555; }

/* ===== SERVICES ===== */
.services { padding: 64px 0; background: #fafafa; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
}
.service-card h3 { margin: 0 0 10px; font-size: 18px; }
.service-card .price { margin: 0; color: var(--color-accent); font-weight: 600; }
.service-card .more-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-accent-2);
  font-weight: 600;
}
.service-card .more-link:hover { text-decoration: underline; }
.services-note {
  text-align: center;
  color: #777;
  font-size: 14px;
  margin: 28px 0 0;
}
.services-note a { color: var(--color-accent-2); font-weight: 600; }
.services-note a:hover { text-decoration: underline; }

/* ===== FEATURE BOXES (phone / payment) ===== */
.features { padding: 56px 0; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.feature-box { text-align: center; }
.feature-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #eaf0fd;
  color: var(--color-accent);
}
.feature-box h3 { font-size: 22px; font-weight: 500; margin: 0 0 10px; }
.feature-box p { margin: 4px 0; }
.feature-box a:hover { color: var(--color-accent); }

/* ===== TESTIMONIALS ===== */
.reviews { padding: 64px 0; background: #fafafa; }
.reviews-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  min-height: 170px;
}
.review-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 24px;
}
.review-card p.quote { margin: 0 0 14px; color: #444; }
.review-card p.author { margin: 0; font-weight: 600; color: var(--color-accent); }
.review-card[dir="rtl"] p.quote { text-align: right; }

.reviews-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}
.reviews-nav button {
  background: #fff;
  border: 1px solid var(--color-border);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}
.reviews-nav button:hover { background: var(--color-accent); color: #fff; }
.reviews-dots { display: flex; gap: 6px; }
.reviews-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ccc;
}
.reviews-dots span.active { background: var(--color-accent); }

@media (max-width: 640px) {
  .reviews-track { grid-template-columns: 1fr; }
  .hero-caption { bottom: 40px; padding: 14px 16px; max-width: calc(100% - 40px); }
  .hero-caption h1 { font-size: 19px; }
  .hero-caption p { font-size: 13px; }
}

/* ===== MAP ===== */
.map-section { line-height: 0; }
.map-address {
  line-height: 1.4;
  text-align: center;
  margin: 0;
  padding: 14px 20px;
  font-weight: 600;
  color: var(--color-text);
  background: #fff;
}
.map-section iframe { width: 100%; height: 380px; border: 0; }

/* ===== APPROACH / STEPS ("Як ми працюємо") ===== */
.approach {
  padding: 56px 0;
  background: #fafafa;
  border-bottom: 1px solid var(--color-border);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.step {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 24px 18px;
  text-align: center;
}
.step-num {
  width: 36px; height: 36px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.step h3 { font-size: 16px; margin: 0 0 8px; }
.step p { margin: 0; font-size: 14px; color: #555; }

/* ===== SUBPAGES (Послуги, Оплата, Про нас, FAQ) ===== */
.page-hero {
  background: #fafafa;
  border-bottom: 1px solid var(--color-border);
  padding: 48px 0 40px;
  text-align: center;
}
.page-hero h1 { font-size: 32px; margin: 0 0 12px; }
.page-hero p { color: #555; max-width: 640px; margin: 0 auto; }

.page-content { padding: 56px 0; }
.page-content .container { max-width: 820px; }
.page-content h2 { text-align: left; font-size: 22px; margin: 40px 0 16px; }
.page-content h2:first-child { margin-top: 0; }
.page-content p { margin: 0 0 16px; color: #333; }
.page-content ul, .page-content ol { margin: 0 0 16px; padding-left: 20px; }
.page-content li { margin-bottom: 8px; }

.icon-list { list-style: none; padding-left: 0; margin: 0 0 16px; }
.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.icon-list svg { flex-shrink: 0; margin-top: 1px; color: var(--color-accent); }
.icon-list span { color: #333; }

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 32px;
  font-size: 15px;
}
.price-table th, .price-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.price-table th { color: #555; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; }
.price-table td:last-child, .price-table th:last-child { text-align: right; color: var(--color-accent); font-weight: 600; }

.price-note {
  background: #fff7e6;
  border: 1px solid #f0d999;
  border-radius: 8px;
  padding: 16px 20px;
  color: #6b5200;
  font-size: 14px;
  margin-top: 8px;
}

.trust-note {
  background: #f5f7fb;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px 20px;
  color: #444;
  font-size: 14px;
}
.trust-note a { color: var(--color-accent-2); font-weight: 600; }
.trust-note a:hover { text-decoration: underline; }

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 4px 20px;
  margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--color-accent); font-weight: 700; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item p { padding-bottom: 16px; margin: 0; color: #444; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-footer);
  color: #fff;
  padding: 22px 0;
  text-align: center;
  font-size: 14px;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 13px;
}
.footer-links a { opacity: .8; }
.footer-links a:hover { opacity: 1; color: var(--color-accent-2); }
.footer-legal {
  margin: 6px 0 0;
  font-size: 13px;
  opacity: .7;
}
.footer-legal a { opacity: 1; text-decoration: underline; }
.footer-legal a:hover { color: var(--color-accent-2); }

/* ===== MOBILE ===== */
@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 20px; border-bottom: 1px solid var(--color-border); }
  .topbar-contacts { font-size: 13px; gap: 12px; }
}

/* Price tables: on narrow screens a real table forces long Ukrainian labels
   into a horizontally-scrolling row, which hides the price column off-screen
   with no visible hint to scroll. Below 640px each row becomes a labelled
   card instead — every price stays visible without scrolling. */
@media (max-width: 640px) {
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table td {
    display: block;
    width: 100%;
  }
  .price-table {
    border: none;
  }
  .price-table tr {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 4px 14px;
    margin-bottom: 10px;
  }
  .price-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
    text-align: right;
  }
  .price-table td:last-child { border-bottom: none; }
  .price-table td::before {
    content: attr(data-th);
    color: #555;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    text-align: left;
    flex-shrink: 0;
  }
}
