@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

  font-family: "Montserrat", sans-serif;
}

html {
  scroll-behavior: smooth;
}

section {
  padding: 10px;
}

.banner {
  position: relative;
  width: 100%;
  height: 80vh;
  padding: 15px;

  background-image: url("/img/banner.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center right;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.banner div {
  color: white;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  z-index: 2;
  bottom: 50px;
  left: 10px;
}

h1 {
  font-size: 32px;
}

.banner h2 {
  font-size: 16px;
}

h2:not(.banner h2) {
  color: #02457A;
  text-align: center;
}

.btn {
  background-color: #001B48;
  color: white;
  padding: 10px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 13px;
  width: 135px;
  height: 35px;
  font-weight: 600;
}

#appointment {
  padding: 0;
  margin-top: 25px;
  margin-bottom: 25px;
}

#appointment h2 {
  margin-bottom: 25px;
  color: #F3F3F3;
}

#appointment img {
  width: 100%;
  display: block;
}

#appointment>div {
  height: 300px;
  padding: 10px;
  background-color: #1A386A;
  color: #F3F3F3;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  justify-content: center;
}


#services {
  margin-top: 25px;
  margin-bottom: 25px;
}

#services h2 {
  margin-bottom: 25px;
}

.cards-services {
  margin: 0 auto;
  display: flex;
  align-items: start;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 25px;
  max-width: 1400px;
}

.card-service {
  background-color: #ffffff;
  max-width: 300px;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  border-radius: 10px;
  padding: 10px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;
}


.card-service div {
  width: 75px;
  height: 75px;
  background-color: #EDF7FF;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-service img {
  width: 50px;
}

.card-service h3 {
  color: #02457A;
}

.cards-procedures {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  max-width: 1200px;
}

.card-procedure {
  display: flex;
  align-items: center;
  gap: 15px;
}

.card-procedure img {
  width: 50px;
}

#about-me {
  padding: 0;
  margin-top: 25px;
  margin-bottom: 25px;
}

#about-me h2 {
  margin-bottom: 25px;
  color: #F3F3F3;
}

#about-me img {
  width: 100%;
  display: block;
}

#about-me div {
  padding: 10px;
  background-color: #1A386A;
  color: #F3F3F3;
}

#profession {
  margin-top: 25px;
  margin-bottom: 25px;
}

#profession .grid-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

#profession .card {
  display: flex;
  align-items: center;
  gap: 10px;
}

#profession .card img {
  width: 50px;
}

#contact {
  background-color: #1A386A;
  color: #F3F3F3;
  display: flex;
  flex-direction: column;
  gap: 30px;
  text-align: center;
  padding-right: 0;
  padding-left: 0;
}

#contact h2 {
  color: #F3F3F3;
  margin-top: 25px;
  margin-bottom: 25px;
}

#contact>div {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

#contact .card-contact {
  background-color: #D6E8EE;
  color: #3B3B3B;

  border-radius: 10px;
  padding: 10px;
  width: 320px;
  height: 185px;

  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap: 10px;

  text-align: left;
}

#contact .card-contact h4 {
  color: black;
}

.style-btn {
  background-color: transparent;
  border: #D6E8EE solid 1px;
  border-radius: 15px;

  padding: 15px 25px 15px 25px;

  display: flex;
  align-items: center;
  gap: 10px;

  color: #D6E8EE;
  width: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin: 20px auto;
  font-size: 14px;
}

.style-btn img {
  width: 25px !important;
}

#alt-procedures {
  background-image: url("/img/back1.webp");
  background-position: bottom;
  background-repeat: no-repeat;
  background-size: cover;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 0;
}

#alt-procedures h2 {
  margin-top: 30px;
  margin-bottom: 30px;
}

.alt-procedures-grid {
  border-radius: 10px;
  background-color: white;
  width: 90%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  row-gap: 50px;
}

.alt-procedures-card {
  margin: 0 auto;
  max-width: 70%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.alt-procedures-card h4 {
  color: #1A386A;
  margin-bottom: 15px;
}

.alt-procedures-card img {
  height: 100px;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* una columna en móvil */
  gap: var(--gap);
  width: 100%;
  margin: 0 auto;
}

.media-grid .media-grid-card {
  margin: 0;
}

.media-grid-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  aspect-ratio: 3 / 4;
  /* fotos verticales en móvil */
}

