:root {
  --bg: #f5f1e9;
  --bg-alt: #ece7db;
  --surface: #fffdf9;
  --text: #1b1714;
  --text-muted: #6a5f58;
  --text-faint: #9a8e88;
  --border: #d8d0c8;
  --border-strong: #c0b0a8;
  --accent: #e8551f;
  --accent-hover: #ff6a33;
  --accent-deep: #c94010;
  --on-accent: #ffffff;
  --footer-bg: #0e0f17;
  --footer-text: #ece7da;
}
html[data-theme="dark"] {
  --bg: #0e0f17;
  --bg-alt: #13151f;
  --surface: #1c1e2e;
  --text: #ece7da;
  --text-muted: #b5afa8;
  --text-faint: #8a8480;
  --border: #2a2d3e;
  --border-strong: #363948;
  --accent: #e8551f;
  --accent-hover: #ff7a4d;
  --accent-deep: #c94010;
  --on-accent: #ffffff;
  --footer-bg: #0e0f17;
  --footer-text: #ece7da;
}

/* =========================
   ACCESSIBILITY UTILITIES
   ========================= */

/* Skip navigation link — visually hidden until focused */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
}

/* Screen-reader only — visually hide but keep accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Global keyboard focus indicator */
*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* =========================
   LAYOUT UTILITIES
   ========================= */

/* Horizontal rule brand divider */
.section-divider {
  border: none;
  height: 1px;
  background-color: var(--accent);
  margin: 40px auto;
  width: 90%;
  max-width: 600px;
}

/* =========================
   TYPOGRAPHY UTILITIES
   ========================= */

/* Inline brand-coloured link */
.link-brand {
  color: var(--accent-hover);
}
.link-brand:hover {
  text-decoration: underline;
}

/* Director name link — brand orange, underline on hover */
.director-link {
  color: var(--accent-hover);
  text-decoration: none;
}
.director-link:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

/* Award category label above a heading */
.award-category {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-hover);
  margin: 0 0 4px 0;
}

/* Secondary director/person name line */
.director-name {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}
/* Gallery Modal Styles */
.poster-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.poster-modal.show, #galleryModal[style*="display: flex"] {
  display: flex !important;
}
.poster-modal__image, #galleryModalImg {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  z-index: 2;
  display: block;
}
.poster-modal__close, #galleryModalClose {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  background: rgba(0,0,0,.6);
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}
#galleryModalClose:hover { background: rgba(255,255,255,0.2); }
#galleryModalPrev, #galleryModalNext {
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#galleryModalPrev:hover, #galleryModalNext:hover {
  background: var(--accent);
}
/* Homepage body — inherits theme vars */
.home {
  background-color: var(--bg);
  color: var(--text);
}

.pre-trailer, .post-trailer {
  background: none;
  color: var(--text);
  padding: 0 48px;
  margin: 36px auto;
  max-width: 800px;
  font-size: 1.15rem;
  line-height: 1.7;
  text-align: center;
}

/* Align event overview paragraph left on desktop, center on mobile */
.event-overview-desc {
  text-align: left;
}
/* Align shortlist description left on desktop, center on mobile */
.shortlist-desc {
  text-align: left;
}

/* Style the site-title link to look like plain text */
.site-title a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.site-title a:visited {
  color: inherit;
}
.site-title a:hover,
.site-title a:active {
  color: inherit;
  text-decoration: none;
}

/* Suppress default link styling on .line spans however they are nested */
.logo .line,
a .line {
  color: var(--on-accent);
  text-decoration: none;
}

html {
  scroll-padding-top: 90px;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg); /* chiaro di default, come le pagine interne */
  color: var(--text);
  overflow-x: hidden;
}

/* Titoli usano Source Code Pro */
h1, h2, h3, h4, h5, h6,
.site-title,
.festival-title,
nav,
.btn {
  font-family: 'Source Code Pro', monospace;
}

/* Homepage main uses theme background */
body.home main {
  background-color: var(--bg);
}


html { scroll-behavior: smooth; }

/* Per la home e le pagine con hero scuro, forziamo uno sfondo nero solo per l'header/hero */
header, .page-hero {
  background-color: #000;
}
/* Riduci dimensione bottone Eventbrite su mobile */

/* NAVIGATION */

.branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  max-width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--on-accent);
}

.site-title {

    display: block;
    color: var(--on-accent);
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 20px;
  white-space: normal;
  word-break: break-word;
    line-height: 1.2;
  text-align: left;
     flex-shrink: 1;
     max-width: none; /* control when line breaks */
  }

.site-title .line {
  display: inline;
}

/* Only allow the <br> to break on mobile */
.mobile-break {
  display: none;
}

  .site-title span {
  display: inline;
}

