/* ===================== RESET Y FUENTES ===================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Montserrat:wght@700&display=swap');

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

body {
  font-family: 'Kohinoor Bangla', 'Inter', Arial, sans-serif;
  color: #333;
  background: #f8faff;
}

.subseccion h3,
#protesis-oculares h3,
#odontologia h3 {
  color: #789ce2 !important;
}

rie-estatico {
  font-family: 'Montserrat', 'Inter', Arial, sans-serif;
  font-weight: 700;
  color: #789ce2 !important;
  letter-spacing: 0.5px;
}

/* ===================== HEADER Y NAVBAR ===================== */
header {
  background-color: white;
  width: 100%;
  display: block;
}

/* Div con logo e iconos - FIXED */
header > div:first-child {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  width: 100%;
  padding-bottom: 0;
  border-bottom: none;
}

.logo {
  max-height: 100px;
}

/* Menú de escritorio */
nav a, nav.menu-desktop a {
  margin-left: 20px;
  text-decoration: none;
  color: #99c2f2;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
  padding: 8px 22px;
  border-radius: 30px;
  background: transparent;
  display: inline-block;
  border: 2px solid #789ce2;
  box-shadow: none;
}

/* Contenedor del menú con submenú */
.menu-item-con-submenu {
  position: relative;
  display: inline-block;
  margin-left: 0;
}

.menu-item-con-submenu > a {
  margin-left: 0 !important;
}

/* Estilos del submenú */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 2px solid #789ce2;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 250px;
  margin-top: 0;
  padding-top: 0.5rem;
  z-index: 1000;
  padding: 0.5rem 0;
}

/* Área invisible para mantener el hover */
.menu-item-con-submenu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.submenu a {
  display: block;
  padding: 10px 20px;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: white !important;
  color: #789ce2 !important;
  transition: background 0.3s ease;
  text-align: left;
}

.submenu a:hover {
  background: linear-gradient(90deg, #a5dbe3 0%, #789ce2 100%) !important;
  color: white !important;
}

.menu-item-con-submenu:hover .submenu {
  display: block;
}

nav a.active,
nav a:hover,
nav.menu-desktop a.active,
nav.menu-desktop a:hover {
  background: linear-gradient(90deg, #a5dbe3 0%, #789ce2 100%);
  color: #fff;
  border: 2px solid #789ce2;
  box-shadow: 0 2px 8px rgba(100,184,195,0.10);
  text-decoration: none;
}

/* Menú desktop visible solo en pantallas grandes */
.menu-desktop {
  display: flex;
  gap: 1.2rem;
  margin-top: 110px;
  margin-bottom: 0;
  width: 100%;
  justify-content: space-around;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(238, 238, 238, 0.3);
  flex-wrap: wrap;
}

/* Menú de escritorio */
nav a, nav.menu-desktop a {
  margin-left: 0;
  text-decoration: none;
  color: #99c2f2;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
  padding: 8px 22px;
  border-radius: 30px;
  background: transparent;
  display: inline-block;
  border: 2px solid #789ce2;
  box-shadow: none;
  text-transform: uppercase;
}

/* Menú móvil */
.menu-mobile {
  display: none;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

#menu-mobile-toggle {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
}

#menu-mobile-label {
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  background: #eaf1fb;
  color: #789ce2;
  font-weight: bold;
  font-size: 1.1rem;
  border: 2px solid #789ce2;
  box-shadow: 0 2px 8px rgba(120,156,226,0.07);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#menu-mobile-arrow {
  transition: transform 0.3s;
}

.menu-mobile.open #menu-mobile-arrow {
  transform: rotate(-90deg);
}

#menu-mobile-dropdown {
  position: absolute;
  top: 3.2rem;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 1rem 1.5rem;
  z-index: 999;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
#menu-mobile-dropdown a {
  color: #789ce2;
  text-decoration: none;
  padding: 0.8rem 1rem;
  font-size: 1.05rem;
  width: 100%;
  text-align: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}
