html {
    font-size: 14px;
}


.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    background: #e9ecef;
    color: rgba(255, 255, 255, 0.87);
    font-family: "Montserrat", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", Verdana, sans-serif;
    font-size: 18px;
}

fieldset legend {
    font-size: 18px;
}

form h3 {
    margin-top: 40px;
    margin-bottom: 20px;
}


.container-main {
    min-height: calc(100vh - 385px);
}

.frase {
    font-style: italic;
    font-size: 36px;
    text-transform: none;
}

.firma {
    margin: -10px 0 25px 0;
    font-weight: 600;
    font-style: italic;
    /* font-size: 20px; */
}

element.style {
    margin: -10px 0 25px 0;
    font-weight: 600;
    font-style: italic;
    /* font-size: 20px; */
}
#wm-header {
    background: #6a94c9;
    padding-bottom: 0;
    padding-left: 20px;
    font-size: 14px;
    color: #FFF;
    overflow: hidden;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 5px solid;
    border-image: linear-gradient(to right, green 33%, white 33%, white 66%, red 66%, red 100%) 5;
}

    #wm-header a {
        color: #FFF;
    }

    #wm-header .activelang {
        opacity: .6;
        cursor: default;
    }

    #wm-header .other,
    #wm-header li.h-lan {
        display: none;
    }

    .header__logo {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .logo-container{
        display: flex;
        justify-content: center;
        align-items: center;
        width: 220px;
    }

    .header__logo img,  img.logo {
        width: 100px;
        object-fit: contain;
    }


    .h-spacer{
        width: 220px;
    }

.logo-title {
    font-family: "Chau Philomene One", sans-serif;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
    font-size: 66px;
    letter-spacing: 3px;
    text-align: center;
    text-shadow: 0px 3px 3px rgba(0, 0, 0, 0.22);
}

 #wm-header a   {
    text-decoration: none;
}

.main-title {
    font-family: "Chau Philomene One", sans-serif;
    text-transform: uppercase;
    text-align: center;
    font-weight: 500;
    font-size: 42px;
    margin: 90px 10px 20px 10px;
    letter-spacing: 3px;
}

#footer-map {
    background-color: #6a94c9;
    padding: 60px;
    color: #fff;
}

    #footer-map a {
        color: #fff;
        font-weight: 700;
        text-decoration: none;
        margin-top: 4px;
        display: block;
    }

    #footer-map a:hover {
        text-decoration: underline;
    }

    #footer-map.testoCentrale {
        width: auto;
    }

#footer-map .info{
    text-align: center;
}

.menu-btn {
    cursor: pointer;
}


.container-fluid-limited {
    padding-right: 15px;
    padding-left: 15px;
    margin-left: auto;
    margin-right: auto;
}

header h1 {
    float: left;
}

h1, h2, h3, h4 {
    font-family: 'Fredoka', serif;
    color: #6a94c9;
}

h2 {
    font-family: 'Fredoka', serif;
    font-size: 25px;
    font-weight: normal;
    margin: 40px 0 20px 0;
    text-transform: uppercase;
    color: #333;
    letter-spacing: 2px;
}

h3{
    font-weight: 500;
    text-transform: uppercase;
}

.logo-bandiera {
    font-family: 'Cinzel', serif;
    width: auto;
    height: 77px;
    font-weight: 100;
    background-image: url(Images/img_tricolore.png);
    background-repeat: no-repeat;
    background-size: auto 100%;
    padding-left: 10px;
    font-size: 25px;
    margin-left: -15px;
    display: block;
    float: left;
}

.logo-presidenza {
    font-family: 'Cinzel', serif;
    width: auto;
    height: 57px;
    font-weight: 100;
    background-image: url(Images/logo.png);
    background-repeat: no-repeat;
    padding-left: 60px;
    font-size: 25px;
    text-align: right;
    position: relative;
    margin: 10px 0 0 40px;
}

    .logo-presidenza a {
        display: block;
        color: #FFF !important;
        text-decoration: none;
        margin-left: -40px;
        padding-left: 40px;
    }


.presidenza-della {
    font-size: 14px;
    position: absolute;
    right: -3px;
    top: 14px;
}

    .presidenza-della a {
        color: rgba(255,252,252,1.00)
    }

