@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(login/beautiful-full-moon-q1k8i2g2m4y8phgo.jpg);
    background-size: cover;
    background-attachment: fixed;
    padding-top: 90px;
    min-height: 100vh;
    color: #fff;
    transition: background-color 0.5s ease;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    border-bottom: 2px solid #ff4444;
    z-index: 1000;
}

header img {
    height: 50px;
    width: auto;
}

.tituloPrincipal {
    font-size: 1.5rem;
    margin: 0 10px;
    color: #fff;
}

.navegacion-principal {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 70px;
    left: 0;
    background: rgba(0, 0, 0, 0.95);
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.navegacion-principal.active {
    display: flex;
}

.nav-enlace {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-enlace:hover {
    color: #ff4444;
    background: rgba(255, 255, 255, 0.1);
}

/* Estilo escritorio para boton "Iniciar Sesión"*/
.boton-sesion {
    display: none;
    padding: 8px 15px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.boton-sesion:hover {
    background: transparent;
    border-color: transparent;
}

/* Estilo celular para boton "Iniciar Sesión"*/
.boton-sesion-mobile {
    display: none;
    padding: 10px 20px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    margin: 10px 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}

.navegacion-principal.active .boton-sesion-mobile {
    display: block;
    /* Show when mobile nav is active */
}

.boton-sesion-mobile:hover {
    background: transparent;
    border-color: #ff4444;
}

.contenedor-modo {
    display: flex;
    align-items: center;
    user-select: none;
}

#interruptor-modo {
    display: none;
}

.etiqueta-modo {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 5px;
    cursor: pointer;
    position: relative;
    width: 60px;
    height: 30px;
    justify-content: space-between;
    backdrop-filter: blur(5px);
    overflow: hidden;
    margin-left: 10px;
}

.icono-sol,
.icono-luna {
    font-size: 16px;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.icono-luna {
    opacity: 0;
}

#interruptor-modo:checked+.etiqueta-modo .icono-sol {
    opacity: 0;
}

#interruptor-modo:checked+.etiqueta-modo .icono-luna {
    opacity: 1;
}

.interruptor {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #ffcc33;
    border-radius: 50%;
    transition: all 0.3s ease;
}

#interruptor-modo:checked+.etiqueta-modo .interruptor {
    transform: translateX(29px);
    background: #333;
}


/*Idioma*/
.selecciones-idioma {
    position: relative;
    display: inline-block;
    width: auto;
    font-family: 'Segoe UI', sans-serif;
    user-select: none;
}

.texto-idioma {
    color: #1a1a1a;
    font-size: 0.9rem;
}

#selected-language {
    width: auto;
    padding: 4px 6px;
    border: 2px solid #bd0404;
    background-color: #fdfdfd;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

#selected-language:hover {
    background-color: #f0f0f0;
}

#selected-language img {
    width: 25px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
}

.oportunidades {
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 5px;
    width: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 20;
    overflow: hidden;
}

.oportunidad {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.oportunidad:hover {
    background-color: #f7f7f7;
}

.oportunidad img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
}


/* Hamburger Menu */
.menu-toggle {
    display: flex;
    /* Show for mobile */
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    cursor: pointer;
    margin-left: 20px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: white; /* Color inicial blanco */
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Animación para el icono que cambia del menú */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

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

/* contenido del Main */
.contenedor-reinos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 140px);
    /* Asegurar altura mínima */
}

.card-reino {
    position: relative;
    transition: transform 0.3s ease-in;
}

.card-enlace {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: all 0.3s ease;
    color: #fff;
}

/*.card-enlace img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 0.8rem;
}*/

.imagen-tarjeta {
    width: 120px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.8rem;
    transition: filter 0.3s ease;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

}

#zorro {
    background-image: url(img/zorro_blanco.png);

}

.card-reino:hover #zorro {
    background-image: url(img/zorro_rojo.png);
}

#planta {
    background-image: url(img/planta_blanco.png);
}

.card-reino:hover #planta {
    background-image: url(img/planta_rojo.png);
}

#champinon {
    background-image: url(img/champinon_blanco.png);
}

.card-reino:hover #champinon {
    background-image: url(img/champinon_rojo.png);
}

#alga {
    background-image: url(img/algas-marinas_blanco.png);
}

.card-reino:hover #alga {
    background-image: url(img/algas-marinas_rojo.png);
}

#bacteria {
    background-image: url(img/bacterias_blanco.png);
}

.card-reino:hover #bacteria {
    background-image: url(img/bacterias_rojo.png);
}


.card-enlace:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.card-titulo {
    font-size: 1.1rem;
    text-align: center;
}

.card-reino:hover .card-titulo {
    color: #ff4444;
}

.explorar,
.nosotros {
    max-width: 1000px;
    margin: 1.5rem auto;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: #f0f0f0;
}

.explorar h3,
.nosotros h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ff4444;
    text-align: center;
}

.explorar h4,
.nosotros h4 {
    font-size: 1.5rem;
    margin: 1.2rem 0 0.8rem;
    color: #ff8888;
}

