/*
Theme Name: FIV2026
Theme URI: https://federvela.it/
Author: Renato Taffi x AZLab
Description: Tema WP FIV Nazionale
Version: 2.1
*/

/* --- Font HelveticaNeue -------------------------------------------------- */
html, body {
  overflow-x: hidden;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueThin.otf") format("opentype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueThinItalic.otf") format("opentype");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueUltraLight.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueUltraLightItalic.otf") format("opentype");
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueLight.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueLightItalic.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueRoman.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueMedium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueMediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueBold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueBoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueHeavy.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueHeavyItalic.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueBlack.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueBlackItalic.otf") format("opentype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

/* --- Stili generali ------------------------------------------------------ */

html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0; // 1
  padding: 0;
  font-family: "HelveticaNeue", Arial, sans-serif;
  background: #fff;
  color: #003c6e;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "HelveticaNeue", Arial, sans-serif;
  color: #003c6e;
}

a {
  color: #003c6e;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: none;
}

p {
  color: #003c6e;
  font-weight: 100 !important;
  font-size: large;
}

a:hover {
  color: #c4001c;
  text-decoration: none;
}

.fiv-page-content img,
.fiv-page-content img,
.fiv-page-content video,
.fiv-page-content iframe {
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  height: auto;
  border-radius: 0;
  opacity: 0;
  transform: translateY(40px);
  animation: fiv-media-fadein 2.5s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes fiv-media-fadein {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.fiv-page-content img,
.fiv-page-content video,
.fiv-page-content iframe {
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  height: auto;
  border-radius: 0;
}
.fiv-stories-main { background: #fff; padding: 2em 0; }
.fiv-stories-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2em; }
.fiv-story { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); overflow: hidden; }
.fiv-story-img img { width: 100%; display: block; }
.fiv-story-tags { margin-bottom: 0.5em; }
.fiv-story-tag { display: inline-block; background: #e30613; color: #fff; font-size: 0.85em; padding: 0.2em 0.7em; border-radius: 4px; margin-right: 0.5em; }
.fiv-story-excerpt { color: #444; font-size: 1em; margin-bottom: 1em; }
@media (max-width: 600px) { .fiv-stories-list { grid-template-columns: 1fr; } }

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg img {
  width: 100vw;
  max-width: 100vw;
  height: 60vh;
  object-fit: cover;
  filter: brightness(0.7);
  opacity: 0;
  background: var(--media-bg, transparent);
  transform: translateY(40px);
  animation: fiv-media-fadein 2.5s cubic-bezier(.4,0,.2,1) forwards;
}
.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
}
.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}
.btn-primary {
  background: #e30613;
  color: #fff;
  padding: 0.8em 2em;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: #b8000f;
}

/* Hero Block con video */
.hero-block {
  position: relative;
  width: 100vw;
  height: 70vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-video video {
  width: 100vw;
  max-width: 100vw;
  height: 70vh;
  object-fit: cover;
  display: block;
  opacity: 0;
  background: var(--media-bg, #000);
  transform: translateY(40px);
  animation: fiv-media-fadein 2.5s cubic-bezier(.4,0,.2,1) forwards;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg,rgba(0,0,0,0.45) 0%,rgba(0,0,0,0.15) 100%);
  text-align: center;
}
.hero-overlay h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.hero-overlay p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* Features Section */
.features {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 3rem 0;
  background: #f7f7f7;
}
.feature {
  text-align: center;
  max-width: 220px;
}
.feature img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0;
  background: var(--media-bg, transparent);
  transform: translateY(40px);
  animation: fiv-media-fadein 2.5s cubic-bezier(.4,0,.2,1) forwards;
}
.feature h2 {
  font-size: 1.3rem;
  color: #e30613;
  margin-bottom: 0.5rem;
}
.feature p {
  font-size: 1rem;
  color: #222;
}

/* Shop Preview */
.shop-preview {
  padding: 3rem 0;
  background: #fff;
}
.shop-preview h2 {
  text-align: center;
  font-size: 2rem;
  color: #222;
  margin-bottom: 2rem;
}
.products {
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.product {
  background: #f7f7f7;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.5rem;
  text-align: center;
  width: 220px;
}
.product img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
  opacity: var(--media-opacity, 1);
  background: var(--media-bg, transparent);
}
.product h3 {
  font-size: 1.1rem;
  color: #e30613;
  margin-bottom: 1rem;
}
.btn-secondary {
  background: #222;
  color: #fff;
  padding: 0.5em 1.5em;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-secondary:hover {
  background: #e30613;
}

/* Slider Section */
.slider {
  position: relative;
  width: 100vw;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.slider-images {
  display: flex;
  transition: transform 0.7s cubic-bezier(.77,0,.18,1);
}
.slider-image {
  min-width: 100vw;
  height: 400px;
  object-fit: cover;
}
.slider-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
}
.slider-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e30613;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.slider-dot.active {
  opacity: 1;
  background: #e30613;
}

/* Animazioni base */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* About Section */
.main-nav-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}
.menu-left, .menu-right {
  flex: 1;
  display: flex;
  justify-content: space-around;
  text-transform: uppercase;
}
.menu-left a, .menu-right a {
  text-decoration: none;
  color: #003c6e;
  font-weight: 300;
  padding: 0.5em 1em;
  transition: color 0.2s;
  text-transform: uppercase;
}
.menu-left a:hover, .menu-right a:hover {
  text-decoration: none;
  color: #c4001c;
  font-weight: 600;
  padding: 0.5em 1em;
  transition: color 0.6s;
}
.menu-left {
  justify-content: space-around;
}

.logo-center {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 2rem;
}
.logo-center img {
  height: 48px;
  width: auto;
}

.logo-mobile {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}
.logo-mobile img {
  height: 32px;
  width: auto;
}
.about-section {
  padding: 4rem 2rem;
  text-align: center;
}
.about-section h1 {
  font-size: 2.5rem;
  color: #e30613;
  margin-bottom: 1.5rem;
}
.about-section p {
  font-size: 1.2rem;
  color: #222;
  margin-bottom: 2rem;
}
.about-section img {
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  opacity: var(--media-opacity, 1);
  background: var(--media-bg, transparent);
}
/* Utility classes per trasparenza media */
.media-opacity-80 img,
.media-opacity-80 video {
  --media-opacity: 0.8;
}
.media-opacity-50 img,
.media-opacity-50 video {
  --media-opacity: 0.5;
}

/* News Section */
.news-section {
  padding: 4rem 2rem;
}
.news-section h1 {
  font-size: 2.2rem;
  color: #e30613;
  margin-bottom: 2rem;
  text-align: center;
}
.news-list {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 0 auto;
}
.news-list li {
  background: #f7f7f7;
  margin-bottom: 1rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.news-list a {
  color: #222;
  font-weight: 600;
  text-decoration: none;
}
.news-list span {
  color: #888;
  font-size: 0.95rem;
}

/* Contact Section */
.contact-section {
  padding: 4rem 2rem;
  text-align: center;
}
.contact-section h1 {
  font-size: 2.2rem;
  color: #e30613;
  margin-bottom: 2rem;
}
.contact-form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.contact-form label {
  text-align: left;
  font-weight: 600;
  color: #222;
}
.contact-form input,
.contact-form textarea {
  padding: 0.7em;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}
.contact-form button {
  align-self: flex-end;
}

/* Blocchi homepage */
.slider-block, .features-block, .shop-preview-block {
  margin: 0 auto;
  max-width: 1200px;
  padding: 3rem 1rem;
}

/* Fullwidth Blocks */
.wp-blocks-fullwidth > * {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  box-sizing: border-box;
  padding: 0;
}
@media (max-width: 900px) {
  .wp-blocks-fullwidth > * {
    padding: 0;
  }
}

@media (max-width: 900px) {
  .mobile-bottom-nav {
    position: fixed;
    left: 0.65em;
    bottom: 0.65em;
    border-radius: 0.8em;
    width: 95vw;
    height: 5em;
    background: rgba(255,255,255,0.7);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.5);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1002;
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    transform: translateY(0);
    opacity: 1;
  }
  .mobile-bottom-nav--hidden {
    transform: translateY(140%);
    opacity: 0;
  }
  .mobile-bottom-nav .nav-link {
    color: #003c6e;
    font-size: 1.6rem;
    background: none;
    border: none;
    outline: none;
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 12px;
    transition: background 0.2s;
    padding: .2em 0 0 0 !important;
    margin-right: .6em;
  }
  .mobile-bottom-nav .nav-link:active,
  .mobile-bottom-nav .nav-link:focus {
    background: #f7f7f7;
  }
  .mobile-menu-button {
    font-size: 1.6em !important;
    padding: .2em 0 0 0 !important;
    margin-right: .6em;
  }
}

/* Side Menu */
.side-menu {
  font-family: "HelveticaNeue", Arial, sans-serif;
  position: fixed;
  top: 0;
  left: -90vw;
  width: 75vw;
  height: 100vh;
  background: rgba(255,255,255,0.65);
  box-shadow: 2px 0 24px rgba(0,60,110,0.8);
  z-index: 1003;
  transition: left 0.35s cubic-bezier(.77,0,.18,1);
  padding: 2rem 0.3rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  margin-bottom: 3em;
}
.side-menu.open {
  left: 0;
}
.close-menu {
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #e30613;
  cursor: pointer;
}
.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.side-menu .menu {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.side-menu .menu-item a {
  color: #222;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5em 0;
}

.side-menu .side-menu-list svg {
  margin: 0 .5em 0 0;
}

/* Side Menu custom list */
.side-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.side-menu-list > li {
  margin: 0.2rem 0x;
  border-bottom: 1px solid #eee;
}
.side-menu-list > li > a {
  color: #003c6e !important;
  font-size: 1.05em;
  font-weight: 500;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}
.side-menu-list > li > a:hover, .side-menu-list > li > a:active {
  color: #e30613 !important;
}
.submenu {
  list-style: none;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}
.submenu li a {
  font-weight: 300;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}
.submenu li a:hover {
  color: #e30613;
}

/* Overlay */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.35);
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.side-menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 900px) {
  #site-header, #main-nav {
    display: none;
  }
  .wp-blocks-fullwidth {
    margin-top: 1.9em;
  }
}

