/**
 * Foglio di Stile Personalizzato
 *
 * Organizzazione:
 * 1. Stili Generali e di Reset
 * 2. Classi di Utilità (Helpers)
 * 3. Componenti UI
 * - Contenitore Home (ac-home-container)
 * - Frase del Giorno (ac-fdg)
 * - Scheda Opera (scheda-opera)
 * - Griglia/Elenco Opere (ac-opere-grid, ac-opere-strip, ac-opera-card)
 * - Slider (ac-slider)
 * - Personaggi (ac-personaggio)
 * - Top Citazioni (ac-top-citazioni)
 * - Pagina Opera (ac-opera, ac-hero, etc.)
 * - Liste Generiche (ac-list)
 * - Amazon Links Box
 * - Tag Descrizione
 * 4. Stili Specifici (Pagine, Widget, WP Admin)
 * 5. Media Queries (Responsive Design)
 */

/* ==========================================================================
   1. Stili Generali e di Reset
   ========================================================================== */

a {
    /* Evitare !important se possibile, indica un'alta specificità o un override forzato */
    text-decoration: none !important;
}

img {
    width: 100%;
    height: auto; /* Mantiene le proporzioni corrette di default */
    object-fit: cover; /* Utile quando il contenitore ha dimensioni fisse */
    display: block; /* Rimuove lo spazio extra sotto l'immagine */
}

