* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f9ff;
  color: #333;
  line-height: 1.6;
}

/* Правильное выравнивание SVG иконок */
svg {
  display: block;
  flex-shrink: 0;
}

/* ========================================
   ВАРИАНТЫ ЦВЕТОВЫХ ПАЛИТР
   ========================================

   1. ГОЛУБАЯ (ТЕКУЩАЯ) - классическая, спокойная
      --primary: #0052d4;
      --secondary: #3a7bc8;
      --gradient-start: #ffffff;
      --gradient-end: #e6f0ff;
*/

:root {
  /* Выберите палитру, раскомментируйте нужную: */

  /* ПАЛИТРА 1: ГОЛУБАЯ (ТЕКУЩАЯ) */
  --primary-color: #0052d4;
  --secondary-color: #3a7bc8;
  --gradient-start: #ffffff;
  --gradient-end: #e6f0ff;

  /* ПАЛИТРА 2: ТЁПЛАЯ ЖЁЛТАЯ - раскомментируйте */
  /*--primary-color: #d97706;
  --secondary-color: #f59e0b;
  --gradient-start: #ffffff;
  --gradient-end: #fef3c7;*/

  /* ПАЛИТРА 3: МЯГКАЯ ТЁПЛАЯ - раскомментируйте */
  /*--primary-color: #e67e22;
  --secondary-color: #f39c12;
  --gradient-start: #ffffff;
  --gradient-end: #fff7ed;*/

  /* ПАЛИТРА 4: ФИОЛЕТОВАЯ - раскомментируйте */
  /*--primary-color: #7c3aed;
  --secondary-color: #a855f7;
  --gradient-start: #ffffff;
  --gradient-end: #f3e8ff;*/

  /* ПАЛИТРА 5: ТЁМНО-БИРЮЗОВАЯ - раскомментируйте */
  /*--primary-color: #0ea5e9;
  --secondary-color: #0284c7;
  --gradient-start: #ffffff;
  --gradient-end: #e0f2fe;*/

  /* ПАЛИТРА 6: ПАСТЕЛЬНАЯ МЯТА - раскомментируйте */
  /*--primary-color: #10b981;
  --secondary-color: #34d399;
  --gradient-start: #ffffff;
  --gradient-end: #ecfdf5;*/

  /* ПАЛИТРА 7: СЕРЫЙ СИНЕВЫЙ - минималистичная */
  /*--primary-color: #1e40af;
  --secondary-color: #64748b;
  --gradient-start: #f8fafc;
  --gradient-end: #e2e8f0;*/
}

.poster-container {
  width: 100%;
  max-width: 864px;
  min-height: 960px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.background-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(41, 121, 255, 0.1) 0%,
    rgba(0, 82, 212, 0.05) 100%
  );
  z-index: 0;
}

.shape-1 {
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
}

.shape-2 {
  bottom: -50px;
  left: -150px;
  width: 400px;
  height: 400px;
}

.header {
  padding: 16px 24px;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Vollkorn", Georgia, serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--primary-color);
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--primary-color);
}

.contact-item i,
.contact-item svg {
  width: 18px;
  height: 18px;
}

.hero-section {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.doctor-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: #e6f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  overflow: hidden;
}

.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-info {
  max-width: 90%;
}

.doctor-name {
  font-family: "Vollkorn", Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.doctor-specialty {
  font-size: 20px;
  font-weight: 500;
  color: #333;
  margin-bottom: 16px;
}

.doctor-description {
  font-size: 18px;
  color: #555;
  margin-bottom: 32px;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 14px 40px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 82, 212, 0.3);
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: #0041a8;
  border-color: #0041a8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 82, 212, 0.4);
}

.cta-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #ccc;
  border-color: #ccc;
  transform: none;
  box-shadow: none;
}

.specializations-section {
  padding: 32px 24px;
  background-color: #ffffff;
  margin: 32px 24px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: "Vollkorn", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 24px;
  text-align: center;
}

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

.specialization-item {
  background-color: #f0f7ff;
  padding: 24px 16px;
  border-radius: 12px;
  font-weight: 500;
  color: var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  min-height: 120px;
}

.specialization-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 82, 212, 0.15);
}

