/*
 * Theme Custom Utilities
 * Classi custom e stilizzazioni di componenti specifici (Header, Footer, Breadcrumbs)
 */

/* Hover base per le card news (zoom in) */
.luiss-card-zoom-hover {
  overflow: hidden;
}
.luiss-card-zoom-hover img {
  transition: transform 0.8s ease-in-out;
}
.luiss-card-zoom-hover:hover img {
  transform: scale(1.05);
}

@media (max-width: 1163px) {
  .footer--contatti {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    row-gap: 0 !important;
  }
}

/* 
 * ==========================================
 * LAYOUT COMPONENTS (HEADER)
 * ========================================== 
 */
/* Applica l'altezza fissa solo al contenitore blu scuro principale */
header > .wp-block-group:first-child {
  box-sizing: border-box;
}
/* Propaga l'altezza 100% per centrare verticalmente i contenuti */
header > .wp-block-group:first-child,
header > .wp-block-group:first-child .wp-block-group,
header > .wp-block-group:first-child .wp-block-columns {
  height: 100% !important;
}
header .wp-block-image img,
header .wp-block-site-logo img {
  width: auto !important;
  object-fit: contain;
}

@media (min-width: 1164px) {
  header > .wp-block-group:first-child {
    height: 160px !important;
  }
  header .wp-block-image img,
  header .wp-block-site-logo img {
    max-height: 81px !important;
  }
  header .wp-block-site-logo.logo-3-righe img {
    max-height: 96px !important;
    height: 96px !important;
  }
}
@media (max-width: 1163px) {
  header > .wp-block-group:first-child {
    height: 102px !important;
  }
  header .wp-block-image img,
  header .wp-block-site-logo img {
    max-height: 52px !important;
  }
  header .nav-search > .wp-block-group {
    justify-content: space-between !important;
    flex-direction: row-reverse !important;
  }
  header > .wp-block-group:first-child .wp-block-group {
    padding-right: 0 !important;
  }
  header .wp-block-site-logo.logo-3-righe img {
    max-height: 62px !important;
    height: 62px !important;
  }
}

/* Off-canvas menu custom classes */
.mobile-menu-logo {
  width: 100%;
  margin-bottom: 30px;
}
.mobile-menu-logo .nav-logo {
  width: auto !important;
  flex-basis: auto !important;
}
.mobile-menu-tools {
  width: 100%;
  margin-top: 80px;
}
.mobile-menu-tools .nav-search {
  width: 100% !important;
  flex-basis: auto !important;
}

/* 
 * ==========================================
 * LAYOUT COMPONENTS (FOOTER)
 * ========================================== 
 */
footer {
  box-sizing: border-box;
}
footer > .wp-block-group {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}
footer .top-footer {
  flex-grow: 1;
  display: flex;
  align-items: center;
  width: 100%;
}
footer .top-footer > .wp-block-columns {
  height: 100%;
  width: 100%;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  align-items: center;
  justify-content: space-between;
}
footer .bottom-footer {
  display: flex;
  align-items: center;
  min-height: 48px;
}
footer .bottom-footer p {
  width: 100%;
}

@media (min-width: 1164px) {
  footer {
    height: 200px !important;
  }
  /* Regola da Linee Guida: icone footer a 16px su desktop */
  footer .wp-block-image.size-large {
    flex-basis: 16px !important;
  }
  footer .wp-block-image.size-large img {
    width: 16px !important;
    height: auto !important;
  }
}
@media (max-width: 1163px) {
  footer {
    height: 240px !important;
  }
  footer .top-footer > .wp-block-columns {
    gap: var(--wp--preset--spacing--8) !important;
  }
  footer .top-footer,
  footer .bottom-footer {
    padding-top: var(--wp--preset--spacing--10) !important;
    padding-bottom: var(--wp--preset--spacing--10) !important;
  }
  /* Regola da Linee Guida: icone footer a 14px su mobile */
  footer .wp-block-image.size-large {
    flex-basis: 14px !important;
  }
  footer .wp-block-image.size-large img {
    width: 14px !important;
    height: auto !important;
  }
  footer .logo-luiss img {
    max-height: 40px !important;
    height: 40px !important;
  }
}

/* 
 * ==========================================
 * BREADCRUMBS
 * ========================================== 
 */
.yoast-breadcrumbs {
  /* Rimuoviamo margini spuri e sovrascriviamo eventuali font-size inline di FSE */
  margin: 0 !important;
  padding: 0 !important;
  font-size: clamp(16px, 1.5vw, 20px) !important;
}

/* L'ultima voce corrente (Current Page) in grassetto */
.yoast-breadcrumbs .breadcrumb_last {
  font-weight: 700 !important;
}

/* Evitiamo che il simbolo "»" vada a capo da solo staccandosi dal testo */
.yoast-breadcrumbs span {
  white-space: normal;
  word-break: keep-all;
}

/* Reset dei link */
.yoast-breadcrumbs a {
  text-decoration: none !important;
}
.yoast-breadcrumbs a:hover {
  text-decoration: underline !important;
}
