/*
Theme Name: Alperia
Theme URI: 
Author: Skylabs
Author URI: 
Description: 
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 5.7
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alperia
Tags: 

/* ─── TOKEN DI DESIGN ────────────────────────────────────────────────────── */
:root {
  --alperia-turchese-secondary-50: #EFF9FB;
  --alperia-turchese-secondary-600: #2DA0BD;
  --alperia-turchese-secondary-700: #1D7990;
  --alperia-turchese-secondary-900: #144754;
  --alperia-white: #FFFFFF;
  --alperia-gray: #333E48;
  --alperia-gray-100: #DADFE4;
  --alperia-gray-200: #B4C6D4;
  --alperia-error-60: #C1292E;
  --alperia-focus: #3F82CF;
	--wp--custom--column-padding-y: 40px
}


/* Mobile */
@media (max-width: 1023px) {
  body {
      --wp--style--root--padding-left: 20px;
      --wp--style--root--padding-right: 20px;
  }
}

/* Tablet */
@media (min-width: 1024px) and (max-width:1199px) {
  body {
      --wp--style--root--padding-left: 40px;
      --wp--style--root--padding-right: 40px;
  }
}

body,
html{
	scroll-behavior: smooth;
}

/**************************
* custom css store locator
**************************/

.alperia-store-container {
  margin-top: 20px;
}


.alperia-store-container #wpsl-checkbox-filter {
  margin: 0 0 40px 0;
  gap: 8px;
  display: flex;
  flex-wrap: wrap;
}


.alperia-store-category-item {
  position: relative;
}

.alperia-store-category-item-label {
 cursor: pointer;
 padding: 8px 16px;
 border: 1px solid var(--alperia-turchese-secondary-700);
 display: inline-block;
 border-radius: 8px;
 color: var(--alperia-turchese-secondary-700);
 font-weight: 500;
 line-height: 130%;
 transition: all  0.3s ease-in-out;
}

.alperia-store-radio:not(:disabled) + .alperia-store-category-item-label:hover,
.alperia-store-radio:not(:checked) + .alperia-store-category-item-label:hover {
  background-color:  var(--alperia-turchese-secondary-900);
  border-color: var(--alperia-turchese-secondary-900);
  color: var(--alperia-white);
}

/* .alperia-store-radio:focus + .alperia-store-category-item-label, */
.alperia-store-radio:not(:disabled):focus-visible + .alperia-store-category-item-label {
 outline: 4px solid var(--alperia-focus);
}

.alperia-store-radio:checked + .alperia-store-category-item-label {
  background-color: var(--alperia-turchese-secondary-700);
  border-color: var(--alperia-turchese-secondary-700);
  color: var(--alperia-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.alperia-store-radio:disabled +.alperia-store-category-item-label {
  opacity: 0.5;
  border-color: var(--alperia-gray-200);
  color: var(--alperia-gray-200);
  pointer-events: none;
}

.alperia-store-radio {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  appearance: none;
}

/**************************************
* Content list result, search and map.
****************************************/
.alperia-wrapper-store {
  display: flex;
  flex-direction: column-reverse;
}

.alperia-wrapper-store .alperia-content-search {
  background-color: transparent;
  padding: 0;
  margin-bottom: 40px;
}

.alperia-content-search #wpsl-search-wrap .alperia-label-search {
  color: var(--alperia-gray);
  font-weight: 500;
  margin-bottom: 8px;
  display: inline-block;
}

.alperia-content-search #wpsl-search-wrap .wpsl-input {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  width: 100%;
}

/* I used the IDs as selector in case of error the plugin removes the css classes */
.alperia-content-search #wpsl-search-wrap #wpsl-search-input {
  padding: 10px 46px 10px 14px;
  display: inline-block;
  width: calc(100% - 4px) !important; /* used from plugin !important */
  flex: 0 0 auto;
  background-color: var(--alperia-white);
  border-radius: 8px;
  border: 1px solid var(--alperia-gray-100);
  box-shadow: 0px 1px 4px 0px #0C0C0D1A;
  color: var(--alperia-gray);
  box-sizing: border-box;
  align-self: center;
}

.alperia-content-search #wpsl-search-wrap #wpsl-search-input:focus,
.alperia-content-search #wpsl-search-wrap #wpsl-search-input:focus-visible {
  outline: 2px solid var(--alperia-focus);
}

.alperia-content-search #wpsl-search-wrap #wpsl-search-input::placeholder {
  color: var(--alperia-gray-200);
}

.alperia-content-search #wpsl-search-wrap #wpsl-search-input.wpsl-error {
  border-color: var(--alperia-error-60);
}

/**************
* RESET BUTTON
**************/
.alperia-content-search-input {
  position: relative;
}

.alperia-content-search-input .alperia-reset-button-search {
  display: none;
  background-color: transparent;
  border: 0;
  overflow: 0;
  position: absolute;
  right: 10px; /* 10px of padding right + 10px right */
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: pointer;
}

.alperia-reset-button-search.show {
  display: inline-flex;
}