#menu-mobile-dropdown a:hover {
  background: #eaf1fb;
  transform: translateX(2px);
}

/* Submenú móvil de testimonios */
.submenu-mobile {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 0.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 0.8rem;
  min-width: 200px;
  z-index: 1000;
}

.submenu-mobile a {
  display: block;
  padding: 0.7rem 1rem !important;
  font-size: 0.95rem !important;
  color: #5a6e8c !important;
  text-align: left !important;
  font-weight: 400 !important;
  border-radius: 6px;
  margin-bottom: 0.3rem;
}

.submenu-mobile a:hover {
  background: #eaf1fb !important;
  padding-left: 1.2rem !important;
}

/* Contenedor relativo para el item de testimonios en móvil */
#menu-mobile-dropdown > a:nth-child(4) {
  position: relative;
}

/* Selector de testimonios dentro de la sección - solo visible en móvil */
.selector-testimonios-mobile {
  display: flex !important;
}

/* Menú desplegable personalizado para testimonios en móvil */
.menu-desplegable-testimonios {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-top: 0.5rem;
  min-width: 250px;
  z-index: 1000;
  padding: 0.5rem 0;
}

.menu-desplegable-testimonios a {
  display: block;
  padding: 0.8rem 1.2rem;
  color: #5a6e8c;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.menu-desplegable-testimonios a:hover {
  background: #f0f4f8;
}

/* Ocultar selector en pantallas grandes (computadora) */
@media (min-width: 901px) {
  .selector-testimonios-mobile {
    display: none !important;
  }
}

/* Responsive: solo muestra el menú mobile en pantallas chicas */
@media (max-width: 900px) {
  .menu-desktop {
    display: none !important;
  }
  .menu-mobile {
    display: flex !important;
    margin-top: 110px;
    width: 100%;
    justify-content: flex-start;
    padding: 1rem 2rem;
    background-color: white;
    border-bottom: 1px solid #eee;
  }
  
  .email-solo-desktop {
    display: none !important;
  }
}

@media (max-width: 700px) {
  nav.menu-desktop {
    position: static !important;
    width: 100%;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: none;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  nav.menu-desktop a {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    padding: 0.7rem 0.5rem;
    border-radius: 2rem;
    border: 2px solid #789ce2;
    color: #789ce2;
    background: #fff;
    margin-bottom: 0.3rem;
  }
}

@media (max-width: 700px) {
  .rie-logo-inicio {
    font-family: 'Montserrat', 'Inter', Arial, sans-serif;
    font-weight: 900;
    font-size: 2.7rem;
    color: #789ce2;
    letter-spacing: 5px;
    text-align: center;
    margin: 32px 0 18px 0;
    text-shadow: 0 2px 12px rgba(120,156,226,0.10);
    display: block;
  }
}

@media (max-width: 700px) {
  .carrusel-fotos {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
  }
  .carrusel-img {
    width: 100vw;
    height: 60vw;
    max-height: 60vw;
    object-fit: cover;
    border-radius: 0;
    display: block;
  }
  #rie-tipeo.rie-desktop {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
    flex-direction: column !important;
    gap: 0.7rem !important;
    text-align: center !important;
  }
}

