/* estilos/trial-bienvenida.css*/

/* ========================================================
=== Reset General ===
======================================================== */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: #2C3E50;
}

/* Inputs generales */
input[type="text"],
input[type="file"] {
    width: 80%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1em;
    background-color: #fff;
    box-sizing: border-box;
}

/* ========================================================
=== Encabezado (Header y Perfil) ===
======================================================== */
header {
    background-color: #1ABC9C;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
}

.perfil {
    position: relative;
    display: inline-block;
}

.perfil-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1em;
}

.perfil-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    color: #2C3E50;
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
    z-index: 10;
}

.perfil-menu a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: #2C3E50;
}

.perfil-menu a:hover {
    background-color: #f1f1f1;
}

.perfil-info {
    text-align: center;
    line-height: 1.8;
}

.perfil-info h2 {
    color: #3498DB;
    margin-bottom: 15px;
}

.perfil-info p {
    font-size: 1.1em;
    margin: 10px 0;
}

.foto-perfil {
    max-width: 150px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 1em;
}

/* ========================================================
=== Menú principal ===
======================================================== */
.menu-bar {
    background-color: #1ABC9C;
    color: white;
    padding: 15px;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-logo {
    font-weight: bold;
    font-size: 1.2em;
}

.menu-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.menu-links li a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s;
}

.menu-links li a:hover {
    color: #ECF0F1;
}

.menu-user {
    font-size: 1em;
}

.menu-visualizar {
    text-decoration: underline;
}

/* ================== SUBMENÚ ORDENAR SECCIONES ================== */
.menu-links li {
    position: relative; /* necesario para posicionar el submenú */
}

/* El padre es <span>, así que hay que darle estilo como si fuera link */
.menu-links li .menu-parent {
    color: white;
    font-size: 1em;
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Submenú oculto por defecto */
.menu-links .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #16A085; /* ligeramente más oscuro */
    list-style: none;
    margin: 0px 0 0;
    padding: 10px 0;
    min-width: 260px;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
    z-index: 9999;
}

/* Cada opción del submenú */
.menu-links .submenu li {
    width: 100%;
}

/* Links dentro del submenú */
.menu-links .submenu li a {
    display: block;
    padding: 10px 14px;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

/* Hover del submenú */
.menu-links .submenu li a:hover {
    background-color: rgba(255,255,255,0.12);
    color: #ECF0F1;
}

/* Mostrar submenú al pasar el mouse */
.menu-links .has-submenu:hover .submenu {
    display: block;
}

.cerrar.toggleSymbol.fila_nivel_1{
    box-sizing: border-box;
    width: 98%;
    margin: 48px auto 0;
    position: relative;

    background-image: url("imagenes/p-fondo3.png");
    background-repeat: repeat;
    /* opcional: si quieres que se adapte/centre */
    /* background-size: cover; */
    /* background-position: center; */

    border: 2px solid #9D978C;
    border-radius: 24px;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.8);
}

.fila_nivel_2{
    box-sizing: border-box;
    width: 98%;
    margin: 18px auto 0;
    position: relative;

    background-image: url("imagenes/p-fondo3.png");
    background-repeat: repeat;
    /* opcional: si quieres que se adapte/centre */
    /* background-size: cover; */
    /* background-position: center; */

    border: 2px solid #9D978C;
    border-radius: 24px;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.8);
}

.fila_nivel_3{
    
    /*box-sizing: border-box;*/
    width: 98%;
    margin: 20px auto 0;
    /*position: relative;

    background-image: url("imagenes/p-fondo3.png");
    background-repeat: repeat;
    */
    /* opcional: si quieres que se adapte/centre */
    /* background-size: cover; */
    /* background-position: center; */

    border: 2px solid #9D978C;
    /*border-radius: 24px;*/
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.8);
}
.fila_nivel_4{
    
    /*box-sizing: border-box;*/
    width: 98%;
    margin: 20px auto 0;
    padding: 5px;
    /*position: relative;

    background-image: url("imagenes/p-fondo3.png");
    background-repeat: repeat;
    */
    /* opcional: si quieres que se adapte/centre */
    /* background-size: cover; */
    /* background-position: center; */

    border: 2px solid #9D978C;
    /*border-radius: 24px;*/
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.8);
}


/* ========================================================
=== Contenedor Principal ===
======================================================== */
main {
    padding: 10px;
    text-align: left;
}

.container {
    /*display: flex;*/
    /*flex-direction: row;*/
    min-height: 80vh;
    width: 98%;
}

.left,
.right {
    flex: 1;
    padding: 10px;
}