.alperia-reset-button-search .alperia-icon-close {
  display: flex;
}

#wpsl-gmap {
margin-bottom: 40px;
height: 276px;
border-radius: 8px;
}

/* Tablet map */
@media screen and (min-width: 767px) {
  #wpsl-gmap {
      height: 476px;
  }
}


#wpsl-wrap {
  margin-bottom: 40px;
  /*For box-shadow #wpsl-wrap #wpsl-result-list li */
  overflow: visible;
}

/******************
* Card list result
*******************/
#wpsl-result-list,
#wpsl-gmap {
  width: 100%;
}

#wpsl-result-list #wpsl-stores {
  height: 600px;
  overflow-x: hidden;
  overflow-y: scroll;
  margin-left: -16px;
  margin-right: -16px;
}

#wpsl-result-list .alperia-result-list-store {
  padding: 0 16px 16px 16px;
}

#wpsl-wrap #wpsl-result-list li {
  padding: 16px;
  -webkit-box-shadow: 0 16px 16px -4px rgba(12, 12, 13, 0.08);
  box-shadow: 0 16px 16px -4px rgba(12, 12, 13, 0.08);
  border-radius: 8px;
  margin-bottom: 10px;
  background-color: var(--alperia-white);
}

#wpsl-result-list li p.alperia-header-store {
  margin-bottom: 0;
}

#wpsl-result-list li .alperia-hours-summary {
  margin-top: 20px;
}

.alperia-content-time {
  margin-bottom: 20px;
}

#wpsl-wrap #wpsl-result-list .alperia-content-time .alperia-appointment-time {
  font-weight: 300;
}

.alperia-result-store-item .alperia-header-store strong {
  font-size: 28px;
  line-height: 130%;
  margin-bottom: 8px;
  display: inline-block;
}

.alperia-result-store-item .wpsl-street {
  font-size: 16px;
  line-height: 130%;
}

/********************
* Content Post store
*********************/
.alperia-result-store-item .wp-block-paragraph {
  font-weight: 300;
}

/*********************
* Action Buttons Card
**********************/
.alperia-result-store-item .wpsl-direction-wrap {
 text-align: center;
}


@media screen and (min-width: 1024px) { 
  .alperia-result-store-item .wpsl-direction-wrap:not(.booking-button) {
      text-align: left;
  }
  
  .alperia-result-store-item .booking-button {
     display: flex;
     justify-content: space-between;
     align-items: center;
     gap: 20px;
  }

.wpsl-direction-wrap .alperia-booking-store {
      margin-top: 0;
      width: auto;
      flex: 0 0 auto;
      flex: 1;
  }
}

.alperia-result-store-item .wpsl-directions,
.wpsl-info-actions .wpsl-directions,
.alperia-booking-store { 
  display: inline-block;
  font-size: 16px;
  line-height: 140%;
}

.alperia-result-store-item .wpsl-directions, 
.wpsl-info-actions .wpsl-directions {
  padding: 12px;
  margin: -12px;
  line-height: 140%;
  text-underline-offset: 4px;
  transition: all 0.3s ease-in-out;
  /* position: relative; */
}

/* TODO: DA valutare
.alperia-result-store-item .wpsl-directions::before,
.wpsl-info-actions .wpsl-directions:before {
  position: absolute;
  content: '';
  top: calc(100% - 12px);
  width: calc(100% - 24px);
  height: 1px;
  background-color: var(--alperia-gray);
  transition: background-color 0.3s ease-in-out;
} */

/* .alperia-result-store-item .wpsl-directions:hover::before,
.wpsl-info-actions .wpsl-directions:before {
  background-color: var(--alperia-turchese-secondary-600);
  height: 2px;
} */

.alperia-result-store-item .wpsl-directions:hover,
.wpsl-info-actions .wpsl-directions:hover,
.alperia-result-store-item .wpsl-directions:focus,
.wpsl-info-actions .wpsl-directions:focus-visible {
  color: var(--alperia-turchese-secondary-600);
  outline: none;
}

.alperia-booking-store {
  width: 100%;
  color: var(--alperia-turchese-secondary-700);
  background-color: var(--alperia-white);
  border: 1px solid var(--alperia-turchese-secondary-700);
  padding: 12px 8px;
  border-radius: 8px;
  margin-top: 20px;
  box-sizing: border-box;
  transition: all 0.3s ease-in-out;
  display: inline-block;
  text-decoration: none;
}

.alperia-booking-store:hover {
  background-color: var(--alperia-turchese-secondary-50);
  box-shadow: 0 0 0 2px var(--alperia-turchese-secondary-700);
}

.alperia-booking-store:focus,
.alperia-booking-store:focus-visible {
  background-color: var(--alperia-turchese-secondary-50);
  box-shadow: 0 0 0 4px var(--alperia-focus);
  outline: none;
}

