/* Sezione "Racconti": elenco (layouts/stories.njk) e scheda (layouts/story.njk). Caricato solo in queste pagine. */

/* --- elementi comuni (i paragrafi del sito sono giustificati: qui allineati a sinistra) */
.racconti p, .racconto p { text-align: left; }
.story-button { display: inline-block; border: 1px solid #fff; color: #fff; padding: 9px 26px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; }
.story-button:hover { background: #fff; color: #313131; }

/* ============ ELENCO ============ */
.stories-side .summary { margin-bottom: 10px; }
.stories-intro p { color: #c9c9c9; max-width: 440px; }
.stories-filter { list-style: none; margin: 26px 0 0; padding: 0; }
.stories-filter button { display: block; padding: 3px 0; border: 0; background: none; color: #a1a1a1; font: inherit; font-size: 1.09rem; text-transform: uppercase; cursor: pointer; text-align: left; }
.stories-filter button:hover, .stories-filter button[aria-pressed="true"] { color: #d7df21; }
.stories-filter button span { opacity: 0.6; }
.stories-cta { margin-top: 34px; padding-top: 28px; border-top: 1px solid #4a4a4a; max-width: 440px; }
.stories-cta p { text-align: left; margin: 0 0 14px; font-size: 1rem; line-height: 1.6; }
.stories-cta .stories-cta-kicker { margin-bottom: 10px; font-size: 0.8rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #a1a1a1; }
.stories-empty { padding: 40px 20px; color: #a1a1a1; }

.stories { padding: 20px 20px 40px; }
.stories-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.story-card { background: #2a2a2a; }
.story-card[hidden] { display: none; }
.story-card > a { display: flex; flex-direction: column; height: 100%; color: #fff; }
.colDx .story-card img { display: block; width: 100%; height: 300px; object-fit: cover; }
.colDx .story-card--featured img { height: 520px; }
.story-card-body { padding: 24px 26px 30px; }
.story-card--featured .story-card-body { padding: 30px 34px 34px; }
.story-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0 0 10px; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; color: #a1a1a1; line-height: 1.4; }
.story-card-badge { background: #d7df21; color: #313131; font-weight: 600; padding: 3px 10px; }
.story-card-title { margin: 0 0 10px; font-size: 1.5rem; line-height: 1.1; font-weight: 700; text-transform: uppercase; color: #fff; }
.story-card--featured .story-card-title { font-size: 2.5rem; line-height: 1.05; }
.story-card-excerpt { margin: 0; font-size: 0.95rem; line-height: 1.7; color: #c9c9c9; }
.story-card--featured .story-card-excerpt { font-size: 1rem; max-width: 640px; }
.story-card-more { display: inline-block; margin-top: 16px; font-size: 0.95rem; font-weight: 600; text-transform: uppercase; color: #d7df21; }
.story-card a:hover .story-card-title { color: #d7df21; }

/* ============ SCHEDA ============ */
.story { height: 100%; padding-bottom: 80px; box-sizing: border-box; }
.story-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.story-wide { max-width: 1240px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

.story-hero { position: relative; }
.story-hero img { display: block; width: 100%; height: 680px; object-fit: cover; }
.story-back { position: absolute; top: 34px; right: 6.5%; padding: 8px 16px; background: rgba(29, 29, 29, 0.72); color: #fff; font-size: 0.95rem; font-weight: 700; text-transform: uppercase; }
.story-back:hover { color: #d7df21; }

.story-head { padding-top: 64px; }
.story-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 18px; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: #a1a1a1; line-height: 1.4; }
.story-meta a.story-kicker { color: #d7df21; font-weight: 600; }
.story-meta a.story-kicker:hover { text-decoration: underline; }
.story-title { margin: 0 0 18px; font-size: 4rem; line-height: 0.98; font-weight: 700; text-transform: uppercase; letter-spacing: -1px; }
.story-author { margin: 0; font-size: 0.95rem; color: #a1a1a1; }
.story-author span { color: #fff; }

.story-text { margin-top: 36px; }
.story-text p, .story-text li { font-size: 1.125rem; line-height: 1.85; color: #e2e2e2; }
.story-text p { margin: 0 0 24px; }
.story-text p:last-child { margin-bottom: 0; }
.story-text .story-lead { font-size: 1.45rem; line-height: 1.6; font-weight: 300; color: #fff; }
.story-text h2, .story-text h3 { margin: 40px 0 16px; font-size: 1.375rem; line-height: 1.2; font-weight: 700; text-transform: uppercase; opacity: 0.6; }
.story-text a { text-decoration: underline; }
.story-text img { display: block; max-width: 100%; height: auto; margin: 8px 0; }
.story-text blockquote { margin: 0 0 24px; padding-left: 20px; border-left: 2px solid #5a5a5a; }

.story-figure { margin-top: 30px; margin-bottom: 0; }
.story-figure a, .story-pair a { display: block; }
.story-figure img { display: block; width: 100%; height: auto; }
.story figcaption { padding-top: 12px; font-size: 0.875rem; line-height: 1.5; color: #a1a1a1; }
.story-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.story-pair figure { margin: 0; }
.story-pair img { display: block; width: 100%; height: 620px; object-fit: cover; }

.story-quote { max-width: 900px; margin: 72px auto 0; padding: 0 24px; border: 0; box-sizing: border-box; }
.story-quote-inner { border-top: 1px solid #5a5a5a; border-bottom: 1px solid #5a5a5a; padding: 44px 8px 40px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.story-quote-mark { width: 40px; height: 30px; fill: none; stroke: #8e8e8e; stroke-width: 4; stroke-linecap: square; }
.story-quote p { margin: 0; font-size: 2.25rem; line-height: 1.3; font-weight: 300; font-style: italic; color: #fff; }
.story-quote cite { font-style: normal; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: #a1a1a1; }

.story-review { max-width: 1000px; margin: 72px auto 0; padding: 0 20px; box-sizing: border-box; }
.story-review-inner { background: #2a2a2a; padding: 48px 52px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px 40px; }
.story-review-photo { flex: 0 0 110px; width: 110px; height: 110px; border-radius: 50%; overflow: hidden; }
.story-review-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-review-body { flex: 1 1 380px; min-width: 0; }
.story-review-stars { display: flex; gap: 4px; margin-bottom: 14px; }
.story-review-stars svg { width: 18px; height: 18px; fill: #d7df21; }
.story-review-text { margin: 0 0 14px; font-size: 1.25rem; line-height: 1.6; font-weight: 300; font-style: italic; color: #fff; }
.story-review-name { margin: 0; font-size: 0.875rem; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
.story-review-name span { font-weight: 400; color: #a1a1a1; }

.story-gallery { margin-top: 40px; }
.story-gallery-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.story-gallery-head h2 { margin: 0; font-size: 1.375rem; font-weight: 700; text-transform: uppercase; opacity: 0.6; }
.story-gallery-head > span:last-child { font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: #a1a1a1; }
.story-gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 260px; gap: 20px; }
.story-gallery--1 .story-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 620px; }
.story-gallery--2 .story-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 460px; }
.story-gallery--3 .story-gallery-grid, .story-gallery--4 .story-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 280px; }
.story-gallery--3 .story-tile--big { grid-column: span 2; grid-row: span 2; }
.story-gallery--4 .story-tile--big { grid-column: span 3; grid-row: span 2; }
.story-tile { position: relative; display: block; overflow: hidden; }
.story-tile--big { grid-column: span 2; grid-row: span 2; }
.story-tile picture, .story-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-tile img { transition: transform 0.4s ease; }
.story-tile:hover img { transform: scale(1.03); }
.story-tile-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(29, 29, 29, 0.66); color: #fff; font-size: 1.9rem; font-weight: 600; }

.story-video { margin-top: 80px; margin-bottom: 0; }
.story-video-frame { position: relative; aspect-ratio: 16 / 9; background: #1d1d1d; }
.story-video-frame img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.story-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.story-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 96px; height: 96px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: rgba(29, 29, 29, 0.55); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
.story-video-play:hover, .story-video-play:focus-visible { background: rgba(29, 29, 29, 0.85); }
.story-video-play svg { width: 32px; height: 32px; margin-left: 5px; fill: #fff; }

.story-end { margin-top: 56px; padding-top: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.story-end { border-top: 1px solid #4a4a4a; max-width: 772px; padding-left: 0; padding-right: 0; }
.story-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.story-tags a { border: 1px solid #5a5a5a; color: #c9c9c9; padding: 5px 14px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.story-tags a:hover { border-color: #d7df21; color: #d7df21; }
.story-end .socialshare { margin: 0; flex: 0 1 auto; width: auto; align-items: center; }

.story-cta { display: flex; flex-wrap: wrap; width: calc(100% - 40px); max-width: 1200px; margin-top: 80px; padding: 0; background: #1d1d1d; }
.story-cta picture { flex: 1 1 380px; min-width: 0; display: block; }
.story-cta img { display: block; width: 100%; height: 360px; object-fit: cover; }
.story-cta-body { flex: 1 1 380px; min-width: 0; box-sizing: border-box; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.story-cta-kicker { margin: 0; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: #d7df21; font-weight: 600; }
.story-cta-title { margin: 0; font-size: 1.9rem; line-height: 1.15; font-weight: 700; text-transform: uppercase; }
.story-cta-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 8px; }
.story-cta-secondary { color: #fff; font-size: 0.875rem; text-transform: uppercase; opacity: 0.7; }
.story-cta-secondary:hover { color: #fff; opacity: 1; }

.story-related { margin-top: 88px; }
.story-related-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.story-related-head h2 { margin: 0; font-size: 2.1rem; font-weight: 700; text-transform: uppercase; }
.story-related-head a { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; }
.story-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.story-related-item { display: flex; flex-direction: column; gap: 14px; color: #fff; }
.story-related-item img { display: block; width: 100%; height: 240px; object-fit: cover; }
.story-related-meta { font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; color: #a1a1a1; }
.story-related-title { font-size: 1.3rem; line-height: 1.15; font-weight: 700; text-transform: uppercase; }
.story-related-item:hover .story-related-title { color: #d7df21; }

/* --- tablet e smartphone: la pagina scorre normalmente (come le altre pagine del sito) */
@media only screen and (max-width: 64em) {
  .story { height: auto; }
  .story-hero img { height: 56vw; }
  .colDx .story-card--featured img { height: 56vw; max-height: 520px; }
  .story-pair img { height: 70vw; max-height: 620px; }
}
@media only screen and (max-width: 40em) {
  .stories { padding: 10px 10px 30px; }
  .stories-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
  .colDx .story-card img { height: 62vw; }
  .story-card-body, .story-card--featured .story-card-body { padding: 20px 20px 24px; }
  .story-card--featured .story-card-title { font-size: 1.8rem; }
  .story-hero img { height: 72vw; }
  .story-back { top: 14px; right: 14px; }
  .story-head { padding-top: 40px; }
  .story-title { font-size: 2.4rem; }
  .story-text .story-lead { font-size: 1.2rem; }
  .story-text p, .story-text li { font-size: 1rem; }
  .story-figure, .story-pair, .story-quote, .story-review, .story-video, .story-cta, .story-related { margin-top: 24px; }
  .story-wide, .story-review { padding: 0 10px; }
  .story-cta { width: calc(100% - 20px); padding: 0; }
  .story-pair { grid-template-columns: 1fr; gap: 10px; }
  .story-pair img { height: auto; max-height: none; }
  .story-quote p { font-size: 1.5rem; }
  .story-review-inner { padding: 30px 24px; }
  .story-gallery-grid, .story-gallery--3 .story-gallery-grid, .story-gallery--4 .story-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 42vw; gap: 10px; }
  .story-gallery--1 .story-gallery-grid, .story-gallery--2 .story-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 62vw; }
  .story-tile--big, .story-gallery--3 .story-tile--big, .story-gallery--4 .story-tile--big { grid-column: span 2; grid-row: span 2; }
  .story-video-play { width: 72px; height: 72px; }
  .story-end { margin-left: 24px; margin-right: 24px; }
  .story-cta-body { padding: 30px 24px; }
  .story-cta img { height: 56vw; }
  .story-related-grid { grid-template-columns: 1fr; }
  .story-related-head h2 { font-size: 1.6rem; }
}
.racconto .story-quote p { text-align: center; }