.left {
    background: linear-gradient(to bottom right, #ECF0F1, #ffffff);
}

.right {
    background-color: #ffffff;
    border-left: 2px solid #ddd;
}

.right h3 {
    margin-bottom: 20px;
    color: #16A085;
}

/* ========================================================
=== Sección de Bienvenida (si se usa) ===
======================================================== */
.bienvenida {
    background-color: #ECF0F1;
    padding: 1px 20px 0px 20px;
    margin: auto;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.bienvenida h2 {
    color: #3498DB;
}

.bienvenida p {
    font-size: 1.1em;
    margin-top: 10px;
}

/* ========================================================
=== Botones y Formularios ===
======================================================== */
.form-group {
    margin-bottom: 15px;
}

button[type="submit"],
button[type="button"] {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
}

button[type="submit"] {
    background-color: #1ABC9C;
    color: white;
}

button[type="submit"]:hover {
    background-color: #16A085;
}

button[type="button"] {
    background-color: #cccccc;
    color: #333;
}

button[type="button"]:hover {
    background-color: #999999;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #2C3E50;
}

/* ========================================================
=== Alertas y Mensajes ===
======================================================== */
.alert-danger {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.alert-warning {
    background-color: #fcf8e3;
    color: #8a6d3b;
    border: 1px solid #faebcc;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.alert-info {
    background-color: #d9edf7;
    color: #31708f;
    border: 1px solid #bce8f1;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.alert-success {
    background-color: #28a745;
    border: 1px solid #1e7e34;
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Animación popup de alert-success fija arriba */
.alert.alert-success {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    animation: fadeInOut 4s ease-in-out forwards;
    min-width: 280px;
    max-width: 400px;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10%, 90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); pointer-events: none; }
}

/* ========================================================
=== Tablas y Layouts ===
======================================================== */
table {
    width: 95%;
    margin: 0 auto;
    border-collapse: collapse;
}

table tr {
    display: flex;
}

table td {
    flex: 1 1 calc(33.33% - 10px);
    box-sizing: border-box;
}

table td:first-child {
    flex: 0 0 10%;
}

table.class_nivel_1 {
    border-top: 1px solid black;
    border-right: 1px solid black;
}

table tr:nth-child(2) {
    flex: 0 0 100%;
}

table tr:nth-child(2) td.tdnormalSegundafilaSegundacolumna {
    width: 100%;
    display: block;
    padding-left: 30px;
}

.tdnormalSegundafilaSegundacolumna p {
    display: list-item;
    list-style-type: disc;
    margin-left: 20px;
}

/* ========================================================
=== Layout flexible (Flexbox) para estructura de niveles ===
======================================================== */
.table {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.row {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.rowlista {
    width: 100%;
    display: block;
}

.column {
    /*flex: 1;*/
    padding: 5px 10px;
}

.cell,
.cellNive1Numero {
    padding: 21px 7px;
    font-weight: bold;
    font-size: 90%;
    box-sizing: border-box;
    /*display: flex;*/
    align-items: center;
    color: rgb(80,80,80);
    width: 15%;
}

.cell,
.cellNivel1imagenes {
    padding: 1px 7px;
    font-weight: bold;
    font-size: 90%;
    box-sizing: border-box;
    /*display: flex;*/
    align-items: center;
    color: rgb(80,80,80);
    /*min-width: 280px;*/
    min-width: 40%;
}

.cell,
.cellNivel4Numero {
    padding: 1px 7px;
    font-weight: bold;
    font-size: 90%;
    box-sizing: border-box;
    align-items: center;
    vertical-align: top;
    color: rgb(80,80,80);
}

.cellseparado {
    padding: 10px;
    font-weight: bold;
    font-size: 90%;
    box-sizing: border-box;
    /*display: flex;*/
    align-items: center;
    color: rgb(80,80,80);
    border-left: 5px double rgb(202, 161, 161);
}

.cellseparacionlinea {
    padding: 10px;
    height: 40px;
    box-sizing: border-box;
    width: 100%;
}

.cellseparacionfila {
    padding: 10px;
    height: 10px;
    width: 100%;
}

.cell {
    /*flex: 1;*/
    width: 100%;
}

.celllista {
    padding: 1px 7px;
    text-align: left;
    font-weight: bold;
    color: rgb(80, 80, 80);
    font-size: 90%;
    box-sizing: border-box;
    align-items: center;
}

.celllista p {
    display: list-item;
    list-style-type: disc;
    margin-left: 75px;
}

.hrdegradado {
    background: linear-gradient(to right, #ffffff, #c8e3ee, #ffffff);
    height: 3px;
    border: none;
}

/* Celdas de detalle Nivel 4 */
.row .cellNivel4superior {
    margin: 5px !important;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
    width: 85%;
}

.row .cellNivel4centrado {
    margin: 5px !important;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
    width: 20%;
}

.row .cellNivel4izquerda {
    margin: 5px !important;
    padding: 8px;
    text-align: justify;
    vertical-align: middle;
    box-sizing: border-box;
    width: 85%;
}

.row .cellNivel4izquerdacenter {
    margin: 5px !important;
    padding: 8px;
    text-align: right;
    vertical-align: middle;
    box-sizing: border-box;
    width: 20%;
}

.row .cellNivel4derecha {
    margin: 5px !important;
    padding: 8px;
    text-align: left;
    vertical-align: middle;
    box-sizing: border-box;
    width: 80%;
}

/* ========================================================
=== Imágenes ===
======================================================== */
.imagenNivel1 {
    padding: 5px;
    max-width: 216px;
    max-height: 80px;
    /*min-width: 40%;*/
    min-height: 65px;
    display: inline-block;
    vertical-align: middle;
}

/* Imagen de nivel 4 en general */
.imagenNivel4 {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.imagenNivel4:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}

/* ========================================================
=== CARRUSEL SIMPLE NIVEL 4 (sin JS, sin Swiper) ===
======================================================== */
.carrusel-nivel4 {
    display: flex;
    flex-wrap: wrap;
    /*gap: 1.5rem;*/
    /*margin: 1.5rem 0 2.5rem;*/
    justify-content: flex-start;
}

.carrusel-item {
    flex: 1 1 320px;
    max-width: 420px;
}

/* Título/leyenda opcional debajo del banner si quisieras agregar texto */
.carrusel-item figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

/* ========================================================
=== Pop up / Modal para imágenes de Nivel 4 ===
======================================================== */
.modal-imagen-nivel4 {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.modal-imagen-nivel4-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.modal-imagen-nivel4-caption {
    margin-top: 0.75rem;
    color: #f0f0f0;
    text-align: center;
    font-size: 0.95rem;
}

.modal-imagen-nivel4-cerrar {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 32px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
}

.modal-imagen-nivel4-cerrar:hover {
    color: #ffdddd;
}

/* ========================================================
=== Popups y Definiciones (Entidades, Nivel 2, Nivel 3, etc.) ===
======================================================== */
.popup-definicion {
    display: none;
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    padding: 25px;
    border: 2px solid #3498db;
    border-radius: 10px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 600px;
}

.popup-contenido {
    max-height: 400px;
    overflow-y: auto;
}

.popup-cerrar {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 20px;
    color: #aaa;
}

/* ========================================================
=== Toggle de Secciones ===
======================================================== */
/*
.nivel_1,
.nivel_2,
.nivel_3,
.nivel_4,
.nivel_5 {
    display: none;
    margin: 0px 0px 0px 50px;
}
*/

.nivel_1{
    display: none;
    margin: 0px 0px 0px 5px;
}

.nivel_2{
    display: none;
    margin: 0px 0px 0px 0px;
}

.nivel_3{
    display: none;
    margin: 0px 0px 0px 0px;
}

.nivel_4{
    display: none;
    margin: 0px 0px 0px 0px;
}

.nivel_5{
    display: none;
    margin: 0px 0px 0px 0px;
}

.toggle-trigger {
    cursor: pointer;
}

/* ========================================================
=== Footer ===
======================================================== */
footer {
    background-color: #2D2D2D;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
}

footer .sitiospopulares h3 {
    margin: 0;
    font-size: 1rem;
}

footer .sitiospopulares {
    margin-top: 0.75rem;
}


@media (min-width: 1024px){
  .nivel_1{
    display: none;
    margin: 0 0 0 20px;
  }
}


.modal-imagen-nivel4-nav{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 34px;
    line-height: 48px;
    text-align: center;
    user-select: none;
    background: rgba(0,0,0,.55);
    color: #fff;
    z-index: 5;
}

.modal-imagen-nivel4-prev{ left: 14px; }
.modal-imagen-nivel4-next{ right: 14px; }

.modal-imagen-nivel4-nav:hover{
    background: rgba(0,0,0,.75);
}

@media (max-width: 640px){
    .modal-imagen-nivel4-nav{
        width: 42px;
        height: 42px;
        font-size: 30px;
        line-height: 42px;
    }
}

/* ------------------ CTA / BOTÓN GENERAR ------------------ */
.cta-generar {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px;
}

.generar-btn {
    background: linear-gradient(to right, #1ABC9C, #16A085);
    color: white;
    padding: 14px 28px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, background 0.3s;
    display: inline-flex;
    align-items: center;
}

.generar-btn i {
    margin-right: 10px;
}

.generar-btn:hover {
    background: linear-gradient(to right, #16A085, #0E6655);
    transform: translateY(-2px);
}


/* ------------------ LOGIN ------------------ */
.login {
    font-family: Arial, sans-serif;
    /*background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 100%);*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 35vh;
    margin: 0;
    color: #2C3E50;
}

.login-box {
    background-color: #ffffffdd;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.login-box h2 {
    margin-bottom: 20px;
    color: #00796B;
}

.login-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #4285F4;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.login-option:hover {
    background-color: #3367D6;
}