/* Accessibility Fix - Complete Version - TEXT CONTRAST #ed8c4f */

/* DOWNLOAD BUTTON - ORO BACKGROUND + NERO TEXT + WHITE HOVER */
body .thsn-header-style-1 .thsn-right-box .thsn-header-button a,
body .thsn-header-style-1 .thsn-header-button a,
.site-header .thsn-header-style-1 .thsn-header-button a {
    color: #000000 !important; /* Testo nero */
    background: #ed8c4f !important; /* SFONDO ORO come richiesto */
    background-image: none !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 2px solid #9a7b05 !important; /* Bordo oro più scuro */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease !important;
}

/* HOVER STATE - SFONDO BIANCO + TESTO ORO come richiesto */
body .thsn-header-style-1 .thsn-right-box .thsn-header-button a:hover,
body .thsn-header-style-1 .thsn-header-button a:hover,
.site-header .thsn-header-style-1 .thsn-header-button a:hover {
    background: #ffffff !important; /* SFONDO BIANCO al hover */
    background-image: none !important;
    color: #ed8c4f !important; /* TESTO ORO al hover */
    border-color: #ed8c4f !important; /* Bordo oro */
    text-decoration: none !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Fix icona - colore coordinato con hover */
body .thsn-header-style-1 .thsn-header-button a:after,
.site-header .thsn-header-style-1 .thsn-header-button a:after {
    color: #000000 !important; /* Icona nera di default */
    font-size: 30px !important;
    opacity: 1 !important;
    transition: color 0.3s ease !important;
}

/* Icona oro al hover */
body .thsn-header-style-1 .thsn-header-button a:hover:after,
.site-header .thsn-header-style-1 .thsn-header-button a:hover:after {
    color: #ed8c4f !important; /* Icona oro al hover */
}

/* Stati focus e active per accessibilità */
body .thsn-header-style-1 .thsn-header-button a:focus,
body .thsn-header-style-1 .thsn-header-button a:active {
    background: #ffffff !important;
    color: #ed8c4f !important;
    outline: 3px solid #ed8c4f !important;
    outline-offset: 2px !important;
}

/* Sticky header state - mantieni stili base */
body .thsn-header-style-1 .thsn-sticky-on .thsn-header-button a,
.thsn-sticky-on .thsn-header-style-1 .thsn-header-button a {
    color: #000000 !important;
    background: #ed8c4f !important; /* ORO CORRETTO */
    background-image: none !important;
    border-color: #9a7b05 !important;
}

/* Sticky hover */
body .thsn-header-style-1 .thsn-sticky-on .thsn-header-button a:hover,
.thsn-sticky-on .thsn-header-style-1 .thsn-header-button a:hover {
    background: #ffffff !important;
    color: #ed8c4f !important;
}

/* Menu toggle button - accessibilità migliorata */
body #menu-toggle,
.site-header #menu-toggle {
    color: #000000 !important;
    background: #ed8c4f !important; /* ORO CORRETTO */
    border: 2px solid #000000 !important;
    padding: 10px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
}

body #menu-toggle:hover,
body #menu-toggle:focus {
    background: #9a7b05 !important;
    color: #000000 !important;
    outline: 2px solid #000000 !important;
}

/* NUOVO FIX - IHBOX NUMBER ELEMENTS - STATI NORMALE E HOVER */
/* Stato normale: numero #ed8c4f su sfondo bianco */
.thsn-ihbox-box-number,
.thsn-ihbox .thsn-ihbox-box-number,
.thsn-miconheading-style-18 .thsn-ihbox-box-number {
    color: #ed8c4f !important; /* Numero oro scuro su sfondo bianco */
    background: transparent !important;
    font-weight: 900 !important;
    font-size: 30px !important;
}

/* Stato hover della card: numero #ed8c4f */
.thsn-ihbox:hover .thsn-ihbox-box-number,
.thsn-ihbox-box:hover .thsn-ihbox-box-number {
    color: #ed8c4f !important; /* Numero oro chiaro al hover */
}

