:root {
  --bg-medical: #fdf2f4;
  --bg-medical-2: #fff8f9;
  --accent: #e91e8c;
  --accent-soft: #f9a8d4;
}

html {
  scroll-behavior: smooth
}

html,
body {
  background: var(--bg-medical)
}

body::before {
  background:
    radial-gradient(900px circle at -5% -10%, #fdf2f4 0%, transparent 60%),
    radial-gradient(900px circle at 105% 20%, #fff0f3 0%, transparent 58%),
    repeating-linear-gradient(90deg, rgba(180, 80, 120, .02) 0 2px, transparent 2px 24px),
    linear-gradient(180deg, var(--bg-medical-2) 0%, var(--bg-medical) 100%)
}

.hero-shapes {
  display: none
}

.section h2 {
  position: relative;
  padding-bottom: 10px;
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #d4a017);
}

.divider {
  height: 80px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1440' height='80' viewBox='0 0 1440 80'><path fill='%23fff8f9' d='M0 40c120 40 240-40 360 0s240 40 360 0 240-40 360 0 240 40 360 0V80H0z'/><path fill='%23fdf2f4' d='M0 60c120 20 240-60 360-20s240 60 360 20 240-60 360-20 240 60 360 20V80H0z'/></svg>") center/cover no-repeat;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

.gallery {
  gap: 16px
}

.gallery figure {
  margin: 0
}

#nav a {
  position: relative;
  cursor: pointer;
}

#nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width .2s ease;
  border-radius: 2px
}

#nav a:hover::after {
  width: 100%
}

.card,
.area-card {
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(180, 80, 120, .06)
}

.area-card:hover {
  box-shadow: 0 12px 26px rgba(180, 80, 120, .10)
}

.button {
  border-radius: 14px
}

.profile img {
  border-radius: 18px;
  border: 6px solid #fff;
  outline: 2px solid var(--accent);
}

/* two-tone alternating sections */
.section {
  position: relative
}

.section,
#home,
#areas,
#about,
#services,
#approach,
#gallery,
#events,
#certifications,
#location,
#social,
#contact {
  scroll-margin-top: 72px
}

.section.alt,
.section:nth-of-type(even) {
  background: linear-gradient(180deg, var(--bg-medical-2) 0%, var(--bg-medical) 160%)
}

.section.alt .container,
.section:nth-of-type(even) .container {
  position: relative
}

/* socials */
.socials {
  display: flex;
  gap: 16px;
  flex-wrap: wrap
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(180, 80, 120, .06);
  color: #0f172a;
  text-decoration: none
}

.social-link:hover {
  box-shadow: 0 10px 20px rgba(180, 80, 120, .10)
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: #1877F2
}

/* mobile menu overlay */
#nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 999;
  pointer-events: none
}

#nav-overlay.show {
  pointer-events: auto
}

.navbar {
  transition: background .25s ease, box-shadow .25s ease
}

.navbar.scrolled {
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 8px 24px rgba(180, 80, 120, .08)
}

/* brand logo image */
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(212, 160, 23, .3);
}

/* hero layout with photo */
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 280px;
  height: 340px;
  object-fit: cover;
  border-radius: 24px;
  border: 5px solid #fff;
  outline: 3px solid #d4a017;
  box-shadow: 0 16px 40px rgba(212, 160, 23, .18), 0 8px 20px rgba(233, 30, 140, .08);
}

/* mobile optimizations */
.menu-toggle {
  display: none;
  z-index: 1002;
  position: relative;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  padding: 12px;
  margin: 0;
  min-width: 48px;
  min-height: 48px;
  font-size: 28px;
  line-height: 1;
}

.navbar .menu-toggle {
  z-index: 1002;
}

.navbar {
  z-index: 999;
}

.map {
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.map iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: none;
}

@media (max-width: 768px) {
  .navbar .container {
    height: 56px
  }

  #nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 1001;
    background: #fff;
    box-shadow: 0 14px 28px rgba(180, 80, 120, .12);
    flex-direction: column;
    padding: 12px 16px;
    gap: 8px;
    border-bottom: 1px solid #fce4ec;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  #nav.open {
    display: flex;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #nav-overlay {
    opacity: 0;
    transition: opacity .2s ease
  }

  #nav-overlay.show {
    opacity: 1
  }

  #nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    font-size: 16px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .menu-toggle {
    display: inline-block
  }

  .hero {
    padding: 56px 0
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-photo img {
    width: 200px;
    height: 240px;
  }

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

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

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

  .actions .button {
    width: 100%
  }

  .card.wide .grid.two {
    grid-template-columns: 1fr
  }

  .profile img {
    width: 100%;
    height: auto
  }
}

@media (max-width: 480px) {
  .grid.three {
    grid-template-columns: 1fr
  }

  .area-grid {
    grid-template-columns: 1fr
  }
}

@media (min-width: 769px) {
  #nav {
    display: flex !important;
    position: static;
    opacity: 1;
    transform: none;
    transition: none;
    background: transparent;
    box-shadow: none
  }
}

/* nav icons */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  opacity: .85
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.lightbox.active {
  display: flex
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  animation: fadeIn 0.3s ease
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 2001;
  animation: zoomIn 0.3s ease
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border-radius: 12px
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  z-index: 2002
}

.lightbox-close:hover {
  transform: scale(1.2)
}

.gallery img {
  cursor: pointer;
  object-fit: contain;
  transition: transform 0.2s ease, box-shadow 0.2s ease
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(233, 30, 140, 0.2)
}

@keyframes fadeIn {
  from {
    opacity: 0
  }
  to {
    opacity: 1
  }
}

.registration-badge {
  font-size: 1.1rem;
  line-height: 1.6;
}

.registration-badge a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.registration-badge a:hover {
  text-decoration: underline;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9)
  }
  to {
    opacity: 1;
    transform: scale(1)
  }
}