/* assets/css/tiles.css */

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.tile-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s ease, border-color 0.3s ease; /* Dodajemy przejście dla koloru ramki */
    height: 250px;
    background: var(--theme-card-bg-color); /* Użycie zmiennej */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* POPRAWKA: Ramka domyślnie jest przezroczysta, ale zajmuje miejsce */
    border: 1px solid transparent; 
}

.tile-card:hover {
    transform: translateY(-10px);

    /* POPRAWKA: Po najechaniu ramka staje się widoczna */
    border-color: rgba(255, 255, 255, 0.25); 
}

.tile-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Dopasowuje obrazek, pokazując go w całości */
    background-color: rgba(0,0,0,0.2); /* Dodaje delikatne tło pod przezroczyste PNG */
}

.tile-card:hover .tile-card__image {
    transform: scale(1.1); /* Lekkie powiększenie obrazka po najechaniu */
}

.tile-card__title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    color: var(--theme-card-text-color); /* Użycie zmiennej */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0;
}

.tile-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 40, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tile-card:hover .tile-card__overlay {
    opacity: 1;
}

.tile-card__overlay .btn {
    min-width: 150px;
    font-weight: bold;
}