.form-floating._100-width {
  margin-bottom: 4rem;
}

@media (max-width: 767px) {
  .form-floating._100-width {
    margin-bottom: 1rem;
  }
}

.form-floating textarea {
  min-height: auto !important;
  height: auto !important;
}
.fascia-capannone{
  grid-template-columns: 1.5fr 1fr;
}
.img_capannone img{
  aspect-ratio: inherit!important;
  width: 100%;
}

/* --- INTRO SECTION --- */
.page_news .intro-section, .page_index .intro-section {
  padding-top: 80px;
  padding-bottom: 60px;
  background-color: #fff;
}

.page_news .intro-grid, .page_index .intro-grid {
  display: -ms-grid;
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 colonne uguali */
  grid-gap: 60px;
  gap: 60px;
  align-items: start;
}

/* Sovrascrittura specifica per il titolo h1 dentro intro-title */
.page_news .intro-title h1, .page_index .intro-title h1 {
  font-size: 38px; /* Mantiene coerenza con h1 base ma cambia font */
  font-weight: 900;
  color: #222;
  text-transform: uppercase;
  line-height: 1.1;
  margin-top: 0; /* Rimuove il margin-top standard di Webflow per allineamento */
  margin-bottom: 20px;
}

/* Sovrascrittura specifica per il paragrafo */
.page_news .intro-desc p, .page_index .intro-desc p {
  font-size: 16px;
  color: #444;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 0;
}

.page_news .intro-desc strong, .page_index .intro-desc strong {
  font-weight: 500;
  color: #000;
}

/* --- GALLERY GRID SECTION --- */
.page_news .gallery-section, .page_index .gallery-section {
  padding-bottom: 100px;
}

.page_news .grid-layout, .page_index .grid-layout {
  display: grid;
  /* repeat(4, 1fr) significa: crea 4 colonne di uguale larghezza (1 frazione l'una) */
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; /* Spazio tra le card */
  width: 100%;
}

.page_news .grid-layout > a, .page_index .grid-layout > a {
  display: block;
  width: 100%;
}

/* --- CARD STYLING --- */
.page_news .card-news, .page_index .card-news {
  width: 100%;
  position: relative;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #e2e2e2; /* Fallback colore main style */
  cursor: pointer;
  transition: transform 0.3s ease;
  /* Fix per safari border-radius clipping */
  -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
}

.page_news .card-news:hover, .page_index .card-news:hover {
  transform: translateY(-5px);
}

/* Overlay Gradiente Scuro */
.page_news .card-news::after, .page_index .card-news::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.page_news .card-news-content, .page_index .card-news-content {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 30px;
  width: 100%;
  z-index: 2;
}

.page_news .card-news-content p, .page_index .card-news-content p {
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 0; /* Rimuove margine p del main style */
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}


/* Mobile Landscape/Portrait (max-width: 767px) */
@media screen and (max-width: 767px) {
  .page_news .intro-grid {
    grid-template-columns: 1fr; /* Stack verticale */
    grid-gap: 20px;
    gap: 20px;
  }

  .page_news .grid-layout {
    grid-template-columns: 1fr; /* 1 colonna */
  }

  .page_news .card {
    height: 320px; /* Altezza ridotta su mobile */
  }

  .page_news .card-content {
    padding: 20px;
  }
}

.language-switch .dropdown-toggle {
  background: none;
  border: 0;
  gap: .5rem;
}

.language-switch .flag {
  width: 1.275rem;
  height: .85rem;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

.language-switch .dropdown-menu {
  min-width: 0;
}

.language-switch .dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: Work Sans, sans-serif;
  padding-right: 2rem;
}

.language-switch .dropdown-item.active {
  background-color: #eaf0f7;
  color: var(--text--default--black);
}

@media screen and (max-width: 991px) {
  .language-switch .dropdown-toggle {
    border-top: 1px solid var(--brand--neutrals--card-grey);
  }

  .language-switch .dropdown-menu {
    position: static;
    border: 0;
    padding: 0 0 1rem 2rem;
    background: none;
  }
}

#iub-legalDoc {
  width: 100%;
  padding: 0 12px 2rem;
  overflow-wrap: anywhere;
}

#iub-legalDoc h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 1rem;
}

#iub-legalDoc h2 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
}

#iub-legalDoc h3 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 2rem 0 .75rem;
}

#iub-legalDoc h4,
#iub-legalDoc h5 {
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 1.5rem 0 .5rem;
}

#iub-legalDoc ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

#iub-legalDoc img {
  max-width: 100%;
  height: auto;
}

@media screen and (max-width: 767px) {
  #iub-legalDoc h1 {
    font-size: 1.875rem;
  }

  #iub-legalDoc h2 {
    font-size: 1.5rem;
  }
}

.error-page {
    padding-top: 6rem;
    padding-bottom: 6rem;
    background: linear-gradient(180deg, var(--brand--color--red-light) 0%, var(--brand--neutrals--white) 65%);
}

.error-page .w-container {
    flex-direction: column;
    align-items: stretch;
}

.error-page .error-hero {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 3rem;
}

.error-page .error-code {
    color: var(--brand--color--blue);
    font-family: "Poppins", sans-serif;
    font-size: clamp(7rem, 16vw, 13rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.error-page .heading-h1 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    line-height: 1.2;
}

.error-page .error-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.error-page .error-button {
    display: inline-block;
    padding: 1rem 1.75rem;
    border-radius: 4px;
    background-color: var(--brand--color--blue);
    color: var(--brand--neutrals--white);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.error-page .error-button:hover,
.error-page .error-button:focus-visible {
    background-color: var(--brand--neutrals--black);
}

.error-page .error-links {
    width: 100%;
    margin-top: 5rem;
}

.error-page .error-label {
    margin: 0 0 1.25rem;
    color: var(--brand--color--blue);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.error-page .error-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.error-page .error-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--brand--neutrals--stroke-grey);
    border-radius: 1rem;
    background-color: var(--brand--neutrals--white);
    color: var(--text--default--black);
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.error-page .error-card:hover,
.error-page .error-card:focus-visible {
    border-color: var(--brand--color--blue);
    box-shadow: 0 8px 24px rgba(35, 110, 168, 0.12);
}

.error-page .error-card img {
    flex: none;
    width: 1.25rem;
}

@media screen and (max-width: 767px) {
    .error-page {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .error-page .error-hero {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .error-page .heading-h1 {
        font-size: 1.75rem;
    }
}