/* Reset per liste ordinate usate come griglie personalizzate */
ol.ac-top-citazioni {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

/* Forza il reset dentro l'editor di WordPress */
.entry-content ol.ac-top-citazioni,
.post-content ol.ac-top-citazioni {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}


/* ==========================================================================
   2. Classi di Utilità (Helpers)
   ========================================================================== */

.aligncenter {
    max-width: 100% !important;
}

/* Contenitore per video/iframe responsivi con aspect ratio 16:9 */
.ratio-16x9 {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.ratio-16x9 iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* ==========================================================================
   3. Componenti UI
   ========================================================================== */
 /* Barra A-Z: orizzontale, scrollabile, con snap e hint visivo */
  .ac-az {
    display: block;
    margin: 1rem 0 1.25rem;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: .25rem .25rem .4rem;
    position: relative;
  }
  .ac-az::-webkit-scrollbar { height: 6px; }
  .ac-az::-webkit-scrollbar-thumb { background: #ddd; border-radius: 999px; }
  .ac-az a {
	  margin: 0 .5rem 0 0;
  }
  .ac-az a, .ac-az span {
    scroll-snap-align:start;
    padding:.4rem .5rem;
    border:1px solid #00000014;
    border-radius:.6rem;
    font-weight:600;
    text-decoration:none;
    color:#333;
    line-height:1;
    white-space:nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
  }
  .ac-az a:hover { background:#f3f3f3; }
  .ac-az .is-active, .ac-az a[aria-current="page"] {
    background:var(--primary-color); color:#fff;
  }

  /* Menu mobile: details/dropdown senza JS */
  .ac-az-dd { display:none; margin:.75rem 0 1rem; }
  .ac-az-dd summary {
    list-style:none;
    cursor:pointer;
    user-select:none;
    border:1px solid #ddd;
    border-radius:999px;
    padding:.65rem .9rem;
    font-weight:700;
    position:relative;
    background:#fff;
    box-shadow:0 1px 2px rgba(0,0,0,.04);
  }
  .ac-az-dd summary::-webkit-details-marker { display:none; }
  .ac-az-dd summary::after {
    content:"";
    position:absolute; right:.9rem; top:50%; transform:translateY(-50%);
    width:14px; height:14px;
    background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="%23666" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat:no-repeat; background-position:center;
  }
  .ac-az-dd[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
  }
  .ac-az-dd .ac-az-dd-panel {
    margin-top:.5rem;
    border:1px solid #ddd;
    border-radius:12px;
    padding:.4rem;
    background:#fff;
    max-height:40vh;
    overflow:auto;
    box-shadow:0 6px 16px rgba(0,0,0,.06);
  }
  .ac-az-dd .ac-az-dd-list {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap:.4rem;
  }
  .ac-az-dd .ac-az-dd-list a {
    display:block;
    text-align:center;
    padding:.55rem .5rem;
    border:1px solid #eee;
    border-radius:.6rem;
    font-weight:600;
    color:#333; text-decoration:none;
  }
  .ac-az-dd .ac-az-dd-list a:hover { background:#f6f6f6; }
  .ac-az-dd .ac-az-dd-list a.is-active {
    background:#111; color:#fff; border-color:#111;
  }

  /* Mobile: mostra SOLO il dropdown, nascondi i chip */
  @media (max-width: 520px) {
    .ac-az { display:none; }
    .ac-az-dd { display:block; }
  }
/* --------------------------------------------------------------------------
   Componente: Contenitore Home (Layout obsoleto?)
   -------------------------------------------------------------------------- */

.ac-home-container {
    display: block;
    width: 100%;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.ac-home-container .headQuote {
    padding: .35rem 1rem;
    border: 2px solid #ddd;
    border-bottom: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    text-align: right;
}

.ac-home-container .footQuote {
    padding: .35rem 1rem;
    border: 2px solid #ddd;
    border-top: 0;
    border-radius: 0 0 0.5rem 0.5rem;
}

.ac-home-container blockquote {
    border-left: 0;
    margin: 0;
    color: #fff;
}

.ac-home-container blockquote p {
    margin: 1em 1em 0;
    text-align: center;
}

.ac-home-container blockquote p:last-child {
    margin-top: .25em;
    padding-top: .2em;
    border-top: .5px dotted #fff;
}

.ac-home-container:visited {
    color: #fff;
}

.ac-fdg {
	width: 100%;
}

/* Layout 2 colonne per ac-home-container */
.ac-fdg-row {
    display: flex;
    align-items: stretch;
}

.ac-fdg-col--cover {
    flex: 0 0 15%; /* larghezza colonna sinistra */
}

.ac-fdg-col--text {
    flex: 1 1 auto;
    min-width: 0;
    background-color: var(--primary-color-link);
}

.ac-fdg-col--text blockquote {
    height: 100%;
    font-size: 1.05rem;
    line-height: 1.6;
}

.ac-fdg-col--text .footQuote .ac-fdg__title {
    font-weight: 600;
    text-decoration: none;
}

.ac-fdg__thumb {
    height: 100%;
}

.ac-fdg__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 250px;
    object-fit: cover;
}


/* --------------------------------------------------------------------------
   Componente: Frase del Giorno (ac-fdg) - Nuovo Stile
   -------------------------------------------------------------------------- */

.ac-fdg {
    margin: 18px 0;
}

.ac-fdg__card {
    display: grid;
    grid-template-columns: 37% 1fr;
    gap: 0;
    border: 1px solid #dfe5ec;
	border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #0b5b84 0%, #074463 55%, #06364e 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.ac-fdg__card {
	background: var(--primary-color-link);
}

.ac-fdg__media {
    position: relative;
    background: #093a56;
}

.ac-fdg__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.ac-fdg__content {
    position: relative;
    padding: 28px clamp(16px, 3vw, 36px);
    color: #eef7ff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ac-fdg__label {
    align-self: flex-end;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: .2px;
    backdrop-filter: saturate(140%) blur(2px);
    margin-bottom: 10px;
}

.ac-fdg__quote {
    position: relative;
    margin: 0;
	padding: 1rem 2rem;
	border-left: 0;
    color: #fff;
}

.ac-fdg__quote blockquote {
	border-left: 0;
	margin: 0;
	padding: 0;
	color: #fff;
}

.ac-fdg__quote ul {
	list-style: none;
	padding: 0;
}

.ac-fdg__quote-mark {
    position: absolute;
    left: -10px;
    top: -10px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1;
    opacity: .2;
    transform: translateY(-10%);
}

.ac-fdg__quote-text {
    font-weight: 600;
    font-size: clamp(20px, 2.6vw, 32px);
    line-height: 1.35;
    text-wrap: balance;
    -webkit-font-smoothing: antialiased;
}


@media (max-width: 900px) {
.ac-fdg__quote {
		padding: 0;
}
	
.ac-fdg__quote-text {
		text-align:center;
}	
	
.ac-fdg__quote-mark {
		left: 0;
}
}

.ac-fdg__quote-text p {
    line-height: 1.2;
    margin: 0;
}

.ac-fdg__sep {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    margin: 16px 0 10px;
}

.ac-fdg__author {
    display: block;
    text-align: center;
    font-style: normal;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 20px);
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .15);
}

.ac-fdg__author p {
	margin: 1rem auto;
}

.ac-fdg__title {
    color: #073a56;
    background: #fff;
	display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    align-items: center;
    padding: 5px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: clamp(15px, 1.8vw, 18px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}

.ac-fdg__title {
	color: var(--primary-color-link);
}

.ac-fdg__link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ac-fdg__chev {
    transition: transform .2s ease;
}

.ac-fdg__link:hover .ac-fdg__chev {
    transform: translateX(3px);
}

.ac-fdg__link:hover .ac-fdg__title {
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}


/* --------------------------------------------------------------------------
   Componente: Scheda Opera
   -------------------------------------------------------------------------- */

.scheda-opera {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border: 2px solid #e0e0e0;
    padding: 20px;
    margin: 1rem 0 2rem;
    background-color: #fafafa;
    border-radius: 10px;
}

.scheda-thumb {
    flex: 2;
}

.scheda-thumb img {
    border-radius: 5px;
    aspect-ratio: 5/3;
}

.scheda-info {
    flex: 1;
    min-width: 65%;
}

.scheda-info h3 {
    margin-top: 0;
    font-size: 20px;
    color: #2c3e50;
}

.scheda-info p {
    margin: 5px 0;
    font-size: 15px;
}

.scheda-opera-box {
    border: 1px solid #ddd;
    border-radius: 1rem;
    padding: 3rem 2rem;
    margin-bottom: 1rem;
    background: #fafafa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.scheda-cover,
.scheda-trailer,
.scheda-trama {
    display: inline-block;
    margin: auto 1rem;
    vertical-align: top;
}

.scheda-cover {
    width: calc(30% - 2rem);
}

.scheda-trailer,
.scheda-trama {
    width: calc(70% - 2rem);
}

.scheda-trailer {
    position: relative;
    height: 0;
    padding-bottom: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.scheda-opera-link {
    display: inline-block;
    background-color: #0085ba;
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none !important;
    transition: background 0.3s;
}

.scheda-opera-link:hover {
    background-color: #005f87;
}

/* Card container */
.ac-opera-card {
  display: flex;
  flex-direction: row;
  gap: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ddd;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  max-width: 780px;
  margin: 0px auto;
  text-align: center;
}

.ac-opera-thumb {
  flex: 0 0 220px;
  overflow: hidden;
}

.ac-opera-thumb img {
	  width: 100%;
	  height: 100%;
	  object-fit: cover;
	  display: block;
}

.ac-opera-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;  /* quante righe vuoi mostrare */
	line-clamp: 1;          /* proprietà standard, usata come fallback moderno */
	overflow: hidden;       /* nasconde il resto */
	text-overflow: ellipsis;
}

.ac-opera-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 16px 10px;
}

/* --------------------------------------------------------------------------
   Componente: Griglia/Elenco Opere
   -------------------------------------------------------------------------- */

.ac-opere-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.ac-elenco-opere {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


@media (max-width: 900px) {
	.ac-elenco-opere {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
/* Contenitore griglia desktop / carosello mobile */
.ac-opere-strip {
    --gap: clamp(12px, 1.2vw, 16px);
    display: grid;
	width: 100%;
    grid-template-columns: repeat(auto-fill,minmax(calc((100%/6) - (10px*2)),1fr));
    gap: var(--gap);
    align-items: stretch;
    margin: 16px 0 24px;
}

/* Card Opera */
.ac-opera-card {
    position: relative;
    display: flex;
	max-width: 100%;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    scroll-snap-align: start;
    min-width: 0; /* Evita overflow del titolo */
    overflow: hidden;
}

.ac-opera-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 24, 40, .12);
    border-color: #d0d5dd;
}

.ac-opera-card:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .35), 0 8px 20px rgba(16, 24, 40, .12);
}

.ac-opera-card::before {
    content: "";
    position: absolute;
    inset: -1px auto -1px -1px;
    width: 4px;
    border-radius: 16px 0 0 16px;
    background: linear-gradient(180deg, #06b6d4, #2563eb 60%, #9333ea);
    opacity: 0;
    transition: opacity .15s ease;
}

.ac-opera-card:hover::before,
.ac-opera-card:focus-visible::before {
    opacity: 1;
}

.ac-opera-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #f3f4f6;
}

.ac-opera-thumb img,
.ac-opera-thumb--ph {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: translateZ(0);
}

.ac-opera-card h3 {
	display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 10px 0 0;
}

.ac-opera-card h3.ac-opera-title {
    margin: 0 6px 4px;
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #111827;
}

.ac-opera-card p.ac-opera-meta {
	margin: 0;
}

.ac-opera-card .ac-fdg__title {
	background: #073a56;
	color: #fff;
}

.ac-opera-excerpt {
	margin: 0 0 15px;
}

/* --------------------------------------------------------------------------
   Componente: Slider
   -------------------------------------------------------------------------- */

.ac-slider-wrapper {
    overflow: hidden;
    width: 100%;
}

.ac-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.ac-slider::-webkit-scrollbar {
    height: 6px;
}

.ac-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.ac-slide {
    flex-shrink: 0;
    width: calc((100% / 5) - (2px * 2) - (.75rem * 2) - (.5rem * 2));
    padding: 0.75rem;
    margin: 2rem .5rem 1.5rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
    text-align: center;
}

.ac-slide a {
    display: block;
}

.ac-slide img {
    width: 100%;
    aspect-ratio: 3 / 5;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.ac-slide-title {
    display: block;
    margin: 1rem 0 0;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}


/* --------------------------------------------------------------------------
   Componente: Personaggi
   -------------------------------------------------------------------------- */

.ac-personaggio {
    width: calc((100% / 4) - 13px);
    text-align: center;
}

.ac-personaggio img {
    width: 100px;
    height: 100px;
    aspect-ratio: 1/1 !important;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 5px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.ac-personaggio img.none {
    background-color: black;
}

.ac-personaggio:hover img {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.ac-personaggio .name {
    font-size: 12px;
    transition: color 0.2s ease;
}

.ac-personaggio .name strong {
    transition: color 0.2s ease;
}

.ac-personaggio:hover .name strong {
    color: #e63946;
}


/* --------------------------------------------------------------------------
   Componente: Top Citazioni
   -------------------------------------------------------------------------- */

.ac-tc-range {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
}

.ac-tc-range-item {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    color: #222;
}

.ac-tc-range-item.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.ac-top-citazioni {
    display: grid;
    gap: 16px;
    margin: 0; /* Spostato da .ac-top-citazione */
}

.ac-top-citazioni.is-list .ac-tc-link {
    grid-template-columns: 96px 1fr;
}

.ac-top-citazioni.is-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.ac-top-citazione {
    position: relative;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.ac-tc-link {
    display: grid;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 12px;
}

.ac-top-citazioni.is-cards .ac-tc-link {
    grid-template-columns: 1fr;
}

.ac-tc-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #000;
    color: #fff;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 14px;
}

.ac-tc-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border-radius: 12px; /* Semplificato */
}

.ac-top-citazioni.is-cards .ac-tc-thumb {
    border-bottom: 1px solid #eee;
    border-radius: 12px 12px 0 0;
}

.ac-top-citazioni.is-list .ac-tc-thumb {
    width: 96px;
    aspect-ratio: 1/1;
    border: 1px solid #eee;
    border-radius: 8px;
}

.ac-tc-title {
    font-size: 18px;
    margin: 4px 0 2px;
    line-height: 1.2;
}

.ac-tc-opera {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.ac-tc-excerpt {
    font-size: 14px;
    color: #333;
}

.ac-tc-views {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 1.5rem;
    margin-top: 1.75rem;
    padding: 0.5rem;
    font-size: 13px;
    color: #444;
}


/* --------------------------------------------------------------------------
   Componente: Layout Pagina Opera
   -------------------------------------------------------------------------- */

.ac-opera {
    padding: 18px 16px;
}

.ac-opera-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding-bottom: 28px;
}

.ac-section {
    margin: 24px auto;
    max-width: var(--ac-max, 1200px);
    padding: 0 16px;
}

.ac-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ac-section-title,
.ac-h2 {
    margin: 0 8px 20px;
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
}

.ac-text {
    font-size: 16px;
    line-height: 1.7;
    color: #111827;
}

.ac-text p {
    margin: .6em 0;
}

/* Hero Section */
.ac-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 22px;
    align-items: start;
    margin-bottom: 18px;
}

.ac-hero-media img,
.ac-hero-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    background: #f3f4f6;
    aspect-ratio: 2 / 3;
    box-shadow: 0 10px 26px rgba(16, 24, 40, .12);
}

.ac-hero-ph {
    background: linear-gradient(180deg, #f3f4f6, #e5e7eb);
}

.ac-hero-title {
    margin: 6px 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: .2px;
}

.ac-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.ac-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
    font-weight: 600;
}

/* Trailer Section */
.ac-iframe {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}

.ac-iframe iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Gallery Section */
.ac-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.ac-g-item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .08);
    transition: transform .15s ease, box-shadow .15s ease;
	aspect-ratio: 2 / 1;
}

.ac-g-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(16, 24, 40, .12);
}