/***************
* Pop up store
***************/
/*
* FALLBACK STYLES — Pop-up info window (default Google Maps style).
*
* These rules apply when the "Use the default style for the info window?"
* option is ENABLED in the WP Store Locator plugin settings.
*
* In that case the InfoBox script is NOT loaded and Google Maps renders
* its native info window; these selectors override its padding, size,
* background, and shadow to match the Alperia design.
*
* If that option is DISABLED, InfoBox replaces the native window and
* these selectors have no effect.
*/
.gm-style .gm-style-iw-c,
.wpsl-gmap-canvas .wpsl-infobox {
  /*style inline*/
 padding: 16px !important;
 max-width: none !important;
 max-height: none !important;
 min-width: 220px !important;
 border-radius: 8px;
 background-color: var(--alperia-white);
  -webkit-box-shadow: 5px 12px 16px -4px rgba(16, 24, 40, 0.08);
  box-shadow: 5px 12px 16px -4px rgba(16, 24, 40, 0.08);
  border: none;
  min-height: 134px;
  text-align: center;
}

@media screen and (min-width: 576px) { 
  .gm-style .gm-style-iw-c,
  .wpsl-gmap-canvas .wpsl-infobox { 
          min-width: 328px !important;
  }
}

.wpsl-gmap-canvas .wpsl-infobox {
  transform: translateX(-50%) !important;
}

.wpsl-gmap-canvas .wpsl-infobox:before,
.gm-style .gm-style-iw-c:before,
.wpsl-gmap-canvas .wpsl-infobox::after,
.gm-style .gm-style-iw-c:after {
  left: 50%;
  transform: translateX(-50%);
}

/* When is disalble Use the default style for the info window? */
.gm-style-iw-ch {
  padding-top: 0;
  display: none;
}

.gm-style-iw-d {
  padding: 0;
  /*style inline*/
  max-height: none !important;
  overflow: visible !important;
}

.gm-style-iw-chr {
  display: flex;
  justify-content: flex-end;
}

.gm-style-iw-chr .gm-ui-hover-effect  {
  width: auto !important;
  height: auto !important;
  padding: 12px !important;
  margin: -12px !important;
}

.gm-style-iw-chr .gm-ui-hover-effect  span {
  margin: 0 !important;
  background-color: var(--alperia-turchese-secondary-700);
}

.gm-style .gm-style-iw-c > img,
.wpsl-gmap-canvas .wpsl-infobox > img { 
  width: 24px;
  height: 24px;
  /* area for icon */
  padding: 12px;
  margin: -12px !important;
}

/**********************
* END FALLBACK STYLES
**********************/
.alperia-title-pop-up {
  font-size: 16px;
  line-height: 130%;
  font-weight: 500;
  color: var(--alperia-gray);
  margin: 24px 0 8px;
}

#wpsl-gmap .wpsl-info-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin: 20px 0 0 !important;
}

.alperia-content-address .alperia-address {
  font-size: 16px;
  line-height: 130%;
}

.gm-style-iw-t .alperia-title-pop-up {
  margin-top: 0;
}

/**************************************
* Desktop list result,search and map.
****************************************/
@media screen and (min-width: 1024px) {
  .alperia-wrapper-store {
      flex-direction: row;
      gap: 20px
  }

  .wpsl-search-results-wrap,
  #wpsl-gmap {
      flex: 0 0 auto;
  }

  #wpsl-gmap {
      width: calc(66.66666667% - 10px); /* gap 20 / 2 */
      height: 656px;
  }

  .wpsl-search-results-wrap {
      width: calc(33.33333333% - 10px); /* gap 20 / 2 */
      height: 700px;
  }

  .alperia-store-container #wpsl-checkbox-filter {
    justify-content: center;
  }
}


#wpsl-gmap *:not(img) {
  box-sizing: border-box !important;
}

/*********************
* Global style Store
**********************/
.alperia-result-store-item .wp-block-paragraph strong,
.alperia-result-store-item .wp-block-paragraph b,
.alperia-result-store-item .wpsl-directions,
.wpsl-info-actions .wpsl-directions,
.alperia-result-store-item .wpsl-street,
.alperia-result-store-item .alperia-header-store strong,
.alperia-result-store-item .alperia-label-button,
.alperia-bold,
.alperia-booking-store {
  font-weight: 500;
}

