.section {
    position: relative;
    margin-bottom: 50px;

    .hero {
        position: relative;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        border-radius: 20px;
        border: 1px solid #000;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.5s ease, opacity 0.5s ease;

        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.35);
            border-radius: 20px;
            transition: background 0.3s ease;
        }

        h2 {
            position: relative;
            z-index: 2;
            color: white;
            font-size: 3.5rem;
            font-weight: bold;
            text-align: center;
            text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
            margin: 0;
            max-width: 917px;
            line-height: 1.2;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInUp 0.5s forwards 0.3s;
        }
    }

    .subspace {
        display: flex;
        gap: 45px;
        margin-top: 68px;
        justify-content: space-between;
    }

    .sub-hero {
        position: relative;
        border-radius: 20px;
        border: 2px solid #ddd;
        overflow: hidden;
        display: grid;
        align-items: center;
        justify-content: center;
        height: 150px;
        background-size: cover;
        background-position: center;
        border: 1px solid #000;
        cursor: pointer;
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;

        &.i1 {
            background-image: url('/assets/img/1.png');
        }

        &.i2 {
            background-image: url('/assets/img/2.png');
        }

        &.i3 {
            background-image: url('/assets/img/3.png');
        }

        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(224, 224, 224, 0.15);
            border-radius: 20px;
        }

        h5 {
            position: relative;
            z-index: 2;
            color: white;
            font-size: 1.25rem;
            font-weight: bold;
            text-align: center;
            text-shadow: 1px 4px 4.5px rgba(0, 0, 0, 0.25);
            margin: 0;
            padding: 0 20px;
            line-height: 1.3;
        }
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-slider {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .section {
        .hero {
            height: 100%;

            h2 {
                font-size: 2.5rem;
                padding: 0 20px;
            }
        }

        .subspace {
            flex-direction: column;
            gap: 20px;
            margin-top: 30px;
        }

        .sub-hero {
            width: 100% !important;
            height: 200px;
            transition: transform 0.3s ease;

            h5 {
                font-size: 1.2rem;
            }

            &:active {
                transform: scale(0.98);
            }
        }
    }

    .slider-container {
        height: 400px;
    }
}

/* Active state for sub-hero elements */
.sub-hero.active {
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}