nav {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: saturate(160%) blur(6px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.nav-inner {
  max-width: 1700px;
  margin: 0 auto;
  padding-left: 30px;
  padding-right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
}

.logo img {
  padding-top: 10px;
  padding-bottom: 10px;
    width: auto;
  height: 70px;
  width: auto;
  flex-shrink: 0; /* prevents logo from shrinking too small */
}


.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: var(--on-accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  word-spacing: -0.05em;
  transition: color 0.3s;
}

.nav-menu li a:hover {
  color: var(--accent);
}

.hamburger {
  display: none;
  font-size: 2rem;
  color: var(--on-accent);
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 4px 8px;
  line-height: 1;
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
  max-width: 800px;
}

/* ==========================
   SCFF 8th Edition — Page styles
   moved from scff_8th_edition.html inline <style>
   ========================== */
.event-section { margin-bottom: 60px; }
.event-section h2 { color: var(--accent-hover); font-size: 1.8rem; margin-bottom: 15px; text-align: left; }
.event-summary { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 30px; }
.event-card { background: var(--surface); border-left: 4px solid var(--accent); padding: 20px; border-radius: 6px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.event-card h3 { margin: 0 0 10px; color: var(--text); font-size: 1.2rem; }
.event-card p { margin: 0; color: var(--text); font-size: 1rem; }
.film-desc { color: var(--text); margin-top: 8px; font-size: 0.95rem; line-height: 1.35; }

/* Film list layout and responsive tweaks */
.film-shortlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.film-item { display: flex; gap: 18px; align-items: flex-start; }
.film-poster { background: none; border: 0; padding: 0; cursor: pointer; flex: 0 0 auto; }
.film-poster img { display: block; width: 140px; height: auto; border-radius: 6px; }
.film-meta { flex: 1 1 auto; min-width: 0; }
.film-meta strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.film-meta span { display: block; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 4px; }


/* Mobile overrides to override the desktop grid-based shortlist */

/* Page hero (header image beneath the menu, with overlayed title/button) */
.page-hero {
  position: relative;
  overflow: hidden;
  background: transparent; /* let the hero image fill the area without a black backing */
  color: #fff;
  /* default hero sizing (will be overridden on pages that opt-in) */
  padding-top: 20px;
  min-height: 36vh;
  display: flex;
  align-items: center; /* vertically center the overlay inside the hero */
  justify-content: center; /* horizontally center the overlay */
}
.page-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('Media_directory/Gallery/DSC05317-Enhanced-NR.jpg');
  background-size: cover;
  background-position: center center;
  opacity: 1; /* show the full image; darken using filter so no transparent black band appears */
  filter: brightness(0.62);
  z-index: 0;
  /* ensure the bg covers the whole hero element height */
  width: 100%;
  height: 100%;
}

/* Page-specific override for pages that have a hero and a fixed nav. We keep
   the default small hero size but increase the top offset so overlay isn't
   hidden under the fixed nav and ensure ample vertical space. */
.with-hero .page-hero {
  padding-top: 100px; /* offset for fixed nav so overlay sits below it */
  min-height: 48vh;   /* larger footprint for the hero on this page */
}

/* Stronger centering for the hero overlay on pages that opt in. Using
   absolute centering avoids subtle layout shifts caused by other header
   elements and guarantees the title/subtitle/button are centered in the
   hero image area. */
.with-hero .page-hero .overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 20px)); /* move overlay 20px lower */
  width: 100%;
  max-width: 1100px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  z-index: 3; /* above the image */
}
.page-hero .overlay {
  position: relative; /* above the background */
  z-index: 2; /* above the hero image but below the nav (nav z-index:1000) */
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center; /* center title/subtitle/button horizontally */
  text-align: center;
}
.page-hero .overlay h1 { margin: 0; font-size: 2rem; color: #fff; }
.page-hero .overlay .subtitle { margin: 0; color: #f3f3f3; font-size: 1rem; }
.page-hero .overlay .btn { margin-top: 6px; }

/* -------- Mobile navigation (shared) -------- */

/* -------- Mobile adjustments for pages with hero -------- */

/* When a header hero exists, pull the main content up so there's no large
   white gap between the hero and the content (avoids the big white area shown previously) */
/* Only pull up content for pages that explicitly opt-in with the .with-hero
   body class. This prevents unintended spacing changes on other pages. */
.with-hero .content-wrapper {
  margin-top: 22px; /* small gap beneath hero */
  text-align: center;
}

.festival-title {
  font-size: 3rem;
  color: var(--accent);
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  font-weight: bold;
}

.subtitle {
  font-size: 1.5rem;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
}

/* Hero subtitle stays light on the dark hero image regardless of theme */
.hero .subtitle {
  color: #f4efe3;
}

.btn {
  display: inline-block;
  margin-top: 15px;
  padding: 20px 25px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  border-radius: 10px;
  transition: background 0.3s;
}

.btn:hover {
  background: var(--accent-hover);
}

/* INTRO SECTION */
.intro {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 60px 10%;
  gap: 40px;
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--bg);
}

/* Trailer/video section — alternating B background */
.intro-grey-bg {
  background-color: var(--bg-alt);
  max-width: 100%;
  padding: 60px 10%;
  position: relative;
}

.intro-grey-bg .text-container h2 {
  color: var(--accent);
}

.intro-grey-bg .text-container p {
  color: var(--text);
}

/* Mirrored intro section (image on right, text on left) */
.intro-reversed {
  flex-direction: row-reverse;
}

.video-container {
  flex: 1;
  max-width: 500px;
}

/* Image container for first section */
.image-container {
  flex: 1;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Carousel styles */
.carousel {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.carousel-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-item.active {
  opacity: 1;
  z-index: 1;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.text-container {
  flex: 1;
  max-width: 500px;
}

.text-container h2 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.text-container p {
  font-size: 1.2rem;
  color: var(--text);
}

/* CONTACT & NEWSLETTER */
.contact-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  padding: 50px 10%;
  background: var(--bg);
  color: var(--text);
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 80px;
}

.divider {
  width: 1px;
  background-color: var(--accent);
  min-height: 300px;
  align-self: stretch;
}

.contact, .newsletter {
  flex: 1;
  max-width: 500px;
}

form input,
form textarea,
form button {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  box-sizing: border-box;
}

form button {
  background: var(--accent-hover);
  color: var(--on-accent);
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

form button:hover {
  background: var(--accent-hover);
}

/* FOOTER */


.footer-gallery {
  position: relative;
  left: 0;
  right: 0;
  width: 100vw;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 20px 0;
  margin: 0 calc(-50vw + 50%);
  box-sizing: border-box;
}

footer {
  width: 100%;
  background: var(--footer-bg);
  padding: 20px;
  text-align: center;
  box-sizing: border-box;
  margin: 0;
  color: var(--footer-text);
}

.footer-logo {
    text-align: center;
  margin-bottom: 15px;
}

.footer-logo a {
  display: inline-block;
}

.footer-logo img {
  width: 100px;
  height: auto;
}


.logo_sponsors {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 90%;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 0;
}

.logo_sponsor_filmstro {
  order: 1;
  justify-self: start;
}

.logo_sponsor_filmfreeway {
  order: 2;
  justify-self: center;
}

.logo_sponsor_ipitch {
  order: 3;
  justify-self: end;
}

.logo_sponsor_ipitch img {
  max-width: 110px;
}

.logo_sponsor_filmstro img {
  max-width: 130px;
}

.logo_sponsors img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.social-icons a {
  margin: 0 10px;
}

.social-icons img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s;
}

.social-icons img:hover {
  transform: scale(1.2);
}

.privacy_cookie {
  color: var(--footer-text);
  text-decoration: underline;
}

.legal-links { margin-top: 22px; }
.legal-links a {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--footer-text);
  opacity: 0.55;
  text-decoration: none;
  transition: opacity .2s ease, color .2s ease;
}
.legal-links a:hover { opacity: 1; color: var(--accent); text-decoration: underline; }


/* MOBILE STYLES */

/* Responsive tweaks for Previous Editions page */

.rules-page {
  background-color: var(--bg);
  color: var(--text);
  padding-left: 30px;
  padding-right: 30px;
}

/* Internal pages (like Scream Culture) don't need the two-line site title in the header */
main.rules-page .site-title {
  display: none;
}

/* Categories grid layout */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 30px 0;
}

.category-block {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.category-block h3 {
  color: var(--accent-hover);
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.category-item {
  margin-bottom: 20px;
}

.category-item:last-child {
  margin-bottom: 0;
}

.category-item h4 {
  color: var(--text);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.category-item p {
  margin: 0;
  line-height: 1.6;
  font-size: 1rem;
}

/* Mobile: stack categories vertically */

/* About Us page - lightweight two-column layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin: 40px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.about-block h2 {
  color: var(--accent-hover);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.about-block ul {
  margin: 0;
  padding-left: 20px;
}

.about-block li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.about-block p {
  margin: 0 0 15px 0;
  line-height: 1.7;
}

.about-block p:last-child {
  margin-bottom: 0;
}

/* Mobile: stack about blocks vertically */

/* Screen Culture Award block */
.award-block {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 35px;
  margin: 30px 0;
  box-shadow: 0 6px 20px rgba(230, 74, 25, 0.15);
  text-align: center;
}

.award-block h2 {
  color: var(--accent-hover);
  margin: 0 0 20px 0;
  font-size: 1.8rem;
}

.award-block .award-description {
  font-size: 1.15rem;
  line-height: 1.7;
  margin: 0 0 15px 0;
  font-weight: 500;
}

.award-block .award-note {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  font-style: italic;
  color: var(--text-muted);
}

.content-wrapper {
  max-width: 1000px;
  margin: 140px auto 0 auto;
  line-height: 1.6;
  font-size: 1.1rem;
  padding-bottom: 80px;
}

.rules-page h1 {
  color: var(--accent-hover);
  font-size: 2.5rem;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
  position: relative;
}

/* PREVIOUS EDITIONS PAGE */

/* Per-year heading inside each editions-grid */
.edition-year-heading {
  color: var(--accent-hover);
  font-size: 1.6rem;
  text-align: center;
  margin: 0 0 12px 0;
  padding-top: 8px;
}

.page-subtitle {
  text-align: center;
  color: var(--text-faint);
  font-size: 1rem;
  margin-top: -10px;
  margin-bottom: 8px;
}

.imdb-event-link {
  text-align: center;
  margin: 0 auto 28px;
  font-size: 0.9rem;
}

.imdb-event-link a {
  color: var(--accent-hover);
  text-decoration: underline;
}

.imdb-event-link a:hover {
  color: var(--accent-deep);
}

.previous_editions #main-content {
  padding-top: 100px;
}

.previous_editions h1 {
  color: var(--accent-hover);
  font-size: 2.5rem;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
  position: relative;
}

.gallery-page h1 {
  color: var(--accent-hover);
  font-size: 2.5rem;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
  position: relative;
}

.gallery-intro {
  max-width: 700px;
  margin: 0 auto 32px auto;
  text-align: center;
  color: var(--text-faint);
  font-size: 1rem;
  line-height: 1.7;
}



    .year-filters {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 50px;
      margin-bottom: 30px;
    }

    .year-filters button {
      padding: 10px 20px;
      border: 1px solid var(--accent);
      background-color: var(--bg);
      color: var(--text);
      font-weight: bold;
      cursor: pointer;
      transition: background 0.3s, color 0.3s;
    }

    .year-filters button:hover {
      background-color: var(--accent);
      color: var(--on-accent);
    }

    .year-filters button.active-year {
      background-color: var(--accent);
      color: var(--on-accent);
      border-color: var(--on-accent);
    }

    .edition-entry {
      display: flex;
      align-items: stretch;
      margin: 0 auto;
      max-width: 1000px;
      width: 100%;
      box-sizing: border-box;
      padding: 20px 30px;
      gap: 30px;
      border-bottom: 1px solid var(--accent);
      min-height: 270px; /* poster max-height 230px + 20px top/bottom padding */
    }

    .editions-grid {
      display: flex;
      flex-direction: column;
      gap: 0;
      max-width: 1000px;
      margin: 0 auto;
    }

    .edition-entry img {
      width: 160px;
      height: 100%;
      max-height: 230px;
      object-fit: cover;
      flex-shrink: 0;
      border: 1px solid var(--border-strong);
      border-radius: 8px;
    }

    .edition-entry .description {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .edition-entry .description h3 {
      margin-top: 0;
      color: var(--accent-hover);
    }

    .origin-trailer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.origin-trailer p {
  margin: 0;
}

.origin-trailer a {
  margin: 0;
  text-decoration: underline;
  color: var(--accent-hover);
  font-weight: bold;
}

.origin-trailer a:hover {
  color: var(--accent-deep);
}

/* Footer links group — right-aligned, joined by | in HTML */
.footer-links {
  display: inline-block;
  margin-left: auto;
  color: var(--text-faint); /* muted color for the | separator text node */
}

.footer-links a {
  color: var(--accent-hover);
  font-weight: bold;
  text-decoration: underline;
  margin: 0;
}

.footer-links a:hover {
  color: var(--accent-deep);
}

.edition-entry .description h2,
.edition-entry .description h3,
.edition-entry .description h4 {
  margin-top: 0.3em;
  margin-bottom: 0.3em;
}
    /* LIGHTBOX POSTER VIEW */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border: 4px solid white;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
}

   /* CONTACT FORM STYLE MESSAGE */
.form-message {
  margin-top: 15px;
  font-weight: bold;
  font-size: 1rem;
}

form input[type="email"],
form input[type="submit"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 0px solid #fff;
  border-radius: 5px;
  font-size: 1rem;
}

form input[type="submit"] {
  background: var(--accent-hover);
  color: var(--on-accent);
  font-weight: bold;
  cursor: pointer;
}

form input[type="submit"]:hover {
  background: var(--accent-hover);
}

.hp {
   position: absolute; 
   left: -9999px; 
   width: 1px; 
   height: 1px; 
   overflow: hidden; }



.gallery-wrapper {
  max-width: 1000px;
  margin: 60px auto 40px auto;
  padding: 0 20px;
}

.main-image {
  margin-bottom: 0;
}

.main-image img {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--accent);
}

.gallery-nav {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 8px 0 12px;
}

.thumbnail-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gallery-arrow {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--accent-hover);
  cursor: pointer;
  padding: 0 10px;
  transition: transform 0.3s;
}

.gallery-arrow:hover {
  transform: scale(1.2);
}

.thumbnails {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  padding: 10px 0;
}

.thumbnails img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  scroll-snap-align: center;
  transition: border 0.3s;
}