/* 4º item = tu video en 16:9 en móvil */
.media-grid .media-grid-card:nth-child(4) {
  aspect-ratio: 16 / 9;
}

/* Medios llenan la tarjeta */
.media-grid-card img,
.media-grid-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-grid-card video {
  object-position: center 20%;
}

#video2 {
  object-position: center 50%;
}

.media-grid .media-grid-card:nth-child(5) img {
  object-position: 100% 50%;
}

.media-grid .media-grid-card:nth-child(2),
.media-grid .media-grid-card:nth-child(3),
.media-grid .media-grid-card:nth-child(6),
.media-grid .media-grid-card:nth-child(7) {
  display: none;
}

/* Neutralizar spans en mobile */
.col-3,
.col-4 {
  grid-column: 1 / -1;
}

#testimonials{
  padding: 10px;
  margin: 20px 0;
}

#testimonials h2{
  margin: 50px 0;
}

.testimonial-flex{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.testimonial-card{
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  width: 400px;
  height: 350px;
  text-align: center;
  background-image: url("/img/back1.webp");
  border-radius: 10px;
  border: solid 1px #D6E8EE;
}

.testimonial-card p:nth-child(1){
  font-style: italic;
}

.testimonial-card p:nth-child(2){
  font-size: larger;
  color: #02457A;
  font-weight: 500;
}

.testimonial-card p:nth-child(3){
  font-size: smaller;
  color: #777777;
  font-weight: 400;
}

@media (min-width: 600px) {

  .media-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(2, 1fr);
    gap: var(--gap);
    width: min(1440px, 100%);
    /* limita a 1440px */
    aspect-ratio: 16 / 9;
    /* contenedor 16:9 */
    height: auto;
    margin: 0 auto;
  }

  /* Las cards llenan su celda; ya no forzamos proporción */
  .media-grid-card {
    aspect-ratio: auto;
  }

  .media-grid .media-grid-card:nth-child(4) {
    aspect-ratio: auto;
  }

  /* Reactivar spans de escritorio */
  .col-3 {
    grid-column: span 3;
  }

  .col-4 {
    grid-column: span 4;
  }

  .media-grid .media-grid-card:nth-child(2),
  .media-grid .media-grid-card:nth-child(3),
  .media-grid .media-grid-card:nth-child(6),
  .media-grid .media-grid-card:nth-child(7) {
    display: block;
  }
}

@media (min-width: 1024px) {

  #services,
  #about-me,
  #profession,
  #appointment {
    margin-top: 50px;
    margin-bottom: 50px;
  }

  #services h2 {
    margin-bottom: 50px;
  }

  .banner {
    background-image: url("/img/banner.webp");
    background-position: center 20%;
    height: 70vh;
  }

  .banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F3F3F3;
    z-index: 1;

    clip-path: polygon(67% 0, 100% 0, 100% 100%, 55% 100%);
  }

  .banner div {
    left: 65%;
    bottom: 40%;
  }

  h1 {
    color: #02457A;
    font-size: 36px;
  }

  .banner h2 {
    color: #018ABE;
    font-size: 24px;
  }

  .banner p {
    color: black;
    font-size: 16px;
  }

  .card-service {
    max-width: 350px;
  }

  .cards-procedures {
    grid-template-columns: 1fr 1fr;
  }

  #about-me {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #about-me h2 {
    text-align: left;
  }

  #about-me img {
    width: 600px;
    border-radius: 10px;
  }

  #about-me>div {
    width: 550px;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #about-me div div {
    max-width: 450px;
    margin: 0 auto;
  }


  #appointment {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #appointment h2 {
    text-align: left;
  }

  #appointment img {
    width: 600px;
    border-radius: 10px;
  }

  #appointment>div {
    width: 550px;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
  }

  #appointment>div {
    max-width: 550px;
  }

  #appointment div div {
    max-width: 450px;
    margin: 0 auto;
  }

  .style-btn {
    margin: 20px 0px;
  }

  #profession h2 {
    margin-bottom: 50px;
  }

  #profession .grid-card {
    grid-template-columns: 1fr 1fr;
    max-width: 1150px;
    margin: 0 auto;
  }

  #profession .card {
    max-width: 455px;
    gap: 25px;
  }

  #profession .card img {
    width: 100px;
  }

  #profession .card img[src*="upaep"] {
    width: 70px;
  }

  #alt-procedures h2 {
    margin-bottom: 70px;
  }

  #alt-procedures {
    min-height: 600px;
  }

  .alt-procedures-grid {
    max-width: 1200px;
    min-height: 600px;
    padding: 30px;
  }

  .alt-procedures-card {
    max-width: 100%;
  }
}



