/* =/* ===== IMPORTAR FUENTE ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c3e50;
    --primary-light: #34495e;
    --secondary: #ecf0f1;
    --accent: #27ae60;
    --accent-dark: #1e8449;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --radius: 12px;
    --transition: 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== PÁGINAS DE LOGIN / REGISTRO ===== */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.login-container {
    background: white;
    padding: 48px 36px;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.login-container h2 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 24px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dce1e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border var(--transition);
    background: #f8f9fa;
    font-family: inherit;
    resize: vertical;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
    background: white;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--primary);
}
.btn-secondary:hover {
    background: #d5dbdb;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-weight: 500;
    font-size: 0.95rem;
}
.alert.error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}
.alert.success {
    background: #eafaf1;
    color: var(--accent-dark);
    border: 1px solid #a9dfbf;
}

.register-link {
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--text-light);
}
.register-link a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.register-link a:hover {
    text-decoration: underline;
}

/* ===== BARRA DE NAVEGACIÓN ===== */
.navbar {
    background: var(--primary);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;        /* ← Centra verticalmente todos los elementos del contenedor */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Logo izquierdo */
.logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;       /* ← Centra verticalmente la imagen */
    height: 100%;             /* ← Asegura que ocupe toda la altura del contenedor */
    padding: 4px 0;           /* ← Pequeño padding opcional */
}

.logo-img {
    height: 45px;             /* ← Tamaño fijo */
    width: 45px;              /* ← Ancho igual al alto: mismo "marco" que el logo del SENA */
    object-fit: cover;        /* ← Recorta cualquier espacio en blanco sobrante del PNG */
    border-radius: 50%;       /* ← Coincide con el sello circular de Altamira */
    display: block;
}

/* Menú centrado */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #dce1e8;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-menu li a.active {
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 600;
}

/* Zona derecha: Logo SENA + Usuario + Cerrar sesión */
.nav-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    height: 100%;             /* ← Asegura que ocupe toda la altura del contenedor */
    padding: 4px 0;           /* ← Pequeño padding opcional */
    justify-content: center;  /* ← Centra verticalmente el contenido */
}

.sena-logo-right {
    height: 45px;             /* ← MISMA altura que .logo-img */
    width: 45px;              /* ← MISMO ancho que .logo-img */
    object-fit: cover;
    border-radius: 50%;
    display: block;
    transition: transform 0.2s;
}

.sena-logo-right:hover {
    transform: scale(1.05);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: #dce1e8;
    font-weight: 500;
}

.user-name {
    font-size: 0.95rem;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    padding: 4px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: background var(--transition);
    text-align: center;
}

.btn-logout:hover {
    background: #c0392b;
}

/* ===== BANNER ===== */
.banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    padding: 100px 20px;
    text-align: center;
    border-bottom: 1px solid #e0e4e8;
}

.banner-content h1.titulo-principal {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0;
    line-height: 1.2;
}

.banner-content h2.subtitulo {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-top: 0;
    margin-bottom: 20px;
}

.banner-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 30px;
}

.banner .btn-primary {
    width: auto;
    padding: 14px 40px;
}

/* ===== SECCIONES ===== */
.section {
    padding: 70px 0;
}
.alt-bg {
    background: var(--secondary);
}

.card {
    background: white;
    padding: 40px 48px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #eceff2;
}

.section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
}
.section h3 {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}
.section p {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 28px 0;
}
.grid-2 ul {
    list-style: none;
    padding: 0;
}
.grid-2 ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eceff2;
    color: var(--text-light);
}

/* Galería */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 20px;
}
.video-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Consejos */
.tips-list {
    list-style: none;
    padding: 0;
}
.tips-list li {
    padding: 14px 20px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    color: var(--text-light);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary);
    color: #dce1e8;
    text-align: center;
    padding: 32px 0;
    margin-top: 20px;
}
.footer p {
    margin: 4px 0;
    font-size: 0.95rem;
}

/* ===== BOTÓN FLOTANTE ===== */
.bubble-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
    animation: float 3s ease-in-out infinite;
    font-family: 'Poppins', sans-serif;
}

.bubble-btn:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 12px 35px rgba(39, 174, 96, 0.6);
}

.bubble-icon {
    font-size: 1.6rem;
    line-height: 1;
}
.bubble-text {
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: -2px;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .bubble-btn {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    .bubble-icon { font-size: 1.4rem; }
    .bubble-text { font-size: 0.5rem; }

    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    .nav-menu {
        justify-content: center;
        gap: 12px;
    }
    .nav-right {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    .user-info {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
    .btn-logout {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
    .banner-content h1.titulo-principal {
        font-size: 2.5rem;
    }
    .banner-content h2.subtitulo {
        font-size: 1.6rem;
    }
    .banner {
        padding: 70px 16px;
    }
    .section h2 {
        font-size: 1.8rem;
    }
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .card {
        padding: 28px 20px;
    }
    .login-container {
        padding: 32px 20px;
        margin: 0 16px;
    }

    /* Tamaño unificado en móviles: mismo alto y ancho para ambos logos */
    .logo-img,
    .sena-logo-right {
        height: 35px;
        width: 35px;
    }
}

@media (min-width: 769px) {
    /* Tamaño unificado en pantallas grandes: mismo alto y ancho para ambos logos */
    .logo-img,
    .sena-logo-right {
        height: 45px;
        width: 45px;
    }
}