.submenu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(.77,0,.18,1), opacity 0.25s;
}
.submenu.open {
  max-height: 20em;
  opacity: 1;
}

.menu-icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 0.7em;
  margin-bottom: 2px;
}

/* Header Desktop */
@media (min-width: 901px) {
  .desktop-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 90px;
  /* Menu header desktop: bianco con trasparenza 30% */
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
    box-shadow: none;
    z-index: 1005;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s, height 0.3s, box-shadow 0.3s;
  }
  .desktop-header.scrolled {
    background: #fff;
    height: 60px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }
  .desktop-header .logo img {
    height: 60px;
    transition: height 0.3s;
  }
  .desktop-header.scrolled .logo img {
    height: 40px;
  }
  #main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
  #main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  #main-nav li a {
    color: #222;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5em 0.8em;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
  }
  #main-nav li a:hover {
    background: #f7f7f7;
    color: #e30613;
  }
  .side-menu,
  .side-menu-overlay,
  .mobile-bottom-nav {
    display: none !important;
    visibility: hidden !important;
  }
}
#site-footer {
  background: #fff;
  border-top: 1px solid #444;
  color: #000;
  padding: 2rem 1rem;
  margin-bottom: 6em;
  text-align: center;
}
/* CSS per Counter pagina La Federazione */
/* ===== FIV Stats Cards ===== */
.fv-stats{
  margin: 28px 0;
}

