/* Widget container */
.uffizio-title-widget {
    display: block;
    width: 100%;
}

/* Content wrapper - this controls alignment */
.uffizio-title-content {
    display: inline-block;
    max-width: 100%;
    text-align: left;
}

/* Alignment: Left */
.elementor-text-align-left .uffizio-title-widget {
    text-align: left !important;
}

/* Alignment: Center (default) */
.uffizio-title-widget {
    text-align: center;
}

.elementor-text-align-center .uffizio-title-widget {
    text-align: center !important;
}

/* Alignment: Right */
.elementor-text-align-right .uffizio-title-widget {
    text-align: right !important;
}

/* Mobile alignment */
@media (max-width: 767px) {
    .elementor-text-align-mobile-left .uffizio-title-widget {
        text-align: left !important;
    }

    .elementor-text-align-mobile-center .uffizio-title-widget {
        text-align: center !important;
    }

    .elementor-text-align-mobile-right .uffizio-title-widget {
        text-align: right !important;
    }
}

/* Tablet alignment */
@media (max-width: 1024px) and (min-width: 768px) {
    .elementor-text-align-tablet-left .uffizio-title-widget {
        text-align: left !important;
    }

    .elementor-text-align-tablet-center .uffizio-title-widget {
        text-align: center !important;
    }

    .elementor-text-align-tablet-right .uffizio-title-widget {
        text-align: right !important;
    }
}

/* Title base styles */
.uffizio-title {
    letter-spacing: 0.04375rem;
    font-weight: 700;
    color: #0E0E0E !important;
    display: block;
    width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    min-width: 0;
    text-align: inherit;
}

h3.uffizio-title {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
}

/* Subtitle base styles */
.uffizio-subtitle {
    margin: 20px 0 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--uffizio-text-secondary);
    display: block;
    width: 100%;
    text-align: inherit;
}

/* Product hero title layout */
.product-hero-title {
    width: 100%;
    display: block;
}

.product-hero-title .uffizio-title-content {
    max-width: 1090px;
    width: 100%;
}

/* Product hero title */
.product-hero-title .uffizio-title {
    color: var(--uffizio-text-white) !important;
    font-size: 60px;
    line-height: 77px;
    font-weight: 500 !important;
}

.product-hero-title .uffizio-subtitle {
    color: var(--uffizio-text-white) !important;
    font-size: 20px;
    line-height: 28px;
    width: 100%;
}

.product-hero-title .uffizio-title,
.product-hero-title .uffizio-subtitle {
    margin-top: 0 !important;
}

/* ------------------------- */
/*   RESPONSIVE IMPROVEMENTS */
/* ------------------------- */

/* Large laptops 1280px - smooth scaling */
@media (max-width: 1280px) {
    .product-hero-title .uffizio-title {
        font-size: 52px;
        line-height: 68px;
    }
}

/* Tablets (1024px) */
@media (max-width: 1024px) {
    .uffizio-title {
        font-size: 2.2rem;
    }

    .uffizio-subtitle {
        font-size: 1.125rem;
    }

    .product-hero-title .uffizio-title {
        font-size: 48px;
        line-height: 62px;
    }

}

/* Small Tablets / Large Mobiles (768px) */
@media (max-width: 767px) {
    .uffizio-title {
        font-size: 1.75rem;
    }

    .uffizio-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }

    .product-hero-title {
        min-height: auto;
        padding: 20px 0;
    }

    .product-hero-title .uffizio-title {
        font-size: 38px;
        line-height: 48px;
    }

    .product-hero-title .uffizio-subtitle {
        font-size: 17px;
        line-height: 24px;
    }

    h3.uffizio-title {
        font-size: 22px;
    }
}

/* Small phones (480px) */
@media (max-width: 480px) {
    .uffizio-title-widget{
        align-content: space-around;
    }
    .uffizio-title {
        font-size: 28px;
        line-height: 38px;
    }

    .uffizio-subtitle {
        font-size: 16px;
        line-height: 23px;
    }

    .product-hero-title .uffizio-title {
        font-size: 26px;
        line-height: 38px;
    }

    .product-hero-title .uffizio-subtitle {
        font-size: 15px;
        line-height: 22px;
        min-height: auto;
    }

    h3.uffizio-title {
        font-size: 18px;
        line-height: 22px;
    }

}

/* Ultra-small phones (380px) */
@media (max-width: 380px) {
    .product-hero-title .uffizio-title {
        font-size: 26px;
        line-height: 34px;
    }

    .product-hero-title .uffizio-subtitle {
        font-size: 16px;
    }
}