:root {
  --navy: #07385f;
  --navy-dark: #04233d;
  --blue: #0b7eb8;
  --cyan: #65cef3;
  --sky: #eaf8ff;
  --sky-soft: #f7fcff;
  --white: #ffffff;
  --text: #102235;
  --muted: #637487;
  --line: rgba(7, 56, 95, 0.14);
  --shadow: 0 24px 70px rgba(7, 56, 95, 0.17);
  --shadow-soft: 0 16px 42px rgba(7, 56, 95, 0.10);
  --radius: 30px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 2%, rgba(101, 206, 243, 0.18), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7fcff 45%, #ffffff 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.section-space {
  padding: 88px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.navbar {
  min-height: 82px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--white);
  font-size: 26px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: var(--shadow-soft);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  color: var(--navy);
  font-size: 16px;
  line-height: 1.12;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-links a {
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  padding: 12px 13px;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--sky);
  color: var(--blue);
  transform: translateY(-1px);
}

.nav-links .nav-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: var(--shadow-soft);
}

.nav-links .nav-button:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--navy));
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 15px;
  background: var(--sky);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 23px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: calc(100vh - 82px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-decoration {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}

.hero-decoration-one {
  width: 680px;
  height: 680px;
  right: -280px;
  top: -170px;
  background: radial-gradient(circle, rgba(101, 206, 243, 0.22), transparent 62%);
}

.hero-decoration-two {
  width: 520px;
  height: 520px;
  left: -280px;
  bottom: -210px;
  background: radial-gradient(circle, rgba(7, 56, 95, 0.13), transparent 62%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  align-items: center;
  gap: 56px;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.label::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.label.light {
  color: #c7eeff;
}

.hero h1 {
  max-width: 780px;
  margin-bottom: 14px;
  color: var(--navy);
  font-size: clamp(43px, 7vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.058em;
}

.hero-subtitle {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: clamp(25px, 3.4vw, 43px);
  font-weight: 900;
  line-height: 1.05;
}

.hero-main {
  margin-bottom: 8px;
  color: var(--text);
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 900;
}

.hero-text {
  max-width: 650px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.btn {
  min-height: 54px;
  padding: 15px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: 0 18px 38px rgba(7, 56, 95, 0.25);
}

.btn-secondary {
  color: var(--navy);
  background: var(--white);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.hero-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 680px;
}

.hero-data article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.hero-data span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.hero-data strong {
  color: var(--navy);
  font-size: 15px;
}

.hero-photo-card {
  position: relative;
}

.photo-frame {
  position: relative;
  padding: 14px;
  border-radius: 42px;
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(234,248,255,0.9));
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: 32px -16px -16px 32px;
  border-radius: 38px;
  background: linear-gradient(135deg, rgba(11,126,184,0.23), rgba(101,206,243,0.18));
  z-index: -1;
}

.photo-frame img {
  width: 100%;
  border-radius: 32px;
  object-fit: contain;
  background: var(--white);
}

.doctor-card {
  position: absolute;
  left: -22px;
  bottom: 28px;
  width: min(330px, calc(100% - 38px));
  padding: 19px 21px;
  border-radius: 23px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.doctor-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doctor-card strong {
  color: var(--navy);
  font-size: 20px;
  line-height: 1.1;
}

.profile {
  padding-top: 36px;
}

.profile-card {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 34px;
  align-items: start;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.section-title {
  max-width: 770px;
  margin-bottom: 32px;
}

.section-title.compact {
  margin-bottom: 0;
}

.section-title h2,
.profile-card h2,
.diploma-panel h2,
.location-card h2,
.contact-header h2 {
  color: var(--navy);
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-list p {
  padding: 19px;
  border-radius: 19px;
  color: var(--navy);
  font-weight: 900;
  background: var(--sky-soft);
  border: 1px solid var(--line);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 27px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,252,255,0.98));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-7px);
  border-color: rgba(11,126,184,0.28);
  box-shadow: var(--shadow);
}

.service-card span {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: 0 15px 28px rgba(7,56,95,0.18);
}

.service-card h3 {
  margin-top: 22px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.18;
}

.diplomas {
  padding-top: 36px;
}

.diploma-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 38px;
  padding: 46px;
  border-radius: 36px;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.18), transparent 28%),
    linear-gradient(135deg, var(--navy-dark), var(--navy) 55%, var(--blue));
  box-shadow: var(--shadow);
}

.diploma-panel h2,
.contact-header h2 {
  color: var(--white);
}

.diploma-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.diploma-grid span {
  padding: 18px;
  border-radius: 19px;
  color: var(--white);
  font-weight: 900;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.2);
}