/* ── Blocco News ─────────────────────────────────────────────────────────── */
.news-carousel-wrap {
  overflow: hidden;
}
.news-carousel-wrap .wp-block-post-template {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  transition: transform 0.35s ease;
  will-change: transform;
  padding: 0 !important;
  margin: 0 !important;
}
/* 5 card visibili: (100% - 4×12px gap) / 5 ≈ 20% - 10px */
.news-carousel-wrap .wp-block-post-template > li {
  flex: 0 0 calc(20% - 10px) !important;
  max-width: calc(20% - 10px) !important;
  list-style: none !important;
  min-width: 0;
  margin-block-start: 0 !important; /* annulla il gap flow-layout di WP su * + * */
}
/* Featured image: dimensioni Figma (315×188.5) + zoom-in hover */
.news-carousel-wrap .wp-block-post-featured-image {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 315 / 188.5; /* contenitore fissa le dimensioni */
  width: 100%;
}
.news-carousel-wrap .wp-block-post-featured-image a {
  display: block;
  height: 100%;
  overflow: hidden;
}
.news-carousel-wrap .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.news-carousel-wrap .wp-block-post-featured-image a:hover img {
  transform: scale(1.07);
}
/* Categoria come badge */
.news-carousel-wrap .wp-block-post-terms a {
  display: inline-block;
  background: #fff;
  border: 0.75px solid #b4c6d4;
  border-radius: 8px;
  padding: 4px 6px;
  color: #333e48;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.3;
}
/* Frecce navigazione */
.news-slider-nav { display: flex; align-items: center; gap: 10px; }
.news-slider-btn {
  height: 34px; width: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #333e48; border-radius: 4px;
  background: none; cursor: pointer; color: #333e48; padding: 5px;
  transition: opacity .2s;
  flex-shrink: 0;
}
/* Stato disabilitato via aria-disabled (bottone rimane nel tab-order) */
.news-slider-btn--disabled,
.news-slider-btn[aria-disabled="true"] {
  border-color: #b4c6d4; color: #b4c6d4; cursor: default;
}
.news-slider-btn:hover:not(.news-slider-btn--disabled):not([aria-disabled="true"]) { opacity: .7; }

/* Focus visible – bottoni freccia */
.news-slider-btn:focus-visible {
  outline: 3px solid #00547a;
  outline-offset: 3px;
  border-radius: 4px;
}
/* Focus visible – link immagine, titolo, categoria */
.news-carousel-wrap .wp-block-post-featured-image a:focus-visible,
.news-carousel-wrap .wp-block-post-title a:focus-visible,
.news-carousel-wrap .wp-block-post-terms a:focus-visible {
  outline: 3px solid #00547a;
  outline-offset: 2px;
  border-radius: 2px;
}
/* Focus visible – wrap track (navigazione ← →) */
.news-carousel-wrap:focus-visible {
  outline: 3px solid #00547a;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Reduced motion: disabilita transizioni carrousel */
@media (prefers-reduced-motion: reduce) {
  .news-carousel-wrap .wp-block-post-template { transition: none !important; }
  .news-carousel-wrap .wp-block-post-featured-image img { transition: none !important; }
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Blocco News – Mobile ────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /*
   * Niente padding destro sulla sezione: il carousel deve arrivare al bordo
   * del viewport per mostrare il peek della card successiva.
   * overflow-x: hidden evita la scrollbar orizzontale.
   */
  .news-section-block {
    padding: 60px 0 60px 16px !important;
    overflow-x: hidden;
  }
  /* Heading e footer recuperano il padding destro da soli */
  .news-section-block > .wp-block-heading {
    padding-right: 16px;
  }
  .news-section-block > .wp-block-group:last-child {
    padding-right: 16px;
    box-sizing: border-box;
    justify-content: space-between !important;
  }
  /* Heading più piccolo */
  .news-section-block h2.wp-block-heading {
    font-size: 26px !important;
    letter-spacing: -0.02em;
  }
  /* 1 card visibile (315px fissi) + peek della card successiva */
  .news-carousel-wrap .wp-block-post-template > li {
    flex: 0 0 315px !important;
    max-width: 315px !important;
  }
  /* Gap più ampio tra le card su mobile */
  .news-carousel-wrap .wp-block-post-template {
    gap: 28px !important;
  }
  /* CTA come link testuale con sottolineatura (stile Figma mobile) */
  .news-section-block .wp-block-button.tertiary-cta .wp-block-button__link {
    background: none !important;
    color: #333e48 !important;
    border: none !important;
    border-bottom: 0.75px solid #333e48 !important;
    border-radius: 0 !important;
    padding: 0 0 4px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
  }
}

/* WP FORMS FUNNEL */
#otp-popup .otp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

#otp-popup .otp-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    z-index: 9999;
    text-align: center;
    min-width: 300px;
}

#otp-popup #otp-input {
    display: block;
    width: 100%;
    font-size: 2rem;
    letter-spacing: 0.5rem;
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    border: 2px solid #ccc;
    border-radius: 4px;
}

#otp-popup #otp-verify {
    background: #e8440a;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#otp-popup #otp-verify:hover {
    background: #c73a08;
}

/* ── ARTICLE SINGLE TEMPLATE ──────────────────────────────────────────────── */

/* Hero image — .article-hero è la figure stessa (alignfull wp-block-post-featured-image) */
.article-single .article-hero {
    padding: 20px 60px;
    box-sizing: border-box;
    margin: 0 !important; /* annulla alignfull che aggiunge margini negativi */
}
.article-single .article-hero img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px !important;
}