/* Quotes Section */
.ac-quotes {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 10px;
}

.ac-quote {
    margin: 0;
}

.ac-quote-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ac-quote-link:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .12);
    transform: translateY(-1px);
}

.ac-quote-excerpt {
    font-size: clamp(15px, 1.8vw, 17px);
    line-height: 1.6;
    color: #0f172a;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.ac-quote-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
}

.ac-quote-arrow {
    font-weight: 700;
    color: #0ea5e9;
}

/* Cast Section */
.ac-cast {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.ac-cast-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

.ac-cast-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    flex: 0 0 auto;
}

.ac-cast-avatar img,
.ac-cast-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ac-cast-ph {
    background: linear-gradient(180deg, #f3f4f6, #e5e7eb);
}

.ac-cast-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}


/* --------------------------------------------------------------------------
   Componente: Liste Generiche (es. news, recensioni)
   -------------------------------------------------------------------------- */

.ac-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 8px;
}

.ac-list-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ac-list-link:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .12);
    transform: translateY(-1px);
}

.ac-list-title {
    font-weight: 600;
    line-height: 1.3;
}

.ac-list-time {
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   Componente: Amazon Links Box
   -------------------------------------------------------------------------- */

.amazon-links-box {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.75rem;
    padding: 1rem 1.75rem;
    margin: 20px 0;
}

.amazon-links-box h4 {
    margin: 0 0 .75rem;
}

.amazon-links-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


/* --------------------------------------------------------------------------
   Componente: Tag Descrizione
   -------------------------------------------------------------------------- */

.ac-tag-descrizione {
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    font-size: 16px;
    line-height: 1.6;
}


/* ==========================================================================
   4. Stili Specifici (Pagine, Widget, WP Admin)
   ========================================================================== */

/* Stili per liste di articoli generiche */
.list-container .list-elem .entry-summary,
.list-container .list-elem .post-author,
.list-container .list-elem .post-category,
.list-container .list-elem .post-date {
    display: block !important;
}

/* Header di pagina */
.page-header .page-title {
    font-size: 2rem;
}

/* Contenitore immagine in pagine e articoli */
.page .hentry .img-cont,
.single .img-cont {
    aspect-ratio: 9 / 5;
	margin-bottom: 20px;
}

.page .hentry .img-cont img,
.single .img-cont img {
	display: block;
    margin: 0 36px;
    width: calc(100% - (36px * 2));
}

@media screen and (min-width: 720px) {
.page .hentry .img-cont img,
.single .img-cont img {
		width: 100%;
		margin: 0;
}
}

.img-cont img {
    border-radius: 8px;
}

/* Widget Pubblicità */
.widget_ads {
    display: block;
    min-width: 31%;
    margin: 2rem auto;
    text-align: center;
}

.banner-header {
    width: 100%;
    min-height: 90px;
}

.google-auto-placed {
    min-height: 300px;
}

.banner-header:empty,
.google-auto-placed:empty { /* Aggiunto :empty per sicurezza */
    display: none;
}

/* Stili per Admin WordPress */
#dashboard_right_now .post-type-opera::before {
    content: "\f128";
    font-family: Dashicons;
    color: #0073aa;
}

