/* ============================================================
   FLAEI CISL — Homepage CSS
   Caricato SOLO sulla homepage tramite libreria Drupal separata
   ============================================================ */

/* === VARIABILI COLORI === */
:root {
  --verde-flaei: #006d44;
  --verde-scuro: #004d30;
  --verde-footer: #003d28;
  --rosso-cta: #cc1a1a;
  --grigio-sfondo: #f4f6f4;
  --bordo-chiaro: #e0e8e0;
}

/* === FONT BASE === */
.hp-ticker,
.hp-kpi,
.hp-docs,
.hp-eventi,
.hp-servizi,
.hp-tv,
.hp-banner,
.hp-footer {
  font-family: 'Segoe UI', Arial, sans-serif;
}


/* ============================================================
   A — TICKER FLASH
   ============================================================ */

.hp-ticker {
  background: #004d30;
  height: 30px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hp-ticker__label {
  background: #fff;
  color: #004d30;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.hp-ticker__text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  height: 100%;
  position: relative;
}

.hp-ticker__scroll {
  display: inline-flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  padding-left: 24px;
  animation: ticker 15s linear infinite;
  color: #fff;
  font-size: 11px;
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hp-ticker__item {
  color: #fff;
  font-size: 11px;
  text-decoration: none;
}

.hp-ticker__item:hover {
  text-decoration: underline;
  color: rgba(255,255,255,0.85);
}

/* Link ticker sempre bianchi — anche dopo visita */
.hp-ticker__item a,
.hp-ticker__item a:visited {
  color: #fff;
  text-decoration: none;
}
.hp-ticker__item a:hover {
  text-decoration: underline;
  color: rgba(255,255,255,0.85);
}

.hp-ticker__sep {
  color: rgba(255,255,255,0.3);
  margin: 0 22px;
  font-size: 10px;
  flex-shrink: 0;
}

.hp-ticker__link {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 10px;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.hp-ticker__link:hover {
  color: rgba(255,255,255,0.75);
}


/* ============================================================
   STRISCE CROMATICHE
   ============================================================ */

.hp-stripe-white {
  height: 4px;
  background: #fff;
}

.hp-stripe-red {
  height: 4px;
  background: #cc1a1a;
}


/* ============================================================
   C — HERO SLIDER
   ============================================================ */

.hp-hero {
  background: linear-gradient(135deg, #006d44, #004d30);
  display: flex;
  min-height: 380px;
}

.hp-hero__slide-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 380px;
}

.hp-hero__slide {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  opacity: 0;
  transition: opacity 0.5s;
  visibility: hidden;
}

.hp-hero__slide.active {
  opacity: 1;
  visibility: visible;
}

/* Colonna immagine (sinistra) */
.hp-hero__slide-img {
  width: 45%;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #006d44, #004d30);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hp-hero__slide-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.hp-hero__slide-img:empty {
  display: none;
}

/* Colonna testo (destra) */
.hp-hero__slide-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px;
  min-width: 0;
}

.hp-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.hp-hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.hp-hero__badge-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.hp-hero__title {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
  max-width: 600px;
}

.hp-hero__excerpt {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 560px;
}

.hp-hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hp-hero__cta-primary {
  background: #fff;
  color: #006d44;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
}

.hp-hero__cta-secondary {
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
}

.hp-hero__date {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  margin-top: 16px;
}

.hp-hero__nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.30);
  box-sizing: border-box;
  z-index: 2;
}

.hp-hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.hp-hero__dot.active {
  width: 20px;
  background: #fff;
}