.thumbnails img:hover {
  border: 2px solid var(--accent);
}



/* =========================
   SCREAM CULTURE — Shortlist
   Poster left, text right
   ========================= */
.film-shortlist {
  list-style: none;
  padding: 0;
  margin: 30px 0 0 0;
  display: grid;
  gap: 18px;
}

.film-shortlist li {
  background: var(--surface);
  border-radius: 6px;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Poster quadrato a sinistra, info a destra */
.film-shortlist li.film-item {
  display: grid;
  grid-template-columns: 150px 1fr; /* poster | testo */
  gap: 16px;
  align-items: start; /* allinea il testo in alto */
}

.film-shortlist li.film-item .film-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.film-shortlist li.film-item strong {
  color: var(--text);
  font-size: 1.2rem;
}

.film-shortlist li.film-item span {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Bottone poster (apre la modale) */
.film-poster {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  width: 100%;
  max-width: 150px;   /* deve matchare la colonna di sinistra */
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  justify-self: start;
}

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

/* Accessibilità focus */
.film-poster:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Mobile */


/* Lightbox modal per i poster */
.poster-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 3000; /* sopra nav e cookie */
}

.poster-modal.show { display: flex; }

/* layer 1: backdrop cliccabile */
.poster-modal__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: zoom-out;
  z-index: 1;
}

