/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Tipografía y colores base ===== */
body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #0d0d0d, #1a1a1a);
    color: #eee;
    line-height: 1.6;
}

/* ===== Cabecera ===== */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.navbar .logo {
    font-weight: bold;
    color: #00d9ff;
    letter-spacing: 1px;
}

.navbar nav {
    display: flex;
    align-items: center;
}

.navbar nav a {
    color: #eee;
    margin: 0 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.navbar nav a:hover,
.navbar nav .activo {
    color: #00d9ff;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.hero-img {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 150px;
    height: 150px;
    border-radius: 0;
    border: 3px solid #00d9ff;
    box-shadow: 0 0 15px #00d9ff;
}

.hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    max-width: 800px;
    z-index: 1;
}

.hero-box {
    background: rgba(17, 17, 17, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.6), 0 0 60px rgba(0, 217, 255, 0.2) inset;
    text-align: left;
    opacity: 0;
    transform: translateY(30px);
    animation: appear 1s forwards;
    animation-delay: 0.5s;
    border: 2px solid rgba(0, 217, 255, 0.8);
    transition: box-shadow 0.5s ease-in-out;
}

.hero-box:hover {
    box-shadow: 0 0 40px #00d9ff, 0 0 80px #00d9ff inset;
}

.hero-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #00d9ff;
    text-align: center;
}

.hero-box p {
    text-indent: 2rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.hero-box ul {
    padding-left: 3rem;
    margin: 1rem 0;
    list-style-type: disc;
}

.hero-box ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* ===== Botón principal ===== */
.boton {
    display: inline-block;
    background: #00d9ff;
    color: #111;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.boton:hover {
    background: #00a3cc;
    transform: scale(1.05);
}


/* ===== Footer ===== */
footer {
    background: #000;
    text-align: center;
    padding: 1rem;
    color: #aaa;
}

/* ===== Animaciones ===== */
.fade-in,
.zoom-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease;
}

.fade-in.visible,
.zoom-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes appear {
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Cursos ===== */
/* ===== Cursos estilo tarjetas tipo catálogo ===== */

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
}

.curso-card {
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.25);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.curso-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 35px rgba(0, 217, 255, 0.6);
}

.curso-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;   /* 🔥 CAMBIO AQUÍ */
    background-color: #000; /* opcional para que no se vea vacío */
    border-bottom: 2px solid #00d9ff;
}

.curso-info {
    padding: 1.5rem;
    text-align: center;
}

.curso-info h3 {
    margin-bottom: 0.5rem;
    color: #00d9ff;
}

.curso-info .fecha {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1rem;
}

/* Botón dentro de la tarjeta */
.btn-curso {
    display: inline-block;
    background: #00d9ff;
    color: #111;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.curso-card:hover .btn-curso {
    background: #00a3cc;
    transform: scale(1.05);
}
/* ===== Detalle de curso ===== */
.detalle-curso {
    max-width: 800px;
    margin: 3rem auto;
    background: rgba(17,17,17,0.95);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.4);
}

.descargas ul {
    list-style-type: none;
    padding-left: 0;
}

.descargas ul li {
    margin-bottom: 0.5rem;
}

.descargas ul li a {
    color: #00d9ff;
    text-decoration: none;
    font-weight: 500;
}

.descargas ul li a:hover {
    color: #00a3cc;
    text-decoration: underline;
}

/* ===== Responsivo ===== */
@media screen and (max-width: 900px) {
    .hero-img { max-width: 120px; max-height: 120px; }
    .hero-text { padding: 0 1rem; }
    .skill-grid { flex-wrap: wrap; justify-content: center; }
}

@media screen and (max-width: 600px) {
    .curso-card img { max-width: 100%; height: auto; }
    .detalle-curso { margin: 1rem; padding: 1.5rem; }
    .skill-card { width: 100%; max-width: 280px; }
}

/* ===== Botones de registro/login ===== */
.boton-registro {
    display: inline-block;
    background: transparent;
    color: #00d9ff;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    border: 2px solid rgba(0,217,255,0.15);
    transition: all 0.25s ease;
}

.boton-registro:hover {
    color: #111;
    background: #00d9ff;
    transform: scale(1.03);
}

.boton-login {
    display: inline-block;
    background: #00d9ff;
    color: #111;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    margin-left: 0.5rem;
    transition: all 0.25s ease;
    border: none;
}

.boton-login:hover {
    background: #00a3cc;
    transform: scale(1.03);
}

/* Estilos del modal */
.modal {
    display: none; /* oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.modal-content .btn {
    margin: 0 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-content .btn:hover {
    opacity: 0.9;
}

#confirm-logout {
    background-color: #e74c3c;
    color: white;
}

#cancel-logout {
    background-color: #95a5a6;
    color: white;
}

/* ===== Carrusel de Próximos Cursos ===== */
.skills {
    text-align: center;
    padding: 4rem 1rem;
}

.carousel {
    position: relative;
    max-width: 1100px;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-window {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease-in-out;
    gap: 1.5rem;
}

.skill-card {
    flex: 0 0 calc((100% - 3rem) / 3); /* exactamente 3 por vista */
    background: #111;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
    border: 1px solid rgba(0, 217, 255, 0.3);
    transition: all 0.3s ease;
}

.skill-card h3 {
    color: #00d9ff;
    margin-bottom: 0.7rem;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.6);
}

/* Flechas laterales */
.carousel-btn {
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid #00d9ff;
    color: #00d9ff;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    font-size: 2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-btn:hover {
    background: #00d9ff;
    color: #0d0d0d;
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.8);
}

.carousel-btn.prev {
    left: -70px;
}

.carousel-btn.next {
    right: -70px;
}

/* Responsivo */
@media (max-width: 900px) {
    .skill-card {
        flex: 0 0 calc((100% - 1.5rem) / 2);
    }
}

@media (max-width: 600px) {
    .skill-card {
        flex: 0 0 100%;
    }
}
/* ===== Animación inicial tipo terminal ===== */
#intro-screen {
    position: fixed;
    inset: 0;
    background: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Courier New", monospace;
    font-size: 1.8rem;
    z-index: 2000;
    flex-direction: column;
}

.terminal-text::after {
    content: "|";
    animation: blink 0.7s infinite;
    color: #00ffcc;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hidden {
    display: none;
}