/* ===================== HERO Y INTRO ===================== */
.hero {
  text-align: center;
  padding: 0px;
  background: linear-gradient(to right, #e8edf6, #f5fcfd);
  width: 100%;
}
.hero h1 {
  font-size: 3.5rem;
  color: #789ce2;
}
.hero h2 {
  font-size: 1.8rem;
  margin: 0;
  font-family: 'Georgia', serif;
  font-weight: normal;
}
.hero p {
  font-size: 1.2rem;
  color: #666;
}

.intro-container {
  text-align: center;
  margin: 2rem auto;
  max-width: 800px;
  padding: 1rem;
}
.intro-container h3 {
  font-size: 2rem;
  color: #789ce2;
}
.intro-container p {
  font-size: 1.1rem;
  color: #444;
  margin-top: 0.5rem;
}

/* Fotos de los destacados más anchas */
.card-icono img {
  width: 185px;
  height: 220px;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: 16px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ver mas */
.btn-ver-mas {
  background: #789ce2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 1.2rem;
  margin: 0.7rem 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.btn-ver-mas:hover {
  background: #5b72a0;
}
.contenido-colapsable {
  margin-top: 0.7rem;
  animation: fadeIn 0.4s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* ===================== DESTACADOS INICIO ===================== */
.destacados-inicio {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  margin-bottom: 4rem;
  color: #789ce2;
}
.card-icono {
  background: #f5fafa;
  border-radius: 10px;
  padding: 2rem;
  width: 350px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-icono h4 {
  color: #789ce2;
  margin-bottom: 0.5rem;
}
.card-icono p {
  font-size: 0.95rem;
  color: #555;
}

/* ===================== TESTIMONIO ===================== */
.testimonio-inicio {
  background: #b1bfd1;
  padding: 2rem;
  margin: 3rem auto;
  max-width: 700px;
  border-left: 5px solid #99c2f2;
  font-style: italic;
}
.testimonio-inicio blockquote {
  font-size: 1.1rem;
  margin: 0;
}
.firma-testimonio {
  margin-top: 1rem;
  font-weight: bold;
  text-align: right;
  color: #99c2f2;
}

.video-cover {
  position: relative;
  width: 100%;
  height: 225px;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: #eaf1fb;
  box-shadow: 0 2px 16px rgba(120,156,226,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-cover-youtube {
  position: relative;
  width: 100%;
  height: 225px;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: #eaf1fb;
  box-shadow: 0 2px 16px rgba(120,156,226,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-cover-youtube img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-cover-youtube .play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  z-index: 2;
  transition: opacity 0.3s;
  opacity: 1;
  pointer-events: none;
}

.video-fondo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1.5px) brightness(0.7) grayscale(0.1);
  transition: filter 0.5s;
  pointer-events: none;
}
.video-cover.playing .video-fondo {
  filter: none;
  pointer-events: auto;
}
.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  z-index: 2;
  transition: opacity 0.3s;
  opacity: 1;
}
.video-cover.playing .play-btn {
  opacity: 0;
  pointer-events: none;
}
.video-testimonio {
  flex: 1 1 400px;
  max-width: 400px;
  transition: flex-basis 0.7s cubic-bezier(.25,.8,.25,1), max-width 0.7s cubic-bezier(.25,.8,.25,1), box-shadow 0.7s;
  z-index: 10;
}
.video-testimonio.zoomed {
  flex: 2 1 700px;
  max-width: 700px;
  z-index: 20;
}

#video-testimonio-2 {
  object-fit: cover;
  object-position: center 74%;
}

#video-testimonio-5 {
  object-fit: cover;
  object-position: center 64%;
}


#video-testimonio-3 {
  object-fit: cover;
  object-position: center 30%;
}

/* ===================== ESTADÍSTICAS INICIO ===================== */
.stats-inicio {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin: 3rem 0 2.5rem 0;
  background: #f8faff;
  border-radius: 24px;
  padding: 2.5rem 1rem;
  box-shadow: 0 4px 24px rgba(120,156,226,0.07);
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
  margin: 0 1rem;
}
.stat-num,
.stat-sufijo {
  display: inline-block;
  vertical-align: middle;
}
.stat-num {
  font-size: 2.8rem;
  color: #789ce2;
  font-weight: 800;
  letter-spacing: 1px;
  transition: color 0.3s;
}
.stat-sufijo {
  font-size: 2.2rem;
  color: #789ce2;
  font-weight: 700;
  margin-left: 4px;
}
.stat-label {
  margin-top: 1rem;
  color: #5b72a0;
  font-size: 1.25rem;
  text-align: center;
  font-weight: 500;
}
@media (max-width: 700px) {
  .stats-inicio {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0.5rem;
  }
  .stat-card {
    min-width: 0;
    margin: 0;
  }
  .stat-label {
    font-size: 1.1rem;
  }
}

/* ===================== SECCIONES GENERALES ===================== */
section {
  padding: 40px 0;
  width: 100%;
  margin: 0;
}
.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #789ce2;
  animation: fadeIn 1s ease-in-out;
}

/* ===================== BLOQUES DE TEXTO ===================== */
.protesis-intro,
.tratamiento,
.galeria,
.equipo,
#nosotros,
#contacto {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 0;
  box-shadow: none;
  padding: 20px 40px;
  margin-bottom: 0;
  animation: fadeInUp 0.7s ease-in-out;
}
.tratamiento h3,
.galeria h3 {
  margin-bottom: 10px;
  color: #789ce2;
}

