.asg-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

.asg-grid.asg-cols-1 { grid-template-columns: 1fr; }
.asg-grid.asg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.asg-grid.asg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.asg-grid.asg-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .asg-grid.asg-cols-3, .asg-grid.asg-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .asg-grid { grid-template-columns: 1fr !important; }
}

.asg-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #222;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, opacity 0.6s ease;
    cursor: pointer;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(50px);
}

.asg-item.is-visible {
    opacity: 1;
    transform: translateY(0);
    animation: asg-float 6s ease-in-out infinite;
}

.asg-item:nth-child(2n).is-visible { animation-delay: 1s; }
.asg-item:nth-child(3n).is-visible { animation-delay: 2s; }
.asg-item:nth-child(4n).is-visible { animation-delay: 1.5s; }

@keyframes asg-float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.asg-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.4s ease;
    z-index: 1;
}

.asg-item:hover::before {
    background-color: rgba(0, 0, 0, 0.8);
}

.asg-item.asg-no-js:hover {
    transform: scale(1.03) translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.asg-content {
    position: relative;
    z-index: 2;
    transform: translateZ(30px);
    transition: transform 0.4s ease;
}

.asg-icon {
    font-size: 40px;
    color: #fff;
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.asg-icon svg {
    fill: #fff;
    width: 40px;
    height: 40px;
}

.asg-title {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 24px;
    transition: transform 0.4s ease;
}

.asg-desc {
    color: #eee;
    font-size: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    max-height: 0;
    overflow: hidden;
}

.asg-item:hover .asg-desc {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    margin-top: 10px;
}

.asg-item:hover .asg-icon {
    transform: scale(1.1);
}
