/* ==================== BARRA DE BÚSQUEDA ==================== */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 1.5rem auto 2rem;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: 2px solid #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff !important; /* Fondo whites */
    color: #333333 !important; /* Texto oscuro */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background-color: #ffffff !important;
    color: #333333 !important;
}

/* Estilo para el texto ingresado */
.search-input,
.search-input:not(:placeholder-shown) {
    color: #333333 !important; /* Color de texto oscuro */
    background-color: #ffffff !important; /* Fondo blanco */
}

.search-button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #d4af37;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: #f1c40f;
}

/* ==================== PAGINADOR ==================== */
.pagination-container {
    margin: 1rem 0 0 !important;
    padding: 1.5rem 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    clear: both !important;
    position: relative !important;
    text-align: center !important;
}

.pagination {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Estilos para los elementos del paginador */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination .page-item {
    margin: 0 0.15rem;
    display: inline-block;
}

/* Estilo base para todos los botones */
.pagination .page-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 0.5rem !important;
    background: none !important;
    border: none !important;
    color: #f0f0f0 !important; /* Texto más claro para mejor contraste */
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    overflow: hidden !important;
}

/* Efecto hover para los botones */
.pagination .page-link:not(.active):not(:disabled):hover {
    color: #ffffff !important; /* Blanco puro en hover */
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px) !important;
    border: none !important;
    box-shadow: none !important;
}

/* Estilo para la página activa */
.pagination .page-item.active .page-link {
    color: #1a1a1a !important;
    background: #f8d56b !important; /* Amarillo más claro para mejor contraste */
    font-weight: 700 !important;
    box-shadow: 0 2px 12px rgba(248, 213, 107, 0.4) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
}

/* Estilo para los botones de navegación (Anterior/Siguiente) */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    padding: 0 1rem;
    color: #f0f0f0 !important; /* Texto más claro */
    font-weight: 500 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease !important;
}

/* Efecto hover para los botones de navegación */
.pagination .page-item:first-child .page-link:hover:not(:disabled),
.pagination .page-item:last-child .page-link:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Estilo para los botones deshabilitados */
.pagination .page-item.disabled .page-link {
    opacity: 0.4 !important;
    color: #666 !important;
    background: none !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Efecto de subrayado al pasar el mouse */
.pagination .page-link:not(.active):not(:disabled):after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background: #f8d56b !important; /* Color dorado más claro */
    transition: all 0.3s ease !important;
    transform: translateX(-50%) !important;
    opacity: 0.8 !important;
    pointer-events: none !important;
}

.pagination .page-link:not(.active):not(:disabled):hover:after {
    width: 60% !important;
    opacity: 1 !important;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 768px) {
    .pagination {
        gap: 0.3rem;
        padding: 0 15px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination .page-link {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
        padding: 0 8px !important;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 0 0.8rem;
        font-size: 0.85rem;
    }
    
    .pagination .page-link:not(.active):not(:disabled):after {
        height: 1px;
    }
}

@media (max-width: 480px) {
    .pagination .page-link {
        min-width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .pagination .page-item:first-child,
    .pagination .page-item:last-child {
        display: none;
    }
    
    .pagination .page-item {
        margin: 0 0.05rem;
    }
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #d4af37 0%, #f1c40f 100%);
    border-color: #d4af37;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.pagination .page-link:hover:not(.active) {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
    color: #f1c40f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
    background-color: #2a2a2a;
    border-color: #444;
}

.pagination .page-item.ellipsis .page-link {
    background: transparent;
    border: none;
    box-shadow: none;
    pointer-events: none;
    color: #777;
    min-width: auto;
}

/* Efecto de pulso en hover */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pagination .page-item:not(.disabled, .active) .page-link:hover {
    animation: pulse 0.5s ease;
}

/* Responsive */
@media (max-width: 767.98px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.85rem;
    }
    
    .pagination .page-item {
        margin: 0.15rem;
    }
}

/* ==================== FIN PAGINADOR ==================== */

/* Contenedor principal de las tarjetas */
.contentJuegos {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
    width: 100%;
}

/* Estilos para móviles */
@media (max-width: 767.98px) {
    .contentJuegos {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }
}

/* Enlace de la tarjeta */
.enlace-card {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.enlace-card:hover {
    transform: translateY(-5px);
    text-decoration: none;
}

/* Tarjeta principal */
.card-full {
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.enlace-card:hover .card-full {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
}

/* Contenedor de la imagen */
.card-img {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.card-img .img-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.enlace-card:hover .img-card {
    transform: scale(1.05);
}

/* Contenido de la tarjeta */
.card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.title-game {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

/* Estilos para la etiqueta de la empresa */
.badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.9);
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Pie de la tarjeta */
.card-bottom {
    margin-top: auto;
    padding: 0.75rem 1.25rem 1.25rem;
    display: flex;
    justify-content: center;
}

.card-bottom .btn {
    background: linear-gradient(135deg, #d4af37 0%, #f1c40f 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    width: auto;
    min-width: 120px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card-bottom .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #f1c40f 0%, #d4af37 100%);
}

/* Estilos para la paginación */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    color: #d4af37;
    background-color: #1e1e1e;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #1a1a1a;
}

.pagination .page-link:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
}