/* Videoteca SIC */
.sic-video-library {
  color: #12213f;
  background: #f5f8ff;
}

.sic-video-library__intro {
  position: relative;
  overflow: hidden;
  padding: 76px 0 58px;
  background: #ffffff;
}

.sic-video-library__intro::after {
  content: "";
  position: absolute;
  top: -190px;
  right: -140px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 75, 203, 0.1) 0, rgba(28, 75, 203, 0) 70%);
  pointer-events: none;
}

.sic-video-intro {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  align-items: center;
  gap: 68px;
}

.sic-video-eyebrow,
.sic-video-toolbar__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1c4bcb;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sic-video-eyebrow::before,
.sic-video-toolbar__kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: #ef7d00;
}

.sic-video-intro__copy h2 {
  max-width: 760px;
  margin: 15px 0 0;
  color: #12213f;
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.sic-video-intro__copy > p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #59677d;
  font-size: 17px;
  line-height: 1.72;
}

.sic-video-notice {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(28, 75, 203, 0.14);
  border-radius: 18px;
  background: linear-gradient(145deg, #f7f9ff 0%, #ffffff 100%);
  box-shadow: 0 14px 40px rgba(22, 47, 98, 0.08);
}

.sic-video-notice__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 20px;
  background: #1c4bcb;
}

.sic-video-notice strong {
  color: #173b93;
  font-size: 14px;
  font-weight: 600;
}

.sic-video-notice p {
  margin: 7px 0 0;
  color: #667389;
  font-size: 13px;
  line-height: 1.62;
}

.sic-video-library__archive {
  position: relative;
  padding: 52px 0 94px;
}

.sic-video-toolbar {
  position: relative;
  z-index: 2;
  padding: 32px;
  border: 1px solid rgba(28, 75, 203, 0.12);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(21, 46, 93, 0.09);
}

.sic-video-toolbar__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.sic-video-toolbar__heading h3 {
  margin: 7px 0 0;
  color: #12213f;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sic-video-filters {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.35fr) auto;
  align-items: end;
  gap: 20px;
}

.sic-video-field label {
  display: block;
  margin-bottom: 8px;
  color: #33415c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sic-video-select-wrap,
.sic-video-search-wrap {
  position: relative;
}

.sic-video-select,
.sic-video-search {
  width: 100% !important;
  height: 58px !important;
  margin: 0;
  border: 1px solid #d9e1ef;
  border-radius: 16px;
  color: #24334f !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.35;
  background: #f9fbff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.sic-video-select {
  padding: 0 45px 0 16px;
  appearance: none;
  cursor: pointer;
}

.sic-video-search {
  padding: 0 16px 0 46px !important;
}

.sic-video-select:focus,
.sic-video-search:focus {
  border-color: #1c4bcb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(28, 75, 203, 0.11);
}

.sic-video-select-wrap > .fa,
.sic-video-search-wrap > .fa {
  position: absolute;
  top: 50%;
  z-index: 1;
  color: #1c4bcb;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Select2 viene attivato dallo script storico del sito: la tendina visibile
   deve mantenere le stesse proporzioni del campo di ricerca. */
.sic-video-select-wrap .select2-container--bootstrap {
  width: 100% !important;
}

.sic-video-select-wrap .select2-container--bootstrap .select2-selection--single {
  height: 58px;
  padding: 0 46px 0 17px;
  border: 1px solid #d9e1ef;
  border-radius: 16px;
  color: #24334f;
  background: #f9fbff;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.sic-video-select-wrap .select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
  height: 56px;
  padding: 0;
  overflow: hidden;
  color: #24334f;
  font-size: 14px;
  line-height: 56px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sic-video-select-wrap .select2-container--bootstrap .select2-selection--single .select2-selection__arrow {
  display: none;
}

.sic-video-select-wrap .select2-container--bootstrap.select2-container--focus .select2-selection,
.sic-video-select-wrap .select2-container--bootstrap.select2-container--open .select2-selection {
  border-color: #1c4bcb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(28, 75, 203, 0.11);
}

.sic-video-select-wrap > .fa {
  right: 17px;
}

.sic-video-search-wrap > .fa {
  left: 17px;
}

.sic-video-field__hint {
  display: block;
  min-height: 16px;
  margin-top: 6px;
  color: #7a879b;
  font-size: 11px;
}

.sic-video-field--category {
  padding-bottom: 22px;
}

.sic-video-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 1px;
}

.sic-video-submit,
.sic-video-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.025em;
  background: #1c4bcb;
  box-shadow: 0 9px 24px rgba(28, 75, 203, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.sic-video-submit {
  min-width: 174px;
  padding: 0 21px;
}

.sic-video-submit:hover,
.sic-video-submit:focus,
.sic-video-load-more:hover,
.sic-video-load-more:focus {
  color: #ffffff;
  background: #153aa1;
  box-shadow: 0 12px 28px rgba(28, 75, 203, 0.29);
  transform: translateY(-2px);
}

.sic-video-reset {
  color: #667389;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sic-video-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 34px 2px 20px;
}

.sic-video-results-bar p {
  margin: 0;
  color: #173b93;
  font-size: 15px;
  font-weight: 600;
}

.sic-video-results-bar > span {
  color: #77849a;
  font-size: 12px;
}

.sic-video-server-message:empty {
  display: none;
}

.sic-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 560px;
  align-items: stretch;
  gap: 25px;
  width: 100%;
  text-align: left;
}

/* Il DataList legacy inserisce un <br> tra gli elementi: non deve occupare
   una cella della griglia. Ogni wrapper generato assume l'intera altezza. */
.sic-video-grid > br {
  display: none;
}

.sic-video-grid > span {
  display: block;
  height: 100%;
  min-width: 0;
}

.sic-video-grid > span[hidden] {
  display: none;
}

.sic-video-card {
  display: grid;
  grid-template-rows: 210px minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(28, 75, 203, 0.12);
  border-radius: 19px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(20, 44, 89, 0.075);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.sic-video-card:hover {
  border-color: rgba(28, 75, 203, 0.27);
  box-shadow: 0 18px 42px rgba(20, 44, 89, 0.14);
  transform: translateY(-4px);
}

.sic-video-card__media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #0c275d, #1c4bcb);
}

.sic-video-card__image-link {
  display: block;
  height: 100%;
  overflow: hidden;
}

.sic-video-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 280ms ease, opacity 180ms ease;
}

.sic-video-card:hover .sic-video-card__image {
  transform: scale(1.035);
}

.sic-video-card__image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 22, 55, 0.48), rgba(6, 22, 55, 0) 55%);
  pointer-events: none;
}