@media (max-width: 768px) {
  .banner {
    flex-direction: column !important; /* Imagen arriba, texto abajo */
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    min-height: auto !important;
    height:50vh;
    padding: 0 0 40px 0 !important;
  }

  .banner-img-container {
    width: 100% !important;
    height: 250px !important; 
  }

  .banner-text {
    width: 100% !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* ESTO CENTRA EL BOTÓN */
    text-align: center !important;
  }

  .banner h1 {
    font-size: 26px !important;
  }

  .banner h2 {
    text-align: center !important;
    font-size: 18px !important;
  }

  /* EL BOTÓN: Sin caracteres raros y forzado al centro */
  .btn {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 280px !important;
    margin: 15px auto 0 auto !important; /* Centrado automático */
    float: none !important;
  }
}


/* --- SECCIÓN PADECIMIENTOS ONCOLÓGICOS --- */

.onco-padecimientos {
    padding: 80px 5%;
    background-color: #f8fafc; /* Un fondo gris casi blanco para dar contraste */
}

.onco-padecimientos .container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Texto de introducción */
.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.intro-text h2 {
    color: #1A386A;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 800;
}

.intro-text p {
    color: #4A5568;
    font-size: 18px;
    line-height: 1.6;
}

/* Contenedor de la lista y CTA */
.padecimientos-content {
    background: #ffffff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.padecimientos-content h3 {
    color: #018ABE;
    font-size: 22px;
    margin-bottom: 35px;
    text-align: center;
    font-weight: 700;
}

/* Cuadrícula de padecimientos */
.padecimientos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin-bottom: 50px;
}

.padecimientos-grid li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: #2D3748;
    padding: 12px 15px;
    background: #f1f5f9;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.padecimientos-grid li:hover {
    background: #EDF7FF;
    transform: translateX(5px);
}

.padecimientos-grid li i {
    color: #018ABE; /* El color del check */
    font-size: 18px;
    flex-shrink: 0;
}

/* Sección de Cierre y Botón */
.cta-section {
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 40px;
}

.quote {
    font-style: italic;
    color: #1A386A;
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Tu botón personalizado */
.cta-button-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #001B48;
    color: #ffffff !important;
    padding: 16px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 27, 72, 0.2);
}

.cta-button-blue:hover {
    background-color: #018ABE;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(1, 138, 190, 0.3);
}

/* --- RESPONSIVO --- */

@media (max-width: 768px) {
    .onco-padecimientos {
        padding: 50px 20px;
    }

    .padecimientos-content {
        padding: 30px 10px; /* Reduje un poco el espacio lateral para que quepan las 2 columnas */
    }

    .padecimientos-grid {
        /* AJUSTE SOLICITADO: 2 columnas en móvil */
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; /* Menos espacio entre ellas para que no choquen */
    }

    .padecimientos-grid li {
        font-size: 13px; /* Letra un poco más pequeña para que quepa en 2 columnas */
        padding: 10px;
        flex-direction: column; /* Icono arriba y texto abajo para que se vea ordenado */
        text-align: center;
    }

    .intro-text h2 {
        font-size: 20px;
    }
    
    .cta-button-blue {
        width: 100%;
    }
    .padecimientos-content h3{
      font-size: 20px;
    }
}

/* ==========================================================================
   SECCIÓN SERVICIOS (ACOMPAÑAMIENTO) - ACTUALIZADO
   ========================================================================== */

#services {
    padding: 80px 5%;
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