/* ===================== GALERÍA ===================== */
.imagenes-comparacion {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.img-container {
  position: relative;
  width: 300px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease;
}
.img-container:hover {
  transform: scale(1.05);
}
.img-container img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(1) contrast(1.1);
  transition: filter 0.3s ease;
}
.etiqueta {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: #789ce2;
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
}



/* ===================== EQUIPO ===================== */
.equipo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.persona {
  text-align: center;
  max-width: 250px;
  position: relative;
  width: 200px;
  margin: 20px;
}
.foto-container {
  position: relative;
  width: 180px;
  height: 220px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50% 50% / 55% 55%; /* forma de huevo parada */
}
.foto-equipo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50% 50% / 55% 55%;
  transition: filter 0.3s, opacity 0.3s;
}
.overlay-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.6);
  color: #789ce2;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  justify-content: center;
  align-items: center;
  display: none;
  text-decoration: none;
  border-radius: 50% 50% / 55% 55%;
  transition: 0.3s ease;
  padding: 20px;
  z-index: 2;
  cursor: pointer;
}
.foto-container:hover .foto-equipo {
  filter: brightness(1.1) grayscale(0.1);
  opacity: 0.5;
}
.foto-container:hover .overlay-info {
  display: flex;
}
/* ===================== CARRUSEL ===================== */
.carrusel-fotos {
  width: 100vw;
  max-width: 100vw;
  position: relative;
  overflow: hidden;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-bottom: 2rem;
}
.carrusel-img {
  width: 100%;
  display: none;
  border-radius: 0;
  object-fit: cover;
  height: 400px;
}
.carrusel-img.active {
  display: block;
}

/* ===================== FOOTER ===================== */
footer {
  text-align: center;
  padding: 5px 10px;
  background-color: #8ea8de;
  color: #333;
  font-size: 0.65rem;
}
footer p {
  margin: 1px 0;
}
footer .info {
  margin-top: 3px;
  font-size: 0.6rem;
  color: #555;
}

/* ===================== ANIMACIONES ===================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes palabraInLeft {
  0% { transform: translateX(-150%); opacity: 0; }
  50% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}
@keyframes palabraInTop {
  0% { transform: translateY(-150%); opacity: 0; }
  50% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes palabraInRight {
  0% { transform: translateX(150%); opacity: 0; }
  50% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}
@keyframes fadeInLetra {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes revealMask {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0% 0 0); }
}
@keyframes parpadeo {
  0% { opacity: 1; }
  100% { opacity: 0.4; }
}
@keyframes pulsoFlecha {
  0% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===================== RIE LOGO ANIMADO ===================== */