.fv-stats__grid{
  gap: 18px;
}

/* card */
.fv-stat-card{
  border: 6px solid rgba(0,0,0,.10);
  padding: 26px 18px 22px;
  text-align: center;
  background: #fff;
  height: 100%;
}

/* icona */
.fv-stat-card__icon img{
  width: 92px;
  height: 92px;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
}

/* numero */
.fv-stat-card__number{
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0a5ea8;
  font-size: 44px;
  line-height: 1.05;
}

/* separatore */
.fv-stat-card__sep{
  width: 70%;
  margin: 12px auto 16px;
  border: none;
  border-top: 2px solid rgba(0,0,0,.12);
}

/* label */
.fv-stat-card__label{
  margin: 0;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(0,0,0,.78);
  line-height: 1.25;
}

/* responsive */
@media (max-width: 960px){
  .fv-stat-card__number{ font-size: 38px; }
}

/* STILE PER BLOCCHI VIDEO  */
/* =========================================================
   FVV - Netflix-like expanding video + Futuristic HUD overlay
   Namespace: .fvv
   ========================================================= */

/* --- Teaser / card --- */
.fvv{ position: relative; }

.fvv__media{
  position: relative;
  max-width: 520px;           /* teaser piccolo: cambia qui se vuoi */
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 48px rgba(0,0,0,.35);
}

.fvv__video{
  width: 100%;
  height: auto;
  display: block;
  will-change: transform;
  transform-origin: top left;
  filter: contrast(1.03) saturate(1.08);
}

/* Play button */
.fvv__play{
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.45);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(6px);
  display: inline-grid;
  place-items: center;
}

.fvv__play:focus{
  outline: 2px solid rgba(255,255,255,.45);
  outline-offset: 3px;
}

/* --- Modal overlay --- */
.fvv__modal[hidden]{ display: none !important; }

.fvv__modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
}

/* Backdrop fade */
.fvv__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  opacity: 0;
  transition: opacity .22s ease;
}
.fvv.fvv--open .fvv__backdrop{ opacity: 1; }

/* Stage (center player) */
.fvv__stage{
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1100px, 92vw);
  height: min(620px, 70vh);
  transform: translate(-50%, -50%);
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
}

/* When video is inside the stage */
.fvv__stage .fvv__video{
  width: 100%;
  height: 100%;
  object-fit: cover; /* cambia in contain se non vuoi crop */
}

/* Close button */
.fvv__close{
  position: absolute;
  top: 40px;
  right: 40px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.55);
  color: #fff;
  cursor: pointer;
  z-index: 4;
  display: inline-grid;
  place-items: center;
}

.fvv__close:focus{
  outline: 2px solid rgba(255,255,255,.45);
  outline-offset: 3px;
}