#block-34 {
	padding: 0;
}

/* ==========================================================================
   5. Media Queries (Responsive Design)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .ac-fdg__chev {
        transition: none;
    }
}

@media (min-width: 1024px) {
    /* -- Top Citazioni -- */
    .ac-top-citazioni.is-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Tablet (schermi fino a 1024px) */
@media (max-width: 1024px) {
    /* -- Personaggi -- */
    .ac-personaggio {
        width: calc((100% / 4) - 12px);
    }
    .ac-personaggio img {
        width: 120px;
        height: 120px;
    }
    /* -- Scheda Opera -- */
    .scheda-thumb img {
        aspect-ratio: 3/5;
    }
}

/* Tablet e Mobile (schermi fino a 900px) */
@media (max-width: 900px) {
    /* -- Frase del Giorno -- */
    .ac-fdg__card {
        grid-template-columns: 1fr;
    }
    .ac-fdg__media {
        max-height: 200px;
    }
    .ac-fdg__label {
        display: none;
    }
    /* -- Pagina Opera (Hero) -- */
    .ac-hero {
        grid-template-columns: 1fr;
    }
}

/* Tablet e Mobile (schermi fino a 800px) */
@media (min-width: 800px) {
    .ac-quotes {
        grid-template-columns: 1fr 1fr;
    }
}