/* layer 2: immagine sopra al backdrop */
.poster-modal__image {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  z-index: 2;
  display: block;
}

/* layer 3: bottone chiudi in alto a destra */
.poster-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  background: rgba(0,0,0,.6);
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  z-index: 3; /* sopra immagine */
  transition: background 0.2s ease;
}
.poster-modal__close:hover { background: rgba(255,255,255,0.2); }

/* quando la modale è aperta blocca lo scroll (aggiunto via JS) */
body.no-scroll, html.no-scroll { overflow: hidden !important; }


/* =========================
   SCREAM CULTURE — YouTube thumbnail embed
   ========================= */
.premiere-embed {
  margin-top: 30px;
  margin-bottom: 80px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}
.premiere-embed .yt-thumb {
  position: absolute;
  inset: 0;
  display: block;
}
.premiere-embed .yt-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.premiere-embed .yt-overlay-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  line-height: 1;
  padding: 14px 18px;
  background: rgba(0,0,0,.45);
  color: #fff;
  border-radius: 50%;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  pointer-events: none;
}
.premiere-embed .yt-subscribe-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: #ff0000;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.premiere-embed .yt-subscribe-badge:hover {
  filter: brightness(1.05);
}
.event-cta {
  display: flex;
  justify-content: center;
  margin: 12px 0 20px;
}
.event-cta .btn.watch-now {
  background: var(--accent);
  color: #000; /* black text by default */
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.08em;
  border-radius: 999px; /* pill shape */
  padding: 10px 20px;
  border: 2px solid var(--accent);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  transition: transform .15s ease, box-shadow .3s ease, background .2s ease, color .2s ease;
}
.event-cta .btn.watch-now:hover {
  color: #fff; /* change text color on hover */
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
  background: var(--accent-hover); /* a touch brighter on hover */
  border-color: var(--accent-hover);
}
.event-cta .btn.watch-now:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

