/* Estilo para la página principal (main page)*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

head{
    top: 0;
    background-color: #1a2165;
}

body {
    font-family: 'montserrat';
    background-color: #1a2165;
}

html {
    scroll-behavior: smooth; /* Enables smooth scrolling */
}

ul{
    list-style: none;
    border-style: none;
}

li{
    margin: 0.5rem 0 0.5rem 0.5rem;
}

a{
    text-decoration: none;
    color: white;
}

/* Estilo para el burguer menu */

.off-screen-menu{
    font-size: 0.9rem;
    color: white;
    position: fixed;
    top: 2rem;
    left: -15rem;
    display: inline-block;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-left: -5rem;
    transition: .3s ease;
    width: 10rem;
    height: 10.5rem;
}

.off-screen-menu.active{
    left: 10rem;
    z-index: 2;
}

.off-screen-menu ul li:hover {
    cursor: pointer;
    background-color: #ffc107;
    border-radius: 2rem;
    transition: 0.7s;
}

.ham-menu{
    margin: 0;
    height: 50px;
    width: 50px;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.ham-menu span{
    height: 0.4rem;
    width: 80%;
    background-color: white;
    border-radius: 25px;
    position: absolute;
    top: 50%;
    left: 4rem;
    margin-top: 2rem;
    transform: translate(-50%, -50%);
    transition: .3s ease;
    cursor: pointer;
}

.ham-menu span:nth-child(1){
    top: 25%;
}

.ham-menu span:nth-child(3){
    top: 77%;
}

.ham-menu.active span:nth-child(1){
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.ham-menu.active span:nth-child(2){
    opacity: 0;
}

.ham-menu.active span:nth-child(3){
    top: 50%;
    transform: translate(-50%, -40%) rotate(-45deg);
}

/* Estilo para el logo y botones */

.home {
    background-color: #1a2165; /* Green */
    flex-direction: column;
    padding: 3rem;
}

.section {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 0 auto;     /* Asegúrate de que el contenedor principal tenga un margen automático */

}

.contenedor-botones{
    display: flex;
    gap: 10px;
    justify-content: space-around;
}

.boton {
    flex: 1; /* Todos los botones ocupan el mismo ancho */
    padding: 15px 20px; /* Espaciado dentro del botón */
    font-size: 0.7rem;
    font-family: 'montserrat';
    text-align: center;
    background-color: rgb(18, 20, 74);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.7s;
    margin: 2rem 3rem 17rem 3rem;
}

.boton:hover {
    background-color: rgb(92, 175,245);
}

.principal{
    position: absolute;
    top: 85%;
    right: 50px;
    bottom: 1%;
    width: 12%;
    height: auto;
    z-index: 2;
}

.button-return-home {
    width: 2px;
    height: 2px;
    transform: scale(0.2);
    position: fixed;
    top: 3%;
    right: 7%;
    border: none;
    background-color: transparent; /* Changed from 'none' to 'transparent' */
    z-index: 1000; /* Ensures it stays on top of other elements */
    cursor: pointer;
}

/* Media queries para responsive design */

@media (max-width: 480px) {

    .section{
        margin-top: 20%;
    }

    li{
        margin: 0.7rem;
    }

    .list-menu{
        margin-top: 0.5rem;
        font-size: 1.5rem;
        font-weight: 700;
    }
    .ham-menu{
        height: 1.5rem;
        width: 3rem;
    }
    .ham-menu span{
        height: 0.2rem;
        width: 2rem;
        left: 1.5rem;
        margin-top: 0.7rem;
    }
    .off-screen-menu{
        font-size: 0.8rem;
        margin-left: 0.1rem;
        background-color: #1a2165;
        height: 7rem;
        z-index: 2;
        border-radius: 15%;
    }
    .off-screen-menu.active{
        left: 1.2rem;
        top: 0.2rem;
    }
  }

/* Para móviles (max-width: 767px) */
@media (max-width: 767px) {
    body {
        font-size: 1.5rem; /* Tamaño de fuente más pequeño en móviles */
    }

    .off-screen-menu.active{
        left: 1.2rem;
        top: 0.2rem;
    }

    .logo {
        width: 80%; /* Logo más grande en móviles */
        margin-top: 5%;
    }

    .contenedor-botones {
        flex-direction: column;
        gap: 1rem;
        margin-left: 0; /* Centra los botones en móviles */
    }

    .boton {
        margin: 1rem;
        font-size: 1rem; /* Botones más pequeños en móviles */
        padding: 10px;
    }

    .principal {
        right: 20px;
        width: 30%;
    }

    .ham-menu span {
        width: 50%; /* Ajustar el tamaño del menú hamburguesa en móviles */
    }
}

/* Para tabletas (min-width: 768px y max-width: 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {

    body {
        font-size: 2rem; /* Tamaño de fuente moderado para tabletas */
    }

    .list-menu{
        margin-top: 2rem;
    }

    .off-screen-menu{
        font-size: 1.1rem;
        margin-left: -7rem;
    }

    .off-screen-menu.active{
        left: 12rem;
        top: 0.8rem;
    }
    .section{
        margin-top: 25%;
    }

    .logo {
        width: 60%; /* Tamaño del logo moderado */
    }

    .contenedor-botones {
        gap: 2rem;
    }

    .boton {
        margin: 2rem 1rem 10rem 1rem; /* Ajustar el espaciado en tabletas */
        padding: 12px;
        font-size: 1.1rem;
    }

    .principal {
        right: 30px;
        width: 20%;
    }

    .ham-menu {
        width: 8%;
    }

    .ham-menu span {
        width: 70%; /* Ajustar el tamaño del menú hamburguesa */
        left: 3rem;
        margin-top: 1rem;
    }
}

