.hero-section {
    padding: 100px 0;
    background-color: rgb(107, 19, 24);
}

.rectangles-container {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.9;
    padding: 20px;
}

.rectangle {
    width: calc(20% - 20px);
    height: 600px;
    background-color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.rectangle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.8s ease;
    z-index: 2;
}

.rectangle:hover::before {
    left: 100%;
}

.rectangle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg, 
        rgba(74, 111, 165, 0.85) 0%, 
        rgba(74, 111, 165, 0.5) 50%,
        rgba(165, 74, 74, 0.3) 100%
    );
    opacity: 0.8;
    transition: all 0.6s ease;
    border-radius: 12px;
}

.rectangle:hover {
    transform: translateY(-12px) scale(1.03) rotateX(2deg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(74, 111, 165, 0.4);
    z-index: 10;
}

.rectangle:hover .rectangle-overlay {
    opacity: 0.4;
    background: linear-gradient(
        135deg, 
        rgba(74, 111, 165, 0.7) 0%, 
        rgba(165, 74, 74, 0.5) 50%,
        rgba(165, 74, 165, 0.3) 100%
    );
}

.rectangle:hover .rectangle-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.rectangle:hover .rectangle-content h3 {
    transform: translateY(0);
}

.rectangle:hover .rectangle-content p {
    transform: translateY(0);
    opacity: 1;
}

.rectangle.active {
    transform: translateY(-15px) scale(1.05) rotateX(3deg);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.35),
        0 0 0 2px rgba(255, 255, 255, 0.3),
        0 0 50px rgba(74, 111, 165, 0.6);
    animation: pulse 2s infinite;
}

.rectangle.active .rectangle-overlay {
    opacity: 0.3;
    background: linear-gradient(
        135deg, 
        rgba(74, 111, 165, 0.9) 0%, 
        rgba(165, 74, 165, 0.6) 50%,
        rgba(165, 165, 74, 0.4) 100%
    );
}

.rectangle.active .rectangle-content {
    transform: translateY(-5px) scale(1.05);
}

.rectangle.active .rectangle-content h3 {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.rectangle-icon {
    font-size: 36px;
    margin-bottom: 15px;
    color: #4a6fa5;
    display: none;
}

.rectangle-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    transform: translateY(10px);
    transition: all 0.5s ease 0.1s;
}

.rectangle-content p {
    font-size: 14px;
    line-height: 1.6;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.5s ease 0.2s;
}

@keyframes pulse {
    0% {
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.35),
            0 0 0 2px rgba(255, 255, 255, 0.3),
            0 0 50px rgba(74, 111, 165, 0.6);
    }
    50% {
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.35),
            0 0 0 3px rgba(255, 255, 255, 0.4),
            0 0 60px rgba(74, 111, 165, 0.8);
    }
    100% {
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.35),
            0 0 0 2px rgba(255, 255, 255, 0.3),
            0 0 50px rgba(74, 111, 165, 0.6);
    }
}

.rectangle:nth-child(1):hover {
    transform: translateY(-12px) scale(1.03) rotateX(2deg) rotateY(1deg);
}

.rectangle:nth-child(2):hover {
    transform: translateY(-12px) scale(1.03) rotateX(2deg) rotateY(-1deg);
}

.rectangle:nth-child(3):hover {
    transform: translateY(-12px) scale(1.03) rotateX(1deg) rotateY(2deg);
}

.rectangle:nth-child(4):hover {
    transform: translateY(-12px) scale(1.03) rotateX(1deg) rotateY(-2deg);
}

.rectangle:nth-child(5):hover {
    transform: translateY(-12px) scale(1.03) rotateX(2deg) rotateY(0deg);
}

.rectangle.scale-down {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 0 25px rgba(74, 111, 165, 0.3) !important;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.rectangle.scale-down .rectangle-overlay {
    opacity: 0.5 !important;
    background: linear-gradient(
        135deg, 
        rgba(74, 111, 165, 0.8) 0%, 
        rgba(165, 74, 74, 0.4) 50%,
        rgba(165, 74, 165, 0.2) 100%
    ) !important;
}

.rectangle.scale-down .rectangle-content {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
}