#rie-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  font-size: 3rem;
  font-weight: bold;
  margin-top: 50px;
  margin-bottom: 0;
}
.letra {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}
.palabra {
  font-size: 1.5rem;
  white-space: nowrap;
  opacity: 0;
  margin-bottom: 10px;
  animation-fill-mode: forwards;
}
#rie-container .palabra {
  font-family: 'garmondbold', 'Georgia', serif;
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: 1px;
  color: #789ce2;
  text-shadow: 0 2px 8px rgba(100,184,195,0.10);
  display: inline-block;
  margin-bottom: 8px;
  transition: color 0.3s;
}
#rie-container .palabra#rehab,
#rie-container .palabra#integ,
#rie-container .palabra#estet {
  color: #789ce2;
}
#intro-tipeo {
  text-align: center;
  margin-top: 60px;
  font-family: 'Georgia', serif;
  font-size: 2.2rem;
  color: #98BFFA;
}
#palabra-tipeada {
  display: inline-block;
}
#cursor {
  display: inline-block;
  animation: blink 0.8s infinite;
  color: #98BFFA;
}
#rie-letras {
  margin-top: 20px;
  font-size: 3rem;
  font-weight: bold;
}
.letra-final {
  color: #98BFFA;
  margin: 0 10px;
  display: inline-block;
}
.final-img {
  width: 120px;
  height: 120px;
  margin: -100;
  opacity: 0;
  animation: fadeInLetra 0.5s forwards;
}
#pincelada-container {
  position: relative;
  width: 300px;
  height: auto;
  overflow: hidden;
  margin: -1111px auto 0;
}
#pincelada {
  width: 300px;
  height: auto;
  clip-path: inset(0 100% 0 0);
  animation: revealMask 2s ease-out forwards;
  margin-top: -40px;
  margin-bottom: 10px;
}

/* ===================== INFO ICONOS ===================== */
.info-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.info-item {
  text-align: center;
  max-width: 150px;
}
.icon-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background: none;
}
.telefono-link {
  text-decoration: none;
  color: #789ce2;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contacto-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.contacto-link:hover {
  color: #789ce2;
}

/* ===================== SECCIONES PRINCIPALES ===================== */
#odontologia, #protesis-oculares, #equipo, #contacto, #nosotros {
  background-color: rgba(250, 249, 249, 0.95);
  padding: 20px 40px;
  border-radius: 0;
  max-width: none;
  margin: 0;
  box-shadow: none;
  animation: fadeInUp 0.7s ease-in-out;
}

/* Imagen grande igual en ambas secciones */
.foto-seccion-grande {
  width: 100%;
  max-width: none;
  height: 320px;
  object-fit: cover;
  display: block;
  margin: 30px 0 40px 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 700px) {
  .foto-seccion-grande {
    width: 100%;
    height: 60vw;
    max-height: 60vw;
    object-fit: cover;
    border-radius: 20px;
    margin: 1rem auto;
  }
}

/* ===================== PRÓTESIS OCULARES ===================== */
#protesis-oculares {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 40px 40px;
  border-radius: 0;
  max-width: none;
  margin: 0;
  box-shadow: none;
  animation: fadeInUp 0.7s ease-in-out;
}
#protesis-oculares h2 {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 30px;
  color: #789ce2;
}
#protesis-oculares .subseccion {
  margin-top: 20px;
}
.icon-ubi {
  width: 60px;
  height: 60px;
  filter: brightness(0.0);
}
#protesis-oculares .subseccion h3 {
  color: #789ce2;
  margin-bottom: 10px;
}
#protesis-oculares .subseccion p {
  line-height: 1.6;
  color: #444;
  font-size: 1rem;
}
#protesis-oculares .antes-despues {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Ajusta la posición vertical para que los ojos coincidan */
#wrapper-ojo-caso2 .img-top,
#wrapper-ojo-caso2 .img-bottom {
  object-position: center 35%;
}

/* Ajusta la posición vertical para que los ojos coincidan en el primer caso */
#wrapper-ojo-caso1 .img-top,
#wrapper-ojo-caso1 .img-bottom {
  object-position: center 38%;
}

#protesis-oculares .antes-despues img {
  width: 250px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
#protesis-oculares .antes-despues .etiqueta {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 5px;
  color: #789ce2;
}

/* ===================== GALERÍA ANTES Y DESPUÉS ===================== */
.galeria-antes-despues {
  margin: 2.5rem 0;
}
.galeria-antes-despues h3 {
  color: #789ce2;
  text-align: center;
  margin-bottom: 1.5rem;
}
.casos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
}
.caso {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(120,156,226,0.07);
  padding: 1.2rem 1rem;
  min-width: 180px;
}
.caso img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(120,156,226,0.08);
}
.caso .etiqueta {
  font-size: 0.95rem;
  color: #789ce2;
  margin-bottom: 0.7rem;
  background: #eaf1fb;
  border-radius: 12px;
  padding: 2px 12px;
}


