/* estilos/ttportafolio.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: 1;
}

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

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

/* Menu ===
=== */
.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;
}
/*==== */

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

/* === Layout Left/Right a 100% de ancho y proporcional === */
.container{
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    gap: 0; /* opcional */
}

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

/* Proporción (ajústarla al gusto) */
.left{
    flex: 3 1 0;   /* 3 partes */
    min-width: 0;  /* IMPORTANTÍSIMO para que no se desborde */
    padding: 10px;
}

.right{
    flex: 2 1 0;   /* 2 partes */
    min-width: 0;  /* IMPORTANTÍSIMO para que no se desborde */
    padding: 10px;

    background-color: #ffffff;
    border-left: 2px solid #ddd;

    display: flex;           /* para que #right pueda crecer */
    flex-direction: column;
}

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

/* El contenedor donde cargas formularios (AJAX) */
.right #right{
    flex: 1;
    min-width: 0;
    overflow: auto; /* si quieres scroll interno al panel derecho */
}

/* ========================================================
=== Sección de Bienvenida ===
======================================================== */
.bienvenida {
    background-color: #ECF0F1;
    padding: 30px;
    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;
}

/* Estilo base para todos los botones */
button[type="submit"],
button[type="button"],
.btn-guardar,
.btn-cancelar,
.btn-borrar {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

/* Botón Guardar */
.btn-guardar {
    background-color: #1ABC9C;
    color: white;
}

.btn-guardar:hover {
    background-color: #16A085;
}

/* Botón Cancelar */
.btn-cancelar {
    background-color: #cccccc;
    color: #333;
}

.btn-cancelar:hover {
    background-color: #999999;
}

/* Botón Borrar */
.btn-borrar {
    background-color: #d9534f;
    color: white;
}

.btn-borrar:hover {
    background-color: #c9302c;
}

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

.proyecto-nombre-editar{
  color: #BB8D05;; /* amarillo oro */
}


/* ========================================================
=== Alertas y Mensajes ===
======================================================== */
.alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: none; /* Ocultas inicialmente */
}

.alert-success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.alert-danger {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.alert-warning {
    background-color: #fcf8e3;
    color: #8a6d3b;
    border: 1px solid #faebcc;
}

.alert-info {
    background-color: #d9edf7;
    color: #31708f;
    border: 1px solid #bce8f1;
}



/* Animación popup de alert-success */
.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: #0f0f0f;
    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) ===
======================================================== */
.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: 1px 7px;
    background-color: rgb(200, 227, 238);
    font-weight: bold;
    font-size: 90%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    color: rgb(80,80,80);
}

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

.cellseparacionlinea {
    padding: 10px;
    height: 40px;
    background-color: rgb(200, 227, 238);
    box-sizing: border-box;
    width: 100%;
}

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

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

.celllista{
    padding: 1px 7px;
    background-color: rgb(200, 227, 238);
    text-align: left;
    font-weight: bold;
    color: rgb(80, 80, 80);
    font-size: 90%;
    box-sizing: border-box;
    align-items: center; /* Centra verticalmente el contenido */
}

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

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

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

.imagenNivel2 {
    padding: 5px 5px 5px 5px;
    max-width: 110px;
    max-height: 80px;
    min-height: 65px;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

.imagenNivel3 {
    padding: 5px 5px 5px 5px;
    max-width: 110px;
    max-height: 80px;
    min-height: 65px;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

.imagenNivel4 {
    padding: 5px 5px 5px 5px;
    max-width: 300px;
    max-height: 400px;
    min-height: 65px;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

/* ========================================================
   === Popups y Definiciones ===
======================================================== */
.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;
}

/* ========================================================
=== Toogle de Secciones ===
======================================================== */
.nivel_1, .nivel_2, .nivel_3, .nivel_4, .nivel_5 {
    display: none;
}

.toggle-trigger {
    cursor: pointer;
}

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

/* Responsive: en pantallas chicas apila (opcional pero recomendable) */
@media (max-width: 900px){
    .container{
        flex-direction: column;
    }
    .right{
        border-left: none;
        border-top: 2px solid #ddd;
    }
}