/* Stato hover: testo bianco */
.thsn-ihbox:hover .thsn-element-title,
.thsn-ihbox:hover .thsn-heading-desc,
.thsn-ihbox:hover .thsn-ihbox-contents h2,
.thsn-ihbox:hover .thsn-ihbox-contents .thsn-heading-desc {
    color: #ffffff !important; /* Testo bianco al hover */
}

/* Stato hover: Read More bianco */
.thsn-ihbox:hover .thsn-ihbox-btn a,
.thsn-ihbox:hover .thsn-ihbox-btn a span {
    color: #ffffff !important; /* Read More bianco al hover */
}


/* NUOVO FIX - TEXT CONTRAST #ed8c4f per READ MORE e TESTI */
/* Read More buttons */
.thsn-ihbox-btn a,
.thsn-ihbox-btn a span,
.thsn-read-more-link a,
.thsn-read-more a,
a[class*="read-more"],
a[href*="read-more"] {
    color: #ed8c4f !important; /* Nuovo colore per contrasto migliorato */
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

/* Read More hover */
.thsn-ihbox-btn a:hover,
.thsn-ihbox-btn a:hover span,
.thsn-read-more-link a:hover,
.thsn-read-more a:hover,
a[class*="read-more"]:hover,
a[href*="read-more"]:hover {
    color: #5a4a04 !important; /* Colore più scuro al hover */
}

/* Testi generali con problemi di contrasto */
.thsn-heading-desc,
.thsn-element-desc,
.thsn-desc,
.entry-content p,
.widget-content,
.widget-text {
    color: #000000 !important; /* Colore nero per massimo contrasto */
}

/* ========================================
   NAVIGATION MENUS
======================================== */

/* Menu generici - oro scuro, no underline */
nav a,
.menu a,
.navigation a {
    color: #ed8c4f !important;
    text-decoration: none !important;
}

nav a:hover,
.menu a:hover,
.navigation a:hover {
    color: #5a4a04 !important;
    text-decoration: none !important;
}

/* Top Menu specifico - oro chiaro normale, oro scuro sticky */
#thsn-top-menu a {
    color: #ed8c4f !important; /* Oro chiaro stato normale */
    text-decoration: none !important;
}

#thsn-top-menu a:hover {
    color: #ed8c4f !important; /* Oro scuro al hover */
}

/* Top Menu sticky state */
.thsn-sticky-on #thsn-top-menu a {
    color: #ed8c4f !important; /* Oro scuro su sfondo bianco */
}

.thsn-sticky-on #thsn-top-menu a:hover {
    color: #5a4a04 !important; /* Oro più scuro al hover */
}

/* ========================================
   BODY TEXT LINKS
======================================== */

/* Link nel contenuto */
.entry-content a,
.widget-content a,
.thsn-heading-desc a,
.thsn-element-desc a {
    color: #ed8c4f !important;
}

.entry-content a:hover,
.widget-content a:hover,
.thsn-heading-desc a:hover,
.thsn-element-desc a:hover {
    color: #5a4a04 !important;
}


/* ========================================
   FORM ACCESSIBILITY FIXES
======================================== */

/* Search form - fix label accessibility issue */
.search-form,
form[role="search"] {
    position: relative;
}

/* Search label - make visible for WCAG 2.5.3 compliance */
.search-form label,
form[role="search"] label {
    display: inline-block !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

/* Screen reader text dentro il label - mantieni nascosto */
.search-form label .screen-reader-text {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Aggiungi testo visibile al label via CSS */
.search-form label:before,
form[role="search"] label:before {
    content: "Search: " !important;
    display: inline !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

/* Search input improvements */
.search-form input[type="search"],
input[type="search"] {
    border: 2px solid #ccc !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 16px !important;
    color: #333 !important;
    background: #fff !important;
}

.search-form input[type="search"]:focus,
input[type="search"]:focus {
    border-color: #ed8c4f !important; /* Nuovo colore per focus */
    outline: 2px solid #ed8c4f !important;
    outline-offset: 2px !important;
    background: #fff !important;
}

/* Search button improvements */
.search-form button[type="submit"],
.search-form .search-submit {
    background: #ed8c4f !important; /* Nuovo colore */
    color: #ffffff !important; /* Testo bianco per contrasto */
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.search-form button[type="submit"]:hover,
.search-form .search-submit:hover {
    background: #5a4a04 !important;
}

.search-form button[type="submit"]:focus,
.search-form .search-submit:focus {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px #ed8c4f !important;
}

/* Generic form control improvements */
input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="hidden"]),
select,
textarea {
    min-height: 44px !important; /* WCAG touch target size */
}

input:focus:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="hidden"]),
select:focus,
textarea:focus {
    outline: 2px solid #ed8c4f !important; /* Nuovo colore */
    outline-offset: 2px !important;
}

