:root {
  --textcolor: #b12200;
  --bgcolor: #e2c1b9;
  --highlight: #4f5e45;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
  
body {
  font-size: 18px;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.4;
  color: var(--textcolor);
  background: var(--bgcolor);
  position: relative;
  letter-spacing: .05em;
  max-width: 64em;  /* remove this for a full-width layout */
  margin: 0 auto;  /* centers the layout */

    /* Add background image */

  background-image: url('img/watkins-bg-TR.jpg');
  background-repeat: repeat;
  background-size: auto; /* Show at original size, no scaling */
  background-position: top left; /* Optional: control starting position */
}

body.en {
  --bgcolor: #afb5aa;
  background: #afb5aa;
  background-image: url('img/watkins-bg-EN.jpg');
}


/* ------- Badge a la Dexter Sinister ------- */

.badgeContainer,
#badge-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    margin: -90px 0 0 -90px;
    z-index: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: none; /* ADD THIS - hide by default */
}

#badge-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    border: none;
}

#badge-link:hover {
    border-bottom: none; /* Override link hover styles */
}

#badge {
    position: absolute;
    vertical-align: top;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures proper scaling */
}

/* Show badge on all pages EXCEPT home */
section:not(#home):target ~ #badge-container {
    display: block; /* Show when any non-home section is active */
}

/* Fallback for browsers without :has() support */
@supports not selector(:has(*)) {
    /* Badge will remain visible in older browsers */
}

/*-- Badge over --*/


/* ------- Sections ------- */

section {
  padding: calc(10em + 5vw) 5vw 8vw 5vw;
  /* ! Everything below is needed ! */
  display: none;
  position: absolute;
  top: 0;
  min-height: 100vh;
  width: 100%;
  /* background: var(--bgcolor); */
  background: transparent;
}

section:target { /* Show section */
  display: block;
}

section#home { /* Show #home by default */
  display: block;
}

/* Hide home section when any other section is targeted */
section:not(#home):target ~ section#home {
  display: none;
}

/* Remove the sibling combinator version, use only :has() */
body:has(section:not(#home):target) section#home {
  display: none;
}

/* ------- Header ------- */

header {
  padding: 5vw 5vw 0 5vw;
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  width: 100%;
  z-index: 2;
  gap: 0.5em 2em;
  margin-bottom: 4em; /* adds space between header and content on desktop */
}

header h1 {
  font-size: 1em;
  flex: 1; /* pushes nav to the right */
  white-space: nowrap;
  padding: 0;
}

header h1 img {
  position: absolute;
  width: 35%;
  margin-top: -20px;
}

header h1 span {
  position: absolute;
  left: -9999px;
}

header.logo {
  width:200px;
  margin-top: -20px;
}

#gorultulogo  {
  width: 120px;
  margin: -40px 0 -20px 0;
} 
 
#date  {
  width: 70%;
} 

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em 0.5em;
}

nav a {
  padding: 0.3em 0.6em;
  transition: background-color 0.15s ease;
}

nav a:hover {
  background-color: white;
  border: none;
}

nav a.active {
  background-color: white;
}

/* ------- Header Image ------- */

.header-image {
  position: absolute;
  top: calc(5vw + 2.5em);
  left: 5vw;
  z-index: 1;
  width: 40%;
}

.header-image a {
  border: none;
}

.header-image a:hover {
  border: none;
}

.header-image img {
  width: 100%;
  height: auto;
}

/* ------- General ------- */

a {
  text-decoration: none;
  color: var(--highlight);
}

a:hover {
  border-bottom: 1px solid;
}

section h1 {
  font-size: 2em;
  margin: 0 0 0.5em 0;
  color: var(--highlight);
}

section h1 a {
  color: var(--highlight);
}

h2 {
  font-size: 1.5em;
  margin: 1em 0;
}

h3, h4 {
  font-size: 1em;
  font-weight: 600;
  margin: 1.6em 0 .6em 0;
}

p, ul, ol, article {
  max-width: 60ch; /* Limit line-length to 60 characters */
  margin-bottom: 2em;
}