.repubblica b,
.repubblica strong {
    font-size: 60px;
    font-weight: 100;
    line-height: 57px;
}


.container-fluid-limited {
    background: #FFF;
    padding-top: 1px;
    padding-bottom: 27px;
    color: #000;
}


.img_menu {
    height: 78px;
    margin-left: 0px;
    margin-top: -6px;
}


.menu-btn {
    cursor: pointer;
}




.testoCentrale {
    /*font-family: Arial, Helvetica, sans-serif; */
    font-size: 1em;
    font-style: normal;
    color: #000000;
    text-decoration: none;
    width: 90%;
    text-align: center;
}

.testoCentraleGrassetto {
    font-style: normal;
    color: #000000;
    text-decoration: none;    
    text-align: center;
    font-weight: bold;
}

.btnSave {
    background: #345887;
    font-size: 20px;
    padding: 10px;
    width: 200px;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: .5rem;
    border-color: none;
}

.btnPrivacy {
    background: #345887;
    font-size: 16px;
    padding: 8px;
    width: 130px;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: .5rem;
    border-color: none;
    margin-top: 24px;
}

.modal .btnSave {
    margin-top: 30px;
}

.testoFooter {
    color: white;
}

.input-validation-error {
    border-color: #dc3545;
}

.videoimg{
    width: 80%;
    margin-top: 40px;
    margin-bottom: 40px;
}

.upload-section {
    background: #f4f4ff;
    padding: 100px;
}



@media (max-width: 390px) {
    #wm-header .logo-presidenza {
        margin: 10px;
    }

}

@media screen and (max-width:575px) {
    .logo-bandiera {
        height: 90px;
    }

    #wm-header .logo-presidenza {
        margin-top: 20px;
    }

    .lang {
        position: absolute;
        top: 3px;
        left: auto;
        right: 15px;
    }

    #footer-map .info {
        font-size: 14px;
    }
}


.intro {
    font-size: 20px;
    text-align: center;
    margin: 0 auto;
    width: 80%;
    line-height: 1.6;
}

.invia {
    font-size: 28px;
    color: #6a94c9;
    text-transform: uppercase;
    margin: 34px 0;
    font-weight: normal;
    display: block;
    font-family: "Chau Philomene One";
    letter-spacing: 2px;
}

.subtitle {
    text-align: center;
    background: #6a94c9;
    color: white;
    padding: 12px;
    font-weight: 600;
    font-size: 24px;
    margin-top: 80px;
    font-family: 'Montserrat';
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.subtitle.reg {
    margin-bottom: 0;
    margin-top: 40px;
}

@media (min-width: 1500px) {
    .container-fluid-limited {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}


/* ── GRID LISTA ── */
.video-list {
    display: grid;
    grid-template-columns:repeat(6 ,minmax(120px,1fr));
    gap: 30px;
    max-width: 1280px;
    margin: 0 auto;
}

.all-video{
    grid-template-columns: repeat(8, 1fr);
}

.all-video .play-icon{
    width: 38px;
    height: 38px;
}

.cerca-video{
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 45px;
    gap: 8px;
}

.cerca-video .form-control{
    width: 400px;
}

.cerca-video .btn{
    background: #345887;
    min-width: 100px;
}

.carica-video-btn {
    background: #345887;
    padding: 8px;
    color: #FFF;
    display: block;
    width: 180px;
    text-align: center;
    border-radius: 8px;
    margin: 60px auto 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border: none;
}

.carica-video-btn:hover{
    text-decoration: underline;
}

@media (max-width:1440px) {
    .all-video{
        grid-template-columns:repeat(6 ,minmax(120px,1fr));
    }

    .all-video .play-icon{
        width: 52px;
        height: 52px;
    }

    .logo-title{
        font-size: 52px;
    }

    .logo-container{
       width: 200px;
    }

}
@media (max-width:1024px) {


    #wm-header  .h-spacer{
       width: 200px;
    }
}

/* ── TABLET (fino a 900px): 3 per riga ── */
@media (max-width:1000px) {
  .video-list {
    grid-template-columns: repeat(3, 1fr);
  }

}



/* ── MOBILE (fino a 600px): 2 per riga ── */
@media (max-width: 600px) {
  .video-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  #wm-header .logo{
    width: 80px;
  }
  #wm-header  .h-spacer{
    display: none;
  }

  .main-title{
    font-size: 34px;
  }
  h2{
    font-size: 22px;
  }

  .intro {
    font-size: 18px;
    text-align: center;
    margin: 0 auto;
    width: 100%;
    line-height: 1.6;
    }

    .upload-section {
        padding: 30px;
    }
    .cerca-video .form-control{
        width: 255px;
    }
    .cerca-video .btn{
        min-width: auto;
    }
    /* .cerca-video div{
        width: 100%;
    } */
    .logo-title{
        font-size: 30px;
    }

    .frase{
        font-size: 30px;
    }

    .invia{
        font-size: 24px;
    }

}

