/* trainings-card.css - Estilos para tarjetas de formaciones */

.oec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.oec-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    height: 530px;
    text-decoration: none !important;
    color: inherit;
}

.oec-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: #194872;
}

.oec-card.enrollment-closed {
    opacity: 0.75;
    filter: grayscale(0.3);
    transition: all .3s;
}

.oec-card.enrollment-closed:hover {
    opacity: 1;
    filter: grayscale(0);
}

.oec-image-wrapper {
    position: relative;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
}

.oec-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.oec-card:hover .oec-image {
    transform: scale(1.08);
}

.oec-badges-container {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.oec-badge-item {
    background: rgba(255,255,255,0.95);
    color: #1c1d1f;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 3px solid #194872;
    white-space: nowrap;
}

.oec-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.oec-title {
    font-size: 17px;
    color: #1c1d1f;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
    word-break: break-word;
}

.oec-organization {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.oec-organization i {
    color: #194872;
    font-size: 12px;
    flex-shrink: 0;
}

.oec-description-container {
    position: relative;
    flex: 1;
    overflow: hidden;
    margin-bottom: 15px;
    min-height: 0;
}

.oec-description {
    font-size: 13px;
    color: #6a6f73;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oec-body.no-reviews .oec-description {
    -webkit-line-clamp: 10;
}

.oec-body.no-reviews .oec-description-container {
    margin-bottom: 0 !important;
}

.oec-description-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}

.oec-grid-reviews {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    min-height: 24px;
    border-top: 1px solid #f0f0f0;
}

.oec-body.no-reviews .oec-grid-reviews {
    display: none;
}

.oec-stars-container {
    position: relative;
    width: 110px;
    height: 20px;
    background-image: url(https://imgrsize.oe-img.center/statics/img/stars-sprite.webp?w=220&q=100);
    background-size: 110px 40px;
    background-position: 0 0;
}

.oec-stars {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    background-image: url(https://imgrsize.oe-img.center/statics/img/stars-sprite.webp?w=220&q=100);
    background-size: 110px 40px;
    background-position: 0 -20px;
}

.oec-stars-average {
    color: #eba134;
    font-weight: 700;
    font-size: 13px;
    line-height: 20px;
}

.oec-cant-reviewers {
    margin-left: auto;
    font-size: 11px;
    line-height: 20px;
    color: #808080;
    transition: all .2s;
}

.oec-cant-reviewers.destacado-review {
    color: #ff6b00;
    font-weight: 700;
    font-size: 12px;
    transform: scale(1.1);
    display: inline-block;
}

.destacado-edicion {
    color: #ff6b00;
    font-weight: 700;
    font-size: 11px;
    transform: scale(1.1);
    display: inline-block;
}

.oec-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
    min-height: 90px;
}

.oec-footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.oec-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.oec-tags-container {
    font-size: 10px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oec-tags-container .separador {
    color: #dcdcde;
    margin: 0 3px;
}

.oec-start-date {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 70%;
    line-height: 1.2;
}

.oec-start-date i {
    font-size: 14px;
    flex-shrink: 0;
}

.fecha-contenedor {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.fecha-valor {
    font-weight: 600;
    color: #1d2327;
    line-height: 1.2;
}

.fecha-etiqueta {
    font-size: 10px;
    font-weight: 400;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .3px;
    line-height: 1.6;
}

.fecha-inicio i {
    color: #194872;
}

.fecha-fin-inscripcion i {
    color: #e67e22;
}

.fecha-cerrada i {
    color: #dc3545;
}

.fecha-async i {
    color: #28a745;
}

.fecha-cerrada .fecha-texto,
.fecha-async .fecha-texto {
    font-weight: 600;
    font-size: 11px;
    line-height: 1.2;
}

.fecha-cerrada .fecha-texto {
    color: #dc3545;
}

.fecha-async .fecha-texto {
    color: #28a745;
}

.oec-btn-fake {
    background: #194872;
    color: #fff;
    padding: 4px 12px;
    border-radius: .5rem;
    font-weight: 600;
    font-size: 12px;
    transition: .2s;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.oec-card:hover .oec-btn-fake {
    background: #1e3ea8;
}

/* Skeletons */
.skeleton-card {
    background: #fff;
    border: 1px solid #eee;
    animation: pulse 1.5s infinite;
}

.skeleton-image {
    height: 180px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-body {
    padding: 20px;
    flex: 1;
}

.skeleton-title {
    height: 20px;
    width: 80%;
    background: #eee;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-organization {
    height: 16px;
    width: 60%;
    background: #eee;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-line {
    height: 12px;
    background: #f0f0f0;
    margin-bottom: 8px;
    border-radius: 4px;
    width: 100%;
}

.skeleton-reviews {
    height: 20px;
    width: 50%;
    background: #eee;
    margin-top: auto;
    border-radius: 4px;
}

.skeleton-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-meta {
    height: 30px;
    width: 60%;
    background: #eee;
    border-radius: 4px;
}

.skeleton-button {
    height: 30px;
    width: 70px;
    background: #194872;
    opacity: 0.3;
    border-radius: 6px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive para tarjetas */
@media (max-width: 1200px) {
    .oec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .oec-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .oec-card {
        height: auto;
        min-height: 560px;
    }
    .oec-footer-bottom {
        gap: 10px;
        align-items: flex-start;
    }
    .oec-start-date {
        max-width: 100%;
    }
    .oec-btn-fake {
        align-self: flex-end;
    }
    .oec-grid {
        grid-template-columns: 1fr;
    }
}