/* Europlan-style layout — polished v4 */

:root {
  --blue: #005b95;
  --blue-light: #0070b8;
  --banner-bg: #cbebff;
  --orange: #f56920;
  --orange-dark: #d6520a;
  --orange-soft: #fff4ec;
  --orange-badge: #ffede1;
  --text: #333;
  --text-muted: #666;
  --text-light: #939799;
  --border: #e8ecef;
  --gray-bg: #f5f8fa;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 32px rgba(245, 105, 32, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Colors from europlan.ru */
/* orange: #f56920, blue: #005b95, banner bg: #cbebff, text muted: #666 */

.topline {
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}

.topline__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  min-height: 36px;
}

.topline a {
  font-weight: 600;
  color: #fff;
}

.topline a:hover {
  color: #ffe8d6;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e8ecef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}

.site-logo img {
  display: block;
  height: 48px;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-left: auto;
}

.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  padding: 6px 0;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.2s;
}

.site-nav a:hover {
  color: var(--orange);
}

.site-nav a:hover::after {
  width: 100%;
}

.site-header__btn {
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #333;
  border-radius: 1px;
}

/* Buttons — europlan style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-main {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 105, 32, 0.35);
}

.btn-main:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 105, 32, 0.4);
}

.btn-outline {
  background: #fff;
  color: var(--orange);
  border: 2px solid var(--orange);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--orange-soft);
}

.btn-white {
  background: #fff;
  color: var(--orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-white:hover {
  background: var(--orange-soft);
}

.main-banner__content .btn-outline {
  align-self: flex-start;
}

.btn-l {
  min-height: 48px;
  padding: 0 28px;
  font-size: 16px;
}

.btn-m {
  min-height: 40px;
  padding: 0 20px;
  font-size: 14px;
}

.link {
  color: #f56920;
  font-weight: 600;
  font-size: 14px;
}

.link:hover {
  color: #d6520a;
}

/* Page */
.page {
  padding: 8px 0 48px;
}

/* Banner grid — slider + aside */
.banner-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.slider {
  position: relative;
  border-radius: var(--radius);
}

.slider__viewport {
  overflow: hidden;
  border-radius: var(--radius);
}

.slider__track {
  position: relative;
}

.slide.main-banner {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--banner-bg);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0;
}

.slide.main-banner.is-active {
  display: flex;
}

.slide.main-banner.is-active:hover {
  box-shadow: var(--shadow-hover);
}

.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s, color 0.2s;
}

.slider__btn:hover {
  background: var(--orange);
  color: #fff;
}

.slider__btn--prev { left: 12px; }
.slider__btn--next { right: 12px; }

.slider__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}

.slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.slider__dot.is-active {
  background: var(--orange);
  transform: scale(1.2);
}

/* Ticker */
.ticker {
  overflow: hidden;
  background: linear-gradient(90deg, var(--orange-dark), var(--orange));
  color: #fff;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ticker__track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: ticker 28s linear infinite;
  white-space: nowrap;
}

.ticker__track span {
  font-size: 14px;
  font-weight: 600;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Section head + carousel */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head .section-title {
  margin-bottom: 4px;
}

.section-head .section-lead {
  margin-bottom: 0;
}

.carousel-nav {
  display: flex;
  gap: 8px;
}

.carousel-nav__btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 22px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.carousel-nav__btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.carousel {
  overflow: hidden;
  margin: 0 -4px;
  padding: 4px;
}

.carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel .catalog-card,
.carousel .service-tile--img {
  flex: 0 0 min(300px, 82vw);
  scroll-snap-align: start;
}

.service-tile--img {
  padding: 0;
  overflow: hidden;
}

.service-tile--img img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.service-tile--img h3,
.service-tile--img p {
  padding: 0 16px;
}

.service-tile--img h3 {
  margin-top: 14px;
}

.service-tile--img p {
  padding-bottom: 18px;
}

@media (min-width: 960px) {
  .cards-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .banner-box {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: stretch;
  }

  .slide.main-banner.is-active {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    padding: 32px;
    min-height: 340px;
  }

  .main-banner__pic {
    max-width: 420px;
    width: 45%;
  }

  .main-banner__pic img {
    min-height: 260px;
    max-height: 320px;
    object-fit: cover;
  }

  .banner-aside {
    grid-template-columns: 1fr;
    height: 100%;
  }

  .aside-banner {
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
  }

  .aside-banner > img {
    width: 100%;
    max-width: 208px;
    align-self: center;
  }
}

.main-banner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--banner-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.main-banner__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.main-banner__content .btn-main,
.main-banner__content .btn-outline {
  width: fit-content;
}

.main-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 899px) {
  .main-banner__content .btn-main,
  .main-banner__content .btn-outline {
    flex: 1 1 100%;
    width: 100%;
  }
}

.main-banner__label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #005b95;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.main-banner__title {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.25;
  color: #1a1a1a;
  font-weight: 700;
}

.main-banner__text {
  margin: 0;
  font-size: 15px;
  color: #666;
  max-width: 480px;
}

