﻿/* ============================================
   PÁGINA CURSOS GRATIS
   ============================================ */

.gratis-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
}

/* ========== HERO ========== */
.gratis-hero {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(0, 242, 254, 0.02));
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 20px;
    padding: 40px 50px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    margin-top:60px;
}

    .gratis-hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(0, 255, 136, 0.05), transparent);
        border-radius: 50%;
        pointer-events: none;
    }

.gratis-hero-content {
    position: relative;
    z-index: 1;
}

.gratis-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

    .gratis-hero-title i {
        font-size: 2rem;
    }

.gratis-hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.gratis-hero-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.gratis-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00ff88;
    font-weight: 600;
    font-size: 1rem;
    background: rgba(0, 255, 136, 0.08);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.1);
}

    .gratis-stat i {
        font-size: 0.9rem;
    }

/* ========== FILTROS ========== */
.gratis-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    align-items: center;
}

.gratis-search-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

    .gratis-search-wrapper:focus-within {
        border-color: #00ff88;
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.08);
    }

    .gratis-search-wrapper i {
        color: var(--text-muted);
        font-size: 0.9rem;
    }

.gratis-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 10px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    font-family: 'Space Grotesk', sans-serif;
}

    .gratis-search-input::placeholder {
        color: var(--text-muted);
    }

.gratis-filter-select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 12px 35px 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    font-family: 'Space Grotesk', sans-serif;
    min-width: 180px;
    transition: all 0.3s ease;
}

    .gratis-filter-select:focus {
        border-color: #00ff88;
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.08);
    }

    .gratis-filter-select option {
        background: #0f1123;
        color: #fff;
    }

/* ========== GRID DE CURSOS ========== */
.gratis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* ========== TARJETA DE CURSO ========== */
.gratis-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

    .gratis-card:hover {
        transform: translateY(-5px);
        border-color: rgba(0, 255, 136, 0.3);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 255, 136, 0.05);
    }

.gratis-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #0f1123, #1a1a3e);
}

.gratis-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
    animation: pulse-gratis 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes pulse-gratis {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 35px rgba(0, 255, 136, 0.6);
        transform: scale(1.03);
    }
}

.gratis-card-body {
    padding: 20px;
}

.gratis-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .gratis-card-title a {
        color: #fff;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .gratis-card-title a:hover {
            color: #00ff88;
        }

.gratis-card-curso {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 10px 0;
}

.gratis-card-desc {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.gratis-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gratis-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: 12px;
}

    .gratis-card-meta-item i {
        font-size: 0.7rem;
        color: #00ff88;
    }

.gratis-card-profesor {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

    .gratis-card-profesor i {
        color: var(--neon-purple);
    }

.gratis-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gratis-card-price {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00ff88;
    font-weight: 700;
    font-size: 1rem;
    background: rgba(0, 255, 136, 0.08);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.15);
}

    .gratis-card-price i {
        font-size: 0.8rem;
    }

.gratis-card-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .gratis-card-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
    }

/* ========== LOADER ========== */
.gratis-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 20px;
}

.gratis-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 136, 0.1);
    border-top-color: #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.gratis-loader p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ========== EMPTY STATE ========== */
.gratis-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

    .gratis-empty i {
        font-size: 4rem;
        color: #00ff88;
        opacity: 0.3;
        margin-bottom: 20px;
    }

    .gratis-empty h3 {
        color: #fff;
        margin: 0 0 10px 0;
    }

    .gratis-empty p {
        color: var(--text-muted);
        margin: 0 0 25px 0;
    }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .gratis-hero {
        padding: 30px 25px;
    }

    .gratis-hero-title {
        font-size: 1.8rem;
    }

    .gratis-hero-description {
        font-size: 0.95rem;
    }

    .gratis-grid {
        grid-template-columns: 1fr;
    }

    .gratis-filters {
        flex-direction: column;
    }

    .gratis-search-wrapper {
        width: 100%;
    }

    .gratis-filter-select {
        width: 100%;
        min-width: unset;
    }

    .gratis-hero-stats {
        gap: 15px;
    }

    .gratis-stat {
        font-size: 0.85rem;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .gratis-hero-title {
        font-size: 1.4rem;
        flex-wrap: wrap;
    }

    .gratis-card {
        margin: 0 5px;
    }

    .gratis-card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .gratis-card-btn {
        text-align: center;
    }
}
/**************************************************************************************************/

