body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Evita desbordamiento horizontal */
}

/* --- Portada --- */
.cover {
    height: 600px;
    width: 100%;
    background-image: url("../img/Portada_rsz_2.png");
    color: white;
    background-size: contain;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.5);
    background-blend-mode: overlay;
    padding-top: 30px;
    margin: 0; /* Propiedad unificada */
}

.text-cover {
    text-align: center;
    max-width: 800px;
    padding: 0 1rem;
    color: white;
    font-size: 1.1rem;
    line-height: 1.6;
}

.visible-mobile {
    display: none;
}

.visible-desktop {
    display: block;
}

.visible-desktop p {
    font-size: 1.2rem;
}

.visible-desktop .second-paragraph-container p {
    font-size: 1.4rem;
}


/* --- Estilos para Pop-ups Legales (Política y Acuerdos) --- */
.popup-legal {
    display: flex;
    flex-direction: column;
    max-width: 90%;
    margin: 20px auto;
    padding: 30px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
}

.popup-content-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Secciones de texto y listas dentro del pop-up */
.popup-legal p, .popup-legal ul, .popup-legal li {
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: justify;
}

/* Títulos y subtítulos consolidados */
.popup-legal h3, .popup-legal h4 {
    text-align: center;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.popup-legal h3 {
    position: sticky;
    top: 0;
    background-color: white;
    padding: 10px 0;
    z-index: 10;
    border-bottom: 1px solid #ccc;
}

/* Animación y alternancia de fondo */
.popup-legal {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-legal section:nth-child(even) {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

/* --- Botones y Componentes del Pop-up --- */
.btn-cerrar-popup {
    font-size: 1.5rem;
    color: #555;
    background-color: #f0f0f0;
    border-radius: 50%;
    padding: 8px;
    transition: background-color 0.3s ease;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.btn-cerrar-popup:hover {
    background-color: #ddd;
}

.btn-aceptar {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin: 20px auto 0;
    display: block;
}

.btn-aceptar:hover {
    background-color: #0056b3;
}

.indice-politica {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}
.indice-politica li {
    margin-bottom: 10px;
}
.indice-politica li a {
    color: #0077cc;
    text-decoration: underline;
    font-weight: bold;
}

/* Estilos para el botón de Ingresar */
.nav-login-icon {
    display: none; /* Oculto por defecto en pantallas grandes */
    background: none;
    border: none;
    cursor: pointer;
    color: rgb(255, 255, 255);
}

/* Estilos para el texto dentro del botón */
.nav-login-icon .login-text {
   font-size: 1rem;
    font-weight: bold;
    text-decoration: underline; /* Agrega un subrayado */
    text-decoration-color: oklch(37.374% 0.16916 276.456 / 0.958); /* Define el color del subrayado en azul */
    text-underline-offset: 3px; /* Separa el subrayado del texto */
    text-decoration-thickness: 2px; /* Hace la línea más gruesa */
}

/* Muestra el subrayado al pasar el cursor sobre el botón */
.nav-login-icon:hover .login-text {
    text-decoration-color: #007bff; /* Hace visible el subrayado al pasar el cursor */
}
/* Elimina el color de fondo verde en el estado activo del botón */
.nav-login-icon:active,
.nav-login-icon:focus {
    background-color: transparent !important;
}

/* --- MOBILE (Media Query) --- */
@media (max-width: 768px) {
    body {
        padding-top: 30px;
    }

    .container-fluid .cover {
        width: 100%;
        height: auto;
        min-height: 350px;
        padding: 40px 15px 40px;
        position: relative;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 10px;
        left: 0;
        margin-top: 10px;
        margin:0px;
    }

    .cover h1 {
        font-size: 2rem;
    }

    .cover h3 {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .cover p.text-cover {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .card {
        padding: 1rem 2rem 1rem;
        height: auto;
    }

    .card p {
        font-size: 16px;
    }

    .serviciosCartas {
        outline: 2px solid #e8e8e8;
        background-color: #f5f5f5;
        margin: 10px;
        padding: 10px;
    }

    .serviciosCartas p {
        font-size: 16px;
    }

    .text-cover {
        font-size: 0.9rem;
    }

    .visible-mobile {
        display: block;
    }

    .visible-desktop {
        display: none;
    }

    .second-paragraph-container {
        padding: 20px 30px;
        text-align: justify;
    }

    .second-paragraph-container p {
        font-size: 1.2rem;
        line-height: 2;
        text-align: justify;
        color: #444;
    }

    .popup-legal {
        width: 95%;
        padding: 20px;
        line-height: 1.6;
    }

     .nav-login-icon {
        display: block; /* Lo hacemos visible en móviles */
    }
}