.hp-hero__counter {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

.hp-hero__arrow {
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.7;
  background: none;
  border: none;
  padding: 4px 8px;
}

.hp-hero__arrow:hover {
  opacity: 1;
}

.hp-hero__cta-panel {
  flex: 0 0 220px;
  background: rgba(0, 109, 68, 0.55);
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.hp-hero__cta-panel--icon {
  width: 48px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  position: relative;
  margin-bottom: 8px;
}

.hp-hero__cta-panel--title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hp-hero__cta-panel--text {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  line-height: 1.5;
}

.hp-hero__cta-panel--btn {
  background: #cc1a1a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 4px;
  text-decoration: none;
  width: 100%;
  text-align: center;
  display: block;
  box-sizing: border-box;
}

.hp-hero__cta-panel--note {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

@media (max-width: 599px) {
  .hp-hero__cta-panel {
    display: none;
  }
}


/* ============================================================
   D — KPI BAR
   ============================================================ */

.hp-kpi {
  background: #fff;
  border-bottom: 1px solid #e0e8e0;
  padding: 20px 0;
}

.hp-kpi__inner {
  display: flex;
  justify-content: center;
  gap: 0;
}

.hp-kpi__item {
  flex: 1;
  text-align: center;
  padding: 12px 20px;
  border-right: 1px solid #e0e8e0;
}

.hp-kpi__item:last-child {
  border-right: none;
}

.hp-kpi__number {
  font-size: 20px;
  font-weight: 800;
  color: #006d44;
  display: block;
}

.hp-kpi__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  display: block;
  margin-top: 2px;
}

@media (max-width: 599px) {
  .hp-kpi__inner {
    flex-wrap: wrap;
  }

  .hp-kpi__item {
    flex: 1 0 50%;
  }
}


/* ============================================================
   E — ULTIMI DOCUMENTI + SIDEBAR
   ============================================================ */

.hp-docs {
  background: #f4f6f4;
  padding: 40px 20px;
}

.hp-docs__header {
  border-left: 4px solid #006d44;
  padding-left: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hp-docs__title {
  font-size: 18px;
  font-weight: 800;
  color: #333;
  margin: 0;
}

.hp-docs__link-all {
  font-size: 12px;
  color: #006d44;
  text-decoration: none;
}

.hp-doc-card {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.hp-doc-card:last-child {
  border-bottom: none;
}

.hp-doc-card__img {
  width: 90px;
  height: 64px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.hp-doc-card__img--small {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.hp-doc-card__badge-ev {
  font-size: 9px;
  text-transform: uppercase;
  color: #006d44;
  font-weight: 700;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

.hp-doc-card__type {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  display: block;
}

.hp-doc-card__title {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}

.hp-doc-card__date {
  font-size: 11px;
  color: #888;
}

.hp-sidebar__box {
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 12px;
}

.hp-sidebar__box--green {
  background: #006d44;
  color: #fff;
}

.hp-sidebar__title--green {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  opacity: 0.6;
  margin: 0 0 6px;
}

.hp-sidebar__subtitle {
  font-size: 11px;
  line-height: 1.5;
  color: #fff;
  opacity: 0.85;
  margin: 0 0 11px;
}

.hp-sidebar__box--white {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.hp-sidebar__title--white {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #006d44;
  margin: 0 0 9px;
}

.hp-sidebar__btn {
  display: block;
  background: #fff;
  color: #006d44;
  font-weight: 700;
  text-align: center;
  padding: 8px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 11px;
}

.hp-sidebar__quicklinks {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hp-sidebar__ql-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  background: #f4f6f4;
  border-radius: 3px;
  font-size: 11px;
  color: #333;
  font-weight: 500;
  text-decoration: none;
}

.hp-sidebar__ql-item:hover {
  background: #e8ede8;
  color: #006d44;
  text-decoration: none;
}

.hp-sidebar__ql-arrow {
  color: #006d44;
  font-size: 9px;
  flex-shrink: 0;
}

@media (max-width: 599px) {
  .hp-docs {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   F — SLIDER EVENTI
   ============================================================ */

.hp-eventi {
  background: #fff;
  border-top: 1px solid #e8ede8;
  padding: 40px 0;
}

.hp-eventi__inner {
  padding: 0 20px;
}

.hp-eventi__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hp-eventi__bar {
  width: 4px;
  height: 24px;
  background: #006d44;
  flex-shrink: 0;
}

.hp-eventi__title {
  font-size: 18px;
  font-weight: 800;
  color: #333;
  margin: 0;
}

.hp-eventi__subtitle {
  font-size: 13px;
  color: #888;
  margin: 0;
}

.hp-eventi__arrows {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.hp-eventi__arrow {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-eventi__grid {
  overflow: hidden;
}

/* Clip overflow su tutti i wrapper intermedi Views Bootstrap */
.hp-eventi__grid > div,
.hp-eventi__grid .views-view-grid {
  overflow: hidden;
}
/* Track slider: .row dentro .views-view-grid è il track reale */
.hp-eventi__grid .row {
  display: flex !important;
  flex-wrap: nowrap !important;
  margin: 0 !important;
  transition: transform 0.35s ease;
  will-change: transform;
}
.hp-eventi__grid .row > div {
  flex: 0 0 25%;
  max-width: 25%;
  padding: 0 8px;
  box-sizing: border-box;
}

/* Freccia disabilitata (prima/ultima pagina) */
.hp-eventi__arrow--disabled {
  opacity: 0.35;
  pointer-events: none;
  border-color: #d0d8d0 !important;
  background: transparent !important;
  color: #555 !important;
}

.hp-ev-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #eee;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Wrapper immagine: posizione relativa per il badge data sovrapposto */
.hp-ev-card__img-wrap {
  display: block;
  position: relative;
  text-decoration: none !important;
}

.hp-ev-card__img {
  width: 100%;
  height: 140px;
  background: #c8ddd4 center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 10px;
}

.hp-ev-card__img--empty {
  background: linear-gradient(135deg, #006d44, #004d30);
}

/* Tag categoria: badge piccolo in basso a sinistra, come nel mockup */
.hp-ev-card__cat-tag {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.8px;
  position: relative;
  z-index: 1;
}

/* Badge data nel body card (sotto immagine) */
.hp-ev-card__date-badge {
  display: inline-block;
  background: #006d44;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

/* Colori per categoria */
.ev-cat--convegno .hp-ev-card__img--empty  { background: linear-gradient(135deg, #006d44, #004d30); }
.ev-cat--convegno .hp-ev-card__date-badge  { background: #006d44; }

.ev-cat--assemblea .hp-ev-card__img--empty { background: linear-gradient(135deg, #3a7a9e, #1a5a7e); }
.ev-cat--assemblea .hp-ev-card__date-badge { background: #3a7a9e; }

.ev-cat--congresso .hp-ev-card__img--empty { background: linear-gradient(135deg, #9e6a1a, #7a4d0d); }
.ev-cat--congresso .hp-ev-card__date-badge { background: #9e6a1a; }

.ev-cat--seminario .hp-ev-card__img--empty { background: linear-gradient(135deg, #4a9e6a, #2e7a4a); }
.ev-cat--seminario .hp-ev-card__date-badge { background: #4a9e6a; }

.ev-cat--formazione .hp-ev-card__img--empty { background: linear-gradient(135deg, #7a4a9e, #52307a); }
.ev-cat--formazione .hp-ev-card__date-badge { background: #7a4a9e; }

.ev-cat--altro .hp-ev-card__img--empty     { background: linear-gradient(135deg, #6a6a9e, #4a4a7a); }
.ev-cat--altro .hp-ev-card__date-badge     { background: #6a6a9e; }

.hp-ev-card__body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hp-ev-card__title {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  flex: 1;
  line-height: 1.4;
}

.hp-ev-card__title a {
  color: #222 !important;
  text-decoration: none !important;
}

.hp-ev-card__title a:hover {
  color: #006d44 !important;
}

.hp-ev-card__link {
  font-size: 12px;
  color: #006d44;
  text-decoration: none;
  font-weight: 600;
}

.hp-ev-card__link:hover {
  color: #004d30 !important;
  text-decoration: underline;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hp-eventi__grid .view-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .hp-eventi__grid .view-content {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   G — SLIDER SERVIZI
   ============================================================ */

.hp-servizi {
  background: #f0f4f0;
  border-top: 4px solid #006d44;
  padding: 40px 0;
}

.hp-servizi__inner {
  padding: 0 20px;
}

.hp-servizi__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hp-servizi__bar {
  width: 4px;
  height: 24px;
  background: #006d44;
  flex-shrink: 0;
}

.hp-servizi__title {
  font-size: 18px;
  font-weight: 800;
  color: #333;
  margin: 0;
}

.hp-servizi__subtitle {
  font-size: 13px;
  color: #888;
  margin: 0;
}

.hp-servizi__arrows {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.hp-servizi__arrow {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-servizi__grid {
  overflow: hidden;
}

.hp-servizi__grid > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.hp-serv-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #eee;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hp-serv-card__img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: #c8ddd4;
}

.hp-serv-card__body {
  padding: 12px;
  text-align: center;
}

.hp-serv-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

.hp-serv-card__link {
  font-size: 12px;
  color: #006d44;
  text-decoration: none;
  font-weight: 600;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hp-servizi__grid > div {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .hp-servizi__grid > div {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   H — FLAEI TV
   ============================================================ */

.hp-tv {
  background: #f0f4f0;
  border-top: 4px solid #006d44;
  padding: 40px 0;
}

.hp-tv__inner {
  padding: 0 20px;
}

.hp-tv__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hp-tv__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hp-tv__logo {
  height: 44px;
  width: auto;
  display: block;
}

.hp-tv__sep {
  width: 1px;
  height: 32px;
  background: #ccd8cc;
  flex-shrink: 0;
}

.hp-tv__subtitle {
  font-size: 13px;
  color: #777;
  line-height: 1.4;
}

.hp-tv__link-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #006d44;
  color: #006d44;
  padding: 8px 18px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.hp-tv__link-all:hover {
  background: #006d44;
  color: #fff;
}

.hp-tv__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
}

/* — Video principale grande — */
.hp-tv__main {
  display: block;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
  transition: box-shadow .15s, transform .15s;
}

.hp-tv__main:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.hp-tv__main-thumb {
  position: relative;
  width: 100%;
  height: 230px;
  background: linear-gradient(160deg, #1a2a1a, #0a150a);
  background-size: cover;
  background-position: center;
}

.hp-tv__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 109, 68, 0.25), rgba(0, 0, 0, 0.55));
}

.hp-tv__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hp-tv__play-icon {
  border-left: 16px solid #006d44;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
  width: 0;
  height: 0;
}

.hp-tv__badge-new {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #e03030;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 2;
}

.hp-tv__main-dur {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 2px;
  z-index: 2;
}

.hp-tv__main-info {
  padding: 14px 16px;
}

.hp-tv__main-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  margin: 0;
}

.hp-tv__main-meta {
  font-size: 11px;
  color: #999;
  margin-top: 5px;
}

/* — Lista 3 video laterali — */
.hp-tv__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hp-tv__item {
  display: flex;
  gap: 10px;
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  transition: box-shadow .15s;
}

.hp-tv__item:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.13);
}

.hp-tv__item-thumb {
  position: relative;
  width: 110px;
  height: 72px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a2a2a, #0a1515);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-tv__item-play {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-tv__item-play .hp-tv__play-icon {
  border-left: 8px solid #006d44;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-left: 2px;
}

.hp-tv__item-dur {
  position: absolute;
  bottom: 4px;
  right: 5px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 2px;
}

.hp-tv__item-body {
  padding: 8px 10px 8px 0;
  flex: 1;
}

.hp-tv__item-title {
  font-size: 11px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
  margin-bottom: 3px;
}

.hp-tv__item-meta {
  font-size: 9px;
  color: #aaa;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hp-tv__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 599px) {
  .hp-tv__grid {
    grid-template-columns: 1fr;
  }

  .hp-tv__header {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ============================================================
   I — BANNER TESSERAMENTO
   ============================================================ */

.hp-banner {
  position: relative;
  overflow: hidden;
}

.hp-banner img {
  width: 100%;
  display: block;
  height: auto;
}

.hp-banner__btn {
  position: absolute;
  bottom: 20px;
  right: 24px;
  background: #cc1a1a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 32px;
  border-radius: 4px;
  text-decoration: none;
}

@media (max-width: 599px) {
  .hp-banner img {
    height: auto;
  }
}


/* ============================================================
   L — FOOTER HOMEPAGE (layout 4 colonne)
   ============================================================ */

.hp-footer {
  background: #003d28;
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 0;
}

.hp-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.hp-footer__col-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hp-footer__logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.hp-footer__brand {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
}

.hp-footer__tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.4;
}

.hp-footer__desc {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.hp-footer__contacts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hp-footer__contacts li {
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hp-footer__links li {
  margin-bottom: 8px;
}

.hp-footer__links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 13px;
}

.hp-footer__links a:hover {
  color: #fff;
}

.hp-footer__social {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.hp-footer__social-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.hp-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.hp-footer__bottom-links {
  display: flex;
  gap: 16px;
}

.hp-footer__bottom-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hp-footer__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .hp-footer__inner {
    grid-template-columns: 1fr;
  }
}

/* Fix: wrapper Drupal Views dentro hero flex */
.hp-hero > .view,
.hp-hero > .views-element-container,
.hp-hero > [class*="js-view-dom-id"] { flex: 1; display: flex; overflow: hidden; min-width: 0; }


/* === COMPAT: ultime circolari block_homepage — stile mockup v3 === */
.hp-docs .views-row { margin-bottom: 8px; }
.hp-docs .views-row:last-child { margin-bottom: 0; }
.hp-docs .ultime-circ-item {
  background: #fff;
  border-radius: 5px;
  border-left: 3px solid #006d44;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  overflow: hidden;
}
.hp-docs .ultime-circ-item .d-flex { gap: 0; }
.hp-docs .ultime-circ-img { width: 88px; flex-shrink: 0; align-self: stretch; overflow: hidden; }
.hp-docs .ultime-circ-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.hp-docs .ultime-circ-img-placeholder { width: 100%; height: 100%; min-height: 72px; background: linear-gradient(135deg, #006d44, #004d30); border-radius: 0; }
.hp-docs .ultime-circ-text { padding: 9px 12px; flex: 1; display: flex; flex-direction: column; }
.hp-docs .ultime-circ-type { font-size: 8px; color: #006d44; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; }
.hp-docs .ultime-circ-title { font-size: 12px; font-weight: 700; color: #222; text-decoration: none; display: block; margin-bottom: 4px; line-height: 1.35; flex: 1; }
.hp-docs .ultime-circ-title:hover { color: #006d44; }
.hp-docs .ultime-circ-body { font-size: 10px; color: #666; margin: 0 0 5px; line-height: 1.5; }
.hp-docs .ultime-circ-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.hp-docs .ultime-circ-data { font-size: 9px; color: #aaa; }
.hp-docs .ultime-circ-sep { display: none; }
.hp-docs .badge-riservato { font-size: 9px; color: #fff; background: #cc1a1a; font-weight: 700; display: inline-block; align-self: flex-start; margin-bottom: 5px; padding: 1px 6px; border-radius: 2px; white-space: nowrap; }
.hp-docs .ultime-circ-img--blur img { filter: blur(4px); transform: scale(1.05); }
.hp-docs .ultime-circ-leggi { font-size: 9px; color: #006d44; text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.hp-docs .ultime-circ-leggi:hover { text-decoration: underline; }

/* ── Wrapper pagina — centrato con margini laterali ── */
body { background: #d6e0d6; }

.hp-wrap {
  max-width: 1320px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 2px 24px rgba(0,0,0,0.10);
}

@media (max-width: 1359px) {
  .hp-wrap { margin: 0 20px; }
}
@media (max-width: 599px) {
  .hp-wrap { margin: 0 8px; }
}

/* ── Hover link: previene il blu Bootstrap, mantiene i colori corretti ── */

/* CTA slider */
.hp-hero__cta-primary:hover   { background: #e8f4ee; color: #005533 !important; text-decoration: none !important; }
.hp-hero__cta-secondary:hover { background: rgba(255,255,255,0.12); color: #fff !important; text-decoration: none !important; }

/* CTA panel iscrizione */
.hp-hero__cta-panel--btn:hover { color: #fff !important; opacity: 0.9; text-decoration: none !important; }

/* Documenti */
.hp-docs__link-all:hover  { color: #004d30 !important; text-decoration: underline; }
.hp-doc-card__title:hover { color: #006d44 !important; text-decoration: none !important; }

/* Sidebar */
.hp-sidebar__btn:hover     { background: #e8f4ee; color: #005533 !important; text-decoration: none !important; }
.hp-sidebar__links a:hover { color: #004d30 !important; text-decoration: underline; }

/* Override globale nelle sezioni a sfondo verde/scuro */
.hp-hero a:hover,
.hp-ticker a:hover,
.hp-kpi a:hover,
.hp-banner a:hover { color: inherit !important; text-decoration: none !important; }

/* Badge "Riservato agli iscritti" in Ultimi Documenti (blocco E):
   evita lo stretch del flex-column, larghezza pari al testo */
.hp-docs .ultime-circ-text .badge-warning {
  align-self: flex-start;
  width: auto;
  display: inline-block;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 700;
  margin-bottom: 5px;
}

/* Banner Tesseramento (blocco I): link che avvolge l immagine */
.hp-banner__link { display: block; line-height: 0; }
.hp-banner__link:hover { text-decoration: none; }