/* Lock scroll when modal open (JS adds fvv-lock on html/body) */
html.fvv-lock, body.fvv-lock { overflow: hidden; }

/* Mobile tweaks */
@media (max-width: 768px){
  .fvv__media{ max-width: 100%; }
  .fvv__stage{
    width: 94vw;
    height: min(72vh, 560px);
    border-radius: 18px;
  }
}

/* =========================================================
   Futuristic HUD overlay (optional, used inside .fvv__stage)
   You already have HTML: <div class="fx-hud">...</div>
   ========================================================= */

.fvv .fx-hud{
  --hud: rgba(0, 255, 240, .85);
  --hud2: rgba(120, 255, 240, .25);
  --shade: rgba(0, 0, 0, .55);

  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* tint + vignette */
.fvv .fx-hud::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(0,0,0,0) 30%, var(--shade) 78%),
    linear-gradient(180deg, rgba(0,255,240,.08), rgba(0,0,0,.22));
  mix-blend-mode: multiply;
}

/* scanlines static */
.fvv .fx-hud::after{
  content:"";
  position:absolute;
  inset:0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,.12) 0px,
    rgba(0,0,0,.12) 1px,
    rgba(0,0,0,0) 3px,
    rgba(0,0,0,0) 4px
  );
  opacity: .22;
  mix-blend-mode: multiply;
}

/* corners frame */
.fvv .fx-corners{
  position:absolute;
  inset: 16px;
  border: 1px solid var(--hud2);
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 0 24px rgba(0,255,240,.12);
}

.fvv .fx-corners::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, var(--hud), transparent 40%) top left/140px 2px no-repeat,
    linear-gradient(180deg, var(--hud), transparent 40%) top left/2px 140px no-repeat,
    linear-gradient(270deg, var(--hud), transparent 40%) top right/140px 2px no-repeat,
    linear-gradient(180deg, var(--hud), transparent 40%) top right/2px 140px no-repeat,
    linear-gradient(90deg, var(--hud), transparent 40%) bottom left/140px 2px no-repeat,
    linear-gradient(0deg, var(--hud), transparent 40%) bottom left/2px 140px no-repeat,
    linear-gradient(270deg, var(--hud), transparent 40%) bottom right/140px 2px no-repeat,
    linear-gradient(0deg, var(--hud), transparent 40%) bottom right/2px 140px no-repeat;
  opacity: .75;
  filter: drop-shadow(0 0 10px rgba(0,255,240,.22));
}

/* grid */
.fvv .fx-grid{
  position:absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0,255,240,.10) 1px, transparent 1px) 0 0/64px 64px,
    linear-gradient(to bottom, rgba(0,255,240,.08) 1px, transparent 1px) 0 0/64px 64px;
  opacity: .20;
  mix-blend-mode: screen;
  transform: translateZ(0);
}

/* scan sweep */
.fvv .fx-scan{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,255,240,.16) 50%, transparent 60%);
  opacity: 0;
  animation: fvv-scan 4.8s linear infinite;
  mix-blend-mode: screen;
}

@keyframes fvv-scan{
  0%   { transform: translateY(-60%); opacity: 0; }
  10%  { opacity: .35; }
  50%  { opacity: .25; }
  100% { transform: translateY(60%); opacity: 0; }
}

/* noise (CSS-only, no external file) */
.fvv .fx-noise{
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.06) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.05) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,.04) 0 1px, transparent 2px);
  background-size: 120px 120px, 160px 160px, 200px 200px;
  opacity: .10;
  mix-blend-mode: overlay;
  animation: fvv-noise 1.2s steps(2) infinite;
}

@keyframes fvv-noise{
  0% { transform: translate(0,0); }
  25% { transform: translate(-2%,1%); }
  50% { transform: translate(1%,-2%); }
  75% { transform: translate(2%,2%); }
  100% { transform: translate(0,0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .fvv .fx-scan,
  .fvv .fx-noise{
    animation: none !important;
  }
}

/* Portal layer (video durante l'animazione) */
.fvv__portal{
  position: fixed;
  left: 0; top: 0;
  z-index: 1045;       /* sotto alle modali Bootstrap (1055) ma sopra al contenuto */
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  will-change: transform, width, height;
}

/* timing più lento e smooth */
.fvv .fvv__video{
  transition: transform 520ms cubic-bezier(.2,.8,.2,1);
}
.fvv .fvv__backdrop{
  transition: opacity 320ms ease;
}

/* PATCH: cover e stabilità durante portal animation */
.fvv__portal .fvv__video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fvv__portal{
  transition: border-radius 520ms cubic-bezier(.2,.8,.2,1);
}

.fvv.fvv--open .fvv__portal{
  border-radius: 22px;
}

.fvv__video{
  backface-visibility: hidden;
  transform: translateZ(0);
}