/* =========================
   MOBILE GLOBAL
========================= */

@media (max-width: 768px) {

    /* ===== NAVBAR ===== */

    .navbar {
        padding: 10px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }

    .logo span {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: 5px;
    }

    .nav-search {
        display: flex;
        align-items: center;
        gap: 5px;

        flex: 0 1 auto;
        max-width: 170px;
        width: 100%;

        margin: 0 8px;
        padding: 4px 6px;
        height: 34px;

        overflow: hidden;
    }

    .nav-search input {
        flex: 1;
        min-width: 0;
        font-size: 12px;
        padding: 4px;
    }

    .nav-search select {
        display: none;
    }

    .nav-search .btn {
        flex-shrink: 0;
        font-size: 11px;
        padding: 3px 6px;
        height: 22px;
        white-space: nowrap;
    }

    .navbar-right {
        position: absolute;
        top: 60px;
        right: 15px;

        background: #1a1a1a;
        border: 1px solid #2a2a2a;
        border-radius: 10px;

        padding: 10px;

        display: none;
        flex-direction: column;
        gap: 10px;
        min-width: 150px;
    }

    .navbar-right.active {
        display: flex;
    }

    /* ===== WELCOME ===== */

    .welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }

    .welcome-left {
        width: 100%;
    }

    .welcome-left h2 {
        font-size: 20px;
    }

    .welcome-left p {
        font-size: 13px;
        min-height: 40px;
    }

    .welcome-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .welcome-right .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
        font-size: 13px;
        padding: 10px 15px;
        border-radius: 999px;
    }

    /* ===== FOOTER ===== */

    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        position: static;
        transform: none;
    }

    .footer-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* ===== CURSOS ===== */

    .courses-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .course-card {
        width: 100%;
        max-width: 320px;
    }

    /* ===== HERO CURSO ===== */

    .course-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .hero-left {
        width: 100%;
    }

    .hero-right {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .hero-right .btn {
        width: 100%;
        max-width: 260px;
    }

    .hero-progress-row {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .hero-progress {
        width: 100%;
        max-width: 260px;
    }

    /* ===== LECCIONES ===== */

    .leccion-layout {
        flex-direction: column;
        min-height: auto;
    }

    .leccion-content {
        order: 1;
        padding: 20px;
    }

    .leccion-sidebar {
        order: 2;
        width: 100%;
        border-top: 1px solid #222;
        margin-top: 20px;
        padding: 15px;
        background: #111;
        border-radius: 12px;
    }

    .sidebar-item {
        padding: 10px;
        border-radius: 8px;
    }

    .lesson-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .lesson-item .btn {
        width: 100%;
    }

    /* ===== COMENTARIOS ===== */

    .comment-item {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .comment-content {
        width: 100%;
    }

    .comment-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }

    .comment-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* ===== AUTH (LOGIN/REGISTRO) ===== */

    .auth-container {
        padding: 20px;
    }

    .auth-card {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 25px 20px;

        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

}

@media (max-width:768px){

    .lesson-item .btn{
        width:100%;
    }

    .lesson-item div[style*="display:flex"]{
        width:100%;
        flex-direction:column;
    }

}