/* ===================== ODONTOLOGÍA ===================== */
/* ...Tus reglas para odontología aquí... */

/* ===================== ANTES Y DESPUÉS (COMPARADOR) ===================== */
.comparador {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 40px auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.img-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  background: transparent;
}
.img-bottom,
.img-top {
  width: 100%;
  display: block;
  background: transparent;
}
.img-top {
  position: absolute;
  top: 0;
  left: 0;
  clip-path: inset(0 50% 0 0);
  z-index: 2;
}
.img-slider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-2px);
  width: 4px;
  height: 100%;
  background-color: #789ce2;
  cursor: ew-resize;
  z-index: 3;
  border-radius: 2px;
}
.img-slider.sin-texto::before {
  display: none;
}
.flechas {
  font-size: 36px;
  font-weight: bold;
  color: #789ce2;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  animation: pulsoFlecha 1.2s ease-in-out infinite;
}

/* ===================== MODAL OTROS CASOS ===================== */
#modal-otros-casos-dientes > div,
#modal-otros-casos-ojos > div {
  max-width: 600px;
  width: 100%;
  padding: 2rem 0;
  border-radius: 10px;
  margin: 0 auto;
  box-sizing: border-box;
}
.comparador-modal {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.img-wrapper-modal {
  position: relative;
  width: 100%;
  max-width: 600px;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}
.img-wrapper-modal img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 900px) {
  .comparador-modal {
    max-width: 500px;
  }
  .img-wrapper-modal {
    max-width: 500px;
  }
}

/* ===================== UTILIDADES Y CLASES GENERALES ===================== */
.contenido {
  display: block;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}
.contenido.oculto {
  display: none;
  opacity: 0;
}

/* ===================== RESPONSIVE AJUSTES ===================== */
@media (max-width: 768px) {
  nav a {
    display: block;
    margin: 10px 0;
  }
  .imagenes-comparacion {
    flex-direction: column;
    align-items: center;
  }
  .equipo {
    flex-direction: column;
    align-items: center;
  }
}
@media (max-width: 600px) {
  #rie-container,
  #rie-tipeo {
    flex-direction: column !important;
    gap: 0.5rem !important;
    font-size: 1.45rem !important;
    margin-top: 18px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .letra,
  .rie-letra {
    font-size: 1.45rem !important;
    margin-bottom: 0 !important;
    min-width: 0 !important;
  }
  #rie-container .palabra,
  #rie-tipeo .palabra,
  .rie-letra span {
    font-size: 1.4rem !important;
    margin-bottom: 2px !important;
    max-width: 92vw !important;
    word-break: break-word !important;
    white-space: normal !important;
    text-align: center !important;
    letter-spacing: 0 !important;
  }
}

/* ===================== FIN DEL CSS ===================== */
/* Galería de antes y después: efecto sutil y profesional */
.foto-antes-despues {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-end;
}

.foto-antes img, .foto-despues img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(120,156,226,0.10);
  transition: 
    transform 0.45s cubic-bezier(.25,.8,.25,1),
    box-shadow 0.45s cubic-bezier(.25,.8,.25,1),
    filter 0.45s cubic-bezier(.25,.8,.25,1);
  filter: brightness(0.98) contrast(1.04) saturate(1.05);
}

.foto-antes img:hover, .foto-despues img:hover {
  transform: scale(1.035) translateY(-8px);
  box-shadow: 0 12px 32px rgba(120,156,226,0.18), 0 2px 16px rgba(120,156,226,0.10);
  filter: brightness(1.03) contrast(1.08) saturate(1.1);
  z-index: 2;
}

