/* Quitar padding excesivo del tema en esta página */
.page-template-page-cursos .page_content_wrap {
    padding-top: 24px !important;
}

#cc-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ── Buscador ── */
.cc-header {
    margin-bottom: 24px;
}

.cc-search-box {
    max-width: 320px;
}
.cc-search-box i { display: none; }
.cc-search-box input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    outline: none;
    font-size: 0.92rem;
    color: #1a2e3b;
    background: #fff;
    box-shadow: none !important;
}
.cc-search-box input::placeholder { color: #adb5bd; }
.cc-search-box input:focus { border-color: #adb5bd; }

/* ── Loading ── */
#cc-loading {
    text-align: center;
    padding: 80px 0;
    color: #6c757d;
    font-size: 0.95rem;
}

/* ── Grid ── */
#cc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

#cc-empty {
    display: none;
    text-align: center;
    padding: 80px 0;
    color: #6c757d;
    font-size: 1rem;
}

/* ── Contador ── */
.cc-count {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 14px;
}

/* ── Card ── */
.cc-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.25s;
}
.cc-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    transform: translateY(-3px);
}

/* Imagen — altura fija, objeto completo */
.cc-card__img {
    position: relative;
    height: 240px;
    background: #1a2e3b;
    overflow: hidden;
    flex-shrink: 0;
}
.cc-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.35s;
}
.cc-card:hover .cc-card__img img { transform: scale(1.04); }
.cc-card__img--empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2e3b 0%, #2d4a5f 100%);
}

/* Badges sobre imagen */
.cc-state {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}
.cc-state--active   { background: #2e7d32; color: #fff; }
.cc-state--upcoming { background: #1565c0; color: #fff; }
.cc-state--finished { background: rgba(0,0,0,0.55); color: #fff; }
.cc-state--full     { background: #c62828; color: #fff; }

.cc-format-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255,255,255,0.92);
    color: #1a2e3b;
    z-index: 1;
}

/* Cuerpo */
.cc-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.cc-card__level {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cc-card__title {
    font-size: 0.97rem;
    font-weight: 700;
    color: #1a2e3b;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cc-card__meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
}
.cc-card__meta-row {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cc-card__meta-row i {
    width: 13px;
    color: #adb5bd;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.cc-card__instructor {
    font-size: 0.78rem;
    color: #adb5bd;
    margin-top: auto;
    padding-top: 6px;
}

/* Footer */
.cc-card__footer {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cc-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a2e3b;
    line-height: 1;
}
.cc-price--free { color: #2e7d32; }

.cc-btn-leer {
    display: inline-block;
    padding: 7px 18px;
    background: #4CAF50;
    border: none !important;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    transition: background 0.2s;
    white-space: nowrap;
    outline: none;
}
.cc-btn-leer:hover {
    background: #388e3c;
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    #cc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    #cc-grid { grid-template-columns: 1fr; gap: 16px; }
    .cc-search-box { max-width: 100%; }
}

/* Botón inscribirse en listado de cursos */
.cc-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cc-btn-inscribirse {
    display: inline-block;
    padding: 8px 16px;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.cc-btn-inscribirse:hover:not(:disabled) { background: #ea6c10; }
.cc-btn-inscribirse:disabled, .cc-btn-inscribirse.cc-inscrito {
    background: #9ca3af;
    cursor: default;
}
