/* ====== CSS INTEGRADO Y OPTIMIZADO ====== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700&display=swap');

:root {
    /* Variables unificadas */
    --color-primario: #ad1457;
    --color-secundario: #555;
    --color-fondo: #fff;
    --color-acento: #ff69b4;
    --color-borde: #e9e9e9;
    --fuente-principal: 'Poppins', sans-serif;
    --sombra-caja: 0 .5rem 1.5rem rgba(0, 0, 0, .1);
    --radio-borde: 12px;
}

/* ====== RESET Y ESTILOS BASE ====== */
* {
    font-family: var(--fuente-principal);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    border: none;
    transition: all 0.2s ease-out;
    text-decoration: none;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-padding-top: 7rem;
    scroll-behavior: smooth;
}

body {
    padding-top: 9rem;
    background-color: var(--color-fondo);
    color: var(--color-secundario);
    line-height: 1.6;
}

/* ====== HEADER Y MENÚ (SIN SUBRAYADO) ====== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-fondo);
    box-shadow: var(--sombra-caja);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4.5%;
    height: 9rem;
}

.Logo img {
    margin-top: 8.5%;
    height: 8.5rem;
    transform: translateX(-3.5rem);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    color: var(--color-primario);
    font-size: 1.6rem;
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
}

/* Eliminamos el subrayado */
.main-nav a::after {
    display: none;
}

/* Estilo hover alternativo (sin subrayado) */
.main-nav a:hover,
.main-nav a.active {
    color: var(--color-acento);
    background-color: rgba(255, 105, 180, 0.1);
    border-radius: 8px;
}

/* ====== ESTILOS DE TÍTULOS Y TEXTO ====== */
main h1 {
    font-size: 3.2rem;
    line-height: 1.25;
    color: var(--color-primario);
    margin: 0 0 1rem;
}

main h2 {
    font-size: 2.4rem;
    margin: 0 0 1rem;
    color: var(--color-primario);
}

main h3 {
    font-size: 2.0rem;
    margin: 1.6rem 0 0.8rem;
    color: var(--color-primario);
}

main p {
    font-size: 1.6rem;
    margin: 0 0 1.2rem;
    line-height: 1.6;
}

/* ====== SECCIONES PRINCIPALES ====== */
.inicio,
.investigadoras,
.galeria,
.videos {
    padding: 4rem 2rem;
    background: var(--color-fondo);
    border-radius: var(--radio-borde);
    box-shadow: var(--sombra-caja);
    margin: 2rem 0;
}

/* ====== GRIDS RESPONSIVE ====== */
.perfil-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-semanas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.6rem;
}

/* ====== MENÚ HAMBURGUESA (MÓVIL) ====== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 3rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle .bar {
    width: 100%;
    height: 0.3rem;
    background-color: var(--color-primario);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.menu-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ====== RESPONSIVE PARA TABLETS (768px - 1024px) ====== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    html {
        font-size: 58%;
    }

    .header {
        padding: 1rem 3%;
        position: fixed;
    }

    .Logo img {
        height: 7rem;
        transform: translateX(-2rem);
    }

    .menu-toggle {
        display: flex;
        margin-right: 1rem;
    }

    .main-nav {
        position: fixed;
        top: 9rem;
        left: 0;
        right: 0;
        background-color: var(--color-fondo);
        box-shadow: var(--sombra-caja);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        z-index: 1050;
    }

    .main-nav.open {
        max-height: 500px;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 0;
    }

    .main-nav li {
        margin: 0.5rem 0;
    }

    .main-nav a {
        display: block;
        padding: 1rem;
        font-size: 1.6rem;
    }

    .perfil-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-semanas {
        grid-template-columns: repeat(2, 1fr);
    }

    .inicio {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1.5rem;
    }

    .inicio-contenido {
        width: 100%;
        margin-bottom: 2rem;
    }

    .inicio-imagen img {
        max-width: 300px;
        margin: 0 auto;
    }

    .onco-carousel .carousel-item img {
        height: 300px;
    }
}

/* ====== RESPONSIVE PARA LAPTOPS (1025px - 1440px) ====== */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }

    .header {
        padding: 1.5rem 5%;
    }

    .main-nav ul {
        gap: 2.5rem;
    }

    .main-nav a {
        font-size: 1.7rem;
    }

    /* Grids optimizados */
    .perfil-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .galeria-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ====== RESPONSIVE PARA MÓVIL (hasta 767px) ====== */
@media screen and (max-width: 767px) {
    html {
        font-size: 55%;
    }

    .menu-toggle {
        display: flex;
        margin-right: 1rem;
    }

    .main-nav {
        position: fixed;
        top: 9rem;
        left: 0;
        right: 0;
        background-color: var(--color-fondo);
        box-shadow: var(--sombra-caja);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        z-index: 1050;
    }

    .main-nav.open {
        max-height: 500px;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 0;
    }

    .main-nav li {
        margin: 0.5rem 0;
    }

    .main-nav a {
        display: block;
        padding: 1rem;
        font-size: 1.6rem;
    }

    .perfil-grid,
    .galeria-grid,
    .video-grid,
    .grid-semanas {
        grid-template-columns: 1fr;
    }

    .inicio {
        padding: 2rem 1rem;
    }

    .inicio h1 {
        font-size: 2.4rem;
    }

    .perfil-card {
        padding: 1.5rem;
    }

    .onco-carousel .carousel-item img {
        height: 200px;
    }

    .Logo {
        margin-left: 1rem;
    }

    .Logo img {
        max-height: 6rem;
        width: auto;
        margin-top: 0.5rem;
        transform: translateX(0);
    }
}

/* ====== PERFIL Y FOOTER ====== */
.perfil {
    position: relative;
    margin-left: auto;
}

.perfil-btn {
    width: auto;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 0;
}

.perfil-inicial {
    width: auto;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.0rem;
    color: #fff;
    background: var(--color-acento);
    border: 2px solid rgba(233, 30, 99, 0.35);
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onco-footer {
    text-align: center;
    padding: 2rem;
    color: #777;
}

.onco-footer .footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.perfil{
  position:relative;
  display:flex;
  align-items:center;
  margin-left:12px;
  flex:0 0 auto;
}

.perfil-btn{
  width:48px;
  height:48px;
  border:none;
  border-radius:50%;
  background:#f3b6c6;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
  overflow:hidden;
}

.perfil-img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  display:block;
}

.perfil-inicial{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  font-size:20px;
  font-weight:700;
  color:#fff;
}

.perfil-menu{
  position:absolute;
  top:58px;
  right:0;
  min-width:180px;
  background:#fff;
  border:1px solid #e7c8d1;
  border-radius:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.12);
  padding:8px 0;
  display:none;
  z-index:9999;
}

.perfil-menu.show{
  display:block;
}

.perfil-menu a{
  display:block;
  padding:10px 14px;
  text-decoration:none;
  color:#8a2d5d;
  font-size:15px;
}

.perfil-menu a:hover{
  background:#fff4f7;
}