.sic-video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(12, 39, 93, 0.76);
  box-shadow: 0 10px 28px rgba(4, 18, 49, 0.3);
  transform: translate(-50%, -50%);
  transition: background 160ms ease, transform 160ms ease;
}

.sic-video-card__play .fa {
  margin-left: 3px;
  font-size: 17px;
}

.sic-video-card:hover .sic-video-card__play {
  background: #ef7d00;
  transform: translate(-50%, -50%) scale(1.06);
}

.sic-video-card__category {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(8, 30, 72, 0.82);
  backdrop-filter: blur(6px);
}

.sic-video-card__category:empty,
.sic-video-card__city:empty,
.sic-video-card__coauthor:empty {
  display: none;
}

.sic-video-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 23px 22px 21px;
}

.sic-video-card__author {
  min-height: 84px;
  overflow: hidden;
}

.sic-video-card__author-label {
  display: block;
  margin-bottom: 5px;
  color: #7b879b;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sic-video-card__author p {
  margin: 0;
  color: #203454;
  font-size: 13px;
  line-height: 1.45;
}

.sic-video-card__author strong {
  color: #173b93;
  font-weight: 600;
}

.sic-video-card__city,
.sic-video-card__coauthor {
  display: block;
  margin-top: 3px;
  color: #738096;
  font-size: 11px;
  font-style: italic;
  line-height: 1.45;
}

.sic-video-card__coauthor {
  display: -webkit-box;
  overflow: hidden;
  color: #56657d;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sic-video-card__title {
  display: -webkit-box;
  height: 90px;
  margin: 14px 0 17px;
  overflow: hidden;
  color: #12213f;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.48;
  letter-spacing: -0.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.sic-video-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #e8edf6;
}

.sic-video-card__code {
  color: #8691a4;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sic-video-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #1c4bcb;
  border-radius: 10px;
  color: #1c4bcb;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease;
}

.sic-video-card__button:hover,
.sic-video-card__button:focus {
  color: #ffffff;
  background: #1c4bcb;
}

.sic-video-card[hidden] {
  display: none !important;
}

.sic-video-card__search-data {
  display: none !important;
}

.sic-video-empty {
  padding: 64px 24px;
  border: 1px dashed #cbd6e8;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.sic-video-empty[hidden] {
  display: none;
}

.sic-video-empty .fa {
  color: #1c4bcb;
  font-size: 30px;
}

.sic-video-empty h3 {
  margin: 16px 0 7px;
  color: #12213f;
  font-size: 22px;
}

.sic-video-empty p {
  margin: 0;
  color: #69768b;
  font-size: 14px;
}

.sic-video-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 38px;
}

.sic-video-load-more {
  gap: 10px;
  min-width: 210px;
  padding: 0 24px;
}

.sic-video-load-more[hidden] {
  display: none;
}

@media (max-width: 1199px) {
  .sic-video-intro {
    gap: 40px;
  }

  .sic-video-filters {
    grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.25fr);
  }

  .sic-video-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
  }

  .sic-video-field--category {
    padding-bottom: 22px;
  }

  .sic-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .sic-video-library__intro {
    padding: 52px 0 42px;
  }

  .sic-video-intro {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .sic-video-intro__copy h2 {
    font-size: 34px;
  }

  .sic-video-intro__copy > p {
    font-size: 15px;
    line-height: 1.65;
  }

  .sic-video-notice {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    padding: 20px;
  }

  .sic-video-notice__icon {
    width: 42px;
    height: 42px;
  }

  .sic-video-library__archive {
    padding: 34px 0 68px;
  }

  .sic-video-toolbar {
    padding: 24px 20px;
    border-radius: 17px;
  }

  .sic-video-toolbar__heading {
    display: block;
  }

  .sic-video-toolbar__heading h3 {
    font-size: 22px;
  }

  .sic-video-filters {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sic-video-field--category {
    padding-bottom: 0;
  }

  .sic-video-actions {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .sic-video-submit {
    width: 100%;
  }

  .sic-video-results-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-top: 28px;
  }

  .sic-video-results-bar > span {
    line-height: 1.5;
  }

  .sic-video-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 550px;
    gap: 20px;
  }

  .sic-video-card {
    grid-template-rows: 205px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .sic-video-grid {
    grid-auto-rows: 540px;
  }

  .sic-video-card {
    grid-template-rows: 190px minmax(0, 1fr);
  }

  .sic-video-card__body {
    padding: 21px 19px 19px;
  }

  .sic-video-card__title {
    height: 84px;
    -webkit-line-clamp: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sic-video-card,
  .sic-video-card__image,
  .sic-video-card__play,
  .sic-video-submit,
  .sic-video-load-more {
    transition: none;
  }
}
