* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #0f1115;
    color: #fff;
}

/* LAYOUT */
.layout {
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: #12161c;
    min-height: 100vh;
    padding: 30px 20px;
    position: fixed;
    left: 0;
    top: 0;
    transition: 0.3s;
}

.sidebar .logo {
    margin-bottom: 30px;
    font-size: 18px;
    color: #28c76f;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    text-decoration: none;
    color: #ccc;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    color: #28c76f;
    padding-left: 5px;
}

/* MAIN CONTENT */
.main-content {
    margin-left: 240px;
    width: 100%;
}

/* HERO */
.hero {
    background: linear-gradient(135deg, #12161c, #1b222b);
    padding: 60px 20px;
    text-align: center;
}

.hero h1 span {
    color: #28c76f;
}

.hero p {
    margin-top: 10px;
    color: #ccc;
}

.buttons {
    margin-top: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    margin: 5px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
}

.btn.green { background: #28c76f; color: white; }
.btn.orange { background: #ff9f43; color: white; }
.btn.dark { background: #2a2f37; color: white; }

.btn:hover {
    opacity: 0.8;
}

.container {
    padding: 40px;
}

/* GRID */
.grid-cursos {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 🔥 3 columnas fijas */
    gap: 30px;
    max-width: 1000px;   /* controla el ancho total */
    margin: 40px auto;   /* 🔥 centra el grid */
}

.curso {
    background: #1b222b;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #2a2f37;
    transition: 0.3s;
}

.curso img {
    width: 100%;
    aspect-ratio: 1 / 1;   /* 🔥 Mantiene proporción cuadrada */
    object-fit: cover;
    display: block;
}

.curso h3 {
    padding: 15px;
    font-size: 16px;
    text-align: center;
}

.curso:hover {
    transform: translateY(-5px);
}

/* VIDEO */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 20px 0;
}

.video-container iframe {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* PROGRESO */
.progreso {
    background: #2a2f37;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.barra {
    width: 60%;
    height: 100%;
    background: #28c76f;
}

.full {
    width: 100%;
}

/* CERTIFICADO */
.certificado {
    margin: 60px auto;
    max-width: 1000px; /* controla el tamaño máximo */
    padding: 20px;
    text-align: center;
}

.certificado img {
    width: 100%;
    height: auto;      /* 🔥 mantiene proporción original */
    max-width: 900px;  /* evita que sea enorme en pantallas grandes */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.logo-container {
    margin-bottom: 25px;
}

.logo-container img {
    width: 100%;
    max-width: 350px; /* controla tamaño en escritorio */
    height: auto;     /* 🔥 mantiene proporción */
}

.stats {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    text-align: center;
    min-width: 150px;
}

.stat-item h2 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 14px;
    color: #ccc;
}

.divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}

/* MENU MOBILE */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background: #28c76f;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .sidebar {
        left: -240px;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .container {
        padding: 20px;
    }
	
	.stats {
        flex-direction: column;
        gap: 20px;
    }

    .divider {
        display: none;
    }

}