#services h2 {
    color: #1A386A;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 50px;
    line-height: 1.2;
}

/* CONTENEDOR FLEX: La clave para centrar las sobrantes */
.cards-services {
    display: flex;
    flex-wrap: wrap;       /* Permite que bajen a la siguiente fila */
    justify-content: center; /* Centra las tarjetas en cada fila */
    gap: 25px;             /* Espacio entre tarjetas */
    margin-bottom: 60px;
}

/* TARJETA INDIVIDUAL */
.card-service {
    background: #ffffff;
    padding: 35px 25px;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    
    /* Control de tamaño en PC */
    flex: 1 1 300px;      /* Intenta medir 300px */
    max-width: 350px;     /* No deja que se estire feo si hay pocas */
}

.card-service:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(2, 69, 122, 0.08);
    border-color: #018ABE;
}

/* ICONOS */
.card-service div {
    width: 70px;
    height: 70px;
    background-color: #f0f7ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.card-service img {
    width: 35px;
    height: 35px;
}

/* TEXTOS */
.card-service h3 {
    color: #1A386A;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-service p {
    color: #556172;
    font-size: 15px;
    line-height: 1.6;
}

/* FRASES Y BOTÓN FINAL */
#services p[style*="font-style: italic"] {
    display: block;
    margin: 40px auto 25px !important;
    color: #1A386A;
    font-size: 1.2rem;
    font-weight: 500;
}

.cta-button-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #001B48;
    color: #ffffff !important;
    padding: 18px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 27, 72, 0.2);
}

/* ==========================================================================
   RESPONSIVE - MÓVIL (2 CARDS POR FILA)
   ========================================================================== */

@media (max-width: 768px) {
    #services {
        padding: 50px 15px;
    }

    .cards-services {
        gap: 12px; /* Espacio reducido para que quepan dos */
    }

    .card-service {
        /* Forzamos 2 columnas: (100% / 2) - gap */
        flex: 1 1 calc(50% - 15px); 
        min-width: 140px; /* Evita que se colapsen */
        padding: 20px 15px;
        border-radius: 15px;
    }

    /* Ajuste de textos en móvil para evitar desbordes */
    .card-service h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .card-service p {
        font-size: 12.5px;
        line-height: 1.4;
    }

    .card-service div {
        width: 50px;
        height: 50px;
    }

    .card-service img {
        width: 25px;
        height: 25px;
    }

    .cta-button-blue {
        width: 100%;
        max-width: 320px;
        font-size: 14px;
        padding: 15px 20px;
    }
    .card-icon{
      text-align: center;
    }
    #services h2{
        font-size: 20px;
    }
}

/* Ajuste para pantallas muy pequeñas (reloj o teléfonos viejos) */
@media (max-width: 360px) {
    .card-service {
        flex: 1 1 100%; /* Una sola columna si la pantalla es minúscula */
    }
}



/* --- SECCIÓN CONSULTA (APPOINTMENT) --- */

.appointment-section {
    padding: 80px 5%;
    /* Fondo más fuerte para que la tarjeta blanca resalte */
    background-color: #f1f4f9; 
}

.appointment-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: #ffffff; /* Tarjeta blanca */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.appointment-content {
    flex: 1;
    padding: 50px;
    /* Forzamos que todo el contenido del bloque se alinee a la izquierda */
    text-align: left; 
}

.appointment-title {
    color: #1A386A;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
    /* Alineación específica para el título */
    text-align: left; 
    display: block;
    width: 100%;
}

.appointment-description {
    color: #4A5568;
    font-size: 18px;
    margin-bottom: 25px;
    text-align: left;
}

/* LISTA CON CHECKS */
.appointment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
}

.appointment-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: #2D3748;
}

.appointment-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #018ABE;
    font-weight: bold;
}

/* CAJA DE PRECIOS */
.price-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
    max-width: 400px; /* Para que no se estire demasiado a lo ancho */
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.price-row:last-child { margin-bottom: 0; }

/* BOTÓN */
.cta-appointment {
    display: inline-block; /* Importante para que respete el ancho del texto */
    background-color: #001B48;
    color: #ffffff !important;
    padding: 16px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 27, 72, 0.2);
}