.spot {
  font-size: 1.3em;
}


ul {
  list-style-type: none;
}

ul li::marker {
  content: "\2022   ";
}

li {
  margin-bottom: .2em;
}

ul, ol {
  padding-left: 2ch;
}

b, strong {
  font-weight: 600;
}

small {
  font-size: .85em;
}

hr {
  height: 2px;
  border: 0;
  background: currentColor;
  margin: 1.2em 0;
  color: var(--textcolor);
}

abbr {
  text-decoration: none;
}

abbr[title]:hover {
  opacity: .7;
  cursor: help;
}

blockquote {
  padding-left: 2ch;
  opacity: .7;
  margin-bottom: .6em;
  position: relative;
}

blockquote:before {
  content: "";
  position:absolute;
  left: 0;
  top: .3em;
  bottom: .3em;
  background: currentColor;
  width: 1px;
  opacity: .2;
}

img, svg, video, audio {
  display: block;
  max-width: 100%;
  height: auto;
  fill: currentColor;
}
  
code, textarea {
  font-family: ui-monospace, SF Mono, Menlo, Monaco, Andale Mono, monospace;
  font-size: 1em;
  opacity: .7;
}

a code {
  opacity:1;
}

pre, textarea { /* for code samples */
  font-size: .9em;
  color: inherit;
  line-height:inherit;
  padding:.6em .9em;
  margin: .8em 0 1em 0;
  position: relative;
  display: block;
  width: 100%;
  white-space: pre;
  border:0;
  border-radius: 4px;
  background:rgba(255,255,100,.075);
  box-shadow: inset 1px 1px 0 rgba(0,0,0,.2), inset -1px -1px 0 rgba(0,0,0,.04) ;
}

.alt-title {
  font-size: 2em;
  font-weight: normal;
  margin-top: -0.7em;
  color: var(--highlight);
}

.moon p {
  color: #531000;
  text-indent: 2em;
  margin: 0;
}

.moon p.zero {
  text-indent: 0;
}

.moon h1 {
  margin: 2em 0 0 0;
  font-weight: normal;
  font-size: 4em;
  line-height: 1em;
  color: #531000;
}

.moon h2 {
  margin:1em 0;
}

.moon small {
  text-indent: 0;
}

.book {
  float: right;
  width:50%; 
  padding: 0 0 2em 2em;
}

.firstchar {
  float: left;
  font-size: 5em;
  margin: -0.2em 0;
  padding: 0 0.2em 0.2em 0;
}

/* ------- Moon Article Sidebar ------- */

.moon-sidebar {
  position: fixed;
  left: calc(50% + 14em); /* 2em past the right edge of content area */
  top: 8em;
  font-size: 1em;
  color: #531000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100;
  max-width: 14em;
}

.moon-sidebar.visible {
  opacity: 1;
  visibility: visible;
}

.moon-sidebar .sidebar-title {
  font-size: 1em;
  font-weight: bold;
  margin: 0;
  line-height: 1.3;
}

.moon-sidebar .sidebar-subtitle {
  font-size: 1em;
  margin: 0;
  line-height: 1.3;
}

.moon-sidebar .sidebar-author {
  font-size: 1em;
  margin: 0.5em 0 0 0;
  line-height: 1.3;
}

.moon-sidebar .sidebar-up {
  display: block;
  margin-top: 1.5em;
  color: var(--textcolor);
  text-decoration: none;
  font-size: 1em;
}

.moon-sidebar .sidebar-up:hover {
  border-bottom: 1px solid var(--textcolor);
}

/* Hide sidebar on smaller screens */
@media (max-width: 1200px) {
  .moon-sidebar {
    display: none;
  }
}

/* ------- Timetable ------- */

.pw-schedule {
  border-collapse: collapse;
  width: 100%;
}

.pw-schedule th {
  font-size: 0.75em;
  font-weight: bold;
  text-transform: uppercase;
  text-align: left;
  vertical-align: baseline;
  padding: 0 25px 20px 0;
  border-bottom: 1px solid;
}