/* ── MOBILE STRETTO (fino a 380px): 1 per riga ── */
@media (max-width: 380px) {
  .video-list {
    grid-template-columns: 1fr;
  }

  .cerca-video {
    flex-direction: column;
  }

  .cerca-video .form-control{
    width: 100%;
}
}

    .video-card {
      aspect-ratio: 9 / 16;
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      position: relative;
      background: #1a1a1a;
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .video-card:hover {
      transform: scale(1.03);
      box-shadow: 0 8px 24px rgba(255,255,255,0.1);
    }

    .video-card video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      pointer-events: none;
    }

    .video-card .overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0,0,0,0.25);
      transition: background 0.2s;
    }

    .video-card:hover .overlay {
      background: rgba(0,0,0,0.1);
    }

    .play-icon {
      width: 52px;
      height: 52px;
      background: rgba(255,255,255,0.85);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .play-icon svg {
      width: 22px;
      height: 22px;
      fill: #111;
      margin-left: 4px;
    }

    .video-label {
      position: absolute;
      bottom: 10px;
      left: 10px;
      right: 10px;
      font-size: 0.75rem;
      background: rgba(0,0,0,0.6);
      padding: 3px 8px;
      border-radius: 20px;
      backdrop-filter: blur(4px);
      color:#ffff;
    }

    /* ── MODALE ── */
    .modal {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(0,0,0,0.92);
      backdrop-filter: blur(6px);
      align-items: center;
      justify-content: center;
    }

    .modal.active { display: flex; }

    .modal-inner {
      position: relative;
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .modal-video-wrap {
      position: relative;
      width: min(88vw, 360px);
      aspect-ratio: 9 / 16;
      border-radius: 16px;
      overflow: hidden;
      background: #000;
      box-shadow: 0 0 60px rgba(0,0,0,0.8);
    }

    .modal-video-wrap video {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }

    /* Bottone chiudi */
    .btn-close {
        position: absolute;
        top: -45px;
        right: -4px;
        z-index: 10;
        background: rgb(255 255 255 / 60%);
        border: none;
        color: #000000;
        font-size: 1.4rem;
        line-height: 1;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }

    .btn-close:hover { background: rgba(255,50,50,0.7); }

/* Bottone chiudi */
.btn-close-privacy {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .btn-close-privacy:hover {
        background: rgba(255,50,50,0.7);
    }


    /* Contatore */
    .video-counter {
      position: absolute;
      bottom: 12px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 0.75rem;
      background: rgba(0,0,0,0.55);
      padding: 3px 10px;
      border-radius: 20px;
      white-space: nowrap;
      pointer-events: none;
    }

    /* Frecce prev/next */
    .btn-nav {
      background: rgba(255,255,255,0.12);
      border: 2px solid rgba(255,255,255,0.2);
      color: #fff;
      font-size: 1.6rem;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s, transform 0.15s;
      flex-shrink: 0;
    }

    .btn-nav:hover {
      background: rgba(255,255,255,0.25);
      transform: scale(1.1);
    }

    .btn-nav:disabled {
      opacity: 0.25;
      cursor: default;
      transform: none;
    }

    /* Swipe hint su mobile */
    @media (max-width: 600px) {
      .btn-nav { display: none; }
      .modal-video-wrap { width: 82vw; }
    }


    .modal-wrap {
      position: relative;
      border-radius: 16px;
      overflow-y: auto;
      background: #fff;
      padding: 30px;
      max-width: 80%;
      max-height: 90vh;
      margin: 0 auto;
    }

    .modal-wrap h1{
        margin-top: 22px;
    }

    .modal-wrap .text-danger{
        display: block;
    }

    body.modal-open {
        overflow: hidden;
    }

        /* VIDEO */

    
    .short-thumbnail-container {
        display: inline-block;
        aspect-ratio: 9 / 16;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .short-thumbnail-container img {
        width: 100%;
        height: 100%;
        object-fit: cover; 
        object-position: center; 
        display: block;
    }

    .shorts-wrapper {
        /* Proporzioni 9:16 standard per gli Shorts */
        width: 315px;
        height: 560px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

    .videoinfo iframe {
        aspect-ratio: 16 / 9;
        margin: 32px 0;
    }

    .resend {
        background: aliceblue;
        padding: 24px;
        border-radius: 8px;
        margin-top: 60px;
        display: flex;
        gap: 12px;
        margin-bottom: -30px;
    }

    .resend span{
        font-weight: 500;
    }


/* TESTO PRIVACY */
    .page {
      max-width: 920px;
      margin: 0 auto;
      background: #ffffff;
      border: 1px solid #d8d5ce;
      border-radius: 6px;
      padding: 3rem 3.5rem;
      box-shadow: 0 4px 24px rgba(0,0,0,0.07);
      display: none;
    }

    .page.show{
        display: block;
    }

    .document-title {
        font-size: 1.5rem;
        font-weight: 600;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #6a94c9;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #bbb;
    }
    .intro { font-size: 1rem; color: #333; margin-bottom: 1.5rem; }
    .intro.start{
        margin-bottom: -1.5rem;
        margin-top: 5rem;
    }
    .section { margin-bottom: 1.5rem; }

    .section-heading {
        font-size: 1rem;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: #6a94c9;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    .section-body { font-size: 1rem; color: #222; line-height: 1.8; }
    .section-body strong { color: #111; }
    .divider { border: none; border-top: 1px solid #e0ddd6; margin: 1.8rem 0; }
        .article-title {
      font-size: 1rem;
      font-weight: bold;
      color: #6a94c9;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      margin-bottom: 0.75rem;
    }

    .flex-check{
        display: flex;
        gap: 8px;
    }

    .no-result {
        font-size: 1.2rem;
        color: #333;
        margin-top: 1.5rem;
        font-weight: bold;
        grid-column: 1 / -1;
        text-align: center;
    }

    @media (max-width: 600px) { 
        .page { 
            padding: 2rem 1.5rem;
         } 

         #privacyModal .modal-wrap{
            max-width: 95%;
            padding: 20px 10px;
         }
    }
    /* HTML: <div class="loader"></div> */
.loader {
    margin: 0 auto;
    width: 20px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 4px solid #ffffff;
    animation: l20-1 0.8s infinite linear alternate, l20-2 1.6s infinite linear;
}
@keyframes l20-1{
   0%    {clip-path: polygon(50% 50%,0       0,  50%   0%,  50%    0%, 50%    0%, 50%    0%, 50%    0% )}
   12.5% {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100%   0%, 100%   0%, 100%   0% )}
   25%   {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100% 100%, 100% 100%, 100% 100% )}
   50%   {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100% 100%, 50%  100%, 0%   100% )}
   62.5% {clip-path: polygon(50% 50%,100%    0, 100%   0%,  100%   0%, 100% 100%, 50%  100%, 0%   100% )}
   75%   {clip-path: polygon(50% 50%,100% 100%, 100% 100%,  100% 100%, 100% 100%, 50%  100%, 0%   100% )}
   100%  {clip-path: polygon(50% 50%,50%  100%,  50% 100%,   50% 100%,  50% 100%, 50%  100%, 0%   100% )}
}
@keyframes l20-2{ 
  0%    {transform:scaleY(1)  rotate(0deg)}
  49.99%{transform:scaleY(1)  rotate(135deg)}
  50%   {transform:scaleY(-1) rotate(0deg)}
  100%  {transform:scaleY(-1) rotate(-135deg)}
}

/* Animazione apertura */
dialog[open] {
  animation: dialog-in 200ms ease-out;
}
@keyframes dialog-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}