@media (max-width: 700px) {
  .foto-antes-despues {
    flex-direction: row;
    gap: 0.8rem;
  }
  .foto-antes img, .foto-despues img {
    width: 45vw;
    max-width: 200px;
    height: 45vw;
    max-height: 200px;
    object-fit: cover;
  }
}

/* Efecto de aparición orgánica para fotos */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(.25,.8,.25,1), transform 0.8s cubic-bezier(.25,.8,.25,1);
  will-change: opacity, transform;
}
.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* posicion de fotos*/



.foto-despues img[src="barbaD.jpeg"] {
  object-position: 40% 30%;
}

.foto-despues img[src="barbaA.jpeg"] {
  object-position: 90%;
}



/* SOLO dentro del modal de "otros casos" */
#modal-otros-casos-ojo .foto-antes,
#modal-otros-casos-ojo .foto-despues {
  height: 200px;              /* más bajitas → más rectangulares */
  aspect-ratio: 3 / 1;        /* 🔥 rectángulo horizontal */
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
}

#modal-otros-casos-ojo .foto-antes img,
#modal-otros-casos-ojo .foto-despues img {
  width: 80%;
  object-fit: contain;        /* no corta nada */
}

@media (max-width: 700px) {
  #modal-otros-casos-ojo p {
    margin-bottom: 0.3rem;
  }
  #modal-otros-casos-ojo .comparador-modal {
    margin-bottom: 0.5rem;
  }
}

/* Modal de dientes - fotos cuadradas */
#modal-otros-casos-dientes .foto-antes,
#modal-otros-casos-dientes .foto-despues {
  height: 300px;              /* altura fija */
  width: 300px;               /* ancho fijo - cuadrado */
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;             /* no se encogen */
}

#modal-otros-casos-dientes .foto-antes img,
#modal-otros-casos-dientes .foto-despues img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* llena todo el espacio, hace zoom si es necesario */
  border-radius: 14px;
}

/* Ajuste específico para la foto del caso 4 después - baja la imagen */
#modal-otros-casos-dientes .caso:nth-child(4) .foto-despues img {
  object-position: top 100%;  /* baja la imagen un 30% desde arriba */
}

/* Reduce el espacio entre antes y después en el modal de dientes */
#modal-otros-casos-dientes .foto-antes-despues {
  gap: 0.4rem;                /* muy cerca */
}

/* Agrega margen alrededor del contenido del modal de dientes */
#modal-otros-casos-dientes > div {
  padding: 1.5rem !important;
}

#modal-otros-casos-dientes .casos-grid {
  padding: 0.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 700px) {
  #modal-otros-casos-dientes .foto-antes,
  #modal-otros-casos-dientes .foto-despues {
    width: 85vw;
    max-width: 350px;
    height: 120px;
  }
  
  #modal-otros-casos-dientes .foto-antes img,
  #modal-otros-casos-dientes .foto-despues img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  
  #modal-otros-casos-dientes .foto-antes-despues {
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
  }
  
  #modal-otros-casos-dientes .casos-grid {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  #modal-otros-casos-dientes .caso {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  /* Flechas más pequeñas y mejor posicionadas en móvil */
  .flecha-nav {
    width: 28px !important;
    height: 28px !important;
    font-size: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
}

/* Estilos generales para las flechas de navegación */
.flecha-nav:hover {
  background: rgba(120, 156, 226, 0.9) !important;
  transform: scale(1.1);
}

.flecha-nav:active {
  transform: scale(0.95);
}

/* Caso 6 y 8 horizontal - formato panorámico */
.caso-8-horizontal .foto-antes img,
.caso-8-horizontal .foto-despues img {
  width: 550px !important;
  height: 240px !important;
  object-fit: cover !important;
  border-radius: 16px !important;
}

@media (max-width: 700px) {
  .caso-8-horizontal .foto-antes img,
  .caso-8-horizontal .foto-despues img {
    width: 85vw !important;
    height: 160px !important;
  }
}

/* Ocultar email en móvil */
@media (max-width: 900px) {
  .email-solo-desktop {
    display: none !important;
  }
}