/* Smartphone Grandi (schermi fino a 768px) */
@media (max-width: 768px) {
    /* -- Contenitore Home (Layout vecchio) -- */
    .ac-fdg-col--cover {
        flex: 0 0 30%;
    }
    .ac-fdg__thumb img {
        max-height: none;
    }
    /* -- Scheda Opera -- */
    .scheda-opera-box {
        padding: 2rem;
    }
    .scheda-opera-media {
        display: flex !important;
        flex-direction: column;
    }
    .scheda-cover,
    .scheda-trailer,
    .scheda-trama {
        flex: 1 1 100% !important;
        width: 100% !important;
        margin: auto 0 2rem;
    }
    .scheda-cover img {
        height: auto !important;
    }
    .scheda-trailer {
        padding-bottom: 56.25% !important; /* 16:9 ratio */
    }
    /* -- Personaggi -- */
    .ac-personaggio {
        width: calc((100% / 2) - 12px);
    }
    .ac-personaggio img {
        width: 150px;
        height: 150px;
    }
    /* -- Titoli Pagina -- */
    .page-header .page-title {
        font-size: 2.25rem;
    }
}

/* Carosello per Griglia Opere (schermi fino a 720px) */
@media (max-width: 720px) {
    .ac-opere-strip {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: clamp(140px, 42vw, 200px);
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        overflow-x: auto;
        padding: 0 8px 4px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .ac-opere-strip::-webkit-scrollbar {
        height: 8px
    }
    .ac-opere-strip::-webkit-scrollbar-thumb {
        background: #d0d5dd;
        border-radius: 8px
    }
}

/* Smartphone (schermi fino a 640px) */
@media (max-width: 640px) {
    /* -- Top Citazioni -- */
    .ac-top-citazioni.is-list .ac-tc-link {
        grid-template-columns: 72px 1fr;
    }
    .ac-top-citazioni.is-list .ac-tc-thumb {
        width: 72px;
    }
}

@media (min-width: 640px) {
    /* -- Top Citazioni -- */
    .ac-top-citazioni.is-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Smartphone (schermi fino a 600px) */
@media screen and (max-width: 600px) {
    /* -- Liste Articoli -- */
    .list-container .list-elem .entry-meta,
    .list-container .list-elem .post-category .entry-meta,
    .list-container .list-elem .post-date .entry-meta {
        display: none !important;
    }
}

/* Smartphone Piccoli (schermi fino a 380px) */
@media (max-width: 380px) {
    /* -- Card Opera -- */
    .ac-opera-title {
        -webkit-line-clamp: 1;
        min-height: 1.25em;
    }
}

/* Card opera */
.cardBox {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
  margin-bottom: 20px;
}

.cardBox:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cardBox-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  aspect-ratio: 1;
}

.cardBox-body {
  padding: 15px;
}

.cardBox-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.cardBox-meta {
  margin-bottom: 10px;
}

.cardBox-meta span {
  display: inline-block;
  background: #f0f4f8;
  color: #003366;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  margin-right: 6px;
}

.cardBox-desc {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 15px;
}

/* Pulsante link */
.cardBox-link {
  display: inline-block;
  background: #005f83; /* blu coerente */
  color: #fff !important;
  margin: 0 0 5px 5px;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

.cardBox-link {
	background: var(--primary-color-link);
}

.cardBox-link:hover {
  background: #00425d;
}

/* Layout desktop affiancato */
@media (min-width: 768px) {
  .cardBox {
    flex-direction: row;
    align-items: flex-start;
  }
  .cardBox-cover {
    flex: 0 0 280px;
    margin: 15px;
  }
  .cardBox-cover img {
    height: auto;
    border-radius: 10px;
  }
  .cardBox-body {
    flex: 1;
  }
}














/* QUIZ */
.ac-quiz-hero{
	position:relative;
	border:1px solid #e6e8ef;
	border-radius:16px;
	overflow:hidden;
	background:#0b1020;
	color:#fff;
	margin:24px 16px;
	width: calc(100% - 32px);
	max-width:1200px;
	padding: 0;
}

.ac-quiz-hero__bg{
	display:block;
	width:100%;
	height:auto;
	object-fit:cover;
	aspect-ratio: 1920/700; /* fallback per layout stabile */
}

.ac-quiz-hero__overlay{
	position:absolute; inset:0;
	background:linear-gradient(90deg, rgba(7,10,20,.85) 0%, rgba(7,10,20,.55) 45%, rgba(7,10,20,.15) 100%);
	pointer-events:none;
}

.ac-quiz-hero__content{
	position:absolute; inset:0;
	display:flex; flex-direction:column; justify-content:center;
	max-width:min(640px, 86vw);
	padding: clamp(16px, 4vw, 36px);
}

.ac-quiz-hero__title{
	margin:0 0 .25rem; font-size: clamp(1.4rem, 2.8vw, 2.2rem); line-height:1.1;
	color: #fff;
}

.ac-quiz-hero__subtitle{
	margin:.25rem 0 1rem; color:#cfd6ff; font-size:clamp(.95rem, 1.6vw, 1.05rem);
}

a.ac-quiz-hero__cta{
	display:inline-block;
	background:#2b5cff; color:#fff; border:1px solid #244de8;
	padding:.8rem 1.1rem; border-radius:12px; font-weight:700; text-decoration:none;
	box-shadow:0 6px 18px rgba(43,92,255,.25);
	transition:transform .08s ease, box-shadow .2s ease, background .2s;
}
.ac-quiz-hero__cta:hover{ transform:translateY(-1px); box-shadow:0 8px 22px rgba(43,92,255,.35); }
.ac-quiz-hero__cta:active{ transform:translateY(0); }

.ac-quiz-hero__bullets{
	display:flex; flex-wrap:wrap; gap:.5rem 1rem; list-style:none; padding:0; margin:1rem 0 0;
	font-size:.92rem; color:#dfe6ff;
}
.ac-quiz-hero__bullets li{ position:relative; padding-left:1.2rem; }
.ac-quiz-hero__bullets li::before{
	content:"✓"; position:absolute; left:0; color:#9fd47a; font-weight:700;
}

/* Mobile tweak: sposta il testo sopra e accentua il gradiente */
@media (max-width: 600px){
	.cardBox-cover img {
		aspect-ratio: 2/1;
	}
	
	.ac-quiz-hero__subtitle {
		display: none;
	}
	
	.ac-quiz-hero__overlay{
		background:linear-gradient(180deg, rgba(7,10,20,.88) 0%, rgba(7,10,20,.55) 50%, rgba(7,10,20,.10) 100%);
	}
	
	.ac-quiz-hero__content{
		justify-content:flex-start; padding-top: min(10vw, 40px);
	}
}

.ac-related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.ac-related-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.ac-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0px, 1fr));
    gap: 1rem;
}

.ac-related-card {
    background: #fafafa;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ac-related-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ac-related-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.ac-related-meta {
    padding: 0.75rem 0.9rem 1rem;
}

.ac-related-cat {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    display: block;
    margin-bottom: 0.25rem;
}

.ac-related-post-title {
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
}

.ac-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}