/* =======================================
   HERO LINK (page-specific)
======================================= */

.hero-link{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 5;
  cursor: pointer;
}

/* =======================================
   TOOLS (filtro anni)
======================================= */

.tools{
  margin: 10px 0 18px;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tools select{
  background: #171717;
  color: #eee;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 8px 10px;
}

/* =======================================
   GRIGLIA VIDEO
======================================= */

.grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
}

.item{
  background: var(--card);
  border: 1px solid var(--br);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.thumb{
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pad{
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.item h3{
  margin: 0;
  font-size: 16px;
}

.meta-row{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.meta-row .type{
  color: var(--muted);
  font-size: 0.95rem;
  margin-right: 14px;
}

/* =======================================
   PULSANTI CARD
======================================= */

.actions{
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* stile comune a tutti i pulsanti (button + a) */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 5px 9px;
  min-height: 20px;
  font-size: 15px;
  line-height: 1;

  border-radius: 10px;
  background: #181818;
  border: 1px solid #292929;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover{
  background: #222;
}

/* blu "Guarda" */
.btn.primary{
  background: #463e3e;
  border-color: #463e3e;
}
.btn.primary:hover{
  background: #050505;
  border-color: #070707;
}

/* rosso YouTube */
.btn.youtube{
  background: #b3261e;
  border-color: #b3261e;
}
.btn.youtube:hover{
  background: #d73228;
  border-color: #d73228;
}

/* =======================================
   MODALE VIDEO
======================================= */

#ovl{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 9998;
}

#mdl{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 92vw);
  max-height: 86vh;
  overflow: hidden;
  background: #111;
  border: 2px solid #b3261e;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.55);
  display: none;
  z-index: 9999;
}

#mdl header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #222;
  background: #151515;
}

#mdl .frame{
  position: relative;
  padding-top: 56.25%; /* 16:9 */
}

#mdl iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