/* FilmFreeway submission button (small inline image link) */
.filmfreeway-button {
  display: inline-block;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  will-change: transform, box-shadow;
  border-radius: 8px; /* for focus outline */
}
.filmfreeway-button img {
  display: block;
  height: auto;
  max-width: 100%;
  vertical-align: middle;
}
.filmfreeway-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  opacity: 1;
}
.filmfreeway-button:active {
  transform: translateY(-1px) scale(0.995);
}
.filmfreeway-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  box-shadow: 0 8px 20px rgba(230,74,25,0.12);
}

/* =========================
   RESPONSIVE OPTIMIZATIONS FOR LARGE SCREENS
   Fixes content width, typography scaling, and layout issues on 1400px+ screens
   ========================= */

/* LARGE SCREENS: 1400px - 1919px */

/* EXTRA LARGE SCREENS: 1920px+ */

/* TABLET OPTIMIZATIONS: 768px - 1023px */

/* SAFARI iOS FIX: Viewport height with dynamic URL bar */
.hero {
  min-height: 100svh; /* standard: small viewport height unit */
  min-height: -webkit-fill-available; /* Safari iOS workaround */
}

/* Partner links styling - no underline, orange on hover */
.partner-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.partner-link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* TOUCH DEVICES: Only apply hover effects on devices with hover capability */

/* =========================
   RULES PAGE — Fees table
   ========================= */

/* Scroll wrapper: enables horizontal scroll on narrow screens without
   breaking the table's internal layout */
.fees-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0 24px;
}

.fees-table {
  width: 100%;
  min-width: 420px; /* keeps columns readable; triggers scroll below this */
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
  background: var(--surface);
  border-left: 4px solid var(--accent); /* matches .category-block accent pattern */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.fees-table caption {
  caption-side: top;
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-faint);
  font-style: italic;
  padding: 0 0 8px 0;
}

.fees-table thead tr {
  background: #222;
  color: #fff;
}

.fees-table thead th {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--accent);
}

.fees-table tbody td {
  padding: 12px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.fees-table tbody tr:last-child td {
  border-bottom: none;
}

.fees-table tbody tr:nth-child(even) {
  background: var(--bg-alt);
}

/* =========================
   RULES PAGE — FilmFreeway CTA wrapper
   ========================= */
.submit-cta {
  text-align: center;
  margin: 36px 0;
}

/* =========================
   TESTIMONIALS SECTION (homepage)
   ========================= */
.testimonials {
  background-color: var(--bg);
  padding: 60px 10%;
}

.testimonials-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.testimonials h2 {
  color: var(--accent);
  font-size: 2rem;
  text-align: center;
  margin: 0 0 10px 0;
}

.testimonials-rating {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 36px 0;
}

.testimonials-rating a {
  color: var(--accent);
  text-decoration: underline;
}

.testimonials-rating a:hover {
  text-decoration: underline;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

.testimonials-grid figure {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 24px;
  margin: 0;
}

.testimonials-grid blockquote {
  margin: 0 0 14px 0;
  padding: 0;
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--text);
}

.testimonials-grid blockquote::before {
  content: '\201C';
  font-size: 2rem;
  line-height: 0;
  vertical-align: -0.35em;
  color: var(--accent);
  margin-right: 2px;
}

.testimonials-grid figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.testimonials-footer {
  text-align: center;
}

.testimonials-footer a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonials-footer a:hover {
  text-decoration: underline;
}


/* =========================
   FAQ SECTION (homepage)
   ========================= */
.faq {
  background-color: var(--bg-alt);
  padding: 60px 10%;
}

.faq-inner {
  max-width: 800px;
  margin: 0 auto;
}

.faq h2 {
  color: var(--accent);
  font-size: 2rem;
  text-align: center;
  margin: 0 0 40px 0;
}

.faq details {
  border-bottom: 1px solid rgba(230, 74, 25, 0.3);
}

.faq details:first-of-type {
  border-top: 1px solid rgba(230, 74, 25, 0.3);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  user-select: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  color: var(--accent);
}

.faq details[open] > summary::after {
  content: '\2212'; /* − minus sign */
}

.faq details > p {
  margin: 0 0 18px 0;
  padding-right: 32px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.faq a {
  color: var(--accent);
  text-decoration: none;
}

.faq a:hover {
  text-decoration: underline;
}


/* =========================
   RULES PAGE — Fees table: stacked-card layout on narrow screens
   Replaces horizontal scroll (overflow-x) with one card per submission window.
   Desktop table rule (above) is untouched — this block is additive only.
   ========================= */

/* ===== RESPONSIVE — grouped by breakpoint, base-first ===== */

@media (max-width: 900px) {  .nav-menu { display: none; }
  .hamburger { display: block; }
  .nav-menu.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.95);
    padding: 16px 24px;
    gap: 12px;
    z-index: 1100;
  }
  .nav-menu.show li a { font-size: 0.9rem; }
}