.results {
  background: linear-gradient(180deg, #ffffff 0%, var(--sky-soft) 100%);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.gallery-item {
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 29px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--white);
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.012);
}

.gallery-wide {
  grid-column: span 2;
}

.location-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: stretch;
  gap: 26px;
}

.location-card,
.map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.location-card {
  padding: 40px;
}

.location-card p:not(.label) {
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 18px;
}

.map-card {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(7,56,95,0.08) 1px, transparent 1px),
    linear-gradient(rgba(7,56,95,0.08) 1px, transparent 1px),
    linear-gradient(135deg, #f2fbff, #ffffff);
  background-size: 42px 42px, 42px 42px, cover;
}

.map-card::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 2px dashed rgba(11,126,184,0.24);
  border-radius: 28px;
}

.map-pin {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: var(--white);
  font-size: 36px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  box-shadow: var(--shadow-soft);
}

.map-card strong {
  color: var(--navy);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.1;
  margin-bottom: 8px;
}

.map-card span {
  color: var(--muted);
  font-weight: 800;
}

.contact {
  padding-top: 36px;
}

.contact-panel {
  padding: 46px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255,255,255,0.18), transparent 28%),
    linear-gradient(135deg, var(--navy-dark), #082b4b 58%, var(--navy));
  box-shadow: var(--shadow);
}

.contact-header {
  margin-bottom: 28px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.contact-grid a {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border-radius: 21px;
  color: var(--white);
  background: rgba(255,255,255,0.11);
  border: 1px solid rgba(255,255,255,0.18);
  transition: transform 0.25s ease, background 0.25s ease;
}

.contact-grid a:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.18);
}

.contact-grid span {
  color: #c7eeff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-grid strong {
  font-size: 18px;
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-weight: 900;
  background: #25d366;
  box-shadow: 0 18px 40px rgba(37, 211, 102, 0.35);
  transition: transform 0.25s ease;
}

.whatsapp-float:hover {
  transform: scale(1.07) translateY(-2px);
}

.site-footer {
  padding: 28px 0;
  color: rgba(255,255,255,0.78);
  background: #041f36;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
}

/* La página permanece visible aunque JavaScript no cargue o falle alguna animación. */
.reveal,
.js-ready .reveal,
.js-ready .reveal.visible {
  opacity: 1;
  transform: none;
}

.js-ready .reveal {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 1040px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 94px;
    left: 16px;
    right: 16px;
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-14px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .menu-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .hero-grid,
  .profile-card,
  .diploma-panel,
  .location-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 680px) {
  .container,
  .navbar {
    width: min(100% - 24px, 1180px);
  }

  .section-space {
    padding: 62px 0;
  }

  .navbar {
    min-height: 74px;
  }

  .brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    font-size: 21px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .brand-copy small {
    font-size: 10px;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .hero-grid {
    gap: 34px;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 56px);
  }

  .hero-data,
  .profile-list,
  .services-grid,
  .diploma-grid,
  .gallery-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .gallery-wide {
    grid-column: auto;
  }

  .profile-card,
  .diploma-panel,
  .location-card,
  .contact-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .photo-frame,
  .photo-frame img,
  .photo-frame::before {
    border-radius: 26px;
  }

  .doctor-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    margin-top: 14px;
  }

  .service-card {
    min-height: 150px;
  }

  .gallery-item {
    min-height: 220px;
  }

  .map-card {
    min-height: 280px;
  }

  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }
}
