/* 1. Rimuove il colore di sfondo grigio e lo spazio in cima alla pagina */
.page-id-1371 .entry-header, 
.page-id-1371 .page-header,
.page-id-1371 .header-post-title-container {
    display: none !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. Sposta il contenuto bianco verso l'alto per chiudere il buco */
.page-id-1371 #content, 
.page-id-1371 .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 3. Assicura che lo sfondo generale sotto il modulo sia bianco e pulito */
.page-id-1371 #primary {
    background-color: #ffffff !important;
    margin-top: 0 !important;
}
/* Nasconde il blocco pagamenti e carrello da TUTTE le pagine, tranne il checkout reale */
body:not(.woocommerce-checkout) .woocommerce-checkout-review-order,
body:not(.woocommerce-checkout) #payment,
body:not(.woocommerce-checkout) .checkout_coupon {
    display: none !important;
}

/* Rende la pagina Mio Account / Login ordinata */
.woocommerce-account .woocommerce-MyAccount-navigation {
    margin-bottom: 20px;
}
/* Cancella le recensioni dalla pagina di checkout */
.woocommerce-checkout #reviews, 
.woocommerce-checkout .tutor-course-reviews,
.woocommerce-checkout .comments-area {
    display: none !important;
}

/* Forza i campi a essere visibili sopra il caos del tema */
body .woocommerce-checkout input.input-text {
    background-color: white !important;
    border: 2px solid black !important;
    color: black !important;
    position: relative !important;
    z-index: 999 !important;
}

/* Sistema l'ordine degli elementi */
.woocommerce-checkout .col2-set {
    display: flex !important;
    flex-direction: column !important;
}
/* BANNER FULL-WIDTH (BORDO A BORDO) - SOSTITUISCI TUTTO IL VECCHIO CODICE CON QUESTO */
html body .wp-block-post-content section figure img {
    /* 1. Forza la larghezza totale ignorando i margini del sito */
    width: 100vw !important;
    max-width: 100vw !important;
    
    /* 2. Tecnica per centrare l'immagine a tutta larghezza */
    margin-left: 50% !important;
    transform: translateX(-50%) !important;
    
    /* 3. Altezza e ritaglio */
    height: 350px !important; 
    object-fit: cover !important;
    object-position: center 50% !important; /* Mostra meglio mani/polsi */
    
    display: block !important;
    min-height: auto !important; /* Reset per evitare conflitti */
}

/* Regolazione per schermi piccoli (Mobile) */
@media (max-width: 767px) {
    html body .wp-block-post-content section figure img {
        height: 250px !important; /* Più bassa sui telefoni per non coprire tutto lo schermo */
    }
}

/* Rimuove eventuali barre di scorrimento laterali fastidiose */
body {
    overflow-x: hidden;
}
/* 1. Pulizia spazi e linee sotto le colonne */
.page-template-default .wp-block-columns,
.wp-block-columns,
.wp-block-column {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important; /* Elimina la riga sottile sotto le colonne */
    box-shadow: none !important;
}
/* 3. Rade al suolo i margini di titoli e paragrafi dentro i blocchi colorati */
.has-background p,
.has-background h1,
.has-background h2,
.has-background h3,
.has-background h4,
.has-background span {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.4 !important; /* Regola l'altezza della riga di testo */
}

/* 4. Nasconde linee e separatori residui */
.wp-block-separator, 
hr,
.wp-block-columns + hr,
html body .wp-block-post-content section::after {
    display: none !important;
    content: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* 1. BLOCCO SPAZIO BIANCO (Tiene la fascia marrone attaccata alla foto) */
.wp-block-columns {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    box-shadow: none !important;
}
.wp-block-columns + .wp-block-spacer,
.wp-block-columns + div[style*="height"] {
    display: none !important;
    height: 0 !important;
}
.wp-block-columns + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
/* 2. BLOCCO CENTRATURA (Forza la scritta marrone al centro perfetto) */
html body .wp-block-post-content .has-brown-background-color,
html body .wp-block-post-content .has-background {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding-top: 35px !important;    /* Spazio sopra la scritta */
    padding-bottom: 35px !important; /* Spazio sotto la scritta identico */
    height: auto !important;
    min-height: auto !important;
}
/* 3. AZZERA I MARGINI DEL TESTO INTERNO PER NON SBILANCIARLO */
.has-brown-background-color p,
.has-background p,
.has-background h1,
.has-background h2 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
/* 4. NASCONDE LE LINEE DIVISORIE RESIDUE */
.wp-block-separator, hr {
    display: none !important;
}
/* Forza il testo specifico a centrarsi e a respirare */
.has-brown-background-color p,
.has-background p {
    text-align: center !important;
    margin: 0 auto !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
@media (max-width: 767px) {
    html body .wp-block-post-content section figure img {
        height: auto !important; /* Rimuove l'altezza fissa di 250px */
        object-fit: contain !important; /* Mostra tutta l'immagine senza tagli */
    }
}
/* Applica l'allineamento solo per schermi più grandi di 768px (PC) */
@media only screen and (min-width: 768px) {
    .allinea-top-pc {
        align-items: flex-start !important;
    }
    .allinea-top-pc img {
        margin-top: 0 !important;
    }
}