/* Prevenir overflow horizontal global */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-family: 'Roboto Condensed', sans-serif;
  background-color: #eeeeee;
  color: #333;
}

/* Box-sizing para todos los elementos */
* {
  box-sizing: border-box;
}

/* Imágenes responsivas */
img {
  max-width: 100%;
  height: auto;
}

/* Clases por peso */
.thin { font-weight: 100; }
.extralight { font-weight: 200; }
.light { font-weight: 300; }
.regular { font-weight: 400; }
.medium { font-weight: 500; }
.semibold { font-weight: 600; }
.bold { font-weight: 700; }
.extrabold { font-weight: 800; }

/* Sección 1 */
.topbar {
  background-color: #98268C;
  color: white;
  padding: 8px 20px;
  width: 100%;
  box-sizing: border-box;
}

.topbar-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.phones {
  display: flex;
  gap: 30px;
  font-size: 14px;
}

.instagram-link {
  position: absolute;
  right: 80px;
}

.instagram-icon {
  height: 20px;
}

/* Sección 2 */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  background: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.logo {
  height: 100px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  color: black;
  font-weight: 600;
  position: relative;
  padding-bottom: 5px;
}

.nav-links li.active a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5px;
  width: 100%;
  background-color: #98268C;
}

.hero-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 512px;
  background-color: #CAC7CE;
  overflow: hidden;
}

.hero-background {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left;
}

.hero-overlay {
  position: absolute;
  top: 15%;
  right: 5%;
  width: 35%;
  max-width: calc(100% - 40px);
  background-color: rgba(152, 38, 140, 0.58);
  color: white;
  padding: 25px;
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 15px;
  box-sizing: border-box;
}

.hero-overlay .small-heading {
  font-size: 16px;
  margin: 0;
}

.hero-overlay h1 {
  font-size: 32px;
  margin: 0;
}

.hero-overlay .subheading {
  font-size: 20px;
  line-height: 1.4;
}

.hero-overlay .footer-text {
  font-size: 16px;
  line-height: 1.4;
}

/* Sección 4 */
.equipo-medico {
  padding: 60px 40px;
  text-align: center;
  background-color: #eeeeee;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.equipo-medico h2 {
  font-size: 50px;
  color: #98268C;
  margin-bottom: 50px;
}