/* IMAGEN */
.appointment-image-wrapper {
    flex: 1;
    height: 500px;
}

.appointment-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
    .appointment-container {
        flex-direction: column;
    }

    .appointment-image-wrapper {
        width: 100%;
        height: 250px;
        order: -1; /* Imagen arriba en móvil */
    }

    .appointment-content {
        padding: 30px 20px;
    }
    .appointment-title{
      font-size: 20px;
      text-align: left;
    }
    .cta-appointment{
      display: block;
      text-align: center;
    }
}



/* --- SECCIÓN VALORACIÓN QUIRÚRGICA --- */
.valuation-section {
    padding: 80px 5%;
    background-color: #ffffff; /* Blanco limpio */
}

.valuation-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.valuation-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.valuation-title {
    color: #1A386A;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 20px;
}

.valuation-intro {
    color: #4A5568;
    font-size: 18px;
    line-height: 1.6;
}

/* GRID DE TARJETAS */
.valuation-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* La segunda tarjeta es más ancha */
    gap: 30px;
    margin-bottom: 50px;
}

.valuation-card {
    background: #f8fafc;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Tarjeta destacada (Featured) */
.valuation-card.featured {
    background: #ffffff;
    border-color: #018ABE;
    box-shadow: 0 15px 35px rgba(1, 138, 190, 0.1);
    position: relative;
}

.valuation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.card-icon {
    font-size: 40px;
    margin-bottom: 20px;
    display: block;
}

.valuation-card h3 {
    color: #1A386A;
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* LISTAS INTERNAS */
.valuation-list {
    list-style: none;
    padding: 0;
}

.valuation-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #334155;
    font-size: 15px;
    line-height: 1.4;
}

.valuation-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #018ABE;
    font-weight: bold;
}

/* FOOTER DE LA SECCIÓN */
.valuation-footer {
    text-align: center;
    margin-top: 40px;
}

.individual-quote {
    font-style: italic;
    color: #1A386A;
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 500;
}

/* --- RESPONSIVO --- */
@media (max-width: 992px) {
    .valuation-grid {
        grid-template-columns: 1fr; /* Una tarjeta sobre otra en tablets */
    }
}

@media (max-width: 768px) {
    .valuation-section {
        padding: 50px 20px;
    }

    .valuation-card {
        padding: 25px;
    }

    /* Convertimos las listas en 2 columnas en móvil para que no ocupen tanto espacio vertical */
    .valuation-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        text-align: left;
    }

    .valuation-list li {
        font-size: 13px;
    }

    /* La frase final y botón */
    .individual-quote {
        font-size: 1rem;
    }

    .cta-button-blue {
        width: 100%;
    }
    .valuation-title{
      font-size: 20px;
    }
    .valuation-card h3{
      font-size: 20px;
      text-align: center;
    }
    #alt-procedures h2{
      font-size: 20px;
    }
}

@media (max-width: 480px) {
    /* Si el celular es muy flaco, volvemos a una columna en la lista */
    .valuation-list {
        grid-template-columns: 1fr;
    }
}




/* --- SECCIÓN ÁREAS ANATÓMICAS (FIX ANCHO REAL) --- */
#alt-procedures {
    padding: 60px 2%; /* Bajamos el padding al mínimo para ganar ancho */
    background-color: #f8fafc;
}

.alt-procedures-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; /* Espacio mínimo entre tarjetas */
    max-width: 1200px;
    margin: 0 auto;
    padding:10px;
}

.alt-procedures-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 8px; /* Padding interno mínimo */
    
    /* CONTROL DE ANCHO EN PC */
    flex: 1 1 300px; 
    max-width: 450px;
}

.alt-procedures-card img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.alt-procedures-card h4 {
    color: #1A386A;
    font-size: 17px;
    margin-bottom: 5px;
}

.alt-procedures-card p {
    color: #556172;
    font-size: 14px;
    line-height: 1.3;
}

