:root {
  --primary: #023a8c; /* Глибокий синій - надійність */
  --secondary: #007BFF; /* Акцентний синій */
  --accent: #00c4b5; /* М'який ціановий/м'ятний - чистота, медичність */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-main: #e8f4fd; /* Ніжний блакитний фон */
  --bg-card: #ffffff;
  --border: #d2e4f5; /* Трохи темніший блакитний для меж */
  --shadow-sm: 0 4px 15px rgba(2, 58, 140, 0.05);
  --shadow-md: 0 10px 30px rgba(2, 58, 140, 0.08);
  --shadow-lg: 0 20px 40px rgba(2, 58, 140, 0.12);
  --font-heading: 'Outfit', sans-serif;
  --font-text: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
body {
  font-family: var(--font-text);
  margin: 0;
  padding: 0;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  position: relative;
  z-index: 1000;
  transition: all 0.3s ease;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-header { display: flex; justify-content: space-between; align-items: center; width: auto; z-index: 10; }
.logo { font-size: 24px; font-weight: 700; font-family: var(--font-heading); color: var(--primary); letter-spacing: -0.02em; }
.menu-icon { display: none; cursor: pointer; flex-direction: column; justify-content: space-between; height: 18px; width: 24px; }
.menu-icon span { display: block; height: 3px; width: 100%; background-color: var(--primary); border-radius: 3px; transition: 0.3s; }
.nav-menu { display: flex; align-items: center; gap: 24px; justify-content: flex-end; flex: 1; }
.nav-buttons { display: flex; align-items: center; gap: 10px; }

nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
nav ul li { margin: 0; }
nav a { text-decoration: none; color: var(--text-main); font-weight: 500; font-size: 15px; transition: color 0.3s ease; }
nav a:hover { color: var(--secondary); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  font-family: var(--font-text);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.35);
}
.hero {
  background: linear-gradient(135deg, rgba(2, 58, 140, 0.85) 0%, rgba(0, 196, 181, 0.8) 100%),
    url('images/hero.jpg') no-repeat center center / cover;
  color: #fff;
  text-align: center;
  padding: 120px 20px 140px;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to top, var(--bg-main), transparent);
}
.hero .badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  margin: 0 0 24px;
  line-height: 1.15;
  font-family: var(--font-heading);
  font-weight: 700;
}
.hero p {
  font-size: clamp(16px, 2.2vw, 18px);
  margin: 0 auto 36px;
  max-width: 680px;
  line-height: 1.6;
  opacity: 0.9;
}
.stats {
  background: transparent;
  padding: 0 20px 40px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
}
.stat-item { padding: 0 16px; }
.stat-num {
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1;
}
.stat-label { font-size: 15px; color: var(--text-muted); font-weight: 500; }
section { padding: 80px 0; }
section h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 48px;
  color: var(--text-main);
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  position: relative;
}
#services { background: var(--bg-main); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}
.service-item {
  background: var(--bg-card);
  padding: 32px;
  border-radius: 20px;
  border: 1px solid transparent;
  text-align: left;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.service-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.service-item:hover::before { opacity: 1; }
.service-item h3 { 
  color: var(--text-main); 
  margin: 0 0 12px; 
  font-size: 20px; 
  font-weight: 600; 
  font-family: var(--font-heading);
}
.service-item p { margin: 0; color: var(--text-muted); font-size: 15px; }
.about {
  background: linear-gradient(180deg, rgba(0, 196, 181, 0.05) 0%, var(--bg-main) 100%);
}
.about p {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 17px;
  color: var(--text-main);
}
.about .address-block {
  margin-top: 40px;
  padding: 24px 32px;
  background: var(--bg-card);
  border-radius: 16px;
  display: inline-block;
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 196, 181, 0.1);
}
.about .address-block a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  transition: color 0.3s;
}
.about .address-block a:hover { color: var(--secondary); }
.about .address-block span { color: var(--text-muted); font-size: 14px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; }
/* Team */
#team { background: var(--bg-main); }
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}
.team-card {
  flex: 0 1 300px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s ease;
}
.team-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
}
.team-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}
.team-card .team-info { padding: 24px; }
.team-card h3 { margin: 0 0 6px; font-size: 20px; font-family: var(--font-heading); color: var(--text-main); font-weight: 600; }
.team-card .team-role { font-size: 14px; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.team-card p { margin: 0; font-size: 14px; color: var(--text-muted); }

.doctor-services-list {
  text-align: left;
  margin-top: 12px;
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-muted);
}
.doctor-services-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.doctor-services-list li:last-child {
  margin-bottom: 0;
}
.doctor-services-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  background-color: var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.4);
}