/* ============================================
   ESTILOS FALTANTES - FILTROS Y EMPTY STATE
   ============================================ */

/* ========== FILTROS - MEJORAS ========== */
.gratis-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.gratis-search-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

    .gratis-search-wrapper:focus-within {
        border-color: #00ff88;
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.1);
        background: rgba(0, 255, 136, 0.02);
    }

    .gratis-search-wrapper i {
        color: var(--text-muted);
        font-size: 0.9rem;
        opacity: 0.6;
    }

.gratis-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 10px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    font-family: 'Space Grotesk', sans-serif;
}

    .gratis-search-input::placeholder {
        color: var(--text-muted);
        opacity: 0.6;
    }

.gratis-filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.gratis-filter-select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 12px 35px 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    font-family: 'Space Grotesk', sans-serif;
    min-width: 180px;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a4abd4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

    .gratis-filter-select:focus {
        border-color: #00ff88;
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.08);
    }

    .gratis-filter-select option {
        background: #0f1123;
        color: #fff;
        padding: 10px;
    }

        .gratis-filter-select option:hover {
            background: #1a1a3e;
        }

/* ========== EMPTY STATE - MEJORAS ========== */
.gratis-empty {
    text-align: center;
    padding: 80px 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .gratis-empty i {
        font-size: 4.5rem;
        color: #00ff88;
        opacity: 0.2;
        margin-bottom: 20px;
        animation: float-gratis 3s ease-in-out infinite;
    }

@keyframes float-gratis {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.gratis-empty h3 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

.gratis-empty p {
    color: var(--text-muted);
    margin: 0 0 25px 0;
    font-size: 1rem;
    max-width: 400px;
    line-height: 1.6;
}

.gratis-empty .btn-neon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 30px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
}

    .gratis-empty .btn-neon:hover {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.4);
    }

/* ========== BOTÓN ACCEDER (No logueado) ========== */
.gratis-card-btn[style*="background: #00f2fe"] {
    background: linear-gradient(135deg, #00f2fe, #4facfe) !important;
    color: #000 !important;
    font-weight: 700;
}

    .gratis-card-btn[style*="background: #00f2fe"]:hover {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(0, 242, 254, 0.4);
    }

/* ========== BOTÓN IR AL CURSO (Inscrito) ========== */
.gratis-card-btn[style*="background: var(--neon-purple)"] {
    background: linear-gradient(135deg, #b026ff, #7c3aed) !important;
    color: #fff !important;
}

    .gratis-card-btn[style*="background: var(--neon-purple)"]:hover {
        box-shadow: 0 0 30px rgba(176, 38, 255, 0.5) !important;
    }

/* ========== BOTÓN DESHABILITADO (Pendiente) ========== */
.gratis-card-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #2d3748 !important;
    color: #a0aec0 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ========== RESPONSIVE FILTROS ========== */
@media (max-width: 768px) {
    .gratis-filters {
        flex-direction: column;
        padding: 15px;
        gap: 12px;
    }

    .gratis-search-wrapper {
        width: 100%;
    }

    .gratis-filter-options {
        width: 100%;
        flex-direction: column;
    }

    .gratis-filter-select {
        width: 100%;
        min-width: unset;
    }

    .gratis-empty {
        padding: 60px 20px;
        min-height: 300px;
    }

        .gratis-empty i {
            font-size: 3.5rem;
        }

        .gratis-empty h3 {
            font-size: 1.2rem;
        }

        .gratis-empty p {
            font-size: 0.9rem;
        }

        .gratis-empty .btn-neon {
            padding: 10px 24px;
            font-size: 0.85rem;
        }
}

@media (max-width: 480px) {
    .gratis-filters {
        padding: 12px;
        border-radius: 12px;
    }

    .gratis-search-wrapper {
        padding: 0 12px;
    }

    .gratis-search-input {
        font-size: 0.85rem;
        padding: 10px 8px;
    }

    .gratis-filter-select {
        font-size: 0.8rem;
        padding: 10px 30px 10px 12px;
    }

    .gratis-empty {
        padding: 40px 16px;
        min-height: 250px;
    }

        .gratis-empty i {
            font-size: 2.8rem;
        }

        .gratis-empty h3 {
            font-size: 1rem;
        }

        .gratis-empty p {
            font-size: 0.8rem;
        }

        .gratis-empty .btn-neon {
            padding: 8px 20px;
            font-size: 0.8rem;
        }
}