
/* ==========================================================================
   LUDOTECA ARCHIVE V2 (Premium Style)
   ========================================================================== */

.game-archive-bg {
    background: linear-gradient(135deg, #023682 0%, #1aafd0 100%);
}

.ludoteca-grid-archive {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.wrapper {
    max-width: var(--max-w, 1600px);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 60px);
}

.game-premium-card {
    /* Specific tweaks if needed, but mostly inherits from activity-premium-card */
}

/* Compact size and spacing refinements for a premium 4-column layout */
.game-premium-card .card-main-content {
    padding: 14px 20px 16px !important; /* Reduced top and bottom padding */
}

.game-premium-card .card-title {
    font-size: 1.1rem !important; /* Slightly smaller, more elegant title */
    margin-bottom: 6px !important; /* Less gap below the title */
}

.game-premium-card .card-info {
    padding-top: 10px !important; /* Less gap above the metadata icons grid */
}

.game-premium-card .card-actions-row {
    margin-top: 14px !important; /* Less gap above the button */
}

/* Image Container */
.card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fa;
}

.card-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.activity-premium-card:hover .card-image-container img {
    transform: scale(1.08);
}

.game-premium-card[data-estado="prestado"] .card-image-container img {
    filter: grayscale(100%);
}

.game-premium-card[data-estado="en_reparacion"] .card-image-container img {
    filter: sepia(100%);
}

.image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #eef2f7;
    color: #ced4da;
}

/* Status Badge (Top Right of image) */
.card-badge-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 5;
    text-transform: uppercase;
}

.bg-status-disponible {
    background: #DCFCE7;
    color: #166534 !important;
    border: 1px solid rgba(22, 101, 52, 0.25);
}

.bg-status-prestado {
    background: #FEE2E2;
    color: #991B1B !important;
    border: 1px solid rgba(153, 27, 27, 0.2);
}

.bg-status-en_reparacion {
    background: #FEF3C7;
    color: #92400E !important;
    border: 1px solid rgba(146, 64, 14, 0.2);
    box-shadow: none;
}

/* Category Badge (Top Left of image) */
.card-badge-left {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
}

.card-badge-left .badge-item {
    background: rgba(255, 255, 255, 0.9);
    color: var(--clr-secondary, #023682);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    backdrop-filter: blur(4px);
    display: inline-block;
}

/* Body */
.card-body-premium {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-game-tag {
    background: #eef2f7;
    color: #40CEF3;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.card-top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

.card-image-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    z-index: 4;
}

/* ── Difficulty indicator on image ── */
.difficulty-indicator {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 99px;
    overflow: hidden;
    cursor: pointer;
}

.stars-group {
    display: flex;
    gap: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.star-svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.star-svg.active {
    fill: #FFD700;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
}

.star-svg.inactive {
    fill: rgba(255, 255, 255, 0.3);
}

.difficulty-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%) scale(0.5);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 15px rgba(64, 206, 243, 0.8), 2px 2px 0 rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    z-index: 2;
}

/* WOW Hover Effect */
.difficulty-indicator:hover .stars-group {
    opacity: 0;
    transform: translateY(-50%) scale(0.7);
    filter: blur(4px);
}

.difficulty-indicator:hover .difficulty-label {
    opacity: 1;
    transform: translateY(0) scale(1.15);
}

.difficulty-indicator:hover .star-svg.active {
    transform: rotate(25deg);
}

.card-game-title {
    font-size: 1.6rem;
    margin: 0 0 20px;
    font-weight: 800;
    line-height: 1.2;
}

.card-game-title a {
    color: #023682;
    text-decoration: none;
    transition: color 0.3s;
}

.card-game-title a:hover {
    color: #40CEF3;
}

/* Card Info Pods (Games only) */
.game-premium-card .card-info {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0 !important;
    border: 1px solid rgba(2, 54, 130, 0.08) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: rgba(2, 54, 130, 0.02);
    margin-bottom: 0 !important;
}

.game-premium-card .card-info .info-item {
    border-right: 1px solid rgba(2, 54, 130, 0.08) !important;
    padding: 10px 5px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 !important;
    min-height: 60px;
}

.card-info .info-item:last-child {
    border-right: none !important;
}

.card-info .info-icon {
    font-size: 1rem !important;
    margin-bottom: 2px !important;
}

.card-info .info-text {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #023682 !important;
}

/* Footer Button */
.card-footer-premium {
    padding: 0 30px 30px;
}

.btn-full-card {
    display: block;
    width: 100%;
    text-align: center;
    background: #023682;
    color: #fff;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-full-card:hover {
    background: #40CEF3;
    box-shadow: 0 8px 20px rgba(64, 206, 243, 0.3);
}

@media (max-width: 1200px) {
    .ludoteca-grid-archive {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .ludoteca-grid-archive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ludoteca-grid-archive {
        grid-template-columns: 1fr;
}