/* Gallery */
#gallery { background: var(--bg-main); padding-top: 40px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

.contact-phone {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  margin-bottom: 16px;
}
.contact-phone a { color: inherit; text-decoration: none; transition: color 0.3s; }
.contact-phone a:hover { color: var(--secondary); }
.work-hours {
  background: rgba(0, 196, 181, 0.05);
  padding: 24px;
  border-radius: 16px;
  margin-top: 24px;
  font-size: 15px;
  color: var(--text-main);
  border: 1px solid rgba(0, 196, 181, 0.1);
}
.work-hours strong { font-family: var(--font-heading); font-size: 16px; display: block; margin-bottom: 8px; }
.gallery-item {
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.gallery-item::after {
  content: ''; position: absolute; inset: 0; background: rgba(2, 58, 140, 0.2); opacity: 0; transition: opacity 0.3s;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

/* Why us */
.why-us { background: #fff; position: relative; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}
.why-item {
  text-align: center;
  padding: 40px 32px;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.why-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.why-item .icon { color: var(--accent); margin-bottom: 20px; display: flex; justify-content: center; }
.why-item h3 { margin: 0 0 12px; font-size: 20px; font-family: var(--font-heading); color: var(--text-main); font-weight: 600; }
.why-item p { margin: 0; font-size: 15px; color: var(--text-muted); }
#contact { background: var(--bg-main); padding-top: 40px; }
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}
@media (max-width: 768px) { .contact-wrap { grid-template-columns: 1fr; gap: 40px; } }
.contact-form { background: #fff; padding: 40px; border-radius: 20px; box-shadow: var(--shadow-md); }
.form-group { margin-bottom: 24px; }
.form-group input {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-text);
  transition: all 0.3s;
}
.form-group input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(0, 196, 181, 0.1); }
.contact-form .btn { width: 100%; padding: 16px; font-size: 16px; border-radius: 12px; }
.contact-info h3 { font-size: 24px; font-family: var(--font-heading); color: var(--text-main); margin: 0 0 24px; font-weight: 600; }
.contact-info p { margin: 0 0 24px; color: var(--text-muted); font-size: 16px; }
.contact-info a { color: var(--primary); text-decoration: none; font-weight: 500; transition: color 0.3s; }
.contact-info a:hover { color: var(--secondary); }
.social-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.social-links a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.social-links svg { width: 22px; height: 22px; fill: currentColor; }
footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 40px 20px;
}
footer p { margin: 0; font-size: 15px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 32px;
  margin-top: 24px;
}
footer .footer-links a {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  opacity: 0.8;
  transition: opacity 0.3s;
}
footer .footer-links a:hover { opacity: 1; }
.btn-phone { font-size: 14px; padding: 10px 18px; background: transparent; border: 2px solid var(--secondary); color: var(--secondary); box-shadow: none; }
.btn-phone:hover { background: var(--secondary); color: #fff; border-color: var(--secondary); box-shadow: var(--shadow-sm); }
@media (max-width: 960px) {
  header { position: relative; padding: 10px 0; }
  .logo { font-size: 20px; }
  
  nav { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-header { width: 100%; display: flex; justify-content: space-between; align-items: center; }
  .menu-icon { display: flex; }
  
  .nav-menu { 
    flex-direction: column; 
    align-items: stretch; 
    gap: 12px; 
    width: 100%; 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0 16px;
    z-index: 999;
    box-shadow: var(--shadow-sm);
  }
  
  #menu-toggle:checked ~ nav .nav-menu { 
    max-height: 450px; 
    padding-top: 16px; 
    padding-bottom: 16px; 
  }
  
  /* Анімація гамбургера в хрестик */
  #menu-toggle:checked ~ nav .nav-header .menu-icon span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  #menu-toggle:checked ~ nav .nav-header .menu-icon span:nth-child(2) { opacity: 0; }
  #menu-toggle:checked ~ nav .nav-header .menu-icon span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  nav ul { flex-direction: column; width: 100%; gap: 12px; align-items: center; }
  nav a { font-size: 14px; } /* Зменшений шрифт для меню */
  .nav-buttons { flex-direction: column; width: 100%; gap: 10px; }
  .btn { padding: 8px 16px; font-size: 14px; width: 100%; text-align: center; }
  .btn-phone { width: 100%; text-align: center; padding: 8px 16px; font-size: 13px; }
  
  .hero { padding: 90px 20px 100px; }
  .stats { margin-top: -40px; padding-bottom: 60px; }
  section { padding: 60px 0; }
  .service-item { padding: 24px; }
}
