/**
 * Home Categories Module - Styles
 */

.homecategories-section {
    background-color: #fff;
    margin: 1rem 0;
}

.category-container {
    padding: 0 30px;
}

h2.h2.homecategories-title {
    margin-bottom: 0;
}

.homecategories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin: 0 auto;
}

.homecategories-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.homecategories-item:hover {
    transform: translateY(-5px);
}

.homecategories-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.homecategories-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Kwadratowy aspect ratio */
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.homecategories-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.homecategories-item:hover .homecategories-image {
    transform: scale(1.05);
}

.homecategories-name {
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: #333;
    line-height: 1.4;
}

/* Responsywność */

/* Duże ekrany (desktop) - 6 w rzędzie */
@media (min-width: 1200px) {
    .homecategories-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Średnie ekrany (tablet landscape) - 4 w rzędzie */
@media (max-width: 1199px) and (min-width: 992px) {
    .homecategories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Małe ekrany (tablet portrait) - 3 w rzędzie */
@media (max-width: 991px) and (min-width: 768px) {
    .homecategories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .homecategories-title {
        font-size: 1.75rem;
    }
}

/* Bardzo małe ekrany (mobile) - 2 w rzędzie */
@media (max-width: 767px) {
    .homecategories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .homecategories-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .homecategories-name {
        font-size: 0.9rem;
    }
    
    .homecategories-section {
        margin: 20px 0;
    }
}