.pw-schedule td {
  border-bottom: 1px solid;
  vertical-align: baseline;
  padding: 20px 20px 10px 0;
}

.pw-schedule td:nth-child(1) { 
  font-weight: bold; 
  white-space: nowrap;
}

.pw-schedule td:nth-child(4) { 
  font-size: 1.2em; 
}

/* Multi-event days */
.pw-schedule .day-start td {
  border-bottom: none;
}

.pw-schedule .same-day td {
  padding-top: 0;
  border-bottom: none;
}

.pw-schedule .day-end td {
  border-bottom: 1px solid;
  border-color: var(--highlight);
}

/* Mobile timetable */
@media (max-width: 600px) {
  .pw-schedule thead {
    display: none;
  }
  
  .pw-schedule tr {
    display: flex;
    flex-wrap: wrap;
  }
  
  .pw-schedule td:nth-child(1),
  .pw-schedule td:nth-child(2),
  .pw-schedule td:nth-child(3) {
    border-bottom: none;
    padding: 25px 10px 0 0;
  }
  
  .pw-schedule td:nth-child(4) {
    width: 100%;
    padding: 0.25em 0 5px 0;
    border-bottom: 1px solid;
  }
  
  /* Multi-event days on mobile */
  .pw-schedule .same-day td:nth-child(1),
  .pw-schedule .same-day td:nth-child(2),
  .pw-schedule .same-day td:nth-child(3) {
    padding-top: 5px;
  }
  
  .pw-schedule .same-day td:nth-child(4),
  .pw-schedule .day-start td:nth-child(4) {
    border-bottom: none;
  }
  
  .pw-schedule .day-end td:nth-child(4) {
    border-bottom: 1px solid;
  }
}

.pw-schedule th,
.pw-schedule td {
  border-color: var(--highlight);
}


/* Poster Grid */

.poster-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2em;
}

.poster-grid a {
  display: block;
  text-decoration: none;
  color: var(--textcolor);
}

.poster-grid a:hover {
  border: none;
}

.poster-grid a:hover img {
  opacity: 0.8;
}

.poster-grid img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: rgba(0,0,0,0.1);
}

.poster-grid span {
  display: block;
  margin-top: 0.5em;
  font-size: 0.85em;
}

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

/* Inline footnotes */

label {
  cursor: pointer;
  vertical-align: super;
  line-height: 1;
  font-size: .75em;
  padding-left: .1em;
}

label:hover {
  color: var(--highlight);
}

label:before {content:"[";}
label:after {content:"]";}

label + input,
label + input + small {
  display: none;
}

input:checked + small {
  display: block;
  padding: .8em 0 1em 2.5vw;
}

/* Figures */

figure {
  margin: 2em 0 1.5em 0;
}

figure figcaption {
  margin: 0.8em 0 0 0;
  font-size: .85em;
  opacity: .7;
}

/* Responsive video embeds */

figure.video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

figure.video iframe, figure.video object, figure.video embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  visibility: hidden; /* so loading="lazy" should work? */
}

section:target iframe {
  visibility: visible;
}

/* External links */
/*
a[href*="//"]:after { 
  font-weight: 300;
  font-size: .85em;
  content: "\2197"; /* top right arrow: ↗ */
  color: var(--textcolor);
  opacity: .25;
}

a[href*="//"]:hover:after {
  color: var(--highlight);
  opacity: 1;
}

*/

/* File links */

a:before { 
  font-size: .7em;
  margin-right: .4em;
}

/* Add more filetypes here if you want */

a[href$=".pdf"]:before { content: "PDF"; }
a[href$=".txt"]:before { content: "TXT"; }
a[href$=".mp3"]:before { content: "MP3"; }
a[href$=".zip"]:before { content: "ZIP"; }
a[href$=".rar"]:before { content: "RAR"; }
a[href$=".jpeg"]:before,
a[href$=".jpg"]:before,
a[href$=".gif"]:before,
a[href$=".png"]:before { content: "IMG"; }

/* ------- News ------- */

article + article {
  margin-top: 4.5em;
}

article h2 {
  font-size: 2em;
  font-weight: 700;
  margin: 0 0 1em 0;
}

