/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #2d3748;
  line-height: 1.65;
  font-size: 16px;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #12274f;
  transition: box-shadow 0.2s;
}

#header.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.logo img {
  height: 50px;
  width: auto;
}

#nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 32px;
}

#nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

#nav ul a {
  color: #c8d6f0;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

#nav ul a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-phones { display: none; }

.header-phones {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.header-phones a {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  white-space: nowrap;
}

.header-phones a:hover { color: #f87171; }

/* Burger button */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.burger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.burger-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-open span:nth-child(2) { opacity: 0; }
.burger-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  background: url('images/ambulance_header.png') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,25,60,0.78) 0%, rgba(10,25,60,0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 60px;
  padding-bottom: 60px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-bottom: 16px;
}

.hero-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 40px;
  padding: 10px 28px;
  margin-bottom: 90px;
  transition: background 0.2s, border-color 0.2s;
}

.hero-phone:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
}

.hero-sub {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: #c8d6f0;
  margin-bottom: 80px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 52px;
  border-radius: 6px;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  cursor: pointer;
}

.btn-red {
  background: #c0392b;
  color: #fff;
  box-shadow: 0 4px 14px rgba(192,57,43,0.45);
}

.btn-red:hover {
  background: #a93226;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(192,57,43,0.5);
}

.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ===== ABOUT ===== */
.section-about {
  padding: 72px 0;
  background: #f4f7fc;
}

.about-inner {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}

.about-text { flex: 1; min-width: 0; }

.about-text h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #12274f;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.about-text h2::after {
  content: '';
  display: block;
  width: 52px;
  height: 4px;
  background: #c0392b;
  margin-top: 10px;
  border-radius: 2px;
}

.about-text p {
  margin-bottom: 14px;
  color: #4a5568;
}

.about-image {
  flex: 0 0 340px;
  max-width: 340px;
}

/* Slider */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.slider-track {
  display: flex;
  transition: transform 0.4s ease;
}

.slider-track img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 3 / 2.8;
  border-radius: 12px;
  object-fit: cover;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(18,39,79,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.slider-btn:hover { background: rgba(18,39,79,0.9); }
.slider-prev { left: 8px; }
.slider-next { right: 8px; }

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 2;
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.slider-dot.active { background: #fff; }

/* ===== FEATURES ===== */
.section-features {
  padding: 56px 0;
  background: #12274f;
  margin-top: 0px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  text-align: center;
  color: #fff;
  padding: 24px 16px;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: #f87171;
}

.feature-icon svg { width: 100%; height: 100%; }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.feature-card p {
  font-size: 0.92rem;
  color: #93aed4;
  line-height: 1.5;
}

/* ===== ADVANTAGES ===== */
.section-advantages {
  padding: 72px 0;
  background: #fff;
}

.section-advantages h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #12274f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.section-advantages h2::after {
  content: '';
  display: block;
  width: 52px;
  height: 4px;
  background: #c0392b;
  margin-top: 10px;
  border-radius: 2px;
  margin-bottom: 24px;
}

.section-advantages p {
  color: #4a5568;
  max-width: 820px;
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 14px;
}

/* ===== SERVICES ===== */
.section-services {
  padding: 72px 0;
  background: #f4f7fc;
}

.section-services h2,
.section-contacts h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #12274f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.section-services h2::after,
.section-contacts h2::after {
  content: '';
  display: block;
  width: 52px;
  height: 4px;
  background: #c0392b;
  margin-top: 10px;
  border-radius: 2px;
}

.services-intro {
  margin-bottom: 32px;
}

.services-intro p {
  color: #4a5568;
  margin-bottom: 12px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #2d3748;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  border-left: 4px solid #c0392b;
}

.service-cross {
  color: #c0392b;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.services-subheading {
  font-size: 1rem;
  font-weight: 700;
  color: #12274f;
  margin: 28px 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.services-note {
  color: #4a5568;
  margin: 20px 0 0;
}

/* ===== HOW TO CALL ===== */
.section-call {
  padding: 72px 0;
  background: #fff;
}

.call-inner {
  display: flex;
  align-items: center;
  gap: 56px;
}

.call-image {
  flex: 0 0 280px;
  max-width: 280px;
}

.call-image img {
  width: 100%;
  border-radius: 12px;
}

.call-text { flex: 1; }

.call-text h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #12274f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.call-text h2::after {
  content: '';
  display: block;
  width: 52px;
  height: 4px;
  background: #c0392b;
  margin-top: 10px;
  border-radius: 2px;
  margin-bottom: 20px;
}

.call-text p {
  color: #4a5568;
  margin-bottom: 14px;
}

.call-text .btn { display: flex; width: fit-content; margin: 30px auto 0; }

.call-text p.call-highlight {
  color: #2fb9ca;
  border-left: 4px solid #2fb9ca;
  padding-left: 14px;
}

/* ===== TESTIMONIAL ===== */
.section-testimonial {
  background: linear-gradient(135deg, #12274f 0%, #1a3a6e 100%);
  padding: 64px 0;
}

.section-testimonial blockquote {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section-testimonial blockquote p {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: #e2eaf8;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 20px;
}

.section-testimonial cite {
  color: #93aed4;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 600;
}

/* ===== CONTACTS ===== */
.section-contacts {
  padding: 72px 0;
  background: #f4f7fc;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.contact-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  border-top: 4px solid #c0392b;
}

.contact-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: #12274f;
}

.contact-icon svg { width: 100%; height: 100%; }

.contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #12274f;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-card p,
.contact-card address {
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact-card a {
  color: #c0392b;
  font-weight: 600;
  transition: color 0.2s;
}

.contact-card a:hover { color: #922b21; }

/* ===== FOOTER ===== */
.footer {
  background: #0c1e3d;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer p {
  color: #6b87b8;
  font-size: 0.85rem;
}

.footer a {
  color: #93aed4;
  transition: color 0.2s;
}

.footer a:hover { color: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-inner { flex-direction: column; gap: 32px; }
  .about-image { flex: none; max-width: 100%; width: 100%; }
  .about-image .slider { max-width: 380px; margin: 0 auto; }

  .features-grid { grid-template-columns: 1fr; gap: 16px; }

  .call-inner { flex-direction: column; gap: 32px; }
  .call-image { flex: none; max-width: 240px; width: 100%; margin: 0 auto; }

  .contacts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-phones { display: none; }
  .burger { display: flex; }

  #nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #12274f;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 0 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  #nav.nav-open { display: flex; }

  #nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0 20px;
    margin-bottom: 16px;
  }

  #nav ul li a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-phones {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 20px;
  }

  .nav-phones a {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
  }

  .section-about,
  .section-advantages,
  .section-services,
  .section-call,
  .section-contacts { padding: 48px 0; }

  .section-features { margin-top: 40px; padding: 40px 0; }

  .hero-content { padding-top: 0px; padding-bottom: 48px; }

  .services-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .btn { padding: 13px 24px; font-size: 0.9rem; }
  .hero-content h1 { font-size: 1.6rem; }
}
