/* --- CSS: DISEÑO Y ESTILOS --- */
:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --bg: #f4f4f9;
    --text: #333;
    --yt-red: #c62828;
    --ud-purple: #7b1fa2;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
}

header {
    background: var(--primary);
    color: white;
    padding: 1rem 1rem;
    text-align: center;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- FILTROS --- */
.filters {
    text-align: center;
    margin-bottom: 2.5rem;
}

.filter-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    margin: 5px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
}

/* --- GRID Y TARJETAS --- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.course-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-8px);
}

.course-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.platform-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.youtube { background: #ffebee; color: var(--yt-red); }
.udemy { background: #f3e5f5; color: var(--ud-purple); }

.course-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
}

/* --- TAGS --- */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.tag {
    background: #e0e6ed;
    color: #475569;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: 600;
}

.btn {
    display: block;
    text-align: center;
    background: var(--accent);
    color: white;
    padding: 1rem;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

/* Utilidad para filtrar */
.hidden {
    display: none !important;
}