@media (max-width: 877px) {    .branding {
    flex-direction: row; /* mantieni logo e titolo in riga */
    align-items: center;
    gap: 10px;
  }

  .festival-title {
    font-size: 1.8rem;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    max-width: 90%;
    margin: 0 auto;
  }

  .mobile-break {
    display: inline;
  }

  .site-title {
    font-size: 1rem;
    max-width: 110px; /* forza l'andata a capo interna */
    word-break: break-word;
  }
    .site-title .line {
    display: block;
  }

      /* .mobile-break duplicate collapsed */

  .intro {
    flex-direction: column;
    text-align: center;
    padding: 40px 5%;
  }

  /* Mirrored section also stacks on mobile */
  .intro-reversed {
    flex-direction: column-reverse; /* Image top, text bottom on mobile */
  }

  .image-container {
    max-width: 100%;
    padding: 0;
    width: 100%;
  }

  .video-container {
    max-width: 100%;
    width: 100%;
  }

  .text-container {
    max-width: 100%;
    width: 100%;
  }

  .text-container h2 {
    font-size: 1.5rem;
  }

  .text-container p {
    font-size: 1rem;
  }

  .carousel {
    width: 100%;
    margin: 0 auto;
  }

  .video-wrapper {
    width: 100%;
  }

  .contact-section {
    flex-direction: column;
    align-items: center;
  }

  .contact,
  .newsletter {
    width: 100%;
    max-width: 400px;
  }

  .divider {
    display: none;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.95);
    position: absolute;
    top: 70px;
    right: 40px;
    padding: 20px;
    border-radius: 8px;
    z-index: 2000;
  }

  .nav-menu.show {
    display: flex;
  }

  .hamburger {
    display: block;
  }


  .logo_sponsors {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }

  .logo_sponsors img {
    max-width: 22vw;
    height: auto;
  }
  /* Preserve link colours that desktop rules define — mobile layout resets can
     strip inherited colour so we re-declare explicitly here. */
  .director-link {
    color: var(--accent-hover);
    text-decoration: none;
  }
  .director-link:hover {
    color: var(--accent-deep);
    text-decoration: underline;
  }
  .origin-trailer a {
    color: var(--accent-hover);
    text-decoration: underline;
  }
  .origin-trailer a:hover {
    color: var(--accent-deep);
  }
  .footer-links a {
    color: var(--accent-hover);
    text-decoration: underline;
  }
  .footer-links a:hover {
    color: var(--accent-deep);
  }
  .imdb-event-link a {
    color: var(--accent-hover);
    text-decoration: underline;
  }
  .imdb-event-link a:hover {
    color: var(--accent-deep);
  }
  .testimonials {
    padding: 40px 5%;
  }
  .testimonials h2 {
    font-size: 1.5rem;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .faq {
    padding: 40px 5%;
  }
  .faq h2 {
    font-size: 1.5rem;
  }
  .faq summary {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {  .event-section { margin-bottom: 45px; }
  .event-section h2 { font-size: 1.5rem; }
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-block {
    padding: 20px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .editions-grid {
    padding: 0 15px;
  }

  .edition-entry {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
    min-height: auto;
  }

  .edition-entry img {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 15px;
  }

  .edition-entry .description {
    width: 100%;
  }

  .origin-trailer {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
  }

  .origin-trailer p,
  .origin-trailer a {
    width: 100%;
    text-align: center;
  }

  .footer-links {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .year-filters {
    padding: 0 10px;
    text-align: center;
  }

  .year-filters button {
    flex: 1 1 100px;
  }

  /* Re-assert link colours — layout-only overrides above can cascade away
     the orange defined in base rules. */
  .director-link {
    color: var(--accent-hover);
    text-decoration: none;
  }
  .director-link:hover {
    color: var(--accent-deep);
    text-decoration: underline;
  }
  .origin-trailer a {
    color: var(--accent-hover);
    text-decoration: underline;
  }
  .origin-trailer a:hover {
    color: var(--accent-deep);
  }
  .footer-links a {
    color: var(--accent-hover);
    text-decoration: underline;
  }
  .footer-links a:hover {
    color: var(--accent-deep);
  }
  .imdb-event-link a {
    color: var(--accent-hover);
    text-decoration: underline;
  }
  .imdb-event-link a:hover {
    color: var(--accent-deep);
  }
  .main-image img {
    max-height: 300px;
  }

  .thumbnails img {
    width: 80px;
    height: 60px;
  }

  .gallery-arrow {
    font-size: 1.5rem;
  }
}

@media (max-width: 700px) {  .pre-trailer, .post-trailer {
    padding: 0 8px;
    font-size: 1rem;
  }
  .event-overview-desc {
    text-align: center;
  }
  .shortlist-desc {
    text-align: center;
  }
  .page-hero .overlay .btn,
  .btn.btn--orange {
    font-size: 1rem;
    padding: 10px 18px;
    border-radius: 8px;
  }
  /* border-radius omitted for .event-cta .btn.watch-now — base pill (999px) wins */
  .event-cta .btn.watch-now {
    font-size: 1rem;
    padding: 10px 18px;
  }
  .film-shortlist li.film-item { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
  .film-shortlist li.film-item .film-poster { justify-self: center; max-width: 360px; width: 100%; }
  .film-shortlist li.film-item .film-poster img { width: 100%; height: auto; object-fit: cover; margin: 0 0 8px 0; }
  .film-shortlist li.film-item .film-meta { width: 100%; }
  .film-shortlist li.film-item .film-meta strong { font-size: 1rem; }
  .film-shortlist li.film-item .film-meta span { font-size: 0.9rem; }
  .film-shortlist li.film-item .film-desc { font-size: 0.9rem; line-height: 1.4; }

  /* Make the paragraph directly after the Event Overview heading match film description size */
  #event-overview + p,
  .event-section[aria-labelledby="event-overview"] > p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  .page-hero .overlay { padding: 28px 14px; align-items: center; text-align: center; }
  .page-hero .overlay h1 { font-size: 1.4rem; }
  .page-hero .overlay .subtitle { font-size: 0.9rem; }
  .page-hero .overlay .btn { width: auto; }
  .with-hero .page-hero .overlay {
    transform: translate(-50%, calc(-50% + 20px));
  }
  .with-hero .page-hero {
    padding-top: 90px; /* ensure hero and overlay are below the fixed nav */
    min-height: 28vh;
  }
  /* On small screens avoid absolute centering which can push content off-screen */
  .with-hero .page-hero .overlay {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: calc(100% - 32px);
    padding: 16px;
  }
  /* .with-hero .content-wrapper { margin-top: 12px } — dead; base 22px wins */

  /* Shortlist: force poster above text on mobile */
  .film-shortlist li.film-item {
    display: block !important;
    padding: 15px;
  }
  .film-shortlist li.film-item .film-poster {
    max-width: 360px;
    margin: 0 auto;
  }
  .film-shortlist li.film-item .film-poster img {
    width: 100%;
    height: auto;
  }
  .film-shortlist li.film-item .film-meta {
    width: 100%;
  }
  .film-shortlist li.film-item .film-desc {
    font-size: 0.9rem;
  }
  .film-shortlist li.film-item {
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 15px;
  }
  /* .film-poster { max-width:110px } — dead; .film-shortlist li.film-item .film-poster (spec 0,3,1) wins */
  .event-cta .btn.watch-now {
    padding: 10px 18px;
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {  /* No longer need horizontal scroll — cards never overflow their container */
  .fees-table-scroll {
    overflow-x: visible;
  }

  /* Reset table-level decoration; each card (tr) carries its own */
  .fees-table {
    min-width: 0;
    background: transparent;
    border-left: none;
    box-shadow: none;
  }

  /* Override display:table-caption so the caption fills the full container width
     instead of shrink-wrapping to the table content (which causes one-word-per-line
     wrapping when the table switches to display:block). Font/colour/style are
     inherited from the desktop .fees-table caption rule above. */
  .fees-table caption {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    margin-bottom: 6px;
  }

  /* Column headers are replaced by data-label ::before on each cell */
  .fees-table thead {
    display: none;
  }

  /* Flatten the table structure so cards can stack vertically */
  .fees-table,
  .fees-table tbody {
    display: block;
    width: 100%;
  }

  /* Each <tr> becomes a card */
  .fees-table tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent); /* brand orange accent retained */
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  }

  /* Cancel alternating row background — cards use surface colour */
  .fees-table tbody tr:nth-child(even) {
    background: var(--surface);
  }

  /* Each <td> is a label-value row inside the card */
  .fees-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: normal; /* override desktop nowrap */
  }

  .fees-table td:last-child {
    border-bottom: none;
  }

  /* Column label generated from data-label attribute */
  .fees-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    margin-right: 12px;
  }
}

@media (min-width: 701px) {  .film-shortlist li.film-item .film-meta,
  .film-shortlist li.film-item .film-desc {
    text-align: left !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {  .content-wrapper {
    max-width: 720px;
    padding: 0 30px;
  }

  .intro,
  .intro-grey-bg {
    padding: 50px 8%;
  }

  /* Categories on tablets: single column for better readability */
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 700px;
    margin: 30px auto;
  }

  .category-block {
    padding: 25px;
  }

  /* Navigation adjustments */
  .nav-menu li a {
    font-size: 0.82rem;
  }

  /* Contact section */
  .contact-section {
    flex-direction: column;
    max-width: 600px;
  }

  .divider {
    display: none;
  }
}

@media (min-width: 1400px) {  /* Content Containers */
  .content-wrapper {
    max-width: 1400px;
  }

  /* Homepage Intro Sections — no max-width/margin so background bleeds full-width */
  .intro,
  .intro-grey-bg {
    padding: 70px 60px;
  }

  .text-container {
    max-width: 600px;
  }

  .image-container,
  .video-container {
    max-width: 600px;
  }

  /* Contact Section */
  .contact-section {
    max-width: 1400px;
  }

  /* Gallery */
  .gallery-wrapper {
    max-width: 1300px;
  }

  /* Previous Editions */
  .edition-entry {
    max-width: 1300px;
    min-height: 320px; /* poster max-height 280px + 20px top/bottom padding */
  }

  .edition-entry img {
    width: 200px;
    max-height: 280px;
  }

  /* Rules Page - Categories Grid */
  .categories-grid {
    gap: 50px;
  }

  .category-block {
    padding: 30px;
  }

  /* Award Block */
  .award-block {
    padding: 40px;
  }
}

@media (min-width: 1920px) {  /* Base Typography Scaling */
  body {
    font-size: 18px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 1.8rem;
  }

  p {
    font-size: 1.25rem;
    line-height: 1.8;
  }

  /* Content Containers */
  .content-wrapper {
    max-width: 1600px;
  }

  /* Hero Section */
  .hero .overlay {
    max-width: 1000px;
  }

  .festival-title {
    font-size: 4rem;
  }

  .subtitle {
    font-size: 2rem;
  }

  /* Homepage Intro Sections */
  .intro,
  .intro-grey-bg {
    padding: 80px 80px;
  }

  .text-container {
    max-width: 700px;
  }

  .text-container h2 {
    font-size: 2.5rem;
  }

  .text-container p {
    font-size: 1.35rem;
  }

  .image-container,
  .video-container {
    max-width: 700px;
  }

  /* Contact Section */
  .contact-section {
    max-width: 1600px;
    padding: 60px 10%;
  }

  .contact,
  .newsletter {
    max-width: 600px;
  }

  .trailer-text {
    font-size: 1.3rem;
  }

  .pre-trailer,
  .post-trailer {
    max-width: 1000px;
    font-size: 1.3rem;
  }

  /* Gallery Page */
  .gallery-wrapper {
    max-width: 1600px;
  }

  .main-image img {
    max-height: 700px;
  }

  .thumbnails img {
    width: 160px;
    height: 107px;
  }

  /* Previous Editions Page */
  .editions-grid {
    max-width: 1500px;
  }

  .edition-entry {
    max-width: 1500px;
    padding: 30px 40px;
    gap: 50px;
    min-height: 400px; /* poster max-height 340px + 30px top/bottom padding */
  }

  .edition-entry img {
    width: 240px;
    max-height: 340px;
  }

  .edition-entry .description {
    font-size: 1.25rem;
  }

  .year-filters button {
    padding: 12px 28px;
    font-size: 1.15rem;
  }

  /* Rules Page */
  .categories-grid {
    gap: 60px;
    max-width: 1600px;
    margin: 40px auto;
  }

  .category-block {
    padding: 35px;
  }

  .category-block h3 {
    font-size: 1.6rem;
  }

  .category-item h4 {
    font-size: 1.25rem;
  }

  .category-item p {
    font-size: 1.15rem;
  }

  .award-block {
    padding: 50px;
    max-width: 1400px;
    margin: 50px auto;
  }

  .award-block h2 {
    font-size: 2.2rem;
  }

  .award-block .award-description {
    font-size: 1.3rem;
  }

  .award-block .award-note {
    font-size: 1.15rem;
  }

  /* Navigation */
  .nav-inner {
    padding-left: 50px;
    padding-right: 50px;
  }

  .nav-menu li a {
    font-size: 1rem;
  }

  .site-title {
    font-size: 1.3rem;
  }

  /* Buttons */
  .btn {
    font-size: 1.3rem;
    padding: 22px 30px;
  }

  /* Forms */
  form input,
  form textarea,
  form button {
    font-size: 1.15rem;
    padding: 12px;
  }
}

@media (hover: hover) and (pointer: fine) {  /* All hover effects are already defined, this ensures they only work on hover-capable devices */
}

/* =========================
   THEME TOGGLE PILL (fixed, bottom-right)
   ========================= */
.theme-toggle {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 1rem));
  bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(217, 164, 65, 0.45);
  background: rgba(20, 22, 34, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  transition: bottom .3s ease;
  color: #f4efe3;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.theme-toggle:focus-visible {
  outline: 2px solid #d9a441;
  outline-offset: 2px;
}
/* Icon spans — sized, inline-flex for vertical alignment */
.theme-toggle .icon-day,
.theme-toggle .icon-night {
  display: inline-flex;
  align-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
/* CSS-only icon swap — no JS needed for the visual change */
html:not([data-theme="dark"]) .theme-toggle .icon-night { display: none; }
html[data-theme="dark"]       .theme-toggle .icon-day   { display: none; }

/* Beige pill in Day/light theme — overrides the dark-glass default */
html:not([data-theme="dark"]) .theme-toggle {
  background: rgba(236, 231, 219, 0.9);
  color: var(--text);
  border-color: rgba(217, 164, 65, 0.55);
}
/* Track needs contrast against the beige pill in light mode */
html:not([data-theme="dark"]) .theme-track {
  background: rgba(100, 80, 60, 0.15);
  border-color: rgba(217, 164, 65, 0.5);
}

/* Sliding switch track and thumb */
.theme-track {
  display: inline-flex;
  align-items: center;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(217, 164, 65, 0.4);
  padding: 2px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.theme-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d9a441;
  color: rgba(20, 22, 34, 1);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
html[data-theme="dark"] .theme-thumb {
  transform: translateX(16px);
}
.theme-thumb .icon-day,
.theme-thumb .icon-night {
  width: 10px;
  height: 10px;
}
.theme-thumb .icon-day svg,
.theme-thumb .icon-night svg {
  width: 10px;
  height: 10px;
  display: block;
}