/* ========================================
   RESPONSIVE FIXES
======================================== */

/* Tablet - Header button adjustment */
@media (max-width: 1199px) {
    body .thsn-header-style-1 .thsn-header-button a,
    .site-header .thsn-header-style-1 .thsn-header-button a {
        padding: 10px 15px !important;
        font-size: 14px !important;
        color: #000000 !important;
        background: #ed8c4f !important;
    }

    body .thsn-header-style-1 .thsn-header-button a:hover,
    .site-header .thsn-header-style-1 .thsn-header-button a:hover {
        background: #ffffff !important;
        color: #ed8c4f !important;
    }
}

/* Tablet - ihbox title typography fix */
@media (max-width: 991px) {
    .thsn-ihbox-style-17 .thsn-element-title {
        font-size: 25px !important;
        line-height: 36px !important;
        margin-bottom: 0px !important;
    }
}

/* Mobile - Typography improvements for better readability */
@media (max-width: 767px) {
    /* Main headings - increase for mobile readability */
    .thsn-element-title,
    .thsn-ihbox .thsn-element-title,
    h1, h2 {
        font-size: 28px !important; /* Era troppo piccolo */
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }

    /* Body text - WCAG recommends 16px minimum */
    .thsn-heading-desc,
    .thsn-element-desc,
    .thsn-desc,
    .entry-content p,
    .widget-content,
    .widget-text,
    p {
        font-size: 16px !important; /* Standard leggibile mobile */
        line-height: 1.5 !important;
        margin-bottom: 12px !important;
    }

    /* ihBox numbers - more visible on mobile */
    .thsn-ihbox-box-number {
        font-size: 36px !important; /* Era 30px, troppo piccolo */
        font-weight: 900 !important;
    }

    /* Read More buttons - touch-friendly */
    .thsn-ihbox-btn a,
    .thsn-read-more-link a,
    .thsn-read-more a {
        font-size: 16px !important;
        padding: 12px 16px !important;
        min-height: 44px !important; /* WCAG touch target */
    }

    /* Menu items - readable mobile */
    #thsn-top-menu a {
        font-size: 16px !important;
        padding: 12px 15px !important;
    }

    /* Footer copyright - legible */
    .thsn-footer-copyright-text-area,
    .thsn-footer-copyright-text-area p {
        font-size: 14px !important; /* Minimo leggibile */
        line-height: 1.4 !important;
    }

    /* Elementor section padding fix */
    .elementor-57 .elementor-element.elementor-element-5e43a3ae {
        padding: 80px 15px 55px 15px !important;
    }
}

/* ========================================
   FOOTER COPYRIGHT
======================================== */

/* Footer copyright - tutto bianco */
.thsn-footer-copyright-text-area,
.thsn-footer-copyright-text-area p,
.thsn-footer-copyright-text-area a {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Footer copyright hover - oro */
.thsn-footer-copyright-text-area a:hover {
    color: #ed8c4f !important;
}

/* Force tutti gli stili per debugging */
* .thsn-header-button a {
    color: #000000 !important;
    background-color: #ed8c4f !important; /* ORO CORRETTO */
}

/* NO DEBUG BORDERS */
.thsn-header-button {
    border: none !important;
    margin: 0 !important;
}