/* ============================================================
   enrollindex.css
   Estilos específicos del listado de cursos (index.blade.php)
   Requiere: comfacor-base.css cargado ANTES
   ============================================================ */

/* ── HERO ── */
.hero {
    background: linear-gradient(135deg, #f0f7f2 0%, #f8fdf9 50%, #fdf8e8 100%);
    padding: 1.75rem 2rem 2rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--gray-200);
}

.hero::after {
    content: '';
    position: absolute;
    right: -80px; top: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(74,158,92,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(74,158,92,0.1);
    color: var(--green-dark);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    border: 1px solid rgba(74,158,92,0.12);
    margin-bottom: 1.2rem;
}

.hero-tag-dot {
    width: 6px; height: 6px;
    background: var(--green-dark);
    border-radius: 50%;
    animation: blink 1.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.2; }
}

.hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.hero-title span {
    background: linear-gradient(90deg, var(--green-dark), var(--gold-mid));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle { color: var(--gray-500); font-size: 0.95rem; max-width: 480px; }

/* ── LAYOUT ── */
.main { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

.filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters-count { font-size: 0.875rem; color: var(--gray-500); }
.filters-count strong { color: var(--ink); font-weight: 600; }

/* Formulario con los filtros en fila */
.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Cada filtro: label encima + select abajo */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 230px;
}

.filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-500);
    white-space: nowrap;
}

.filter-label svg { width: 12px; height: 12px; flex-shrink: 0; }

.filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    text-decoration: none;
    padding: 0 0.75rem;
    height: 38px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    background: #fff;
    transition: all 0.15s;
    white-space: nowrap;
    align-self: flex-end;
}

.filter-clear:hover {
    border-color: var(--gray-400);
    color: var(--ink);
    background: var(--gray-50);
}

@media (max-width: 640px) {
    .filters-bar  { flex-direction: column; align-items: flex-start; }
    .filter-form  { width: 100%; }
    .filter-group { width: 100%; }
    .filter-clear { width: 100%; justify-content: center; }
}

/* ── ALERT ── */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--gray-50);
    border: 2px dashed var(--gray-200);
    border-radius: 16px;
}

.empty-icon { font-size: 3.5rem; margin-bottom: 1rem; }

.empty-state h3 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p { font-size: 0.875rem; color: var(--gray-400); }

/* ── GRID DE CURSOS ── */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ── CARD ── */
.course-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
    animation: slideUp 0.4s ease both;
}

.course-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transform: translateY(-3px);
    border-color: var(--green-mid);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.course-card:nth-child(1) { animation-delay: 0.05s; }
.course-card:nth-child(2) { animation-delay: 0.10s; }
.course-card:nth-child(3) { animation-delay: 0.15s; }
.course-card:nth-child(4) { animation-delay: 0.20s; }
.course-card:nth-child(5) { animation-delay: 0.25s; }
.course-card:nth-child(6) { animation-delay: 0.30s; }

.card-strip {
    height: 4px;
    background: linear-gradient(90deg, var(--green-dark), var(--gold-mid));
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.card-badges { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-type { background: var(--green-light); color: var(--green-dark); }
.badge-open { background: var(--green-light); color: var(--green); }
/* Badge de cupos (en la franja de badges superiores) */
.badge-seats-high { background: var(--green-light); color: var(--green-dark); border: 1px solid #a7d9b2; }
.badge-seats-mid  { background: #fff8e1; color: #9a6b05; border: 1px solid #f2df9b; }
.badge-seats-low  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-seats-unlimited { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.badge-modality-presencial { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-modality-virtual    { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-payment             { background: #fff8e8; color: #92600a; border: 1px solid #f0d070; }

.card-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    letter-spacing: -0.01em;
    transition: color 0.2s;
}

.course-card:hover .card-title { color: var(--green-dark); }

.card-description {
    font-size: 0.83rem;
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.meta-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; color: var(--gray-700); }
.meta-row svg { width: 14px; height: 14px; color: var(--gray-400); flex-shrink: 0; }
.meta-row strong { font-weight: 600; color: var(--ink); }

/* ── Cupos restantes ── */
.seats-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}
.seats-high { background: var(--green-light); color: var(--green-dark); border: 1px solid #a7d9b2; }
.seats-mid  { background: #fff8e1; color: #9a6b05; border: 1px solid #f2df9b; }
.seats-low  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.seats-unlimited { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }

.card-notes {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-style: italic;
    line-height: 1.5;
    border-left: 2px solid var(--gray-200);
    padding-left: 0.75rem;
}

.card-footer { padding: 0 1.5rem 1.25rem; }

.enroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: var(--ink);
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.enroll-btn:hover { background: var(--green-dark); transform: scale(1.02); }
.enroll-btn svg { width: 15px; height: 15px; transition: transform 0.2s; }
.enroll-btn:hover svg { transform: translateX(4px); }


/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .hero { padding: 2rem 1.25rem 2.5rem; }
}

/* ── SLIM SELECT — filtros (index) ── */
.filter-form .ss-main {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    border: 1.5px solid var(--gray-200) !important;
    border-radius: 8px !important;
    padding: 0 0.85rem !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: var(--ink) !important;
    background: #ffffff !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.filter-form .ss-main:hover {
    border-color: var(--green-mid) !important;
}

.filter-form .ss-main:focus,
.filter-form .ss-main.ss-open-below,
.filter-form .ss-main.ss-open-above {
    border-color: var(--green-dark) !important;
    box-shadow: 0 0 0 3px rgba(45,110,62,0.1) !important;
    outline: none !important;
}

.filter-form .ss-main .placeholder {
    color: var(--gray-400) !important;
}

.filter-form .ss-content {
    border: 1.5px solid var(--gray-200) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    margin-top: 4px !important;
    z-index: 200 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.filter-form .ss-search {
    padding: 0.45rem !important;
    border-bottom: 1px solid var(--gray-100) !important;
}

.filter-form .ss-search input {
    border: 1.5px solid var(--gray-200) !important;
    border-radius: 6px !important;
    padding: 0.3rem 0.6rem !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.8rem !important;
    outline: none !important;
    width: 100% !important;
}

.filter-form .ss-search input:focus {
    border-color: var(--green-dark) !important;
}

.filter-form .ss-option {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.82rem !important;
    color: var(--ink) !important;
}

.filter-form .ss-option:hover,
.filter-form .ss-option.ss-highlighted {
    background: var(--green-light) !important;
    color: var(--green-dark) !important;
}

.filter-form .ss-option.ss-selected {
    background: var(--green-light) !important;
    color: var(--green-dark) !important;
    font-weight: 600 !important;
}

.filter-form .ss-arrow path {
    stroke: var(--gray-400) !important;
}

.filter-form .ss-main.ss-open-below .ss-arrow path,
.filter-form .ss-main.ss-open-above .ss-arrow path {
    stroke: var(--green-dark) !important;
}