/* Numbered Blocks Widget Styles */
.numbered-blocks-widget {
    width: 100%;
}

.blocks-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.numbered-block-wrapper {
    position: relative;
}

.numbered-block {
    display: block;
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}



/* Background Image */
.block-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.block-bg:after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.block-bg-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--theme-primary);
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.numbered-block:hover .block-bg-hover {
    opacity: 0.7;
}

.block-content .button{
    padding: 12px 25px;
    margin-top: 15px;
}

/* Content */
.block-content {
    position: relative;
    z-index: 3;
    padding: 40px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    color: #333;
}

.block-number {
    font-size: 18px;
    font-weight: 600;
    color: #999;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.block-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.2;
    margin-top: 0;
    position: relative;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.block-text-content{
    position: relative;
}

.block-content .block-description {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: auto;
    margin-top: 0;
    transition: all 0.5s ease;
}

.block-hover-text{
    position: absolute;
}

.block-hover-text{
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.3s ease;
}

.numbered-block:hover .block-hover-text {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.numbered-block:hover .block-title {
    transform: translateY(0px);
}

.block-arrow {
    align-self: flex-start;
    font-size: 24px;
    color: #333;
    transition: transform 0.3s ease;
    margin-top: 20px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Responsive */
@media (max-width: 768px) {
    .blocks-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .numbered-block {
        height: 300px;
        border-radius: 15px;
    }
    
    .block-content {
        padding: 30px 25px;
    }
    
    .block-title {
        font-size: 24px;
    }
    
    .block-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .numbered-block {
        height: 280px;
    }
    
    .block-content {
        padding: 25px 20px;
    }
    
    .block-title {
        font-size: 22px;
    }
}