article time {
  margin-left: .6em;
  font-size: .8em;
  font-weight: 400;
  opacity: .7;
}

/* ------- Images Grid ------- */

.grid {
  display: grid;
  grid-gap: 5vmin;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* 150px = minimum image size */
  grid-auto-flow: dense;
  padding: 2em 0;
}

.grid a {
  position: relative;
  border: 0;
}

.grid a:hover {
  transform: scale(.975);
}

/* For a square ratio */
.grid a:before {
  content: "";
  display: block;
  padding-top: 100%;
}

.grid a img {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ------- Slideshow ------- */

.slides {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.slides figure {
  height: 100vh;
  padding: 0 5vw;
  margin: 0;
  display: grid;
  place-items: center;
  align-content: center;
  scroll-snap-align: center;
}

.slides figure img {
  max-height: 88vh; /* Adjust if needed */
}

.slides figure.cover {
  padding: 0;
}

.slides figure.cover img {
  max-height: none;
  position: absolute;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

/* ------- Lightbox ------- */

.lightbox {
  display: none;
  color: var(--textcolor);
}

.lightbox:target {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  align-content: center;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
  border: 0;
  z-index: 999;
  padding: 5vw; /* Padding around image */
  cursor: pointer; /* Show it's clickable */
}

/* Adjust on mobile */
@media (max-width: 800px) {
  .lightbox:target {
    padding: 2vw;
  }

  .lightbox img {
    max-height: 95vh;
    max-width: 95vw;
  }
}

.lightbox img {
  max-height: 90vh;
  max-width: 90vw;
  z-index: 1;
  object-fit: contain;
  width: auto;
  height: auto;
}

/* Caption for film name */
.lightbox figcaption {
  position: fixed;
  bottom: 2em;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1em;
  z-index: 10;
  text-align: center;
  padding: 0.5em 1em;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  pointer-events: none;
}

@media (max-width: 800px) {
  .lightbox figcaption {
    font-size: 0.85em;
    bottom: 1em;
  }
}

.lightbox:target:before { /* Pulsing loading dot */
  content:"";
  width: 1em;
  height: 1em;
  background: var(--textcolor);
  border-radius: 50%;
  display: block;
  position: absolute;
  animation: pulse 1.5s ease-in-out infinite;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.lightbox.loaded:target:before {
  opacity: 0;
  display: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}
/* Close button - removed pseudo-element, now a real HTML element */

/* Navigation arrows for lightbox */
.lightbox-nav,
.lightbox-close {
  position: fixed;
  font-size: 2.5em;
  color: #ff0000;
  text-decoration: none;
  z-index: 10000;
  padding: 2em 1.5em;
  line-height: 1;
  user-select: none;
  cursor: pointer;
  opacity: 1;
  border: none;
  font-weight: 300;
  display: none;
}

.lightbox-close {
  font-size: 2.5em;
  font-weight: 200;
  top: 0;
  right: 0;
  padding: 1em;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  border: none;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.prev {
  left: 0;
}

.lightbox-nav.next {
  right: 0;
}

@media (max-width: 800px) {
  .lightbox-nav {
    font-size: 2em;
    padding: 1.5em 1em;
  }

  .lightbox-close {
    font-size: 2em;
    padding: 0.75em;
  }
}

/* ------- Film Page Layout ------- */

.film-header {
  display: flex;
  gap: 2em;
  margin-bottom: 2em;
  align-items: flex-start;
}

.film-poster {
  width: 40%;
  flex-shrink: 0;
  order: 2;
  margin-top: 1em; /* moves poster up to align with title */
}

.film-poster img {
  width: 100%;
  height: auto;
}

.film-info {
  flex: 1;
  order: 1;
}

.film-credits {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5em;
}

.film-credits td {
  border-bottom: 1px solid var(--highlight);
  padding: 0.5em 1em 0.5em 0;
  vertical-align: top;
}

.film-credits td:first-child {
  font-weight: bold;
  white-space: nowrap;
  width: 1%;
}

.film-synopsis {
  max-width: 70ch;
  margin-bottom: 2em;
}

.film-synopsis p {
  color: var(--highlight);
}

.film-synopsis a {
  color: var(--textcolor);
}

.film-synopsis a[href*="//"]:after { 
  font-weight: 300;
  font-size: .85em;
  content: "\2197"; /* top right arrow: ↗ */
  color: var(--textcolor);
}

.film-synopsis a[href*="//"]:hover:after {
  color: var(--highlight);
  opacity: 1;
}

/* Film Gallery Thumbnails */

.film-gallery {
  margin: 2em 0;
}

.film-gallery h3 {
  font-size: 0.85em;
  margin-bottom: 0.5em;
  opacity: 0.7;
}

.film-gallery .grid {
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 2em;
  padding: 0;
}

.film-gallery .grid a:before {
  padding-top: 75%;
}

@media only screen and (max-width: 680px) {
  .film-gallery .grid {
    grid-template-columns: 1fr;
    grid-gap: 1em;
  }
}

@media (max-width: 800px) {
  .film-header {
    flex-direction: column;
  }
  
  .film-poster {
    width: 60%;
    order: 1;
  }
  
  .film-info {
    order: 2;
  }
}

/* ------- Smaller screens ------- */


@media only screen and (max-width: 540px) {
  nav { width: 100%; } /* Fix for older webkit versions */
}

@media only screen and (max-width: 800px) {

  body { font-size: 16px; }
  
  header {
    padding: 5vw 5vw 2em 5vw;
    margin-bottom: 4em;
    position: relative;
  }
  
  header h1 {
    width: 100%;
    margin-bottom: 1em;
  }
  
  header h1 img {
    position: relative;
    width: 100%;
  }
  
  nav {
    width: 100%;
    padding-bottom: 1em;
  }
  
  nav a {
    border: 1px solid var(--highlight);
  }
  
  nav a:hover {
    background-color: white;
    border: 1px solid white;
  }

  nav a.active {
    border: none;
    border: 1px solid white;
  }
  
  section {
      margin-top: 6em;
  }
  
  .film-poster {
    margin-top: 1em; /* moves poster down to align with title */
    width: 100%;
  }
  
  .book {
    width: 100%;
    padding: 2em 0;
    float: none;
  }
    
  #gorultulogo  {
    width: 100px;
    margin: 0;
x  } 
 
  #date  {
    width: 100%;
  } 
}

/* ------- Showing Times Box ------- */

.showing-times {
  border: 1px solid var(--textcolor);
  padding: 0;
  margin: 1em 0 2em 0;
  width: 100%;
  background: white;
}

.showing-label {
  font-size: 0.75em;
  color: var(--textcolor);
  font-weight: bold;
  padding: 0.5em 0.66em;
  margin: 0;
  border-bottom: 1px solid var(--textcolor);
}

.showing-time {
  padding: 0.5em 0.66em;
  margin: 0;
  border-bottom: 1px solid var(--textcolor);
}

.showing-time img {
  display: inline;
  width: auto;
  height: 19px; /* Adjust this value as needed */
  vertical-align: middle;
  margin-top:-5px;
  opacity: 1;
}

.showing-time a:has(img):hover {
  border: none;
  opacity: 0.7;  
}

.showing-link {
  padding: 0.5em 0.66em;
  margin: 0;
  font-size: 0.85em;
}

.showing-link a {
  color: var(--highlight);
}

/* Showing times in film header context */
.film-poster .showing-times {
  margin-bottom: 1em;
}


/* ------- Print ------- */

@media print {
  
  nav, .lightbox:target:after { display: none; }
  
  article, figure, img {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  /* Inline footnotes */
  
  label + input + small { display: inline; }
  label + input + small:before { content: "["; }
  label + input + small:after { content: "]"; }
  
  /* Slides */
  
  .slides, .slides figure {
    position: relative;
    height: auto;
    padding: 0;
  }

  .slides figure img, .slides figure.cover img {
    max-height: auto;
    position: relative;
    z-index: 1;
    width: auto;
    height: 100vh;
    object-fit: contain;
  }
    
}