/* Body wrapper */
.article-body-wrap {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* 3-column grid — sovrascrive il padding laterale iniettato da wp-block-columns/is-layout-flex */
.article-columns {
    align-items: flex-start;
    gap: 20px !important;
    max-width: none !important;  /* annulla il max-width: 1200px iniettato da article-body-wrap (layout: constrained) */
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* ── Left share sidebar ─────────────────────────────────────────────────── */
.article-col-share {
    flex: 0 0 23.86% !important;
    width: 23.86% !important;
    min-width: 0;
    align-self: flex-start;
    position: sticky;
    top: 120px;
}
/* Azzera margin-block-start iniettato da WP layout sul primo figlio */
.article-col-share > * {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}
.article-share-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.article-share__label {
    font-size: 16px;
    color: #5c6670;
    font-weight: 500;
    text-align: left;
    letter-spacing: 0.03em;
}
.article-share__btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-share__btn:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
}
/* Icon toggle inside share button */
.article-share__btn .icon-share { display: flex; }
.article-share__btn .icon-close { display: none; }
.article-share__btn[aria-expanded="true"] .icon-share { display: none; }
.article-share__btn[aria-expanded="true"] .icon-close { display: flex; }

/* Toggle button + panel in riga */
.article-share__controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Share panel — box con bordo e ombra */
.article-share__panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 162px;
    height: 54px;
    padding: 0 16px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid rgba(218, 223, 228, 1);
    background: #ffffff;
    box-shadow:
        0 4px 8px -2px rgba(0, 0, 0, 0.08),
        0 2px 4px -1px rgba(0, 0, 0, 0.04);
}
.article-share__panel[hidden] { display: none; }

/* Share action buttons/links (copy, FB, LI) */
.article-share__action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.2s;
}
.article-share__action:hover { opacity: 0.75; }
.article-share__action:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
}

/* "Seguici su" social links */
.article-social {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.article-social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: opacity 0.2s;
}
.article-social__link:hover { opacity: 0.75; }
.article-social__link:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
}

/* ── Center: Article content ────────────────────────────────────────────── */
.article-col-content {
    flex: 1 1 0% !important;
    min-width: 0;
}

/* Category pills */
.article-category-terms .wp-block-post-terms__content a {
    display: inline-block;
    border: 1px solid #b4c6d4;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 300;
    color: #333e48;
    text-decoration: none;
    margin-right: 6px;
    margin-bottom: 12px;
}
.article-category-terms .wp-block-post-terms__content a:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
}

/* Meta row (date · time) */
.article-meta {
    display: flex !important;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}
.article-date,
.article-read-time {
    font-size: 14px !important;
    font-weight: 300 !important;
    color: #5c6670 !important;
}
.article-meta-sep {
    font-size: 14px !important;
    color: #b4c6d4 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* H1 */
.article-title {
    font-size: clamp(32px, 4vw, 52px) !important;
    font-weight: 500 !important;
    color: #333e48 !important;
    line-height: 1.15 !important;
    margin-bottom: 32px !important;
}

/* ── Table of contents ──────────────────────────────────────────────────── */
.article-toc {
    border-left: 3px solid #b4c6d4;
    padding: 16px 20px;
    margin-bottom: 40px;
    background: #f8fbfc;
    border-radius: 0 6px 6px 0;
}
.article-toc__title {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5c6670;
    margin: 0 0 12px;
}
.article-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.article-toc__item--h2 { padding-left: 0; }
.article-toc__item--h3 { padding-left: 20px; }
.article-toc__link {
    font-size: 14px;
    font-weight: 500;
    color: #00547a;
    text-decoration: none;
    line-height: 1.4;
    display: inline-block;
}
.article-toc__link:hover { text-decoration: underline; }
.article-toc__item--h3 .article-toc__link {
    font-size: 13px;
    font-weight: 300;
    color: #333e48;
}
.article-toc__link:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
}

/* ── Article body typography ────────────────────────────────────────────── */
.article-body h2 {
    font-size: 26px;
    font-weight: 500;
    color: #333e48;
    margin-top: 40px;
    margin-bottom: 16px;
}
.article-body h3 {
    font-size: 20px;
    font-weight: 500;
    color: #333e48;
    margin-top: 28px;
    margin-bottom: 12px;
}
.article-body p {
    font-size: 16px;
    font-weight: 300;
    color: #333e48;
    line-height: 1.7;
    margin-bottom: 16px;
}
.article-body ul,
.article-body ol {
    padding-left: 20px;
    margin-bottom: 20px;
}
.article-body li {
    font-size: 16px;
    font-weight: 300;
    color: #333e48;
    line-height: 1.7;
    margin-bottom: 6px;
}
.article-body img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}
.article-body figure {
    margin: 32px 0;
}