.equipo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  justify-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.medico-card {
  width: 250px;
  background-color: #98268C;
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  color: white;
  padding-bottom: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.medico-card:hover {
  transform: translateY(-5px);
}

.medico-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.medico-card h3 {
  margin-top: 15px;
  font-size: 20px;
}

section.porque-alliancer-wrapper {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.porque-alliancer-wrapper h2 {
  font-size: 30px;
  color: #98268C;
  text-align: center;
  margin-bottom: 30px;
}

.porque-contenedor-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 180px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.porque-alliancer-box {
  background-color: #98268C;
  border-radius: 25px;
  padding: 40px;
  color: white;
  text-align: center;
  font-size: 20px;
  line-height: 1.6;
  width: 363px;
  max-width: 100%;
  height: 441px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.porque-alliancer-box p {
  margin: 0;
}

.porque-texto-externo {
  color: rgba(185, 42, 170, 0.60);
  max-width: 302px;
  text-align: left;
  font-size: 22px;
  line-height: 1.6;
}

/* Sección de contacto */
.contacto-section {
  padding: 60px 40px;
  background-color: #eeeeee;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.contacto-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.contacto-texto {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
}

.contacto-texto h2 {
  color: #98268C;
  font-size: 28px;
  margin-bottom: 20px;
  text-align: left;
}

.texto-morado {
  color: #B8B6BB;
  font-size: 18px;
  margin-bottom: 10px;
  text-align: left;
}

.texto-gris {
  color: #7E7E7E;
  font-size: 18px;
  text-align: left;
  margin-bottom: 20px;
}

.imagen-contacto {
  margin-top: 20px;
  max-width: 68%;
  border-radius: 10px;
}

.contacto-formulario {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 0px;
  margin-top: 20px; 
}

.contacto-formulario input,
.contacto-formulario select,
.contacto-formulario textarea {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

.contacto-formulario textarea {
  height: 100px;
  resize: vertical;
}

.contacto-formulario button {
  background-color: rgba(152, 38, 140, 0.74);
  color: white;
  border: none;
  width: 83px;
  height: 36px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.contacto-formulario button:hover {
  background-color: rgba(152, 38, 140, 0.9);
}

/* Sección de consultorio */
.consultorio-section {
  padding: 60px 40px;
  background-color: #eeeeee;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.consultorio-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.consultorio-info {
  flex: 1;
  min-width: 300px;
}

.consultorio-info h2 {
  color: #98268C;
  font-size: 30px;
  margin-bottom: 20px;
}

.consultorio-sub {
  color: #98268C;
  font-size: 22px;
  margin-bottom: 15px;
}

.consultorio-detalles {
  color: #7E7E7E;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.consultorio-detalles a {
  color: #7E7E7E;
  text-decoration: none;
}

.mapa-btn {
  background-color: #98268C;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.mapa-btn:hover {
  background-color: #7c1f71;
}

.consultorio-mapa {
  flex: 1;
  min-width: 300px;
}

.consultorio-mapa iframe {
  max-width: 100%;
  width: 100%;
  height: 450px;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0px;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}

.faq-container {
  margin-top: 60px;
}

.faq-container h2 {
  color: #98268C;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 20px;
  font-family: 'Roboto Condensed', sans-serif;
}

.faq-item {
  background-color: #d9d9d9;
  margin-bottom: 12px;
  border-radius: 6px;
  max-width: 600px;
  width: 100%;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}

.faq-icon {
  font-size: 20px;
  margin-right: 12px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 18px;
  background-color: #eeeeee;
  font-size: 15px;
  border-top: 1px solid #ccc;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}

.faq-item.open .faq-answer {
  padding: 12px 18px;
  max-height: 300px;
}

/* CTA */
.cta-section {
  text-align: center;
  padding: 40px 20px;
  background-color: #f5f5f5;
}

.cta-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.cta-button {
  background-color: #98268C;
  color: white;
  border: none;
  padding: 14px 30px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  background-color: #7b1f71;
}

.acerca-header h1 {
  color: #98268C;
  text-align: center;
  font-size: 36px;
  padding: 100px;
}

.servicio-header h1 {
  color: #98268C;
  text-align: center;
  font-size: 36px;
  padding: 100px;
}


.medicos-destacados {
  background-color: #eeeeee;
  padding: 0;
}

.medico-bloque,
.servicio-bloque {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 5px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px;
  box-sizing: border-box;
  min-height: 400px;
}

.medico-bloque.morado,
.servicio-bloque.morado {
  background-color: #98268C;
  color: white;
}

.medico-bloque.lila,
.servicio-bloque.lila {
  background-color: rgba(152, 38, 140, 0.66);
  color: white;
}

.medico-texto,
.servicio-texto {
  flex: 1;
  padding-right: 40px;
  max-width: 60%;
}

.medico-texto h3,
.servicio-texto h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.especialidad {
  font-size: 16px !important;
  font-weight: 500 !important;
  margin-bottom: 20px !important;
  opacity: 0.9;
}

.medico-texto p,
.servicio-texto p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: justify;
}

.medico-texto a,
.servicio-texto a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.medico-foto,
.servicio-foto {
  flex: 0 0 400px;
  height: auto;
  max-height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* IMÁGENES - DIFERENCIACIÓN ENTRE MÉDICOS Y SERVICIOS - FIXED */
.servicio-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.medico-foto img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  border-radius: 15px;
  object-position: center !important;
}


.drmarco,
.draeileen,
.drivanrosales,
.draldo {
  width: 100% !important;
  height: auto !important;
  max-height: 500px !important;
  object-fit: cover !important;
  object-position: center !important;
}



.drvictor{
   margin-top: auto;
  width: 100% !important;
  height: 95% !important;
  max-height: 600px !important;
}

.drivan{
   margin-top: auto;
  width: 100% !important;
  height: 100% !important;
  max-height: 700px !important;
}

/* Footer */
.site-footer {
  background-color: #98268C;
  color: white;
  padding: 40px 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1080px;
  margin: 0 auto;
}

.footer-column h4 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.footer-column ul li a:hover {
  text-decoration: underline;
}

.footer-column .instagram-link-footer .instagram-icon {
  height: 30px;
  width: auto;
  display: inline-block;
  margin-top: 10px;
}

.footer-logo img {
  width: 185px;
  margin-bottom: 10px;
}

.footer-subtext {
  font-size: 14px;
  font-style: italic;
}

.pagina-legal {
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 20px;
}

.pagina-legal h1 {
  color: #98268C;
  font-size: 36px;
  margin-bottom: 20px;
}

.pagina-legal h2 {
  color: #98268C;
  font-size: 24px;
  margin-top: 40px;
}

.pagina-legal p, .pagina-legal li {
  font-size: 18px;
  line-height: 1.6;
  text-align: justify;
}

.pagina-legal ul {
  padding-left: 20px;
}

.gracias-container {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 90%;
}

.gracias-container h1 {
  color: #98268C;
  font-size: 32px;
  margin-bottom: 20px;
}

.gracias-container p {
  font-size: 18px;
  margin-bottom: 30px;
}

.gracias-container a {
  display: inline-block;
  background-color: #98268C;
  color: white;
  text-decoration: none;
  padding: 10px 25px;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s;
}

.gracias-container a:hover {
  background-color: #b92aaa;
}

/* HAMBURGER MENU */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 4px 0;
  transition: 0.4s;
}


/* Pantallas grandes (1400px - 1200px) */
@media (max-width: 1400px) {
  .medico-bloque,
  .servicio-bloque {
    padding: 50px 40px;
    max-width: 100%;
  }
  
  .medico-foto,
  .servicio-foto {
    flex: 0 0 350px;
    max-height: 450px;
  }
}

/* Pantallas medianas-grandes (1200px - 900px) */
@media (max-width: 1200px) {
  .medico-bloque,
  .servicio-bloque {
    padding: 40px 30px;
    min-height: 350px;
  }
  
  .medico-texto,
  .servicio-texto {
    padding-right: 30px;
    max-width: 65%;
  }
  
  .medico-foto,
  .servicio-foto {
    flex: 0 0 320px;
    max-height: 400px;
  }
  
  .medico-texto h3,
  .servicio-texto h3 {
    font-size: 24px;
  }
  
  .medico-texto p,
  .servicio-texto p {
    font-size: 16px;
  }
}

/* Navegación responsive */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: white;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    text-align: right;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    margin-bottom: 15px;
  }

  .main-nav {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }

  .hamburger {
    display: flex;
    position: absolute;
    right: 20px;
    top: 25px;
  }
}

/* Pantallas medianas (900px - 768px) */
@media (max-width: 900px) {
  .medico-bloque,
  .servicio-bloque {
    flex-direction: column;
    padding: 40px 30px;
    min-height: auto;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .medico-texto,
  .servicio-texto {
    max-width: 100%;
    padding-right: 0;
    margin-bottom: 30px;
  }
  
  .medico-foto,
  .servicio-foto {
    flex: none;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
  }
  
  .medico-foto img {
    width: 100%;
    height: auto;
    max-height: 400px;
  }
  
  .equipo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .porque-contenedor-flex {
    gap: 50px;
  }

  .hero-overlay {
    width: 80%;
    right: 10%;
    left: 10%;
  }

  .contacto-wrapper,
  .consultorio-wrapper {
    gap: 40px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Pantallas pequeñas (768px - 480px) */
@media (max-width: 768px) {
  .topbar-content {
    padding: 8px 10px;
  }
  
  .phones {
    font-size: 12px;
    gap: 15px;
  }
  
  .main-nav {
    padding: 15px 10px;
  }
  
  .hero-overlay {
    width: 90%;
    right: 5%;
    left: 5%;
    max-width: 90%;
  }
  
  .acerca-header h1,
  .servicio-header h1 {
    font-size: 28px;
    padding: 60px 20px;
  }
  
  .medico-bloque,
  .servicio-bloque {
    padding: 30px 20px;
    margin-bottom: 15px;
  }
  
  .medico-foto,
  .servicio-foto {
    max-width: 350px;
  }
  
  .medico-foto img {
    max-height: 350px;
  }
  
  .medico-texto h3,
  .servicio-texto h3 {
    font-size: 22px;
  }
  
  .equipo-grid {
    grid-template-columns: 1fr;
  }

  .porque-contenedor-flex {
    flex-direction: column;
    gap: 20px;
    padding: 0 10px;
  }

  .porque-alliancer-box {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }

  .contacto-wrapper,
  .consultorio-wrapper,
  .pagina-legal {
    flex-direction: column;
    padding: 0 10px;
    gap: 30px;
  }

  .imagen-contacto {
    max-width: 100%;
  }
  
  .consultorio-mapa iframe {
    height: 300px;
  }
}

/* Pantallas muy pequeñas (480px y menos) */
@media (max-width: 480px) {
  .topbar-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 5px;
  }

  .phones {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    font-size: 10px;
  }

  .instagram-link {
    position: static;
    align-self: flex-start;
  }
  
  .main-nav {
    padding: 15px 5px;
  }
  
  .logo {
    height: 80px;
  }
  
  .medico-foto,
  .servicio-foto {
    max-width: 300px;
  }
  
  .medico-foto img {
    max-height: 300px;
  }
  
  .medico-texto p,
  .servicio-texto p {
    font-size: 14px;
  }
  
  .hero-overlay {
    width: 95%;
    right: 2.5%;
    left: 2.5%;
    padding: 15px;
  }
  
  .hero-overlay h1 {
    font-size: 24px;
  }
  
  .hero-overlay .subheading {
    font-size: 16px;
  }
  
  .porque-alliancer-box {
    width: 100%;
    max-width: 320px;
    padding: 30px 20px;
  }
  
  .consultorio-mapa iframe {
    height: 200px;
  }
}

/* Hover para links */
.nav-links li a:hover {
  color: #98268C;
}



.drhiram {
  width: 100% !important;
  height: auto !important;
  max-height: 500px !important;
  object-fit: cover !important;
  object-position: top center !important;
  border-radius: 15px !important;
  display: block;
}

/* Ajustes específicos para pantallas intermedias como 1024px */
@media (max-width: 1200px) {
  .drjoaquin,
  .drhiram {
    max-height: 450px !important;
  }
}



/* Ajustes para tablets */
@media (max-width: 768px) {
  .drjoaquin,
  .drhiram {
    max-height: 500px !important;
  }
}

/* Ajustes móviles */
@media (max-width: 480px) {
  .drjoaquin,
  .drhiram {
    max-height: 450px !important;
  }
}



.drhector,
.draeileen,
.drivanrosales,
.draldo {
  width: 100% !important;
  height: auto !important;
  max-height: 500px !important;
  object-fit: cover !important;
  object-position: center !important;
}



.drjoaquin,
.drivanrosales,
.draldo {
  width: 100% !important;
  height: auto !important;
  max-height: 500px !important;
  object-fit: cover !important;
  object-position: center !important;
}

.drjoaquin {
  width: 100% !important;
  height: auto !important;
  max-height: 600px !important;
  object-fit: cover !important;
  object-position: center !important;
  margin-top: 25px;
}

/* ACCESIBILIDAD Y CONTRASTE AGREGADO */

/* Aumentar tamaño de toque para enlaces */
.footer-column ul li a {
  min-width: 48px;
  min-height: 48px;
  padding: 10px 14px;
  display: inline-block;
}

/* Aumentar tamaño mínimo de botones para accesibilidad */
.contacto-formulario button,
button {
  min-width: 48px;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 16px;
}

/* Asegurar contraste y jerarquía de encabezados */
.footer-column h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* Contraste mejorado */
.bold {
  text-transform: uppercase;
  
}

.texto-morado {
  color: #4b004b;
}

.texto-gris {
  color: #4a4a4a;
}

.consultorio-detalles {
  color: #333;
}
