/* Базовые стили */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #222;
}

/* Хедер */
.header {
  width: 100%;
  background: linear-gradient(to right, #e8f0ff, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', sans-serif;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
  flex-wrap: wrap;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 70px;
}

.org-name {
  font-size: 18px;
  font-weight: 600;
  color: #1f3f75;
  line-height: 1.4;
}

/* Контакты */
.contact-info {
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  color: #444;
}

.contact-info .icon {
  color: #4c6ef5;
  margin-right: 6px;
}

/* Кнопка регистрации */
.register-button {
  display: flex;
  justify-content: flex-end;
}

.btn-register {
  background: linear-gradient(135deg, #4c6ef5 0%, #1f3f75 100%);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(76, 110, 245, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-register:hover {
  background: linear-gradient(135deg, #3a5ce2 0%, #16306b 100%);
  box-shadow: 0 6px 20px rgba(76, 110, 245, 0.5);
  transform: translateY(-2px);
}

.btn-register:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(76, 110, 245, 0.2);
}

.btn-register::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-register:hover::before {
  width: 200px;
  height: 200px;
}

/* Навигация */
.nav-container {
  border-top: 1px solid #dbe3f0;
  border-bottom: 1px solid #dbe3f0;
  background-color: #f6f9ff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav {
  display: flex;
  justify-content: center;
  padding: 14px 0;
  gap: 30px;
  font-size: 16px;
  font-weight: 500;
}

.nav a {
  color: #1f3f75;
  text-decoration: none;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav a::after {
  content: "";
  display: block;
  height: 2px;
  background: #4c6ef5;
  width: 0%;
  transition: width 0.3s ease;
  margin-top: 5px;
}

.nav a:hover {
  color: #4c6ef5;
}

.nav a:hover::after {
  width: 100%;
}

/* Профиль врача */
.doctor-profile {
  padding: 60px 20px;
  background: #fff;
}

.doctor-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Фото слева/справа */
.photo-left .doctor-photo { order: 0; }
.photo-left .doctor-info  { order: 1; }
.photo-right .doctor-photo { order: 1; }
.photo-right .doctor-info  { order: 0; }

.doctor-photo {
  flex: 0 0 320px;
  max-width: 320px;
}

.doctor-photo img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  object-fit: cover;
}

.doctor-info {
  flex: 1 1 auto;
}

.doctor-name {
  font-size: 28px;               /* как на главной */
  color: #1f3f75;                 /* как на главной */
  font-weight: 700;
  margin-bottom: 16px;
}

.doctor-badges {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.doctor-badges li {
  background: #f0f4ff;
  color: #1f3f75;
  border-left: 4px solid #4c6ef5;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 15px;
}

.doctor-info h2 {
  font-size: 22px;
  color: #1f3f75;
  margin: 24px 0 10px;
  font-weight: 600;
}

.doctor-info p {
  color: #333;
  line-height: 1.6;
  margin-bottom: 14px;
  font-size: 16px;
}

/* Таблица расписания как на главной */
.table-wrapper {
  overflow-x: auto;
}

.doctor-schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 10px;
}

.doctor-schedule thead {
  background: #e5eaff;
  color: #1f3f75;
}

.doctor-schedule th,
.doctor-schedule td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: center;
}

.doctor-schedule tbody tr:nth-child(even) {
  background: #f6f6f6;
}

.doctor-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 24px;
}

.btn-primary {
  background: #4c6ef5;
  color: #fff;
  border: 0;
  border-radius: 24px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s;
}

.btn-primary:hover {
  background: #3a5ce2;
}

.back-link {
  color: #1f3f75;
  text-decoration: none;
  font-size: 14px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .doctor-wrapper {
    flex-direction: column;
  }
  .doctor-photo {
    max-width: 100%;
  }
}

/* Подвал */
.footer {
  background-color: #1f3f75;
  color: #ffffff;
  padding: 40px 20px 0;
  font-size: 14px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-logo {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo img {
  width: 120px;
  margin-bottom: 10px;
}

.footer-logo p {
  line-height: 1.4;
}

.footer-nav,
.footer-contacts {
  flex: 1 1 200px;
  margin-top: 20px;
}

.footer-nav h4,
.footer-contacts h4 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav ul li {
  margin-bottom: 8px;
}

.footer-nav ul li a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-nav ul li a:hover {
  color: #a2c0ff;
}

.footer-contacts p {
  margin: 6px 0;
}

.footer-bottom {
  text-align: center;
  padding: 20px 10px;
  font-size: 13px;
  color: #ccc;
}

/* Кнопка "Наверх" */
#toTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  padding: 15px;
  background: linear-gradient(135deg, #4c6ef5 0%, #1f3f75 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(76, 110, 245, 0.3);
  transition: all 0.3s ease;
}

#toTopBtn:hover {
  background: linear-gradient(135deg, #3a5ce2 0%, #16306b 100%);
  box-shadow: 0 6px 20px rgba(76, 110, 245, 0.5);
  transform: translateY(-2px);
}

#toTopBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(76, 110, 245, 0.2);
}

/* Бургер-меню */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
  position: absolute;
  top: 25px;
  right: 20px;
}

.burger span {
  width: 25px;
  height: 3px;
  background-color: #333;
  transition: all 0.3s ease;
}

.burger.burger-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.burger-active span:nth-child(2) {
  opacity: 0;
}

.burger.burger-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Адаптивность */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 15px;
  }

  .logo img {
    width: 80px;
  }

  .org-name {
    font-size: 15px;
    line-height: 1.3;
    max-width: 200px;
  }

  .contact-info {
    font-size: 14px;
  }

  .register-button {
    align-self: stretch;
    justify-content: flex-start;
  }

  .burger {
    display: flex;
  }

  .nav-container {
    display: none;
  }

  .nav-container.open {
    display: flex;
    flex-direction: column;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
  }

  .nav a {
    font-size: 16px;
    padding: 8px 0;
    display: block;
    border-bottom: 1px solid #ddd;
  }

  .about-section .container {
    padding: 20px 15px;
  }

  .schedule-section .table-wrapper {
    overflow-x: auto;
  }

  .schedule-section table {
    min-width: 700px;
  }

  .news-section .news-grid {
    flex-direction: column;
    gap: 20px;
  }

  .doctors-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 15px;
  }

  .footer-logo img {
    width: 90px;
  }

  .footer-nav,
  .footer-contacts {
    margin-top: 20px;
  }

  .footer-bottom {
    padding: 15px;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .test-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .test-price, .how-icon {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .doctors-grid {
    grid-template-columns: 1fr;
  }
}