/* ==========================================
   1. HOME PAGE (.testo-illustrato)
   ========================================== */

/* Desktop */
.testo-illustrato {
    background-image: url("https://udxzinefestival.it/wp-content/uploads/2026/08/disegno-1_1.png") !important;
    background-repeat: no-repeat !important;
    background-position: right 180px center !important; 
    background-size: 580px auto !important; 
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
}

.testo-illustrato, 
.testo-illustrato p,
.testo-illustrato span,
.testo-illustrato div {
    font-size: 2.2rem !important;
    line-height: 1.15 !important;
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    margin-right: 0 !important;
}

/* Tablet Home (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .testo-illustrato {
        background-position: right -20px bottom 10px !important;
        background-size: 380px auto !important;
        padding-bottom: 20px !important;
    }

    .testo-illustrato, 
    .testo-illustrato p,
    .testo-illustrato span,
    .testo-illustrato div {
        font-size: 1.35rem !important;
        line-height: 1.25 !important;
    }

    .testo-illustrato p::after {
        display: none !important;
    }
}

/* Mobile Home (fino a 768px) */
@media (max-width: 768px) {
    .testo-illustrato,
    .elementor-widget-container:has(.testo-illustrato) {
        background-image: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    .testo-illustrato, 
    .testo-illustrato p,
    .testo-illustrato span,
    .testo-illustrato div {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
    }

    .testo-illustrato p {
        margin-bottom: 14px !important;
    }

    /* Illustrazione al centro del testo su mobile */
    .testo-illustrato p:first-of-type::after {
        content: "" !important;
        display: block !important;
        width: 100% !important;
        height: 180px !important;
        background-image: url("https://udxzinefestival.it/wp-content/uploads/2026/08/disegno-1_1.png") !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
        background-size: contain !important;
        margin: 25px 0 !important;
    }
}


/* ==========================================
   2. PAGINA OPEN CALL (.opencall-testo)
   ========================================== */

/* Desktop Open Call */
.opencall-testo,
.opencall-testo * {
    font-size: 2.2rem !important;
    line-height: 1.15 !important;
}

/* Tablet Open Call (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .opencall-testo,
    .opencall-testo * {
        font-size: 1.35rem !important;
        line-height: 1.2 !important;
    }
}

/* Mobile Open Call (fino a 768px) */
@media (max-width: 768px) {
    [class*="elementor-element"]:has(.opencall-testo),
    .elementor-column:has(.opencall-testo),
    .elementor-widget-container:has(.opencall-testo),
    .opencall-testo {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex: 0 0 100% !important;
        box-sizing: border-box !important;
    }

    .opencall-testo,
    .opencall-testo * {
        font-size: clamp(0.95rem, 4.2vw, 1.15rem) !important;
        line-height: 1.3 !important;
        letter-spacing: -0.01em !important;
    }

    .opencall-testo p,
    .opencall-testo div {
        margin-bottom: 16px !important;
    }
}


/* ==========================================
   3. BOTTONE OPEN CALL (.btn-open-call)
   ========================================== */
.btn-open-call a,
.btn-open-call button,
.btn-open-call {
    background-color: #ffffff !important;
    color: #000000 !important;
    text-transform: lowercase !important;
    border: 1px solid #000000 !important;
    border-radius: 0px !important;
    padding: 12px 28px !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease-in-out !important;
    position: relative !important;
    z-index: 3 !important;
}

.btn-open-call a:hover,
.btn-open-call button:hover,
.btn-open-call:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* ==========================================
   FIX MOBILE: TESTO A TUTTA PAGINA
   ========================================== */
@media (max-width: 768px) {
    /* Azzera i margini e forza la larghezza al 100% per contenitore e testo */
    .testo-illustrato,
    .opencall-testo,
    .elementor-widget-container:has(.testo-illustrato),
    .elementor-widget-container:has(.opencall-testo) {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        padding-right: 15px !important; /* Mantiene solo un piccolo margine di sicurezza dal bordo dello schermo */
        padding-left: 15px !important;
        box-sizing: border-box !important;
    }

    /* Mantiene il font ridotto e proporzionato */
    .testo-illustrato, 
    .testo-illustrato p,
    .testo-illustrato span,
    .opencall-testo,
    .opencall-testo p,
    .opencall-testo span {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
}