/* Custom Cards Grid Styles */

.ccg_custom-cards-grid-container {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ccg_custom-cards-grid-container .row {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.ccg_custom-cards-grid-container .row:last-child {
    margin-bottom: 0;
}

.ccg_custom-card {
    position: relative;
    width: 100%;
    height: 471px;
    max-width: 100%;
    max-height: 471px;
    min-height: 471px;
    margin: 0 auto;
    border-radius: 48px;
    overflow: hidden;
    background: #AA2718;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Imagen de fondo */
.ccg_custom-card .ccg_card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ccg_custom-card .ccg_card-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Información visible por defecto (sin overlay) */
.ccg_custom-card .ccg_card-info-default {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 5;
    transition: all 0.4s ease;
}

/* Tags/Categorías - VISIBLES POR DEFECTO */
.ccg_custom-card .ccg_card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ccg_custom-card .ccg_card-tag {
    background: #D2301E;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Título - VISIBLE POR DEFECTO */
.ccg_custom-card .ccg_card-title {
    font-size: 24px;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ccg_custom-card .ccg_card-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ccg_custom-card .ccg_card-title a:hover {
    color: #D2301E;
}

/* Overlay completo - OCULTO POR DEFECTO */
.ccg_custom-card .ccg_card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    padding: 30px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: all 0.4s ease;
    visibility: hidden;
    opacity: 0;
    z-index: 10;
    transform: translateY(100%);
}

/* Contenido del overlay - ordenado verticalmente */
.ccg_custom-card .ccg_card-overlay .ccg_card-tags {
    margin-bottom: 20px;
    opacity: 1;
    transform: translateY(0);
}

.ccg_custom-card .ccg_card-overlay .ccg_card-title {
    margin-bottom: 20px;
    opacity: 1;
    transform: translateY(0);
}

/* Descripción - dentro del overlay */
.ccg_custom-card .ccg_card-description {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.5;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Efectos hover */
.ccg_custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.ccg_custom-card:hover .ccg_card-background img {
    transform: scale(1.05);
}

/* En hover: ocultar info por defecto, mostrar overlay completo */
.ccg_custom-card:hover .ccg_card-info-default {
    opacity: 0;
    transform: translateY(-20px);
}

.ccg_custom-card:hover .ccg_card-overlay {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */

/* Desktop - 4 cards por fila, ancho fijo y centrado */
@media (min-width: 1200px) {
    .ccg_custom-card {
        width: 278px;
        max-width: 278px;
        min-width: 278px;
        height: 471px;
        max-height: 471px;
        min-height: 471px;
        margin: 0 15px 30px 15px;
        /* Centrado por flex del row */
    }
    .ccg_custom-cards-grid-container .col-lg-3 {
        flex: 0 0 auto;
        max-width: none;
        padding: 0;
        display: flex;
        justify-content: center;
    }
    
    .ccg_custom-card .ccg_card-title {
        font-size: 24px;
    }
    
    .ccg_custom-card .ccg_card-description {
        font-size: 16px;
    }
}

/* Tablet - 2 cards por fila, ancho fijo y centrado */
@media (max-width: 1199px) and (min-width: 768px) {
    .ccg_custom-card {
        width: 250px;
        max-width: 250px;
        min-width: 250px;
        height: 423px;
        max-height: 423px;
        min-height: 423px;
        margin: 0 15px 30px 15px;
    }
    .ccg_custom-cards-grid-container .col-md-6 {
        flex: 0 0 auto;
        max-width: none;
        padding: 0;
        display: flex;
        justify-content: center;
    }
    
    .ccg_custom-card .ccg_card-info-default,
    .ccg_custom-card .ccg_card-overlay {
        padding: 25px 25px;
    }
    
    .ccg_custom-card .ccg_card-title {
        font-size: 20px;
        margin-bottom: 0;
    }
    
    .ccg_custom-card .ccg_card-overlay .ccg_card-title {
        margin-bottom: 15px;
    }
    
    .ccg_custom-card .ccg_card-description {
        font-size: 14px;
    }
    
    .ccg_custom-card .ccg_card-tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    /* Efecto hover en tablet */
    .ccg_custom-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
    
    .ccg_custom-card:hover .ccg_card-background img {
        transform: scale(1.03);
    }
}

/* Móvil - 1 card por fila, ancho 100% */
@media (max-width: 767px) {
    .ccg_custom-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 300px;
        max-height: 300px;
        min-height: 300px;
        margin: 0 0 20px 0;
    }
    .ccg_custom-cards-grid-container .col-sm-12 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
        display: block;
    }
    
    .ccg_custom-card .ccg_card-info-default,
    .ccg_custom-card .ccg_card-overlay {
        padding: 20px 20px;
        /* En móvil, mostrar información siempre visible */
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }
    
    .ccg_custom-card .ccg_card-tags,
    .ccg_custom-card .ccg_card-title,
    .ccg_custom-card .ccg_card-description {
        opacity: 1;
        transform: translateY(0);
    }
    
    .ccg_custom-card .ccg_card-title {
        font-size: 18px;
        margin-bottom: 0;
    }
    
    .ccg_custom-card .ccg_card-overlay .ccg_card-title {
        margin-bottom: 15px;
    }
    
    .ccg_custom-card .ccg_card-description {
        font-size: 13px;
    }
    
    .ccg_custom-card .ccg_card-tag {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* Efecto hover en móvil (touch) */
    .ccg_custom-card:hover,
    .ccg_custom-card:active {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    
    .ccg_custom-card:hover .ccg_card-background img,
    .ccg_custom-card:active .ccg_card-background img {
        transform: scale(1.02);
    }
}

@media (max-width: 480px) {
    .ccg_custom-card {
        height: 280px;
        max-height: 280px;
        min-height: 280px;
    }
    
    .ccg_custom-card .ccg_card-info-default,
    .ccg_custom-card .ccg_card-overlay {
        padding: 15px 15px;
    }
    
    .ccg_custom-card .ccg_card-title {
        font-size: 16px;
        margin-bottom: 0;
    }
    
    .ccg_custom-card .ccg_card-overlay .ccg_card-title {
        margin-bottom: 10px;
    }
    
    .ccg_custom-card .ccg_card-description {
        font-size: 12px;
    }
    
    .ccg_custom-card .ccg_card-tag {
        font-size: 9px;
        padding: 2px 6px;
    }
} 