.specialization-icon,
.specialization-icon svg {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.services-section {
  padding: 32px 24px;
  margin: 32px 24px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

.services {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.service-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.service-title {
  font-family: "Vollkorn", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.service-title i,
.service-title svg {
  width: 24px;
  height: 24px;
}

.service-description {
  font-size: 16px;
  color: #555;
  margin-bottom: 16px;
}

.insole-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.insole-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.insole-name {
  font-family: "Vollkorn", Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
}

.insole-motto {
  font-family: "Vollkorn", Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary-color);
  font-style: italic;
  text-align: center;
}

.insole-content {
  display: flex;
  gap: 24px;
}

.insole-image-placeholder {
  width: 250px;
  height: 250px;
  background-color: #f0f7ff;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  padding: 8px;
}

.insole-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.insole-description {
  font-size: 16px;
  color: #555;
}

.certificates-section {
  padding: 32px 24px;
  background-color: #ffffff;
  margin: 32px 24px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

/* Карусель сертификатов */
.certificates-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.certificates-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
  padding: 8px 8px;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.certificates-track::-webkit-scrollbar {
  display: none;
}

.certificate-card {
  flex-shrink: 0;
  scroll-snap-align: none;
  width: 100px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px;
  border: 2px solid transparent;
}

.certificate-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 82, 212, 0.2);
  border-color: var(--primary-color);
}

.certificate-icon,
.certificate-icon svg {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.certificate-label {
  font-size: 12px;
  font-weight: 500;
  color: #333;
  text-align: center;
  line-height: 1.2;
}

.certificates-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.certificates-nav-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.certificates-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.certificates-nav-btn i,
.certificates-nav-btn svg {
  width: 24px;
  height: 24px;
}

.certificates-nav-prev {
  left: 0;
}

.certificates-nav-next {
  right: 0;
}

.certificates-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.certificates-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.certificates-dot.active {
  background-color: var(--primary-color);
  width: 24px;
  border-radius: 4px;
}

.certificates-dot:hover {
  background-color: var(--secondary-color);
}

/* Секция расположения */
.location-section {
  padding: 32px 24px;
  background-color: #ffffff;
  margin: 32px 24px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
}

.location-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.location-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.location-address i,
.location-address svg {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.location-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 12px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.location-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.location-link i,
.location-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.location-map {
  display: flex;
  justify-content: center;
}

.location-map img {
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid #e6f0ff;
}

.footer {
  padding: 32px 24px;
  background-color: var(--primary-color);
  color: white;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-column {
  width: 100%;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 16px;
}

.footer-info {
  font-size: 16px;
  line-height: 1.8;
}

.footer-info p {
  margin: 8px 0;
}

.footer-phone {
  color: white !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 24px;
  display: block;
  margin-top: 8px;
  transition: transform 0.2s ease;
  letter-spacing: 0.5px;
}

.footer-phone:hover {
  transform: scale(1.02);
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Модальное окно для просмотра сертификата */
.certificate-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity:  0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.certificate-modal.active {
  opacity: 1;
  visibility: visible;
}

.certificate-modal-content {
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.certificate-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s;
}

.certificate-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.certificate-modal-close i,
.certificate-modal-close svg {
  width: 20px;
  height: 20px;
  color: #333;
}

.certificate-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

/* Loader для загрузки документа */
.certificate-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  color: #0052d4;
}

.certificate-loader .loader-icon {
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.certificate-loader p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 8px;
  }

  .contact-info {
    flex-wrap: wrap;
    justify-content: center;
  }

  .specializations {
    grid-template-columns: repeat(2, 1fr);
  }

  .certificates-container {
    flex-direction: column;
    gap: 8px;
  }

  .certificates-carousel {
    padding: 8px;
    gap: 8px;
  }

  .certificates-carousel .certificate-item {
    width: 100px;
    height: 100px;
  }

  .footer-map img {
    max-width: 100%;
  }

  /* Стелки в стопку на планшетах */
  .insole-content {
    flex-direction: column;
  }

  .insole-image-placeholder {
    width: 100%;
    height: auto;
    max-width: 250px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .doctor-photo {
    width: 150px;
    height: 150px;
  }

  .doctor-name {
    font-size: 28px;
  }

  .doctor-specialty {
    font-size: 18px;
  }

  .section-title {
    font-size: 20px;
  }

  .specializations {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .specialization-item {
    padding: 16px 8px;
  }

  .specialization-icon,
  .specialization-icon svg {
    width: 30px;
    height: 30px;
  }

  .service-card {
    padding: 16px;
  }

  /* Стелки в стопку на мобильных */
  .insole-content {
    flex-direction: column;
  }

  .insole-image-placeholder {
    width: 100%;
    height: auto;
    max-width: 250px;
    margin: 0 auto;
  }

  .certificate-info {
    font-size: 12px;
  }

  .cta-button {
    padding: 12px 32px;
    font-size: 16px;
  }

  .certificates-carousel .certificate-item {
    width: 100px;
    height: 100px;
  }

  .certificates-carousel .certificate-icon,
  .certificates-carousel .certificate-icon svg {
    width: 14px;
    height: 14px;
  }

  /* Touch-friendly кнопки (минимум 44px) */
  .certificates-nav-btn {
    width: 44px;
    height: 44px;
  }

  .certificate-modal-close {
    width: 44px;
    height: 44px;
  }
}
