﻿.category-card {
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    background: #f5f5f5;
    height: 150px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

.category-title {
    position: absolute;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    top: 1rem;
    left: 1rem;
    margin: 0;
    font-size: 1.1rem !important;
    font-weight: 400;
    color: #333;
    z-index: 2;
    max-width: 70%;
    text-shadow: 0 1px 2px rgba(255,255,255,0.7);
}

.category-image {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 180px; 
    height: 180px; 
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Media query per tablet */
@media (max-width: 1024px) {
    .category-card {
        height: 140px;
    }

    .category-title {
        font-size: 0.9rem !important;
    }

    .category-image {
        width: 160px; 
        height: 160px; 
        bottom: -45px;
        right: -45px;
    }
}

/* Media query per tablet piccoli e telefoni in landscape */
@media (max-width: 900px) {
    .category-card {
        height: 130px;
    }

    .category-title {
        font-size: 0.8rem !important;
        top: 0.8rem;
        left: 0.8rem;
    }

    .category-image {
        width: 140px; 
        height: 140px; 
        bottom: -40px;
        right: -40px;
    }
}

/* Media query per telefoni */
@media (max-width: 768px) {
    .category-card {
        height: 120px;
    }

    .category-title {
        top: 0.7rem;
        left: 0.7rem;
        max-width: 65%;
    }

    .category-image {
        width: 120px; 
        height: 120px; 
        bottom: -35px;
        right: -35px;
    }
}

/* Media query per telefoni piccoli */
@media (max-width: 480px) {
    .category-card {
        height: 110px;
        flex: 0 0 48%;
    }

    .category-title {
        top: 0.6rem;
        left: 0.6rem;
        max-width: 70%;
    }

    .category-image {
        width: 100px; 
        height: 100px; 
        bottom: -30px;
        right: -30px;
    }
}

/* Media query per telefoni molto piccoli */
@media (max-width: 360px) {
    .category-image {
        width: 90px; 
        height: 90px; 
    }
}

/* Media query per dispositivi in modalità landscape con altezza ridotta */
@media (max-height: 500px) and (orientation: landscape) {
    .category-card {
        height: 100px;
    }

    .category-image {
        width: 110px; 
        height: 110px; 
        bottom: -35px;
        right: -35px;
    }
}