.explorar p,
.nosotros p {
    line-height: 1.7;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    text-align: justify; /* Added for text justification */
}

.explorar ul,
.nosotros ul {
    list-style: square inside;
    margin: 0.8rem 0 1.5rem;
}

.explorar ul li {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff4444;
    margin: 0.8rem 0 0.4rem;
    text-align: justify; /* Added for text justification */
}

.explorar ul p {
    margin: 0.4rem 0 0.8rem;
    line-height: 1.6;
    font-size: 1rem;
    text-align: justify; /* Added for text justification */
}

/* Nuevo contenedor para el video responsive */
.videoContenedor {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1.5rem auto 0;
    border: 3px solid #ff4444;
    border-radius: 10px;
}

.explorar .video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nosotros ul li {
    font-size: 1rem;
    margin: 0.6rem 0;
    text-align: justify; /* Added for text justification */
}

.explorar,
.nosotros {
    scroll-margin-top: 80px;
}

/* Footer*/
.footer-contenedor {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 1.5rem 1rem;
    font-family: 'Arial', sans-serif;
}

.footer-contenido {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-con {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo .logo-img {
    width: 150px;
    height: auto;
}

#btn-dato {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 800;
    color: #ff4444;
    cursor: pointer;
    background-color: transparent;
    border-radius: 10px;
    border: 2px solid #ff4444;
    transition: all 0.3s ease;
}

#btn-dato:hover {
    background-color: #ff4444;
    color: white;
}

#animal-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: fadeIn 0.5s;
    border: 2px solid #ff4444;
    max-width: 90%;
}

#animal-container.hidden {
    display: none;
}

#animal-container img {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 12px;
}

#dato-curioso {
    font-size: 14px;
    color: #333;
    max-width: 250px;
    margin: 0 auto;
}

.footer-communidad {
    text-align: center;
}