/* Para pantallas de escritorio (min-width: 1025px) */
@media (min-width: 1025px) {
    body {
        font-size: 2.5rem; /* Tamaño de fuente más grande para pantallas */
    }

    .logo {
        width: 50%;
    }

    .contenedor-botones {
        gap: 3rem;
    }

    .boton {
        margin: 3rem;
        padding: 15px;
        font-size: 1.2rem; /* Tamaño de los botones más grande */
    }

    .principal {
        right: 50px;
        width: 12%;
    }

    .ham-menu span {
        width: 80%; /* Tamaño del menú hamburguesa en escritorio */
    }
}

/*TAMIZAJE*/

/* Welcome Screen Styles */
.header-welcome{
    color: white;
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.logo{
    width: 25%;
    margin-top: 10%;
    margin-bottom: 1%;
}

.texto-tamizaje{
    margin-left: 35%;
    margin-right: 35%;
}

.welcome-screen {
    font-family: 'montserrat';
    font-weight: 400;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: justify;
    height: 100%; /* Full height for centering */
    background-color: #1a2165;
    transition: opacity 0.5s ease; /* Transition for fade-out effect */
    opacity: 1; /* Initial opacity */
    position: absolute; /* Positioned to overlay the entire screen */
    color: rgb(62, 227,148); /* Font color for the welcome message */
    font-size: 1rem;
    line-height: 1.1rem;
    z-index: 1;
    padding-top: 25%;

}

.welcome-screen.fade-out {
    opacity: 0; /* Fades out when class is added */
    pointer-events: none; /* Prevent interactions after fading */
}

/* Questionnaire Container */
body{
    color: white;
}

.question-container {
    display: none; /* Hide the questionnaire initially */
    width: 90%; /* Full width for responsive design */
    max-width: 600px; /* Max width for larger screens */
    height: 400px; /* Fixed height to keep each question centered */
    color: white;
    font-family: 'montserrat';
    font-size: 1.5rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed; /* Use fixed positioning for centering */
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center horizontally and vertically */
    padding: 20px; /* Add padding for space around content */
    border-radius: 15px; /* Rounded corners */
    opacity: 0; /* Initially invisible */
    transition: opacity 0.5s ease; /* Smooth fade-in effect */
    z-index: 1; /* Ensure it stays above other elements */
}

/* Active class for question container to fade in */
.question-container.active {
    display: flex; /* Make it visible */
    opacity: 1; /* Fade-in effect */
}

/* Question Screens */
.question-screen {
    position: absolute; /* Absolute positioning within the container */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Center the content vertically */
    text-align: center;
    color: white;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.question-screen.active {
    opacity: 1;
    transform: translateY(0);
}

/* Question Images */
.question-image {
    position: absolute; /* Position relative to the question container */
    bottom: -20%; /* Place near the bottom */
    right: -10%; /* Place near the right */
    max-width: 35%; /* Max width of the image */
    width: 100%; /* Responsive width */
    height: auto; /* Maintain aspect ratio */
    opacity: 0; /* Initially hidden */
    transition: opacity 0.5s ease; /* Fade-in/out effect */
}

.question-screen.active .question-image {
    opacity: 1; /* Make image visible with the question */
}

/* Response Buttons */
.button-container {
    display: flex;
    gap: 20px; /* Space between buttons */
    margin-top: 20px; /* Margin between question and buttons */
}

.response-button {
    width: 10rem;
    padding: 1rem;
    border: none;
    border-radius: 5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.7s ease;
}

.yes{
    background-color: #ffc107;
    color: #1a2165;
}

.no{
    background-color: #002b7a;
    color: white;
}

.response-button:hover {
    background-color: #ff9800;
}

/* Start Button */
.start-button {
    font-size: 1rem;
    padding: 15px 20px;
    font-family: 'montserrat';
    text-align: center;
    background-color: rgb(18, 20, 74);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.7s;
    margin: 35px;
}

.start-button:hover {
    background-color: rgb(92, 175,245);
}

/* Progress Bar */
.progress-container {
    position: absolute;
    top: 22%;
    left: 5%;
    width: 90%;
    height: 10px;
    background-color: rgb(62, 227,148);
    border-radius: 10px;
}

.progress {
    height: 100%;
    width: 0;
    background-color: #007bff;
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Animated Circle */
.animated-circle {
    position: fixed; /* Positioned relative to the entire viewport */
    bottom: 50px; /* Position slightly above the bottom of the page */
    left: 50%; /* Start at the center */
    transform: translateX(-50%); /* Adjust to be centered */
    width: 30px;
    height: 30px;
    background-color: #ffc107;
    border-radius: 50%;
    animation: moveCircle 2s infinite ease-in-out;
}

/* Animation for the circle */
@keyframes moveCircle {
    0% {
        transform: translateX(-50%);
    }
    50% {
        transform: translateX(calc(100% - 30px)); /* Move to the right side */
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Final query container */
.final-query {
    margin-top: 50px;
    text-align: center;
    font-size: 18px;
    color: #333;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease;
}

/* Popup overlay styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* Hidden initially */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Popup content styles */
.popup-content {
    background: #fff;
    padding: 20px 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-30px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Text inside popup */
.popup-content p {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

/* Close button */
.popup-close-button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.popup-close-button:hover {
    background: #0056b3;
}


/* Media queries para responsive design */
@media (max-width: 480px) {

    .logo{
        width: 50%;
    }

    .header-welcome{
        font-size: 1rem;
    }
    .texto-tamizaje{
        margin-left: 12%;
        margin-right: 12%;
    }

    .welcome-screen{
        font-size: 0.8rem;
        top: 9%;
    }
    .start-button{
        font-size: 0.8rem;
    }
    .question-container{
        width: 75%;
        height: 55%;
        font-size: 0.8rem;
        top: 50%;
    }
    .response-button{
        width: 7rem;
        font-size: 0.8rem;
        padding: 5%;
    }
    .question-image{
        bottom: -25%;
        right: -10%;
        max-width: 50%;
    }
    .button-return-home{
        top: 2%;
        right: 3%;
        max-width: 15%;
    }
    .progress-container{
        top: 17%;
        left: 6%;
        width: 88%;
    }
  }

/* Para móviles (max-width: 767px) */
@media (max-width: 767px) {
    
    .welcome-screen{
        top: 15%; 
    }

    .question-container{
        top: 50%;
    }
    .button-return-home{
        top: 1%;
        right: 10%;
        max-width: 15%;
        transform: scale(0.1);
    }
}

/* Para tabletas (min-width: 768px y max-width: 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .welcome-screen{
        top: 15%;
    }
    .texto-tamizaje{
        margin-left: 20%;
        margin-right: 20%;
    }
    .question-container{
        top: 48%;
    }
    .button-return-home{
        top: 1%;
        right: 11%;
    }
    .question-image{
        max-width: 35%;
        bottom: -60%;
    }
}

/* Para pantallas de escritorio (min-width: 1025px) */
@media (min-width: 1025px) {
    
}