/* ── Right sidebar: Related card ───────────────────────────────────────── */
.article-col-sidebar {
    flex: 0 0 23.86% !important;
    width: 23.86% !important;
    min-width: 0;
    align-self: flex-start;
    position: sticky;
    top: 120px;
}
/* Azzera margin-block-start iniettato da WP layout sui figli del sidebar */
.article-col-sidebar > *,
.article-col-sidebar > .wp-block-shortcode {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}
/* Rimuove il <br> aggiunto da wpautop sul blocco shortcode */
.article-col-sidebar br { display: none; }
.article-related-card {
    background: #fff;
    border: 1px solid #e0eaf0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,84,122,0.07);
}
.article-related-card__heading {
    font-size: 13px;
    font-weight: 500;
    color: #5c6670;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 16px 16px 0;
    margin: 0 0 12px;
    /* h2 reso visivamente come label secondaria */
    font-family: inherit;
    line-height: 1.3;
}
.article-related-card__img-wrap {
    position: relative;
    overflow: hidden;
}
.article-related-card__img-wrap img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.article-related-card__badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #00547a;
    padding: 6px 14px;
    line-height: 1.3;
}
.article-related-card__body {
    padding: 16px;
}
.article-related-card__title {
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #333e48 !important;
    margin: 0 0 6px !important;
    line-height: 1.3 !important;
}
.article-related-card__desc {
    font-size: 13px;
    font-weight: 300;
    color: #5c6670;
    margin: 0 0 12px;
    line-height: 1.5;
}
.article-related-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.article-related-card__features li {
    font-size: 13px;
    font-weight: 300;
    color: #333e48;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}
.article-related-card__features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 10px;
    height: 7px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 7'%3E%3Cpath d='M1 3.5L3.5 6 9 1' stroke='%231D7990' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}
.article-related-card__cta {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #00547a;
    text-decoration: underline;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}
.article-related-card__cta:hover { color: #0083be; }
.article-related-card__cta:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) and (min-width: 769px) {
    .article-col-share {
        flex: 0 0 22% !important;
        width: 22% !important;
    }
    .article-col-sidebar {
        flex: 0 0 22% !important;
        width: 22% !important;
    }
}

@media (max-width: 768px) {
    /* ── Stack colonne verticalmente: contenuto → card → share ────────── */
    .article-columns {
        flex-direction: column !important;
        flex-wrap: nowrap !important; /* sovrascrive is-not-stacked-on-mobile */
    }
    .article-col-content  { order: 1; }
    .article-col-sidebar  {
        order: 2;
        width: 100% !important;
        min-width: unset;
        flex: 0 0 auto !important;
        align-self: auto;
        position: static; /* rimuove il sticky desktop */
    }
    .article-col-share {
        order: 3;
        width: 100% !important;
        min-width: unset;
        flex: 0 0 auto !important;
        align-self: auto;
        position: static; /* rimuove il sticky desktop */
    }

    /* ── Related card: statica e full-width ───────────────────────────── */
    .article-related-card {
        position: static;
        border-radius: 8px;
    }

    /* ── Share / Social: verticale e allineata a sinistra ────────────── */
    .article-share-wrap {
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: nowrap;
        position: static;
        padding: 32px 0 24px;
        gap: 14px;
        border-top: 1px solid #e0eaf0;
    }
    .article-share__label {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 14px;
        font-weight: 400;
    }
    .article-share__btn svg {
        width: 32px;
        height: 32px;
    }
    /* Share panel: icone più grandi su mobile */
    .article-share__action svg {
        width: 28px;
        height: 28px;
    }
    .article-share__panel {
        width: auto;
        height: 54px;
        gap: 16px;
        padding: 0 20px;
    }
    /* Social "Seguici su": icone orizzontali e più grandi */
    .article-social {
        flex-direction: row;
        gap: 24px;
    }
    .article-social__link {
        width: 48px;
        height: 48px;
    }
    .article-social__link svg {
        width: 48px;
        height: 48px;
    }

    /* ── Body wrap: padding verticale ridotto ─────────────────────────── */
    .article-body-wrap {
        padding-top: 24px !important;
        padding-bottom: 40px !important;
    }
    /* ── Columns: padding laterale mobile (sovrascrive WP layout) ──────── */
    .article-columns {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* ── Hero ─────────────────────────────────────────────────────────── */
    .article-single .article-hero {
        padding: 20px 16px;
    }
    .article-single .article-hero img {
        height: 193px;
        object-fit: cover;
        border-radius: 8px;
    }
}

/* Post thumbnail (wp-post-image): border-radius globale su tutti i breakpoint */
img.wp-post-image {
    border-radius: 8px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .article-share__action,
    .article-social__link,
    .article-toc__link {
        transition: none;
    }
}
/* ── END ARTICLE SINGLE TEMPLATE ─────────────────────────────────────────── */

/* ── MAGAZINE ARCHIVE (home.html + archive.html) ──────────────────────────── */

/* Header pagina */
.magazine-archive__header {
    text-align: center;
    padding-top: 60px !important;
    padding-bottom: 21px !important;
}
.magazine-archive__header h1.wp-block-heading,
.magazine-archive__header .wp-block-post-title {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Separatore tra pills e "In evidenza" */
hr.magazine-separator {
    border: none;
    border-top: 1px solid #dadfe4;
    margin: 4px 60px 20px;
    display: block;
}

/* ── Filtro categorie ─────────────────────────────────────────────────────── */
.magazine-filter {
    /* 70px totali: (70 - 38px chip) / 2 = 16px top/bottom */
    padding: 16px 60px;
}
.magazine-filter__list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    align-items: center;
}
.magazine-filter__tab {
    display: inline-block;
    padding: 12px 16px;
    border: 1px solid #1d7990;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;         /* 38px totali = 12+14+12 */
    color: #1d7990;
    background: #ffffff;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    white-space: nowrap;
}
.magazine-filter__tab:hover {
    background: #eff9fb;
    color: #1d7990;
}
.magazine-filter__tab.is-active {
    background: #1d7990;
    border-color: #1d7990;
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.magazine-filter__tab:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ── In evidenza ──────────────────────────────────────────────────────────── */
.magazine-featured {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px 60px;
}
.magazine-featured__section-label {
    font-size: 36px !important;
    font-weight: 500 !important;
    color: #00547a !important;
    text-align: center;
    margin: 0 0 40px !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-family: inherit;
}
.magazine-featured__inner {
    display: flex;
    gap: 48px;
    align-items: stretch; /* entrambe le colonne stessa altezza → CTA allineato al fondo immagine */
}
.magazine-featured__content {
    flex: 0 0 38%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.magazine-featured__img-link {
    flex: 1;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    order: 1; /* immagine a destra su desktop (il content ha order: 0 default → va a sinistra) */
}
.magazine-featured__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    transition: transform 0.35s ease;
}
.magazine-featured__img-link:hover .magazine-featured__img {
    transform: scale(1.03);
}
.magazine-featured__meta {
    display: flex;
    flex-direction: column; /* pill categoria sopra, data+tempo sotto */
    gap: 8px;
    margin-bottom: 16px;
}
.magazine-featured__cat {
    display: inline-block;
    align-self: flex-start; /* la pill non si allunga a tutta la larghezza */
    background: #5c6670; /* Grey 4 — contrasto 5.5:1 su bianco, WCAG AA ✓ */
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 14px;       /* Body/Size Small */
    font-weight: 500;      /* Medium */
    line-height: 1.3;      /* 130% */
    letter-spacing: 0;
    color: #ffffff;
    text-decoration: none;
}
.magazine-featured__cat:hover,
.magazine-featured__cat:focus-visible {
    background: #333e48;
    color: #ffffff;
    outline: 2px solid #00547a;
    outline-offset: 2px;
}
.magazine-featured__date {
    font-size: 15px;
    font-weight: 300;
    color: #5c6670;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.magazine-featured__title {
    font-size: 36px !important;
    font-weight: 500 !important;
    color: #333e48 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 16px !important;
    font-family: inherit;
}
.magazine-featured__title a {
    color: inherit;
    text-decoration: none;
    /* theme.json imposta font-size:16px su tutti i <a> — override esplicito */
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    font-family: inherit !important;
}
.magazine-featured__title a:hover { color: #00547a; }
.magazine-featured__title a:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
    border-radius: 2px;
}
.magazine-featured__excerpt {
    font-size: 16px;
    font-weight: 300;
    color: #5c6670;
    line-height: 1.3;
    letter-spacing: 0;
    margin: 0 0 24px;
    display: -webkit-box;
    /* -webkit-line-clamp: 4; */
    /* line-clamp: 4; */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1; /* occupa lo spazio disponibile, spinge il CTA in fondo */
}
.magazine-featured__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #00547a;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
    margin-top: auto; /* si ancora al fondo della colonna, allineato al fondo immagine */
    align-self: flex-start;
}
.magazine-featured__cta:hover { border-bottom-color: #00547a; }
.magazine-featured__cta:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Magazine Archive – Mobile ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .magazine-filter {
        padding: 10px 16px;
    }
    .magazine-filter__list {
        gap: 10px;
        justify-content: flex-start;
    }
    .magazine-featured {
        padding: 0 20px 40px;
    }
    .magazine-featured__section-label {
        font-size: 28px !important;
        margin-bottom: 24px !important;
    }
    .magazine-featured__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }
    .magazine-featured__img-link {
        order: 0; /* su mobile l'immagine è già prima nel DOM → nessun reorder necessario */
        width: 100%;
        flex: none;
    }
    .magazine-featured__content {
        flex: none;
        width: 100%;
    }
    .magazine-featured__title {
        font-size: 22px !important;
        letter-spacing: -0.02em !important;
    }
    .magazine-featured__cta {
        margin-top: 24px; /* su mobile reimposta: non c'è immagine da allineare, usa spazio fisso */
    }
    .magazine-archive__header {
        padding-top: 40px !important;
        padding-left: 20px;
        padding-right: 20px;
    }
    .magazine-archive__header h1.wp-block-heading,
    .magazine-archive__header .wp-block-post-title {
        font-size: 36px !important;
    }
    .magazine-archive__header p {
        font-size: 18px !important;
    }
    hr.magazine-separator {
        margin-left: 16px;
        margin-right: 16px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .magazine-featured__img { transition: none; }
    .magazine-filter__tab { transition: none; }
}
/* ── END MAGAZINE ARCHIVE ─────────────────────────────────────────────────── */

/* ── Category Archive Grid ───────────────────────────────────────────────── */
.cat-grid-section {
    padding: 40px 60px 60px;
    max-width: 1320px;
    margin: 0 auto;
}
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.cat-grid__item--hidden {
    display: none;
}
.cat-grid__img-wrap,
.cat-grid__cat-wrap {
    display: block; /* evita che wpautop inserisca <p> intorno agli <a> interni */
}
.cat-grid__img-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 16px;
}
.cat-grid__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.cat-grid__img-link:hover .cat-grid__img,
.cat-grid__img-link:focus-visible .cat-grid__img {
    transform: scale(1.03);
}
.cat-grid__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cat-grid__cat {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-width: 20px;
    height: 28px;
    padding: 0 6px;
    gap: 4px;
    border-radius: 8px;
    border: 0.75px solid rgba(180, 198, 212, 1);
    background: #ffffff;
    color: rgba(51, 62, 72, 1);
    font-size: 14px; /* Body/Size Small */
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
}
.cat-grid__cat:hover,
.cat-grid__cat:focus-visible {
    border-color: rgba(51, 62, 72, 0.5);
    background: rgba(180, 198, 212, 0.15);
}
.cat-grid__meta {
    font-size: 13px;
    font-weight: 100;
    color: #5c6670;
    display: flex;
    gap: 4px;
    align-items: center;
}
.cat-grid__title {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #333e48;
    margin: 0;
}
.cat-grid__title a {
    color: inherit;
    text-decoration: none;
    font-size: inherit !important;
}
.cat-grid__title a:hover,
.cat-grid__title a:focus-visible {
    text-decoration: underline;
}
.cat-grid__empty {
    color: #5c6670;
    text-align: center;
    padding: 40px 0;
}
.cat-grid__footer {
    text-align: center;
    margin-top: 40px;
}
.cat-grid__load-more {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    text-decoration: underline;
    color: #333e48;
}
.cat-grid__load-more:hover {
    color: #00547a;
}
.cat-grid__load-more:focus-visible {
    outline: 3px solid #00547a;
    outline-offset: 4px;
    border-radius: 2px;
    color: #00547a;
}
@media (prefers-reduced-motion: reduce) {
    .cat-grid__img { transition: none; }
}
@media (max-width: 768px) {
    .cat-grid-section {
        padding: 24px 20px 40px;
    }
    .cat-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
/* ── END CATEGORY ARCHIVE GRID ───────────────────────────────────────────── */

/* ── PAGE STYLE GLOBAL ───────────────────────────────────────────── */
.alp-title-section-page {
    font-size: 26px;
    line-height: 120%;
    font-weight: 500;
    letter-spacing: -2%;
    margin: 0 0 20px 0;
}


@media screen and (min-width: 1024px) {
    .alp-title-section-page {
        font-size: 36px;
        margin: 0 0 40px 0;
    }
}

.alp-content-trustpilot p {
    margin: 0 !important;
    display: none;
}

.alp-col-padding {
    padding-top: 20px;
    padding-bottom: 20px;
}

@media (min-width: 1024px) {
    .alp-col-padding {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

@media (min-width: 1024px) {
    .alp-col-padding-inline {
		max-width: 1440px;
    }
}

@media (min-width: 1500px) {
    .alp-col-padding-inline {
		 padding-left: 60px !important;
		padding-right: 60px !important;
    }
}


.alp-col-padding-section-full {
    padding-top: 40px;
    padding-bottom: 40px;
}

@media (min-width: 1024px) {
    .alp-col-padding-section-full {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

.alp-col-padding .alp-offers-slider {
    margin-top: 0;
}

.primary-cta .wp-block-button__link.wp-element-button {
    line-height: 130%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/*
 * Banner preventive
 */

 .alp-banner-preventive {
    -webkit-box-shadow: 0px 16px 32px -4px rgba(12, 12, 13, 0.1);
    box-shadow: 0px 16px 32px -4px rgba(12, 12, 13, 0.1);
 }

/* ── END STYLE GLOBAL ───────────────────────────────────────────── */

/* ── PAGE STYLE PA ───────────────────────────────────────────── */
.benefits-title {
    margin-bottom: 8px;
}

@media (min-width: 1024px) {
    .benefits-title {
        margin-bottom: 40px;
    }
}
/* ── PAGE STYLE PAL ───────────────────────────────────────────── */

/* ── BLOCK SERVICE ───────────────────────────────────────────── */
.alp-wrapper-service .alp-cards-item {
    border: 0.5px solid #DADFE4;
    -webkit-box-shadow: 0px 4px 4px -1px rgba(12, 12, 13, 0.1);
    box-shadow: 0px 16px 32px -4px rgba(12, 12, 13, 0.1);
}
/* ── END BLOCK SERVICE ───────────────────────────────────────────── */


