/* ==========================================================================
  UTILITIES 
  ========================================================================== */

/* VARIABILI PER I CONTAINER */
:root { --container: 1440px; --container-xxl: 95%; --container-xl: 90%; --container-lg: 85%; --container-md: 80%; --container-sm: 75%; --container-xs: 55%; --container-apple: 990px; --color-primary: #0056b3; --color-primary-dark: #004085; --color-primary-light: #0069d9; --color-secondary: #6c757d; --color-secondary-dark: #545b62; --color-secondary-light: #868e96; --giallo: #ff9800; }

/* RESET E UTILITY BASE */
html { overflow-x: hidden; scroll-padding-top: 100px; }
body:not(.single) {overflow-x: hidden;}

body.category { margin-top: 0 !important; }
body.single-post { margin-top: 0 !important; }
body.logged-in .fixed-top { top: 32px !important; }

a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
/* CONTAINER CLASSES */
.container { max-width: var(--container); }
.container-xxl { max-width: var(--container-xxl) !important; }
.container-xl { max-width: var(--container-xl) !important; }
.container-lg { max-width: var(--container-lg) !important; margin: 0 auto; }
.container-md { max-width: var(--container-md) !important; margin: 0 auto; }
.container-sm { max-width: var(--container-sm) !important; margin: 0 auto; }
.container-xs { max-width: var(--container-xs) !important; margin: 0 auto; }
.container-apple { max-width: var(--container-apple) !important; margin: 0 auto; }

/* UTILITY CLASSES */
.hide { opacity: 0; pointer-events: none; visibility: hidden; }
#site-footer .hide_to_scroll.hide { opacity: 1 !important; pointer-events: all !important; visibility: visible !important; }
.space_page { margin-top: 200px; }
#content-page:not(.long-read) .wp-block-list { padding-left: 0; }
.container_breadcrumb ol { display: flex; justify-content: center; align-items: center; }
.single .entry-content li {margin-left: 0 !important;}
.center-y { display: flex; justify-content: center; align-items: center; }
.alignfull { width: 100vw !important;max-width: 100vw !important;margin-left: calc(50% - 50vw) !important;margin-right: calc(50% - 50vw) !important;left: 0 !important; }
.moltiplica {mix-blend-mode: multiply;}

/* ==========================================================================
   BUTTON UTILITIES
   ========================================================================== */

/* BUTTON BASE STYLES */
.btn, .wp-block-button__link { border-radius: 8px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; font-size: 0.875rem; padding: 0.75rem 1.5rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 2px solid transparent; position: relative; overflow: hidden; }
.btn::before, .wp-block-button__link::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.5s; }
.btn:hover::before, .wp-block-button__link:hover::before { left: 100%; }

/* PRIMARY BUTTON */
.btn-primary, .btn, .wp-block-button__link { background-color: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3); }
.btn-primary:hover, .wp-block-button__link:hover { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff !important; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 86, 179, 0.4); }
.btn-primary:focus { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25); }
.btn-primary:active { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); transform: translateY(0); }

/* OUTLINE PRIMARY BUTTON */
.btn-outline-primary { background-color: transparent; border-color: var(--color-primary); color: var(--color-primary); box-shadow: 0 2px 10px rgba(0, 86, 179, 0.1); }
.btn-outline-primary:hover { background-color: var(--color-primary); border-color: var(--color-primary); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 86, 179, 0.3); }
.btn-outline-primary:focus { background-color: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25); }

/* SECONDARY BUTTON */
.btn-secondary { background-color: var(--color-secondary); border-color: var(--color-secondary); color: #fff; box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3); }
.btn-secondary:hover { background-color: var(--color-secondary-dark); border-color: var(--color-secondary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4); }
.btn-secondary:focus { background-color: var(--color-secondary-dark); border-color: var(--color-secondary-dark); color: #fff; box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25); }

/* OUTLINE SECONDARY BUTTON */
.btn-outline-secondary { background-color: transparent; border-color: var(--color-secondary); color: var(--color-secondary); box-shadow: 0 2px 10px rgba(108, 117, 125, 0.1); }
.btn-outline-secondary:hover,.is-style-outline a:hover { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3); }

/*BTN PDF*/
.btn-pdf .wp-block-button__link::before {content: "\F756" !important; margin-right: 10px; font-family: bootstrap-icons !important;font-style: normal;font-weight: normal !important;font-variant: normal;text-transform: none;line-height: 1;vertical-align: -.125em;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale; position: static;}
.btn-pdf .wp-block-button__link {background-color: #d8401e; border-color: #d8401e; box-shadow: 0 4px 15px rgba(216, 64, 30, 0.3); display: none;}

/* BUTTON SIZES */
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; border-radius: 6px; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; border-radius: 10px; }

/* BUTTON STATES */
.btn:disabled, .btn.disabled { opacity: 0.5; transform: none !important; box-shadow: none !important; cursor: not-allowed; }
.btn:disabled::before, .btn.disabled::before { display: none; }

/* BUTTON GROUPS */
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.btn-group .btn:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

/* LOADING STATE */
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid transparent; border-top: 2px solid currentColor; border-radius: 50%; animation: btnLoading 1s linear infinite; }
@keyframes btnLoading { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
/* ==========================================================================
   ANCHOR OFFSET UTILITIES
   ========================================================================== */

/* Responsive anchor offsets */
@media (max-width: 768px) {
  html { scroll-padding-top: 80px; }
}

/* ==========================================================================
   SCROLL CONTROL UTILITIES
   ========================================================================== */

/* SCROLL BLOCKING */
.no-scroll { overflow: hidden !important; position: fixed !important; width: 100% !important; height: 100% !important; }
.no-scroll-y { overflow-y: hidden !important; }
.no-scroll-x { overflow-x: hidden !important; }

/* SCROLLBAR HIDING */
.hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ROBUST SCROLL LOCK */
.scroll-locked,
.scroll-locked body { overflow: hidden !important; position: fixed !important; width: 100% !important; height: 100% !important; }