/* --- EL ARREGLO PARA QUE NO SE VEAN FLACAS EN MÓVIL --- */
@media (max-width: 768px) {
    #alt-procedures {
        padding: 40px 5px; /* Casi nada de margen a los lados del teléfono */
    }

    .alt-procedures-grid {
        gap: 8px; /* Hueco muy pequeño entre las dos */
    }

    .alt-procedures-card {
        /* Forzamos el ancho para que usen todo el espacio disponible */
        flex: 1 1 calc(50% - 10px); 
        min-width: calc(50% - 10px); 
        padding: 15px 5px;
    }

    .alt-procedures-card h4 {
        font-size: 14px;
    }

    .alt-procedures-card p {
        font-size: 11px;
    }

    .alt-procedures-card img {
        width: 35px;
        height: 35px;
    }
}




/* --- SECCIÓN ACERCA DE MÍ (REDISEÑO TOTAL) --- */
#about-me {
    padding: 80px 5%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Imagen con un detalle lateral elegante */
#about-me img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 15px 15px 0px 0px #001B48; /* Detalle sólido sutil */
    object-fit: cover;
}

/* Contenedor de Texto */
#about-me .about-text {
    flex: 1;
}

#about-me h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -1px;
}

/* Las Cédulas: Ahora se ven como una ficha técnica profesional */
.cedulas-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 3px solid #018ABE; /* Línea de acento azul */
}

.cedulas-container p {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
}

/* Texto Principal */
.about-description {
    color: #334155;
    font-size: 18px;
    line-height: 1.7;
}

.about-description strong {
    color: #018ABE;
    font-size: 22px;
    display: block;
    margin-bottom: 10px;
}

/* --- RESPONSIVO --- */
@media (max-width: 992px) {
    #about-me {
        flex-direction: column;
        text-align: left;
        padding: 50px 20px;
    }
    #about-me h2{
      text-align: left;
    }

    #about-me img {
        max-width: 300px;
        box-shadow: 10px 10px 0px 0px #001B48;
    }

    .cedulas-container {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
        padding: 15px 0;
        align-items: left;
    }

    .about-description {
        text-align: left; /* Párrafo a la izquierda para mejor lectura */
    }
}



/* --- ESTILO BASE PARA ESCRITORIO --- */
#profession-section {
    padding: 60px 5%;
    text-align: center;
    background: #fff;
}
#profession-section h2{
  margin-bottom: 40px;
}

.trayectoria-grid {
    display: grid !important;
    /* FORZAMOS 3 COLUMNAS EN PC */
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.trayectoria-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 25px 15px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.trayectoria-card img {
    height: 65px;
    width: auto;
    margin-bottom: 15px;
    object-fit: contain;
}

.trayectoria-card p {
    font-size: 14px;
    color: #4A5568;
    font-weight: 600;
    margin: 0;
}

.trayectoria-quote {
    grid-column: 1 / -1; /* Abarca las 3 columnas */
    margin-top: 40px;
    font-style: italic;
    color: #1A386A;
}

/* --- ESTILO PARA MÓVIL (HASTA 768px) --- */
@media screen and (max-width: 768px) {
    .trayectoria-grid {
        /* FORZAMOS 2 COLUMNAS EN CELULAR */
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .trayectoria-card {
        padding: 15px 5px;
        min-height: 150px;
    }

    .trayectoria-card img {
        height: 40px; /* Logos más chicos para que no rompan la card */
    }

    .trayectoria-card p {
        font-size: 10px; /* Letra ajustada al ancho de 2 columnas */
    }
    #profession-section h2{
      font-size: 20px;
    }
}



#testimonials {
    padding: 60px 20px;
    background-color: #f8fafc;
    overflow: hidden;
}

#testimonials h2 {
    text-align: center;
    color: #1A386A;
    margin-bottom: 40px;
    font-size: 28px;
}

/* Contenedor del Slider */
.testimonial-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* Habilita el deslizamiento */
    scroll-snap-type: x mandatory; /* Ajuste magnético al deslizar */
    scrollbar-width: none; /* Oculta scroll en Firefox */
    padding: 10px 0 30px 0;
}

.testimonial-slider::-webkit-scrollbar {
    display: none; /* Oculta scroll en Chrome/Safari */
}