.main-banner__pic {
  display: block;
  align-self: center;
  flex-shrink: 0;
  width: 100%;
  max-width: 480px;
}

.main-banner__pic img {
  display: block;
  width: 100%;
  min-height: 200px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  background: #b8dff5;
}

.banner-aside {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.aside-banner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--banner-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.aside-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.aside-banner__content {
  flex: 1;
  min-width: 0;
}

.aside-banner__content h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.3;
  color: #1a1a1a;
}

.aside-banner__content p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #666;
  line-height: 1.45;
}

.aside-banner__content a {
  font-size: 14px;
  font-weight: 600;
  color: #f56920;
}

.aside-banner__content a:hover {
  color: #d6520a;
}

.aside-banner > img {
  flex-shrink: 0;
  width: 120px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* Intro */
.intro {
  margin-bottom: 48px;
}

.intro__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px;
  background: var(--gray-bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--orange);
}

@media (min-width: 768px) {
  .intro__inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
  }
}

.intro__text h2 {
  margin: 0 0 12px;
  font-size: 26px;
  color: var(--blue);
}

.intro__text p {
  margin: 0;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
}

.intro__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.intro__stats li {
  text-align: center;
  padding: 16px 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.intro__stats strong {
  display: block;
  font-size: 22px;
  color: var(--orange);
  line-height: 1.2;
}

.intro__stats span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

@media (max-width: 480px) {
  .intro__stats {
    grid-template-columns: 1fr;
  }
}

/* Sections */
.section {
  margin-bottom: 48px;
}

.section--gray {
  background: #f5f8fa;
  margin-left: -16px;
  margin-right: -16px;
  padding: 48px 16px;
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.5vw, 30px);
  font-weight: 700;
  color: var(--blue);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--orange-soft);
  display: inline-block;
}

.section-lead {
  margin: 0 0 28px;
  color: #666;
  font-size: 16px;
}

/* Offer cards */
.cards-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .cards-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cards-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.offer-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.offer-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.offer-card:hover > img {
  transform: scale(1.03);
}

.offer-card__body {
  padding: 18px 20px 22px;
}

.offer-card__body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  color: #1a1a1a;
}

.offer-card__body p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #666;
}

/* Catalog */
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.catalog-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.catalog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.catalog-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.catalog-card__body {
  padding: 20px;
}

.catalog-card__body h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #005b95;
}

.catalog-card__body p {
  margin: 0 0 12px;
  color: #666;
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: #ffede1;
  color: #d6520a;
  font-size: 12px;
  font-weight: 600;
}

/* Calculator */
.calc-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
  padding: 32px 28px;
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-light) 60%, #0088cc 100%);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 91, 149, 0.25);
}

@media (min-width: 900px) {
  .calc-block {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
  }

  .calc-block__text {
    flex: 1 1 220px;
  }

  .calc-block__fields {
    flex: 2 1 360px;
  }

  .calc-block__result {
    flex: 0 0 auto;
    text-align: right;
  }
}

.calc-block__text h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.calc-block__text p {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
}

.calc-block__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.calc-block__fields label span {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  opacity: 0.85;
}

.calc-block__fields input[type="range"] {
  width: 100%;
  accent-color: #ffd4a8;
}

.calc-block__fields label output {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  font-size: 15px;
  color: #ffd4a8;
}

.calc-block__result strong {
  display: block;
  margin-bottom: 10px;
  font-size: 28px;
  color: #ffd4a8;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-tile {
  padding: 24px 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.service-tile:hover {
  border-color: rgba(245, 105, 32, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.service-tile__num {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.05em;
}

.service-tile h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--blue);
}

.service-tile p {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* Contacts */
.contacts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .contacts {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contacts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.contacts__list span {
  display: block;
  font-size: 13px;
  color: #939799;
  margin-bottom: 2px;
}

.contacts__list a {
  font-size: 18px;
  font-weight: 600;
  color: #005b95;
}

.contacts__list a:hover {
  color: #f56920;
}

.lead-form {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e8ecef;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  display: grid;
  gap: 14px;
}

.lead-form h3 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #005b95;
}

.lead-form label {
  display: grid;
  gap: 6px;
}

.lead-form label span {
  font-size: 13px;
  font-weight: 500;
  color: #666;
}

.lead-form input,
.lead-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: #f56920;
  box-shadow: 0 0 0 3px rgba(245, 105, 32, 0.15);
}

.lead-form .btn {
  width: 100%;
  margin-top: 4px;
}

/* Footer */
.site-footer {
  background: #1e1e1e;
  color: rgba(255, 255, 255, 0.75);
  padding: 36px 0;
  border-top: 4px solid var(--orange);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.site-footer__inner img {
  height: 40px;
  width: auto;
}

.site-footer p {
  margin: 0;
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  min-width: 200px;
}

/* Mobile nav */
@media (max-width: 899px) {
  .site-header__btn {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    position: fixed;
    top: 108px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #eee;
    overflow-y: auto;
    z-index: 99;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .site-header__btn {
    display: inline-flex;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 100;
    justify-content: center;
  }
}