.community-titilo {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.redes-sociales {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.icono-social {
    width: 30px;
    height: 30px;
    filter: grayscale(100%) brightness(1.5);
    transition: all 0.3s ease;
}

.red-social:hover .icono-social {
    filter: none;
    transform: scale(1.1);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.footer-info div {
    margin-bottom: 1rem;
}

.lugar p,
.telefono p {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 5px;
}

.lugar a,
.telefono a,
.contacta a {
    font-size: 0.9rem;
    color: #ff4444;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lugar a:hover,
.telefono a:hover,
.contacta a:hover {
    color: #fff;
}

.linea-dividir {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 1.5rem auto;
    width: 90%;
}

.copyright-texto {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* Estilo para modo de día */
body.light-mode {
    background-image: none;
    background-color: #f5f5f5;
    color: #333;
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid #ff4444;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.light-mode .tituloPrincipal,
body.light-mode .nav-enlace {
    color: #333;
}

body.light-mode .nav-enlace:hover {
    color: #ff4444;
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .navegacion-principal {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .card-enlace {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .card-enlace:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

body.light-mode .card-titulo:hover {
    color: #ff4444;
}

body.light-mode .explorar,
body.light-mode .nosotros {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .explorar h3,
body.light-mode .nosotros h3 {
    color: #ff4444;
}

body.light-mode .explorar h4,
body.light-mode .nosotros h4 {
    color: #ff6666;
}

body.light-mode .footer-contenedor {
    background-color: #333;
    color: #fff;
}

body.light-mode .icono-social {
    filter: grayscale(0%) brightness(1);
}

body.light-mode .copyright-texto {
    color: rgba(255, 255, 255, 0.7);
}

/*Ajustes para alternar el modo oscuro con el modo claro */
body.light-mode .etiqueta-modo {
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .interruptor {
    background: #333;
}

body.light-mode #interruptor-modo:checked+.etiqueta-modo .interruptor {
    background: #ffcc33;
}

body.light-mode #zorro {
    background-image: url(img/zorro.png);
}

body.light-mode #planta {
    background-image: url(img/planta.png);
}

body.light-mode #champinon {
    background-image: url(img/champinon.png);
}

body.light-mode #alga {
    background-image: url(img/algas-marinas.png);
}

body.light-mode #bacteria {
    background-image: url(img/bacterias.png);
}

/* Barra de Scroll */
body.light-mode::-webkit-scrollbar-track {
    background: #e0e0e0;
}

body.light-mode::-webkit-scrollbar-thumb {
    background-color: #ff4444;
    border: 3px solid #e0e0e0;
}

body.light-mode::-webkit-scrollbar-thumb:hover {
    background-color: #bd0404;
}

/*Estilos para la barra Scroll */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: #ff4444;
    border-radius: 10px;
    border: 3px solid #f0f0f0;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #bd0404;
}



/* Estilo para Escritorio - CORREGIDO PARA VISIBILIDAD COMPLETA */
@media (min-width: 769px) {
    body {
        padding-top: 100px;
    }

    header {
        padding: 15px 40px;
    }

    header img {
        height: 60px;
    }

    .tituloPrincipal {
        font-size: 1.8rem;
        margin: 0 20px;
    }

    .navegacion-principal {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        border-top: none;
    }

    .nav-enlace {
        padding: 8px 15px;
        border-radius: 8px;
    }

    .boton-sesion {
        display: inline-block;
        padding: 10px 25px;
        border-radius: 25px;
        margin: 0;
    }

    .boton-sesion-mobile {
        display: none;
    }

    .menu-toggle {
        display: none;
    }

    .contenedor-modo {
        margin-left: 20px;
    }

    .etiqueta-modo {
        width: 70px;
        height: 35px;
    }

    .icono-sol,
    .icono-luna {
        font-size: 18px;
    }

    .interruptor {
        width: 29px;
        height: 29px;
    }

    #interruptor-modo:checked+.etiqueta-modo .interruptor {
        transform: translateX(35px);
    }

    .contenedor-reinos {
        display: flex;
        flex-direction: column;
        max-width: 1200px;
        margin: 0 auto;
        min-height: calc(100vh - 160px);
        padding: 2rem 1rem;
    }

    .arriba,
    .abajo {
        display: flex;
        flex-wrap: nowrap;
        gap: 15px;
        justify-content: center;
        gap: 2rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
    }


    .card-reino {
        flex: 0 0 280px;
        min-height: 200px;
        max-width: 300px;
        margin: 0;
        padding: 0;
    }

    .card-enlace {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 1.2rem;
        border-radius: 15px;
        align-items: center;
        justify-content: space-between;
    }

    .imagen-tarjeta {
        width: 100px;
        height: 100px;
        margin-bottom: 0.8rem;
        flex-shrink: 0;
    }

    .card-titulo {
        font-size: 1.1rem;
        text-align: center;
        margin-top: auto;
        padding-top: 0.8rem;
    }

    .explorar,
    .nosotros {
        padding: 3rem 2rem;
        margin: 2rem auto;
        border-radius: 20px;
    }

    .explorar h3,
    .nosotros h3 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .explorar h4,
    .nosotros h4 {
        font-size: 1.8rem;
        margin: 1.5rem 0 1rem;
    }

    .explorar p,
    .nosotros p {
        font-size: 1.05rem;
        text-align: justify; /* Added for text justification */
    }

    .explorar ul {
        margin: 1rem 0 2rem;
    }

    .explorar ul li {
        font-size: 1.2rem;
        margin: 1rem 0 0.5rem;
        text-align: justify; /* Added for text justification */
    }

    .explorar ul p {
        margin: 0.5rem 0 1rem;
        text-align: justify; /* Added for text justification */
    }

    .video-responsive-container {
        margin: 2rem auto 0;
        max-width: 800px;
        border-radius: 15px;
    }

    .nosotros ul li {
        font-size: 1.1rem;
        margin: 0.8rem 0;
        text-align: justify; /* Added for text justification */
    }

    .footer-con,
    .footer-info {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        align-items: start;
        gap: 2rem;
        text-align: center;
    }

    .footer-logo .logo-img {
        width: 200px;
    }

    #btn-dato {
        padding: 10px 20px;
        font-size: 16px;
    }

    .community-titilo {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .redes-sociales {
        gap: 1.5rem;
    }

    .icono-social {
        width: 40px;
        height: 40px;
    }

    .footer-info div {
        margin-bottom: 0;
    }

    .lugar p,
    .telefono p {
        font-size: 1.1rem;
    }

    .lugar a,
    .telefono a,
    .contacta a {
        font-size: 1rem;
    }

    .copyright-texto {
        font-size: 0.9rem;
    }

    #selected-language {
        padding: 5px 8px;
        gap: 10px;
    }

    #selected-language img {
        width: 30px;
        height: 23px;
    }

    .texto-idioma {
        font-size: 1rem;
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .card-reino {
        flex: 0 0 260px;
        min-height: 180px;
    }

    .arriba,
    .abajo {
        gap: 1.5rem;
        padding: 1rem;
    }

    .contenedor-reinos {
        min-height: calc(100vh - 140px);
    }
}


@media (min-width: 1400px) {
    .card-reino {
        flex: 0 0 300px;
        min-height: 220px;
    }

    .arriba,
    .abajo {
        gap: 2.5rem;
        padding: 2rem;
    }

    .contenedor-reinos {
        min-height: calc(100vh - 180px);
    }
}


@media (min-width: 769px) and (max-height: 800px) {
    .card-reino {
        flex: 0 0 250px;
        min-height: 160px;
    }

    .card-enlace {
        padding: 1rem;
    }

    .imagen-tarjeta {
        width: 80px;
        height: 80px;
        margin-bottom: 0.6rem;
    }

    .card-titulo {
        font-size: 1rem;
        padding-top: 0.6rem;
    }

    .arriba,
    .abajo {
        padding: 1rem;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .selecciones-idioma {
        order: 4;
        width: 90%;
        margin: 10px auto;
    }

    #selected-language {
        justify-content: center;
        width: 100%;
    }

    .oportunidades {
        position: static;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
        border: none;
    }

    .navegacion-principal.active .selecciones-idioma {
        display: block;
    }

    body.light-mode .menu-toggle span {
        background-color: #333;
    }

}