/* ============================================
   Dr. Abjaparov — Clean Clinical
   Style 02: Безупречная чистота
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --bg: #ffffff;
  --bg-rgb: 255, 255, 255;
  --surface: #f7fafa;
  --accent: #0e8a7b;
  --accent-rgb: 14, 138, 123;
  --accent-hover: #0ba392;
  --text: #1a2332;
  --text-muted: #5a6a7a;
  --border: #e2e8f0;
  --heading-font: 'Source Serif 4', serif;
  --body-font: 'Inter', sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 40px rgba(14,138,123,0.12);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* --- Text Safety (Russian long words) --- */
h1, h2, h3, h4, h5, h6,
.service-card,
.team-card,
.hero h1,
.section-header h2 {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* --- Typography --- */
h1 {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  color: var(--text);
}

h2 {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  color: var(--text);
}

h3 {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.3;
  color: var(--text);
}

p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Section --- */
.section {
  padding: 80px 0;
  position: relative;
}

.section--surface {
  background: var(--surface);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-header p {
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  height: 52px;
  width: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.logo-text {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
}

.nav-desktop {
  display: none;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-desktop a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-desktop a:hover {
  color: var(--accent);
}

.nav-desktop a:hover::after {
  width: 100%;
}

/* Burger */
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity 0.2s;
  border-radius: 1px;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-mobile.open {
  opacity: 1;
  pointer-events: all;
}

.nav-mobile a {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 12px 24px;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.nav-mobile a:hover {
  color: var(--accent);
}

/* Desktop nav breakpoint */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
  .burger {
    display: none;
  }
}

/* ============================================
   HERO — Split Half
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  background: var(--bg);
}

/* Medical cross SVG decoration */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect x='35' y='10' width='30' height='80' rx='2' fill='%230e8a7b' opacity='0.07'/%3E%3Crect x='10' y='35' width='80' height='30' rx='2' fill='%230e8a7b' opacity='0.07'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

/* Subtle diagonal lines pattern */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, transparent 30%, rgba(14, 138, 123, 0.03) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(14, 138, 123, 0.08);
  border: 1px solid rgba(14, 138, 123, 0.2);
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-photo {
  flex: 1;
  position: relative;
}

.hero-photo img {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4/5;
}

.hero-photo::before {
  content: '';
  position: absolute;
  top: -12px;
  right: -12px;
  width: 100%;
  max-width: 520px;
  height: 100%;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  opacity: 0.3;
  z-index: -1;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 60px;
    padding: 0 40px;
  }

  .hero-content {
    flex: 1;
  }

  .hero-photo {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  min-height: 48px;
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(14, 138, 123, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.btn--white {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid var(--border);
}

.btn--white:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================
   SERVICES — 2col Grid
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: 0;
  transition: all var(--transition);
  position: relative;
}

.service-card:hover {
  border-left-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.service-card__image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.service-card__body {
  padding: 24px;
}

.service-card__title {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Service card index preview — compact */
.service-card--compact {
  display: flex;
  flex-direction: column;
}

.service-card--compact .service-card__image {
  aspect-ratio: 3/2;
}

/* ============================================
   TEAM — Large Photos 3:4
   ============================================ */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.team-card {
  text-align: center;
  position: relative;
}

.team-card__photo-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.team-card__photo-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
  pointer-events: none;
}

.team-card__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.team-card:hover .team-card__photo {
  transform: scale(1.05);
}

.team-card__name {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 4px;
}

.team-card__role {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.team-card__spec {
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 500;
}

/* ============================================
   USP / Features
   ============================================ */
.usp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .usp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .usp-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.usp-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
  position: relative;
}

.usp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: height var(--transition);
}

.usp-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.usp-card:hover::before {
  height: 100%;
}

.usp-icon {
  width: 48px;
  height: 48px;
  background: rgba(14, 138, 123, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.usp-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.usp-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.usp-card p {
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ============================================
   GALLERY — Before-After + 2x2 Grid
   ============================================ */
.gallery-section {
  padding: 80px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

/* Before-After Slider */
.before-after {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  grid-column: 1 / -1;
  max-width: 700px;
  margin: 0 auto 24px;
}

.before-after img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.before-after__label {
  position: absolute;
  bottom: 16px;
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.before-after__label--left {
  left: 16px;
}

.before-after__label--right {
  right: 16px;
}

/* Swiper gallery overrides */
.gallery-swiper .swiper-slide img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--accent) !important;
}

.swiper-pagination-bullet-active {
  background: var(--accent) !important;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: var(--surface);
  padding: 80px 0;
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  max-width: 480px;
  margin: 0 auto 32px;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ============================================
   FLOATING WHATSAPP CTA
   ============================================ */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.floating-whatsapp svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* ============================================
   CONTACTS / FOOTER
   ============================================ */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer h4 {
  font-family: var(--heading-font);
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

.footer a:hover {
  color: var(--accent);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.82rem;
}

/* ============================================
   COUNTERS
   ============================================ */
.counters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  text-align: center;
  padding: 48px 0;
}

@media (min-width: 640px) {
  .counters {
    grid-template-columns: repeat(4, 1fr);
  }
}

.counter-item .count {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1;
}

.counter-item .count-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  padding: 96px 0 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span {
  margin: 0 8px;
  opacity: 0.5;
}

/* ============================================
   PAGE HERO (services, gallery pages)
   ============================================ */
.page-hero {
  padding: 120px 0 48px;
  text-align: center;
  background: var(--surface);
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-hero p {
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================
   SERVICE DETAIL CARDS (services page)
   ============================================ */
.service-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:last-child {
  border-bottom: none;
}

.service-detail__image {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 3/2;
  object-fit: cover;
}

.service-detail__content {
  flex: 1;
}

.service-detail__content h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.service-detail__content p {
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .service-detail {
    flex-direction: row;
    gap: 48px;
    align-items: center;
  }

  .service-detail__image {
    width: 45%;
    flex-shrink: 0;
  }

  .service-detail:nth-child(even) {
    flex-direction: row-reverse;
  }
}

/* ============================================
   ANIMATIONS — visible by default
   ============================================ */
[data-reveal] {
  opacity: 1;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

/* ============================================
   RESPONSIVE FINE-TUNING
   ============================================ */
@media (max-width: 767px) {
  .section {
    padding: 56px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .hero-photo::before {
    display: none;
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stat .number {
    font-size: 1.5rem;
  }

  .page-hero {
    padding: 96px 0 32px;
  }
}

@media (max-width: 374px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 1.7rem;
  }
}
