/* ======== IMPORTS Y VARIABLES COMPARTIDAS ======== */
@import url('estilos.css');

body {
    background: url('../images/vehicle5.jpeg') no-repeat center center fixed;
    background-size: cover;
    justify-content: flex-start;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 40px;
    height: auto;
    min-height: 100vh;
}

/* Modificar el overlay del body en el dashboard */
body::before {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(2px);
}

/* ======== BARRA DE NAVEGACIÓN (ESTILO AGXEED) ======== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--accent-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.navbar-marca {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0px;
    color: var(--text-dark);
    -webkit-text-fill-color: initial;
    -webkit-background-clip: initial;
    background: none;
    text-shadow: none;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    align-items: center;
}

.navbar-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color var(--transition-fast);
    position: relative;
    padding: 5px 0;
}

.navbar-item a:hover,
.navbar-item.activo a {
    color: var(--accent-green);
    text-shadow: none;
}

.navbar-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: width var(--transition-fast);
}

.navbar-item a:hover::after,
.navbar-item.activo a::after {
    width: 100%;
}

.navbar-perfil {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-perfil img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--accent-green);
    object-fit: cover;
    box-shadow: none;
}

.navbar-usuario-info {
    display: flex;
    flex-direction: column;
}

.navbar-usuario-nombre {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.navbar-usuario-rol {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-logout {
    font-family: 'Outfit', sans-serif;
    background: #fdf2f2;
    border: 1px solid #f8b4b4;
    color: #9b1c1c;
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    width: auto;
    letter-spacing: 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-logout:hover {
    background: #f05252;
    color: #ffffff;
    box-shadow: none;
    transform: none;
    filter: none;
}

/* ======== LAYOUT DE CONTENEDOR ANCHO (LIGHT CARD) ======== */
.contenedor-ancho {
    width: 95%;
    max-width: 1100px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    backdrop-filter: none;
    margin-top: 20px;
    position: relative;
}

.contenedor-ancho::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent-green);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* ======== FORMULARIO EN GRID DE DOS COLUMNAS ======== */
.formulario-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 25px;
    margin-bottom: 25px;
}

.formulario-grid .campo {
    margin-bottom: 0;
}

.formulario-grid .campo-completo {
    grid-column: span 2;
}

select {
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%231d2120' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

select:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(92, 184, 52, 0.2);
}

select option {
    background: #ffffff;
    color: var(--text-dark);
}

