/* Costa Cars — CMS / landing pages with embedded HTML (ty-wysiwyg-content) */

/* Embedded <style> in page body can override :root — restore site tokens */
html,
body,
.cc-site-shell {
  --text: #ffffff !important;
  --muted: rgba(255, 255, 255, 0.64) !important;
  --bg: #090b0f !important;
  --accent: #ef1f2d !important;
  --card: #11141a !important;
  --line: rgba(255, 255, 255, 0.1) !important;
  color: #fff;
}

.ty-mainbox-container:has(.ty-wysiwyg-content .wrap) {
  padding: 0;
  margin: 0;
}

.ty-mainbox-container:has(.ty-wysiwyg-content .wrap) .ty-mainbox-title {
  display: none !important;
}

.ty-mainbox-container:has(.ty-wysiwyg-content .wrap) .ty-mainbox-body {
  padding: 0 !important;
  margin: 0 !important;
}

.ty-wysiwyg-content meta,
.ty-wysiwyg-content title {
  display: none !important;
}

.ty-wysiwyg-content {
  --bg: transparent;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --accent: #ef1f2d;
  --card: #11141a;
  --line: rgba(255, 255, 255, 0.1);
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.22);
  --max: min(1200px, 100%);
  color: #fff;
  max-width: 100%;
  overflow-x: clip;
}

.ty-wysiwyg-content .wrap {
  width: min(1200px, calc(100% - 32px));
  max-width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(20px, 4vw, 36px) clamp(16px, 4vw, 20px)
    calc(clamp(28px, 5vw, 56px) + var(--ty-navbar-mobile-height, 0px));
}

.ty-wysiwyg-content .grid {
  gap: clamp(28px, 5vw, 44px) !important;
}

.ty-wysiwyg-content .lead {
  gap: clamp(18px, 4vw, 28px) !important;
  align-items: start !important;
}

.ty-wysiwyg-content .lead h1,
.ty-wysiwyg-content .section h2,
.ty-wysiwyg-content .cta h2,
.ty-wysiwyg-content .card__title,
.ty-wysiwyg-content h1,
.ty-wysiwyg-content h2,
.ty-wysiwyg-content h3 {
  color: #fff !important;
}

.ty-wysiwyg-content .lead h1 {
  font-size: clamp(24px, 6.2vw, 44px) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.02em;
  margin: 0 !important;
}

.ty-wysiwyg-content .section h2,
.ty-wysiwyg-content .cta h2 {
  font-size: clamp(20px, 4.5vw, 32px) !important;
  margin: 0 0 16px !important;
  line-height: 1.15 !important;
}

.ty-wysiwyg-content .lead p,
.ty-wysiwyg-content .section p,
.ty-wysiwyg-content .card__text,
.ty-wysiwyg-content .note,
.ty-wysiwyg-content p {
  color: rgba(255, 255, 255, 0.62) !important;
}

.ty-wysiwyg-content .lead p {
  margin: 12px 0 0 !important;
  line-height: 1.6 !important;
  font-size: clamp(15px, 2.2vw, 18px) !important;
}

.ty-wysiwyg-content .tagline {
  margin: 0 0 12px !important;
  gap: 8px !important;
}

.ty-wysiwyg-content .tag {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.84) !important;
  box-shadow: none !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
}

.ty-wysiwyg-content .hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    url("https://iz-korei.ru/images/Фото/image.1759151399998.jpg") center / cover no-repeat,
    #0d1016;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 10;
  min-height: clamp(200px, 52vw, 420px);
}

.ty-wysiwyg-content .hero img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

/* bmw.ru blocks hotlink — show local fallback background instead */
.ty-wysiwyg-content .hero img[src*="bmw.ru"],
.ty-wysiwyg-content .hero img[src*="bmw.com"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.ty-wysiwyg-content .cards {
  gap: clamp(16px, 3vw, 20px) !important;
}

.ty-wysiwyg-content .card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    #0d1016 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: var(--shadow-soft) !important;
}

.ty-wysiwyg-content .card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ty-wysiwyg-content .card__body {
  padding: clamp(16px, 3vw, 20px) !important;
  color: rgba(255, 255, 255, 0.82);
}

.ty-wysiwyg-content .card__title {
  margin: 0 0 8px !important;
  font-size: clamp(16px, 2.4vw, 18px) !important;
  line-height: 1.3 !important;
}

.ty-wysiwyg-content .card__text {
  line-height: 1.55 !important;
  font-size: 14px !important;
}

.ty-wysiwyg-content .specs {
  gap: 12px !important;
  margin-top: 16px !important;
}

.ty-wysiwyg-content .spec {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.72) !important;
  padding: 14px 16px !important;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 12px !important;
}

.ty-wysiwyg-content .spec b {
  color: #fff;
  margin-bottom: 6px;
}

.ty-wysiwyg-content .cta {
  margin-top: 8px !important;
  padding: clamp(18px, 4vw, 28px) !important;
  background:
    radial-gradient(circle at 88% 14%, rgba(239, 31, 45, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    #0d1016 !important;
  border: 1px solid rgba(239, 31, 45, 0.22) !important;
  box-shadow: var(--shadow) !important;
  gap: 16px !important;
}

.ty-wysiwyg-content .cta .actions {
  gap: 10px !important;
}

.ty-wysiwyg-content .btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ty-wysiwyg-content .btn--primary {
  background: linear-gradient(135deg, #ef1f2d, #ff3745) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 18px 44px rgba(239, 31, 45, 0.24) !important;
}

.ty-wysiwyg-content .btn--primary:hover {
  transform: translateY(-1px);
}

.ty-wysiwyg-content .btn--ghost {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
}

.ty-wysiwyg-content .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.ty-wysiwyg-content .note {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.ty-wysiwyg-content .cards,
.ty-wysiwyg-content .specs,
.ty-wysiwyg-content .lead {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 760px) {
  .ty-wysiwyg-content .lead {
    grid-template-columns: 1.05fr 1fr !important;
    align-items: center !important;
  }
}

@media (min-width: 768px) {
  .ty-wysiwyg-content .wrap {
    padding-bottom: clamp(36px, 5vw, 64px);
  }
}

@media (max-width: 767px) {
  .ty-wysiwyg-content .wrap {
    width: min(1200px, calc(100% - 24px));
    max-width: min(1200px, calc(100% - 24px));
    padding-top: 14px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .ty-wysiwyg-content .lead h1 {
    font-size: clamp(22px, 7vw, 30px) !important;
  }

  .ty-wysiwyg-content .spec {
    grid-column: span 12 !important;
  }

  .ty-wysiwyg-content .cta .actions {
    flex-direction: column;
  }

  .ty-wysiwyg-content .btn {
    width: 100%;
    justify-content: center;
  }
}