/* Tarjeta Individual */
.testimonial-item {
    background: white;
    flex: 0 0 calc(33.33% - 20px); /* 3 tarjetas en PC */
    min-width: 300px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    scroll-snap-align: center;
    border-top: 4px solid #018ABE;
    display: flex;
    flex-direction: column;
}

.stars { color: #FFB400; margin-bottom: 15px; font-size: 18px; }

.testimonial-item p:nth-child(2) {
    font-style: italic;
    color: #4A5568;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.name { color: #1A386A; font-weight: bold; margin: 0; }
.origin { color: #018ABE; font-size: 12px; margin: 0; }

/* --- EL ARREGLO PARA CELULAR --- */
@media (max-width: 768px) {
    .testimonial-item {
        flex: 0 0 85%; /* Muestra el 85% de una tarjeta para que se vea que hay otra al lado */
        min-width: 280px;
        margin-left: 10px;
    }
    
    .testimonial-slider {
        padding-left: 5%; /* Centra la vista inicial */
    }

    #testimonials h2 {
        font-size: 20px;
    }
}




/* --- SECCIÓN CONTACTO: VERSIÓN FINAL BLINDADA --- */
#contact {
    padding: 80px 5%;
    background-color: #001B48; /* Azul Marino Principal */
    text-align: center;
    color: #ffffff;
    display: block;
    width: 100%;
}

#contact h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #ffffff !important;
}

#contact p {
    font-size: 16px;
    color: #cbd5e1;
    margin-bottom: 40px;
}

/* Contenedor de las tarjetas */
#contact > div:first-of-type {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: stretch; /* Hace que todas midan lo mismo de alto */
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 50px auto;
}

/* Tarjetas */
.card-contact {
    background: #ffffff !important;
    flex: 1;
    padding: 30px 15px;
    border-radius: 15px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* Centrado horizontal */
    justify-content: center !important; /* Centrado vertical */
    text-align: center !important;
    min-height: 250px; /* Altura mínima para que no se deformen */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Iconos en Azul Brillante (#018ABE) */
.card-contact img {
    height: 50px !important;
    width: auto !important;
    margin-bottom: 15px;
    /* Filtro para color #018ABE */
    filter: invert(41%) sepia(82%) saturate(1948%) hue-rotate(174deg) brightness(91%) contrast(101%);
}

.card-contact h4 {
    color: #001B48 !important; /* Azul Marino para títulos */
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 10px 0;
}

.card-contact p {
    color: #475569 !important; /* Gris oscuro para el texto */
    font-size: 14px !important;
    line-height: 1.4;
    margin: 0 !important;
}

/* Mapa */
#contact iframe {
    width: 100%;
    max-width: 1100px;
    border-radius: 15px;
    border: none;
    margin: 0 auto;
}

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
    #contact > div:first-of-type {
        flex-direction: column !important; /* Una arriba de otra en móvil */
        align-items: center;
    }
    
    .card-contact {
        width: 100%;
        max-width: 320px;
        min-height: auto;
        padding: 25px;
    }
    #contact h2{
      font-size: 20px;
    }
}




/* --- SECCIÓN PADECIMIENTOS --- */
.padecimientos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas fijas en móvil */
    gap: 15px;
    padding: 0;
    list-style: none;
}

.padecimientos-grid li {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column; /* Icono arriba, texto abajo para que no se amontone */
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #2D3748;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.padecimientos-grid li i {
    color: #018ABE; /* Tu azul médico */
    font-size: 20px;
    margin-bottom: 8px;
}

/* EL TRUCO PARA EL ÚLTIMO ELEMENTO EN MÓVIL */
@media (max-width: 768px) {
    .padecimientos-grid li:last-child {
        grid-column: 1 / span 2; /* Obliga al último a ocupar las 2 columnas */
        width: 100%;
    }
}

/* --- AJUSTE PARA DESKTOP --- */
@media (min-width: 992px) {
    .padecimientos-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en PC */
    }
    
    .padecimientos-grid li:last-child {
        grid-column: auto; /* Quitamos el expandido en PC */
    }
    
    .padecimientos-grid li {
        flex-direction: row; /* En PC icono y texto a la par */
        gap: 12px;
        text-align: left;
    }
}