/* ======== BOTONES ACCIÓN CRUD ======== */
.botones-crud {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.botones-crud button {
    width: auto;
    min-width: 120px;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-actualizar {
    background: var(--warning);
}

.btn-actualizar:hover {
    background: #d68400;
    box-shadow: none;
}

.btn-eliminar {
    background: var(--error);
}

.btn-eliminar:hover {
    background: #c0392b;
    box-shadow: none;
}

.btn-buscar {
    background: #3498db;
}

.btn-buscar:hover {
    background: #2980b9;
    box-shadow: none;
}

.btn-limpiar {
    background: #e0e0e0;
    color: var(--text-dark);
}

.btn-limpiar:hover {
    background: #c8c8c8;
    box-shadow: none;
}

/* ======== ESTADÍSTICAS CARD PANEL ======== */
.panel-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.card-stat {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: none;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.card-stat:hover {
    transform: translateY(-2px);
    border-color: var(--accent-green);
}

.card-stat-titulo {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-stat-valor {
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent-green);
    text-shadow: none;
}

/* ======== TABLAS CYBERNETIC (REDISEÑADAS A LIGHT TABLE) ======== */
.tabla-contenedor {
    width: 100%;
    overflow-x: auto;
    margin-top: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: rgba(92, 184, 52, 0.05);
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 14px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-dark);
}

tr:nth-child(even) {
    background-color: #fafafa;
}

tr:hover {
    background: rgba(92, 184, 52, 0.03) !important;
}

.accion-icon {
    font-size: 1.1rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    width: auto;
    color: var(--text-secondary);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.accion-icon:hover {
    color: var(--accent-green);
    transform: scale(1.15);
    box-shadow: none;
    background: none;
}

.badge-rol {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin { background: #ebf8e1; color: #3e8e19; border: 1px solid #a3e284; }
.badge-inst { background: #e8f4fd; color: #1a73e8; border: 1px solid #94c2ed; }
.badge-apren { background: #f1f2f6; color: #57606f; border: 1px solid #ced6e0; }

.badge-estado {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-activo { background: #e6fdf0; color: #1e7e34; }
.badge-inactivo { background: #fdf2f2; color: #bd2130; }

/* ======== RESPONSIVIDAD DASHBOARD ======== */
@media (max-width: 900px) {
    .formulario-grid {
        grid-template-columns: 1fr;
    }

    .formulario-grid .campo-completo {
        grid-column: span 1;
    }

    .panel-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .navbar-menu {
        display: none;
    }

    .btn-logout {
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .panel-stats {
        grid-template-columns: 1fr;
    }

    .botones-crud {
        flex-direction: column;
        align-items: stretch;
    }

    .botones-crud button {
        width: 100%;
    }
}

/* ======== HELPER STYLES FOR REDESIGN ======== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: url('../images/drone_banner.png') no-repeat center center;
    background-size: cover;
    border-radius: 16px;
    margin-bottom: 50px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 90, 156, 0.45) 0%, rgba(33, 110, 57, 0.5) 100%);
    z-index: 1;
}

.hero-banner-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    padding: 30px;
    animation: fadeInUp 1s ease-out;
}

.hero-titulo {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.2rem;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.hero-subtitulo {
    font-size: 1.4rem;
    color: #f7f9fa;
    margin-bottom: 30px;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.btn-hero {
    display: inline-block;
    padding: 14px 36px;
    background: var(--accent-green);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(59, 174, 67, 0.4);
    transition: background var(--transition-fast), transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-hero:hover {
    background: var(--accent-green-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 110, 57, 0.5);
}

.btn-hero:active {
    transform: translateY(-1px);
}

/* ======== NUEVA ESTRUCTURA NOSOTROS (ESTILO ROBOTIKA) ======== */
.seccion-nosotros-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: flex-start;
    margin-bottom: 90px;
}

.nosotros-col-izquierda {
    display: flex;
    flex-direction: column;
}

.nosotros-titulo-nosotros {
    font-family: 'Poppins', sans-serif;
    font-size: 98px;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 25px;
    letter-spacing: -2px;
    text-transform: uppercase;
    line-height: 1.0;
    text-align: left;
    text-shadow: 3px 3px 0px #ffffff, 6px 6px 0px rgba(0, 90, 156, 0.12); /* Scaled Relief 3D shadow */
}

.nosotros-texto p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: justify;
    margin-bottom: 18px;
}

.nosotros-texto p strong {
    font-weight: 700;
    color: #000000;
}

.nosotros-col-derecha {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.seccion-img-wrapper {
    position: relative;
    width: 100%;
    background: var(--accent-blue); /* Fondo azul tecnológico sólido */
    border-radius: 12px;
    padding: 0;
    height: 175px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 90, 156, 0.15);
}

/* Modificar el color de fondo para la segunda y tercera fila para dar diversidad */
.seccion-nosotros-row:nth-of-type(2) .seccion-img-wrapper {
    background: var(--accent-green); /* Verde institucional */
    box-shadow: 0 10px 25px rgba(59, 174, 67, 0.15);
}

.seccion-nosotros-row:nth-of-type(3) .seccion-img-wrapper {
    background: #475569; /* Gris oscuro metálico */
    box-shadow: 0 10px 25px rgba(71, 85, 105, 0.15);
}

.seccion-img-wrapper img {
    position: absolute;
    bottom: -20px; /* Efecto desbordado por abajo */
    width: 90%;
    height: 125%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.seccion-nosotros-row:hover .seccion-img-wrapper img {
    transform: translateY(-8px) scale(1.02);
}

.seccion-slogan-destacado {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    line-height: 1.45;
    color: #555555;
    margin-top: 10px;
    font-weight: 400;
    text-align: left;
}

.seccion-slogan-destacado strong {
    color: var(--text-dark);
    font-weight: 700;
}

.seccion-slogan-sub {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #475569;
    margin-top: 8px;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
}

/* Tarjetas Premium para Misión y Visión */
.tarjetas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 50px 0;
}

.tarjeta-premium {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 35px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.tarjeta-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-blue);
    transition: background 0.3s ease;
}

.tarjeta-premium:hover::before {
    background: var(--accent-green);
}

.tarjeta-premium:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 174, 67, 0.3);
}

.tarjeta-icono-grande {
    font-size: 2.8rem;
    color: var(--accent-green);
    display: inline-block;
    transition: transform 0.4s ease;
}

.tarjeta-premium:hover .tarjeta-icono-grande {
    transform: scale(1.15) rotate(8deg);
}

.tarjeta-premium h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.tarjeta-premium p {
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 0.98rem;
    text-align: justify;
}

/* Galería de Prototipos estilo Cursos */
.galeria-grid-nosotros {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for 3 course cards */
    gap: 30px;
    margin-top: 35px;
    width: 100%;
}

.galeria-card {
    box-sizing: border-box;
    background: #ffffff; /* White background */
    border: 1px solid #e2e8f0; /* Thin border */
    border-radius: 16px; /* Rounded corners */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.galeria-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.galeria-img-container {
    position: relative;
    width: 100%;
    height: 145px; /* reduced uniform height */
    overflow: hidden;
}

.galeria-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeria-card:hover .galeria-img-container img {
    transform: scale(1.04);
}

.galeria-card-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left; /* Left-aligned */
}

/* Category Badges */
.badge-categoria {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.badge-robotica {
    background: #e6f4ea;
    color: #137333;
}

.badge-iot {
    background: #e8f0fe;
    color: #1a73e8;
}

.badge-energia {
    background: #fef7e0;
    color: #b06000;
}

.galeria-card-info h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: #202124; /* Dark color */
    margin: 0 0 12px 0;
    line-height: 1.4;
    min-height: 52px; /* vertical alignment */
}

.galeria-card-info p {
    font-size: 0.88rem;
    color: #5f6368; /* grey text */
    line-height: 1.6;
    margin: 0 0 18px 0;
    flex-grow: 1;
}

/* Metadata and Divider */
.galeria-meta-divider {
    height: 1px;
    background-color: #f1f3f4;
    margin: 0 0 15px 0;
    border: none;
}

.galeria-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.galeria-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #5f6368;
}

.galeria-meta-item i {
    color: #5f6368;
    font-size: 0.95rem;
}

.btn-continuar-leyendo {
    display: block;
    width: 100%;
    padding: 12px;
    background: #4caf50; /* Green color #4caf50 */
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
    margin: 0;
    box-sizing: border-box;
}

.btn-continuar-leyendo:hover {
    background: #43a047; /* darker green on hover */
    color: #ffffff;
}

.btn-continuar-leyendo:active {
    transform: scale(0.98);
}

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

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

@media (max-width: 1200px) {
    .galeria-grid-nosotros {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-banner {
        height: 380px;
    }
    
    .hero-titulo {
        font-size: 2.4rem;
        letter-spacing: 2px;
    }
    
    .hero-subtitulo {
        font-size: 1.1rem;
    }
    
    .seccion-nosotros-row {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 60px;
    }
    
    .nosotros-titulo-nosotros {
        font-size: 2.3rem;
        margin-bottom: 15px;
    }
    
    .seccion-img-wrapper {
        height: 150px;
        margin-bottom: 20px;
    }
    
    .seccion-img-wrapper img {
        height: 125%;
        bottom: -15px;
    }
    
    .tarjetas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .galeria-grid-nosotros {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* ======== ESTILOS PAGINA DE EQUIPO ======== */
.switch-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 45px;
    background: #f8fafc;
    padding: 12px 24px;
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.switch-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

input:checked + .slider-round {
    background-color: var(--accent-green);
}

input:checked + .slider-round:before {
    transform: translateX(24px);
}

.team-avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px auto;
}

.team-avatar-container.small {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px auto;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: opacity 0.3s ease;
}

.avatar-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-green);
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}
