:root {
  --bg: #fff;
  --text: #111;
  --header-bg: #f5f5f5;
  /* Light gray for navbar in light mode */
  --card-bg: #f5f5f5;
  --accent: #e50914;
  /* Netflix red */
  --modal-bg: #fff;
  --modal-text: #111;
  --focus: #e50914;
  --bg-image: url(assets/redBg4.webp);
  --palantir-color: hue-rotate(-25deg) brightness(1.8) saturate(0.7);
  --quote-border: #e92379;
  --ArwenAndAragorn: url(assets/ArwenAndAragornDay.webp);
  --quote-title: linear-gradient(150deg, rgb(231, 36, 98) 0%, rgb(216, 67, 122) 25%, rgb(231, 36, 98) 50%, rgb(236, 50, 121) 100%);
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Essential image optimizations */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure images maintain aspect ratio */
img[width][height] {
  aspect-ratio: attr(width) / attr(height);
}

html.dark {
  --bg: #181818;
  --text: #fff;
  --header-bg: #181818;
  /* Slightly lighter than pure black for navbar in dark mode */
  --card-bg: #222;
  --accent: #e50914;
  /* Netflix red */
  --modal-bg: #181818;
  --modal-text: #fff;
  --focus: #e50914;
  --bg-image: url(assets/redBg1.webp);
  --palantir-color: hue-rotate(-15deg) contrast(1.5) saturate(0.7);
  --quote-border: #c40808;
  --ArwenAndAragorn: url(assets/ArwenAndAragornNight.webp);
  --quote-title: linear-gradient(150deg, var(--accent) 0%, rgb(177, 0, 6) 25%, rgb(189, 5, 5) 50%, rgb(227, 0, 0) 100%);
}

html.light {
  --bg: #fff;
  --text: #111;
  --header-bg: #f5f5f5;
  --card-bg: #f5f5f5;
  --accent: #e50914;
  /* Netflix red */
  --modal-bg: #fff;
  --modal-text: #111;
  --focus: #e50914;
  --bg-image: url(assets/redBg4.webp);
  --palantir-color: hue-rotate(-25deg) brightness(1.8) saturate(0.7);
  --quote-border: #e92379;
  --ArwenAndAragorn: url(assets/ArwenAndAragornDay.webp);
  --quote-title: linear-gradient(150deg, rgb(231, 36, 98) 0%, rgb(216, 67, 122) 25%, rgb(231, 36, 98) 50%, rgb(236, 50, 121) 100%);
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  position: relative;
  overflow-x: hidden;
}

#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

html.dark #background-canvas {
  opacity: 0.4;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
}

header {
  background: var(--header-bg);
  padding: 0;
  text-align: center;
  position: relative;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  z-index: 10;
  border-bottom: 3px solid var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  position: relative;
  padding-left: 9rem;
}

.nav-logo {
  position: absolute;
  left: 0rem;
  top: 110%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  height: 110px;
}

.nav-logo a {
  display: block;
  text-decoration: none;
  outline: none;
}

.nav-logo img {
  height: 140px;
  width: auto;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: var(--header-bg);
  transition: 0.4s;
  padding: 0.5em;
}

.nav-logo img:hover {
  filter: saturate(120%);
}

.nav-title {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.nav-title h1 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--accent);
  letter-spacing: 0.4px;
  font-weight: normal;
}

.nav-items {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0 1.5rem 0 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-item>a,
.nav-item>button {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  outline: none;
}

.nav-item>a:hover,
.nav-item>button:hover,
.nav-item>a:focus-visible,
.nav-item>button:focus-visible {
  background: var(--accent);
  color: #fff;
}

.nav-dropdown .dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: auto;
  top: 110%;
  background: var(--header-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  min-width: 170px;
  z-index: 100;
  padding: 0.5rem 0;
}

.nav-dropdown:hover .dropdown,
.nav-dropdown:focus-within .dropdown {
  display: block;
}

.dropdown li {
  list-style: none;
}

.dropdown a {
  min-width: 72px;
  display: block;
  padding: 0.5rem 1.2rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  font-size: 1rem;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: var(--accent);
  color: #fff;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: 1.5rem;
}

.home-nav-items .nav-item a {
  color: white !important;
}

.theme-toggle-container {
  position: static;
  right: unset;
  top: unset;
  transform: none;
  z-index: 20;
  display: flex;
  align-items: center;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#dark-mode-toggle,
.icon-moon,
.icon-sun {
  display: none !important;
}

html.dark .icon-moon {
  display: none;
}

html.dark .icon-sun {
  display: inline;
}

html.light .icon-moon {
  display: inline;
}

html.light .icon-sun {
  display: none;
}

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

#search-form {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

#search-input {
  width: 70%;
  padding: 0.5rem;
  font-size: 1rem;
  border: none;
  /* radius set conditionally via form class */
}

/* When language dropdown is hidden, round the input's left corners */
#search-form.no-lang #search-input {
  border-radius: 4px 0 0 4px;
}

/* When language dropdown is visible, input stays square to align between controls */
#search-form.has-lang #search-input {
  border-radius: 0;
}

.light #search-input {
  border: 1.5px solid #bbb;
  background: #fff;
}

#search-form button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: var(--accent) solid 1.5px;
  background: var(--accent);
  color: #fff;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.4s ease-in-out, border-color 0.2s ease-in-out;
}

#search-form button:focus {
  outline: none;
}

#search-form button:hover {
  background-color: #b0021f;
  border-color: #b0021f;
}

#search-input:focus {
  outline: none;
}

#search-input:focus-visible {
  outline: none;
}

#search-form button:focus-visible {
  outline: 2px solid var(--text);
}

.dropdown-trigger {
  padding: 0.5rem 0.3rem !important;
  font-size: 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 65px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.dropdown-trigger:focus {
  outline: 2px solid var(--text);
}

.dropdown-menu {
  position: absolute;
  top: 105%;
  left: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  color: #333;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
  min-width: 85px;
  gap: 0.1rem;
}

.dropdown-menu .dropdown-item {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 4px !important;
}

.dropdown-menu .dropdown-item:hover {
  background: var(--accent);
  color: #fff;
}

#movies-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.movie-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  transition: background 0.3s, color 0.3s, box-shadow 0.15s ease-in-out;
}
.movie-card:hover{
  cursor: pointer;
  box-shadow: var(--accent) 0 0 10px 2px;
}
.movie-card:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.movie-card img {
  width: 100%;
  max-width: 150px;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.movie-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
}

.movie-details {
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
}

#error-message {
  color: var(--accent);
  text-align: center;
  margin-top: 1rem;
}

#pagination-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

#pagination-nav button {
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

#pagination-nav button:disabled {
  background: #333;
  color: #888;
  cursor: not-allowed;
}

#pagination-nav button:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

#page-info {
  font-size: 1.1rem;
  color: var(--text);
  min-width: 60px;
  text-align: center;
}

.spinner {
  border: 6px solid #222;
  border-top: 6px solid var(--accent);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--modal-bg);
  color: var(--modal-text);
  border-radius: 8px;
  max-width: 540px;
  width: 90vw;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  /* consistent padding */
  position: relative;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  transition: background 0.3s, color 0.3s;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--modal-bg);
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--modal-bg);
  border-radius: 8px;
}

#close-modal {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-size: 2rem;
  border: none;
  border-bottom-left-radius: 1.2em;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 0.1em 0.5em 0.3em 0.7em;
  z-index: 2000;
  margin: 0;
  float: none;
  display: block;
  align-self: flex-end;
  transition: background 0.18s, color 0.18s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

#close-modal:hover,
#close-modal:focus {
  background: #b0021f;
  color: #fff;
  outline: none;
}

#modal-body img {
  width: 100%;
  max-width: 200px;
  display: block;
  margin: 0.5em auto 1rem auto;
  border-radius: 4px;
}

#modal-body h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  text-align: center;
}

#modal-body p {
  font-size: 1rem;
  color: var(--modal-text);
  margin-bottom: 0.5rem;
  text-align: center;
}

#share-movie {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
  display: block;
}

#share-movie:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Nav Bubbles & Chains */
.bubble {
  display: inline-block;
  background: var(--header-bg);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.5em 1.2em;
  margin: 0.5em 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  font-weight: 500;
  border: 2px solid var(--accent);
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
  font-size: 1.05em;
}

.bubble:hover,
.bubble:focus {
  background: var(--accent);
  color: var(--header-bg);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(220, 20, 60, 0.13);
}

.nav-heading[aria-expanded="true"] {
  background: var(--accent);
  color: white;
}

.dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  min-width: 180px;
  padding-top: 0.5em;
  /* Subtle creative gradient: accent only at corners */
  background: linear-gradient(135deg, var(--accent) 0%, var(--header-bg) 18%, var(--header-bg) 82%, var(--accent) 100%);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.18), 0 1.5px 0 var(--accent);
  border-radius: 14px;
  transition: opacity 0.2s, visibility 0.2s;
  overflow: visible;
}

/* Remove the accent bar */
.dropdown::before {
  display: none !important;
}

.dropdown[hidden] {
  display: none !important;
}

.dropdown ul {
  padding: 0.5em 0.5em 0.5em 0.5em;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dropdown li {
  margin: 0.2em 0;
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  animation: bubble-pop-in 0.35s cubic-bezier(.5, 1.7, .5, 1) forwards;
}

.dropdown li:nth-child(1) {
  animation-delay: 0.05s;
}

.dropdown li:nth-child(2) {
  animation-delay: 0.12s;
}

.dropdown li:nth-child(3) {
  animation-delay: 0.19s;
}

@keyframes bubble-pop-in {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.imdb-btn {
  display: inline-block;
  background: #f5c518;
  color: #111;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  padding: 0.6em 1.4em;
  font-size: 1.08em;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin: 0.5em auto 1em auto;
  transition: background 0.18s, color 0.18s;
}

.imdb-btn:hover,
.imdb-btn:focus {
  background: #e6b800;
  color: #111;
  outline: none;
}

/* Global scrollbar styling for all scrollable elements */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--modal-bg);
  -webkit-tap-highlight-color: transparent;
  /* Removes the unwanted blue highlight effect */
  outline-color: var(--text);
  /* Outline color changes based on theme */
  margin: 0;
  padding: 0;
}

*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 6px;
}

*::-webkit-scrollbar-track {
  background: var(--modal-bg);
  border-radius: 8px;
}

.cast-list {
  display: flex;
  gap: 1em;
  margin: 0 0 0.5em 0;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
}

.cast-member {
  width: 80px;
  flex: 0 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cast-member img {
  width: 80px;
  height: 95px;
  object-fit: cover;
  border-radius: 50%;
  background: #eee;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.cast-name {
  font-size: 0.95em;
  font-weight: 500;
  margin-top: -0.75em;
}

.cast-character {
  font-size: 0.85em;
  color: #888;
}

.director-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1em;
}

.director-img {
  width: 80px !important;
  height: 95px !important;
  object-fit: cover;
  border-radius: 50%;
  background: #eee;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  margin-bottom: 0.18em;
}

.director-name {
  font-size: 0.95em;
  font-weight: 500;
  margin-top: -0.75em;
  text-align: center;
}

/* Theme toggle switch styles from Uiverse.io by RiccardoRapelli */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch #input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2196f3;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  z-index: 0;
  overflow: hidden;
}

.sun-moon {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: yellow;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

#input:checked+.slider {
  background-color: black;
}

#input:focus+.slider {
  box-shadow: none !important;
}

#input:checked+.slider .sun-moon {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
  background-color: white;
  -webkit-animation: rotate-center 0.6s ease-in-out both;
  animation: rotate-center 0.6s ease-in-out both;
}

.moon-dot {
  opacity: 0;
  transition: 0.4s;
  fill: gray;
}

#input:checked+.slider .sun-moon .moon-dot {
  opacity: 1;
}

.slider.round {
  border-radius: 34px;
}

.slider.round .sun-moon {
  border-radius: 50%;
}

#moon-dot-1 {
  left: 10px;
  top: 3px;
  position: absolute;
  width: 6px;
  height: 6px;
  z-index: 4;
}

#moon-dot-2 {
  left: 2px;
  top: 10px;
  position: absolute;
  width: 10px;
  height: 10px;
  z-index: 4;
}

#moon-dot-3 {
  left: 16px;
  top: 18px;
  position: absolute;
  width: 3px;
  height: 3px;
  z-index: 4;
}

#light-ray-1 {
  left: -8px;
  top: -8px;
  position: absolute;
  width: 43px;
  height: 43px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

#light-ray-2 {
  left: -50%;
  top: -50%;
  position: absolute;
  width: 55px;
  height: 55px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

#light-ray-3 {
  left: -18px;
  top: -18px;
  position: absolute;
  width: 60px;
  height: 60px;
  z-index: -1;
  fill: white;
  opacity: 10%;
}

.cloud-light {
  position: absolute;
  fill: #eee;
  animation-name: cloud-move;
  animation-duration: 6s;
  animation-iteration-count: infinite;
}

.cloud-dark {
  position: absolute;
  fill: #ccc;
  animation-name: cloud-move;
  animation-duration: 6s;
  animation-iteration-count: infinite;
  animation-delay: 1s;
}

#cloud-1 {
  left: 30px;
  top: 15px;
  width: 40px;
}

#cloud-2 {
  left: 44px;
  top: 10px;
  width: 20px;
}

#cloud-3 {
  left: 18px;
  top: 24px;
  width: 30px;
}

#cloud-4 {
  left: 36px;
  top: 18px;
  width: 40px;
}

#cloud-5 {
  left: 48px;
  top: 14px;
  width: 20px;
}

#cloud-6 {
  left: 22px;
  top: 26px;
  width: 30px;
}

@keyframes cloud-move {
  0% {
    transform: translateX(0px);
  }

  40% {
    transform: translateX(4px);
  }

  80% {
    transform: translateX(-4px);
  }

  100% {
    transform: translateX(0px);
  }
}

.stars {
  transform: translateY(-32px);
  opacity: 0;
  transition: 0.4s;
}

.star {
  fill: white;
  position: absolute;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  animation-name: star-twinkle;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

#input:checked+.slider .stars {
  -webkit-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
  opacity: 1;
}

#star-1 {
  width: 20px;
  top: 2px;
  left: 3px;
  animation-delay: 0.3s;
}

#star-2 {
  width: 6px;
  top: 16px;
  left: 3px;
}

#star-3 {
  width: 12px;
  top: 20px;
  left: 10px;
  animation-delay: 0.6s;
}

#star-4 {
  width: 18px;
  top: 0px;
  left: 18px;
  animation-delay: 1.3s;
}

@keyframes star-twinkle {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.2);
  }

  80% {
    transform: scale(0.8);
  }

  100% {
    transform: scale(1);
  }
}

/* Theme toggle: sun/moon/stars visibility based on theme */
.switch.light .moon-dot,
.switch.light .stars {
  opacity: 0 !important;
}

.switch.dark .moon-dot,
.switch.dark .stars {
  opacity: 1 !important;
}

.switch.light .sun-moon {
  background-color: yellow;
}

.switch.dark .sun-moon {
  background-color: white;
}

/* Modal quotes/taglines always red/crimson */
.tagline,
.modal blockquote,
.modal-content blockquote {
  color: var(--accent) !important;
  font-style: italic;
  font-weight: 500;
  margin: 0.5em 0 1em 0;
  text-align: center;
}

@media (max-width: 1300px) {
  .nav-logo img {
    height: 125px;
  }
}

@media (max-width: 1180px) {
  #search-input {
    width: calc(70% - 100px);
  }
}

@media (max-width: 1080px) {
  #search-input {
    width: calc(65% - 100px);
  }
}

@media (max-width: 1000px) {
  #search-input {
    width: calc(60% - 100px);
  }
}

@media (max-width: 995px) {
  .nav-logo img {
    height: 120px;
  }

  .nav-items {
    gap: 1rem;
    margin-right: 0rem;
  }

  .nav-logo {
    top: 100%;
  }
}

@media(max-width:940px) {
  .nav-logo img {
    height: 115px;
  }
}

@media(max-width:930px) {
  .nav-title h1 {
    font-size: 20px;
  }
}

@media(max-width:915px) {
  .nav-logo img {
    height: 110px;
  }
}

@media(max-width:900px) {
  .nav-logo img {
    height: 105px;
    width: 112px;
  }
}

@media (max-width: 900px) {
  .dropdown {
    min-width: 140px;
  }

  #close-modal {
    position: fixed;
    top: 0;
    right: 0;
  }

  .modal-content {
    padding: 1rem 0.5rem 0.5rem 0.5rem;
  }
}

@media(max-width:890px) {
  .nav-title h1 {
    font-size: 19px;
  }
}

@media(max-width:870px) {
  .nav-title h1 {
    font-size: 18px;
  }
}

@media(max-width:860px) {
  .nav-title h1 {
    font-size: 17px;
  }
}

@media(max-width:845px) {
  .nav-right {
    gap: 0.5rem;
  }

  .home-nav {
    gap: 1.5rem;
  }

  .nav-items {
    gap: 0.5rem;
  }
}

@media (max-width: 810px) {
  main {
    padding: 0 0.5rem;
  }

  #movies-container {
    margin: 0 20px;
  }

  #search-input {
    width: 60%;
    font-size: 0.95rem;
  }

  .movie-card {
    padding: 0.5rem;
  }

  .home-nav-items {
    gap: 1.5rem;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding-left: 0;
  }

  .nav-logo {
    position: static;
    transform: none;
    height: 110px;
    justify-content: center;
    margin: 0.5rem 0 1rem 0;
  }

  .nav-logo img {
    height: 110px;
    width: auto;
    border-radius: 8px;
    box-shadow: none;
    transition: 0s;
  }

  .nav-title {
    justify-content: center;
    margin-bottom: 0.2rem;
  }

  .nav-right {
    justify-content: center;
    margin-right: 0rem;
    margin-bottom: 0.5rem;
  }

  .home-nav {
    margin-bottom: 0.4rem;
  }

  .nav-items {
    justify-content: center;
    margin: 0;
  }

  #dark-mode-toggle {
    right: 0.5rem;
    top: 1.2rem;
    transform: none;
  }
}

@media (max-width:420px) {

  .nav-item>a,
  .nav-item>button {
    padding: 0.5rem 0.3rem;
  }

  .home-nav-items>a,
  .home-nav-items>button {
    padding: 0.5rem 0.5rem;
  }

  .dropdown {
    min-width: 120px;
  }

  .dropdown a {
    padding: 0.4rem 0.4em;
  }

  #movies-container {
    margin: 0 30px;
  }
}

@media (max-width:375px) {
  .dropdown {
    min-width: 100px;
  }

  .dropdown a {
    padding: 0.4rem 0.2em;
    font-size: 0.8rem;
  }

  .home-nav-items {
    gap: 1rem;
  }

  .home-nav {
    gap: 1rem;
  }
}

@media (max-width:345px) {
  .dropdown {
    min-width: 90px;
  }

  .dropdown a {
    padding: 0.4rem 0.2em;
  }

  .home-nav-items {
    gap: 0.8rem;
  }

  .home-nav {
    gap: 0.8rem;
  }
}

/* --- Scroll to Top Button --- */
.scroll-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.scroll-to-top-btn:hover,
.scroll-to-top-btn:focus {
  background: #b0021f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

/* Remove mobile focus outline for specific buttons */
@media (max-width: 768px) {
  .scroll-to-top-btn:focus {
    outline: none;
  }

  .switch #input:focus+.slider {
    outline: none;
  }

  .switch:focus-within {
    outline: none;
  }

  /* Additional mobile-specific rules */
  .scroll-to-top-btn {
    -webkit-touch-callout: none;
    /* Disable long press menu on iOS */
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE/Edge */
    user-select: none;
    /* Modern browsers */
  }

  .switch {
    -webkit-touch-callout: none;
    /* Disable long press menu on iOS */
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE/Edge */
    user-select: none;
    /* Modern browsers */
  }

  .scroll-to-top-btn:active {
    outline: none;
  }

  .switch:active {
    outline: none;
  }
}

.scroll-to-top-btn svg {
  transition: transform 0.2s ease;
}

.scroll-to-top-btn:hover svg {
  transform: translateY(-1px);
}

@media (max-width: 1070px) {
  .scroll-to-top-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .scroll-to-top-btn {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }

  .scroll-to-top-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* --- End Scroll to Top Button --- */

/* --- YouTube Lite Embed Styles --- */
.youtube-player {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin: 0 auto;
  cursor: pointer;
}

.youtube-player img.yt-thumb {
  object-fit: cover;
  display: block;
  left: 0;
  bottom: 0;
  margin: auto;
  max-width: 100%;
  width: 100%;
  position: absolute;
  right: 0;
  top: 0;
  border: none;
  height: auto;
  cursor: pointer;
  transition: 0.4s all;
  height: 100%;
}

.youtube-player img.yt-thumb:hover {
  filter: brightness(75%);
}

.yt-play-btn {
  height: 48px;
  width: 68px;
  left: 50%;
  top: 50%;
  margin-left: -34px;
  margin-top: -24px;
  position: absolute;
  background: url('https://i.ibb.co/j3jcJKv/yt.png') no-repeat center center/contain;
  cursor: pointer;
  z-index: 2;
  pointer-events: none;
}

.yt-iframe {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  min-height: 200px;
  max-width: 100%;
  display: block;
  border: none;
  background: #000;
}

@media (max-width: 600px) {
  .yt-iframe {
    min-height: 140px;
  }
}

/* --- End YouTube Lite Embed Styles --- */

/* --- Homepage Styles --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 2;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-top: 0.82em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  background: linear-gradient(180deg, var(--accent) 0%, #ff6b6b 50%, #feca57 100%);
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent;
  background-clip: text !important;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
  line-height: 1.1;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.hero-subtitle {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  color: white;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 1), 0px 0px 5px rgba(0, 0, 0, 1);
  opacity: 0;
  text-align: justify;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

.quote-instruction {
  text-align: center;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
}

.hero-buttons a {
  outline-color: var(--focus);
  outline-offset: 1px;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.cta-button.primary {
  background: var(--accent);
  color: white;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 1), 0px 0px 5px rgba(0, 0, 0, 1);
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
  border: 2px solid var(--accent);
}

.cta-button.primary:hover {
  background: #b0021f;
  border-color: #b0021f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.cta-button.secondary {
  background: transparent;
  color: white;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 1), 0px 0px 5px rgba(0, 0, 0, 1);
  border: 2px solid var(--accent);
}

.cta-button.secondary:hover {
  background: var(--accent);
  color: white;
}

.cta-button.large {
  padding: 1.2rem 3rem;
  border: #00000012 2px solid;
  font-size: 1.1rem;
  box-shadow: 0 6px 3px 1px rgba(0, 0, 0, 0.35);
}

.cta-button.large:hover {
  transform: translateY(4px);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Image Collage */
.image-collage {
  position: relative;
  width: 520px;
  height: 450px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}

.collage-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Collage Layout */
.collage-item-1 {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  animation-delay: 0.2s;
}

.collage-item-2 {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  animation-delay: 0.4s;
}

.collage-item-3 {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Spotlights and About Section */
.about,
.spotlights-section {
  background: var(--card-bg);
  overflow: hidden;
  transition: background 0.3s, color 0.3s;
}

.spotlights-section {
  position: relative;
}

.about-content,
.spotlights-content {
  display: grid;
  padding: 2.5rem 0 4rem 0;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.spotlights-content {
  align-items: center;
  gap: 15px;
}

.about-text h2,
.spotlights-text h2 {
  font-size: 2.5rem;
  margin-top: 0.82em;
  margin-bottom: 2rem;
  color: var(--text);
  font-weight: 700;
}

.about-text p,
.spotlights-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--text);
  opacity: 0.9;
  text-align: justify;
}

.character-text {
  position: relative;
  z-index: 1;
}

.character-text h2 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.character-text p {
  margin-bottom: 0.5rem;
  margin-top: 0.6rem;
  font-weight: normal;
  text-align: center;
}

.character-context-content .character-lore h2 {
  margin-top: 0.4rem;
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
}

.character-context-content .character-lore p {
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.runtime-text h2,
.runtime-text p {
  font-weight: bold;
}

.character-content {
  text-align: center;
}

@font-face {
  font-family: 'RingbearerMedium';
  src: url('assets/RingbearerMedium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap
}

@font-face {
  font-family: 'RuntimeRegular';
  src: url('assets/RuntimeRegular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap
}

.ringbearer-text {
  font-family: 'RingbearerMedium', Georgia, serif;
  letter-spacing: 0.35rem;
}

.runtime-text {
  font-family: 'RuntimeRegular', Georgia, sans-serif;
  letter-spacing: 0.1rem;
  font-weight: bold;
}

/* --- Aragorn Section On-Load Animations --- */
#Aragorn .character-text {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0s forwards;
}

#Aragorn .character-text h2:first-child {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

#Aragorn .character-text p {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

#Aragorn .character-text h2:last-child {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

#Aragorn .about-visual {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

#Aragorn .about-visual .character-decor:nth-child(1) {
  opacity: 0;
  transform: rotate(-30deg) scale(0.8);
  animation: decorSpinIn1 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

#Aragorn .about-visual .character-decor:nth-child(2) {
  opacity: 0;
  transform: rotate(150deg) scale(0.8);
  animation: decorSpinIn2 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

@keyframes decorSpinIn1 {
  from {
    opacity: 0;
    transform: rotate(-30deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes decorSpinIn2 {
  from {
    opacity: 0;
    transform: rotate(150deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(180deg) scale(1);
  }
}

.about-cta,
.spotlights-cta {
  font-size: 1.1rem;
  display: inline-block;
  margin-top: 1rem;
  padding: 1rem 2rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  text-shadow: 0px 0px 5px rgba(0, 0, 0, 1), 0px 0px 5px rgba(0, 0, 0, 1);
  transition: all 0.3s ease;
}

.about-cta:hover,
.spotlights-cta:hover {
  background: #b0021f;
  transform: translateY(-2px);
}

.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spotlights-image-collage {
  width: 590px;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.spotlights-visual {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 12px;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(5, 1fr);
  grid-template-areas:
    "s3 s3 s3 s3 s2 s2"
    "s3 s3 s3 s3 s2 s2"
    "s1 s1 s1 s1 s2 s2"
    "s1 s1 s1 s1 s2 s2"
    "s1 s1 s1 s1 s2 s2";
}

.character-quote,
.character-quote-author {
  padding: 0 2rem;
  letter-spacing: 0.1rem;
}

.character-quote {
  margin-bottom: 0.35rem !important;
}

.character-quote-author {
  text-align: right !important;
}

.aragorn-character-visual {
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(12, 1fr);
  grid-template-areas:
    "p1 p1 p1 p1 p2 p2 p2 p2"
    "p1 p1 p1 p1 p2 p2 p2 p2"
    "p5 p5 p5 p5 p5 p5 p5 p5"
    "p5 p5 p5 p5 p5 p5 p5 p5"
    "p5 p5 p5 p5 p5 p5 p5 p5"
    "p3 p3 p6 p6 p6 p6 p4 p4"
    "p3 p3 p6 p6 p6 p6 p4 p4"
    "p7 p7 p6 p6 p6 p6 p8 p8"
    "p7 p7 p9 p9 p9 p9 p8 p8"
    "p7 p7 p9 p9 p9 p9 p8 p8"
    "p10 p10 p10 p10 p11 p11 p11 p11"
    "p10 p10 p10 p10 p11 p11 p11 p11";
}

.aragorn-second-visual {
  grid-template-areas:
    "p12 p12 p12 p12 p13 p13 p13 p13"
    "p12 p12 p12 p12 p13 p13 p13 p13"
    "p14 p14 p14 p14 p14 p14 p14 p14"
    "p14 p14 p14 p14 p14 p14 p14 p14"
    "p14 p14 p14 p14 p14 p14 p14 p14"
    "p15 p15 p17 p17 p17 p17 p16 p16"
    "p15 p15 p17 p17 p17 p17 p16 p16"
    "p18 p18 p17 p17 p17 p17 p19 p19"
    "p18 p18 p20 p20 p20 p20 p19 p19"
    "p18 p18 p20 p20 p20 p20 p19 p19"
    "p22 p22 p22 p22 p21 p21 p21 p21"
    "p22 p22 p22 p22 p21 p21 p21 p21";
}

.olaf-character-visual {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(16, 1fr);
  grid-template-areas:
    "p23 p23 p23 p24 p24 p24"
    "p23 p23 p23 p24 p24 p24"
    "p23 p23 p23 p24 p24 p24"
    "p26 p26 p26 p27 p27 p27"
    "p26 p26 p26 p27 p27 p27"
    "p26 p26 p26 p27 p27 p27"
    "p25 p25 p25 p25 p25 p25"
    "p25 p25 p25 p25 p25 p25"
    "p25 p25 p25 p25 p25 p25"
    "p25 p25 p25 p25 p25 p25"
    "p28 p28 p28 p29 p29 p29"
    "p28 p28 p28 p29 p29 p29"
    "p28 p28 p28 p29 p29 p29"
    "p30 p30 p30 p31 p31 p31"
    "p30 p30 p30 p31 p31 p31"
    "p30 p30 p30 p31 p31 p31";
}

.olaf-second-visual {
  grid-template-rows: repeat(17, 1fr);
  grid-template-areas:
    "p32 p32 p32 p33 p33 p33"
    "p32 p32 p32 p33 p33 p33"
    "p32 p32 p32 p33 p33 p33"
    "p36 p36 p36 p36 p36 p36"
    "p36 p36 p36 p36 p36 p36"
    "p36 p36 p36 p36 p36 p36"
    "p36 p36 p36 p36 p36 p36"
    "p34 p34 p34 p35 p35 p35"
    "p34 p34 p34 p35 p35 p35"
    "p34 p34 p34 p35 p35 p35"
    "p37 p37 p37 p37 p37 p37"
    "p37 p37 p37 p37 p37 p37"
    "p37 p37 p37 p37 p37 p37"
    "p37 p37 p37 p37 p37 p37"
    "p39 p39 p39 p38 p38 p38"
    "p39 p39 p39 p38 p38 p38"
    "p39 p39 p39 p38 p38 p38";
}

.poster1 {
  grid-area: p1;
}

.poster2 {
  grid-area: p2;
}

.poster3 {
  grid-area: p3;
}

.poster4 {
  grid-area: p4;
}

.poster5 {
  grid-area: p5;
}

.poster6 {
  grid-area: p6;
  background: var(--ArwenAndAragorn) 60% 50%/cover no-repeat !important;
}

.poster7 {
  grid-area: p7;
}

.poster8 {
  grid-area: p8;
}

.poster9 {
  grid-area: p9;
}

.poster9 img {
  object-fit: fill !important;
}

.poster10 {
  grid-area: p10;
}

.poster11 {
  grid-area: p11;
}

.poster12 {
  grid-area: p12;
}

.poster12 img {
  object-position: 35% 50% !important;
}

.poster13 {
  grid-area: p13;
}

.poster13 img {
  object-position: 100% 50% !important;
}

.poster14 {
  grid-area: p14;
}

.poster15 {
  grid-area: p15;
}

.poster16 img {
  object-position: 60% 50% !important;
}

.poster18 img {
  object-position: 75% 50% !important;
}

.poster16 {
  grid-area: p16;
}

.poster16 img {
  object-position: 36% 50% !important;
}

.poster17 {
  grid-area: p17;
}

.poster18 {
  grid-area: p18;
}

.poster19 {
  grid-area: p19;
}

.poster20 {
  grid-area: p20;
}

.poster21 {
  grid-area: p21;
}

.poster21 img {
  object-position: 65% 50% !important;
}

.poster22 {
  grid-area: p22;
}

.poster23 {
  grid-area: p23;
}

.poster24 {
  grid-area: p24;
}

.poster25 {
  grid-area: p25;
}

.poster26 {
  grid-area: p26;
}

.poster27 {
  grid-area: p27;
}

.poster27 video {
  display: block;
}

.poster27 img {
  display: none;
}

.poster28 {
  grid-area: p28;
}

.poster29 {
  grid-area: p29;
}

.poster30 {
  grid-area: p30;
}

.poster31 {
  grid-area: p31;
}

.poster32 {
  grid-area: p32;
}

.poster32 img {
  object-position: 0% 50% !important;
}

.poster33 {
  grid-area: p33;
}

.poster34 {
  grid-area: p34;
}

.poster34 img {
  object-position: 0% 50% !important;
}

.poster35 {
  grid-area: p35;
}


.poster35 video {
  display: block;
}

.poster35 img {
  display: none;
}

.poster36 {
  grid-area: p36;
}

.poster37 {
  grid-area: p37;
}

.poster37 img {
  object-position: 0% 30% !important;
}

.poster37 video {
  object-position: top !important;
}

.poster38 {
  grid-area: p38;
}

.poster39 {
  grid-area: p39;
}

.first-half-context {
  padding-bottom: 0 !important;
}

.second-half-context {
  padding-top: 0 !important;
}

.character-gallery {
  height: 1120px;
}

.second-aragorn-gallery {
  height: 1160px;
}

.olaf-first-gallery {
  height: 970px;
}

.olaf-second-gallery {
  height: 1080px;
}

@media (max-width: 1250px) {
  .character-gallery {
    height: 1150px;
  }

  .second-aragorn-gallery {
    height: 1190px;
  }

  .olaf-first-gallery {
    height: 985px;
  }

  .olaf-second-gallery {
    height: 1100px;
  }
}

@media (max-width: 1230px) {

  .second-aragorn-gallery {
    height: 1230px;
  }

  .olaf-first-gallery {
    height: 1030px;
  }

  .olaf-second-gallery {
    height: 1110px;
  }
}

@media (max-width: 1215px) {

  .second-aragorn-gallery {
    height: 1250px;
  }

  .olaf-second-gallery {
    height: 1135px;
  }

}

@media (max-width: 1210px) {
  .olaf-second-gallery {
    height: 1150px;
  }
}

@media (max-width: 1200px) {
  .character-gallery {
    height: 1200px;
  }

  .second-aragorn-gallery {
    height: 1275px;
  }

  .olaf-first-gallery {
    height: 1070px;
  }

  .olaf-second-gallery {
    height: 1180px;
  }
}

@media (max-width: 1185px) {
  .character-gallery {
    height: 1250px;
  }

  .second-aragorn-gallery {
    height: 1290px;
  }

  .olaf-first-gallery {
    height: 1090px;
  }

  .olaf-second-gallery {
    height: 1180px;
  }
}

@media (max-width: 1176px) {
  .olaf-second-gallery {
    height: 1210px;
  }
}

@media (max-width: 1160px) {
  .character-gallery {
    height: 1300px;
  }

  .second-aragorn-gallery {
    height: 1320px;
  }

  .olaf-first-gallery {
    height: 1110px;
  }

  .olaf-second-gallery {
    height: 1240px;
  }
}

@media (max-width: 1155px) {
  .second-aragorn-gallery {
    height: 1340px;
  }

  .olaf-first-gallery {
    height: 1140px;
  }
}

@media (max-width: 1150px) {
  .second-aragorn-gallery {
    height: 1360px;
  }

  .olaf-second-gallery {
    height: 1280px;
  }
}

@media (max-width: 1145px) {
  .second-aragorn-gallery {
    height: 1430px;
  }

  .olaf-first-gallery {
    height: 1175px;
  }
}

@media (max-width: 1130px) {
  .character-gallery {
    height: 1350px;
  }

  .second-aragorn-gallery {
    height: 1450px;
  }

  .olaf-first-gallery {
    height: 1200px;
  }

  .olaf-second-gallery {
    height: 1310px;
  }
}

@media (max-width: 1110px) {
  .character-gallery {
    height: 1400px;
  }

  .second-aragorn-gallery {
    height: 1465px;
  }

  .olaf-first-gallery {
    height: 1240px;
  }

  .olaf-second-gallery {
    height: 1380px;
  }
}

@media (max-width: 1100px) {
  .character-gallery {
    height: 1450px;
  }

  .second-aragorn-gallery {
    height: 1485px;
  }

  .olaf-first-gallery {
    height: 1250px;
  }

  .olaf-second-gallery {
    height: 1380px;
  }
}

@media (max-width: 1095px) {
  .second-aragorn-gallery {
    height: 1515px;
  }

  .olaf-first-gallery {
    height: 1290px;
  }
}

@media (max-width: 1095px) {
  .olaf-second-gallery {
    height: 1410px;
  }
}

@media (max-width: 1085px) {
  .olaf-second-gallery {
    height: 1430px;
  }
}

.spot1 {
  grid-area: s1;
}

.spot2 {
  grid-area: s2;
}

.spot2 img {
  object-position: 30% 50% !important;
}

.spot3 {
  grid-area: s3;
}

.spotlights-visual>div {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.22);
  background: var(--card-bg);
}

.character-video video,
.spotlights-visual img,
.spotlights-visual video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.character-video video {
  outline-color: transparent;
}

#Aragorn,
#CountOlaf {
  background-color: var(--bg);
}

.AragornOverlay,
.CountOlafOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 392px;
  background: url(assets/ArgonathBW.webp);
  background-size: cover;
  background-position-x: center;
  background-position-y: top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  mask-image: linear-gradient(rgba(0, 0, 0, 0.6), transparent);
  z-index: 0;
}

.CountOlafOverlay {
  background: url(assets/SailorDisguiseBW.webp);
  background-size: cover;
  background-position-x: 30%;
  background-position-y: top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.about-decor {
  position: absolute;
  height: 240px;
  width: 240px;
  filter: drop-shadow(0 0 7px var(--accent));
  animation: pulse-decor-shadow 2s ease-in-out infinite;
}

.character-decor {
  height: 150px;
  width: 150px;
}

@keyframes pulse-decor-shadow {
  0% {
    filter: drop-shadow(0 0 2px var(--accent));
  }

  50% {
    filter: drop-shadow(0 0 7px var(--accent));
  }

  100% {
    filter: drop-shadow(0 0 2px var(--accent));
  }

}

.about-decor:nth-child(1) {
  top: 0;
  right: 0;
  transform: rotate(15deg);
}

.about-decor:nth-child(2) {
  bottom: 0;
  left: 0;
  transform: rotate(195deg);
}

.character-decor:nth-child(1) {
  transform: rotate(0deg);
}

.character-decor:nth-child(2) {
  transform: rotate(180deg);
}

.about-image {
  position: relative;
  background-color: var(--bg);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgb(177, 0, 18);
  box-shadow: 0 0 15px 5px rgb(179, 0, 0);
  animation: pulse-shadow 3s ease-in-out infinite;
}

.character-video {
  border-radius: 12px;
  width: 480px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border-color: black;
  animation: none;
}

.about-image:hover {
  cursor: pointer;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1);
  border-radius: 50%;
  animation: pulse-saturate 3s ease-in-out infinite, watchers-rotate 15s linear infinite;
  animation-play-state: paused;
  /* Start paused */
}

/* When playing, resume rotation */
.about-image.playing img {
  animation-play-state: running;
}

/* Overlay styling */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  transition: opacity 0.3s ease;
}

.character-overlay {
  border-radius: 8px;
}

/* Hide overlay when playing */
.about-image.playing .overlay {
  opacity: 0;
}

/* Play button styling */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 2;
}

/* Hide play button when playing */
.about-image.playing .play-button {
  opacity: 0;
  pointer-events: none;
}

/* Keyframes for pulsating drop shadow */
@keyframes pulse-saturate {
  0% {
    filter: saturate(0.8);
  }

  50% {
    filter: saturate(1);
  }

  100% {
    filter: saturate(0.8);
  }
}

/* Keyframes for rotating the image */
@keyframes watchers-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Keyframes for pulsating box shadow */
@keyframes pulse-shadow {
  0% {
    box-shadow: 0 0 15px 5px rgb(179, 0, 0);
  }

  50% {
    box-shadow: 0 0 20px 10px rgb(179, 0, 0);
  }

  100% {
    box-shadow: 0 0 15px 5px rgb(179, 0, 0);
  }
}

/* Quotes Section */

.quote-section {
  position: relative;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  padding: 4rem 2rem;
  margin: 0 auto;
  text-align: center;
  overflow-anchor: none;
}

/* Background Overlay with Backdrop Filter */
.background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: saturate(0.8) brightness(1);
  animation: background-pulse 10s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes background-pulse {

  0%,
  100% {
    backdrop-filter: saturate(0.8) brightness(1);
  }

  50% {
    backdrop-filter: saturate(1.2) brightness(1.2);
  }
}

.quote-section .container {
  position: relative;
  z-index: 2;
  background-color: var(--card-bg);
  border-radius: 12px;
  max-width: 700px;
  margin-top: 150px;
  border-left: 4px var(--quote-border) solid;
  border-right: 4px var(--quote-border) solid;
}

.quote-section .hero-title {
  margin-top: 0;
  display: inline-block;
  background: var(--quote-title);
  margin-bottom: 1rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  letter-spacing: 0.25rem;
  text-shadow: 0 0 120px black;
  -webkit-text-stroke: 0.1px #ffffff14;
}

.quote-section .hero-subtitle {
  margin-bottom: 0;
  -webkit-text-stroke: black 0.1px;
}

#quoteButton {
  position: absolute;
  width: 150px;
  top: 0;
  left: 50%;
  border-radius: 100%;
  transform: translateX(-50%) translateY(-85%);
  filter: var(--palantir-color);
  z-index: 3;
}

#quoteButton:hover {
  cursor: grab;
}

#quoteContainer {
  font-size: 1.2rem;
  padding: 2.5rem 1.5rem;
  color: var(--text);
  font-family: cursive, sans-serif;
  min-height: 103px;
  margin: 0 auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: pre-wrap;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

/* Flexbox for aligning quote and author */
.quote-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.quote-text {
  text-align: left;
  margin-bottom: 10px;
}

.author-text {
  text-align: right;
  align-self: flex-end;
}

/* Animation for each character */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
    /* Slight scaling for smoothness */
  }

  to {
    opacity: 1;
    transform: translateY(0);
    /* Return to normal size */
  }
}

#quoteContainer span.word {
  display: inline-block;
  /* Ensure words stay together */
  margin-right: 0.25em;
  /* Add spacing between words */
  opacity: 0;
  /* Initial opacity is 0 */
  animation: fadeIn 0.5s ease-in-out forwards;
  /* Fade in animation */
  will-change: opacity, transform;
}

/* CTA Section */
.cta-section {
  padding: 4.5rem 0;
  background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
  text-align: center;
  color: white;
}

.cta-section h2 {
  font-family: 'RingbearerMedium';
  letter-spacing: 0.09rem;
  font-size: 2.5rem;
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  font-weight: normal;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 1.6rem;
}

/* Footer */
.footer {
  background: #222;
  padding: 1.5rem 0;
  text-align: center;
  color: white;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom:hover {
  cursor: default;
}

.footer-bottom p:nth-child(1) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.footer-link {
  letter-spacing: 0.8px;
  font-size: 1rem;
}

.footer-link a {
  text-decoration: none;
  color: white;
  transition: 0.3s ease-in-out;
}

.footer:hover .footer-link a {
  color: red;
  text-shadow: 0px 5px 3px black;
}

/* Responsive Design for Homepage */
@media (max-width: 1180px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 1080px) {

  .first-half-context {
    padding-bottom: 1.15rem !important;
  }

  .spotlights-visual {
    gap: 8px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .image-collage {
    width: 450px;
    height: 400px;
    margin-top: 2rem;
  }

  .spotlights-image-collage {
    width: 650px;
    height: 450px;
  }

  .character-gallery {
    height: 1200px;
  }

  .collage-item {
    border-radius: 12px;
  }

  .about-content,
  .spotlights-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3.5rem;
    padding-bottom: 5rem;
    padding-top: 1.5rem;
  }

  .character-context-content {
    gap: 1rem;
  }

  .character-gallery {
    order: 1;
  }

  .character-lore {
    order: 0;
  }

  .about-image {
    width: 250px;
    height: 250px;
  }

  .AragornOverlay,
  .CountOlafOverlay {
    height: 602px;
  }
}

@media (max-width: 760px) {
  .spotlights-image-collage {
    width: 550px;
    height: 350px;
  }

  .character-gallery {
    height: 950px;
  }
}

@media (max-width: 670px) {
  .spotlights-image-collage {
    width: 450px;
    height: 350px;
  }

  .character-gallery {
    height: 800px;
  }
}

@media (max-width: 600px) {
  .modal-top-backdrop {
    height: 250px !important;
  }

  .modal-content-wrapper {
    top: 125px !important;
  }

  #modal-body img {
    max-width: 170px;
  }

  .AragornOverlay,
  .CountOlafOverlay {
    height: 595px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .cta-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .image-collage,
  .spotlights-image-collage {
    width: 250px;
    height: 250px;
  }

  .collage-item {
    border-radius: 10px;
  }

  .AragornOverlay,
  .CountOlafOverlay {
    height: 525px;
  }
}

/* --- Homepage Video Section Styles --- */
.homepage-video-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  z-index: 1;
}

.homepage-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.homepage-video-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg) 0%, var(--card-bg) 100%);
  z-index: 1;
}

/* Backdrop shadows to hide widescreen bars */
.homepage-video-section::before,
.homepage-video-section::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
}

.homepage-video-section::before {
  top: 0;
  height: 40vh;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.95) 0%,
      rgba(0, 0, 0, 0.8) 30%,
      rgba(0, 0, 0, 0.4) 70%,
      rgba(0, 0, 0, 0) 100%);
}

.homepage-video-section::after {
  bottom: 0;
  height: 25vh;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0.4) 50%,
      rgba(0, 0, 0, 0) 100%);
}

/* Homepage Header with Backdrop Blur */
.homepage-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: none;
}

.homepage-nav {
  background: transparent;
}

.homepage-header .nav-logo img {
  background: transparent;
  border-radius: 8px;
  padding: 8px;
}

/* Ensure the hero section starts after the video */
.hero {
  position: relative;
  z-index: 2;
  margin-top: 0;
}

/* Homepage Hero Overlay */
.homepage-hero {
  position: relative;
  min-height: 100vh;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  padding: 6rem 2rem 3rem 2rem;
  width: 100%;
}

/* Responsive adjustments for homepage video */


@media (max-width: 1125px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-container {
    padding: 7rem 2rem 3rem 2rem;
  }
}

@media (max-width: 1080px) {
  .homepage-video-section {
    min-height: 100vh;
  }

  .homepage-hero {
    min-height: calc(100vh - 120px);
  }

  .homepage-header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 3rem 1rem 3rem 1rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
  }
}

@media (max-width: 810px) {
  .hero-container {
    padding: 11rem 1rem 3rem 1rem;
  }

  .hero-title,
  .about-text h2,
  .spotlights-text h2,
  .cta-section h2 {
    font-size: 3rem;
  }

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

  .quote-section,
  .AragornOverlay,
  .CountOlafOverlay {
    background-attachment: scroll;
  }
}

@media (max-width: 568px) {
  .cta-section h2 {
    font-size: 2.5rem;
  }

  .image-collage,
  .spotlights-image-collage {
    width: 350px;
    height: 300px;
  }

  .character-gallery {
    height: 700px;
  }
}

@media (max-width: 492px) {

  .hero-title,
  .about-text h2,
  .spotlights-text h2 {
    font-size: 2.5rem;
  }

  .character-text h2 {
    font-size: 2rem;
  }

  .about-cta,
  .spotlights-cta {
    font-size: 1rem;
  }

  .hero-container {
    padding: 11.5rem 0.5rem 3rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .homepage-video-section {
    min-height: 100vh;
  }

  .cta-section h2 {
    font-size: 2.2rem;
  }

  .about-content,
  .spotlights-content {
    padding-bottom: 4rem;
    padding-top: 1rem;
  }

  .homepage-hero {
    min-height: calc(100vh - 100px);
  }

  .homepage-header {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

@media (max-width: 470px) {

  .character-quote,
  .character-quote-author {
    font-size: 1rem !important;
    padding: 0 1.5rem;
  }
}

@media (max-width: 435px) {

  .image-collage,
  .spotlights-image-collage {
    width: 300px;
    height: 250px;
  }

  .character-gallery {
    height: 600px;
  }

  .cta-section h2 {
    font-size: 2rem;
  }
}

@media (max-width: 425px) {

  .hero-title,
  .about-text h2,
  .spotlights-text h2 {
    font-size: 2.2rem;
  }

  .spotlights-visual {
    gap: 4px;
  }

  .character-text h2 {
    font-size: 1.9rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

}

@media (max-width: 390px) {

  .hero-title,
  .about-text h2,
  .spotlights-text h2 {
    font-size: 2rem;
  }

  .character-text h2 {
    font-size: 1.7rem;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }

  .hero-container {
    padding: 12rem 0.5rem 3rem 0.5rem;
  }

  .hero-buttons .cta-button {
    padding: 0.8rem 1rem;
  }

  .about-content,
  .spotlights-content {
    padding-bottom: 3.5rem;
  }

  .image-collage,
  .spotlights-image-collage {
    width: 280px;
    height: 240px;
  }

  .character-gallery {
    height: 550px;
  }

}

@media (max-width: 370px) {

  .character-quote,
  .character-quote-author {
    font-size: 0.9rem !important;
    padding: 0 1rem;
  }
}

@media (max-width: 360px) {

  .hero-title,
  .about-text h2,
  .spotlights-text h2 {
    font-size: 1.8rem;
  }

  .character-text h2 {
    font-size: 1.6rem;
  }

  .cta-button.large {
    padding: 0.8rem 2.2rem;
    font-size: 1rem;
  }

  .cta-section h2 {
    font-size: 1.6rem;
  }

  .cta-section p {
    font-size: 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons .cta-button {
    padding: 0.6rem 0.8rem;
  }

  .character-quote,
  .character-quote-author {
    padding: 0 0.8rem;
  }
}

@media (max-width: 349px) {

  .image-collage,
  .spotlights-image-collage {
    width: 250px;
    height: 210px;
  }

  .character-gallery {
    height: 530px;
  }

  .character-context-content .character-lore h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 340px) {
  .hero-buttons {
    gap: 0.5rem;
  }

  .hero-buttons .cta-button {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
  }

  .hero-container {
    padding: 12rem 0rem 3rem 0rem;
  }

  .dropdown a {
    min-width: 60px;
  }
}

@media (max-width: 330px) {

  .hero-title,
  .about-text h2,
  .spotlights-text h2 {
    font-size: 1.7rem;
  }

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

}

@media (max-width: 325px) {

  .image-collage,
  .spotlights-image-collage {
    width: 240px;
    height: 200px;
  }

  .character-gallery {
    height: 520px;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }
}

/* media query for about page */
@media (max-width:1250px) {
  .about-decor:nth-child(1) {
    transform: rotate(5deg);
  }

  .about-decor:nth-child(2) {
    transform: rotate(185deg);
  }

  .character-decor:nth-child(1) {
    transform: rotate(0deg);
  }

  .character-decor:nth-child(2) {
    transform: rotate(180deg);
  }

  .character-video {
    width: 420px;
  }
}

@media (max-width:1150px) {
  .character-video {
    width: 400px;
  }
}

@media (max-width:1100px) {
  .character-video {
    width: 380px;
  }
}

@media (max-width:1080px) {
  .about-decor {
    width: 300px;
    height: 200px;
  }

  .about-text {
    padding: 0 2rem;
  }

  .character-video {
    width: 480px;
    height: 350px;
  }

  .about-decor:nth-child(1) {
    top: 0;
    right: 0;
    transform: rotate(45deg);
  }

  .about-decor:nth-child(2) {
    top: 0;
    left: 0;
    transform: rotate(235deg);
  }

  .character-decor:nth-child(1) {
    transform: rotate(0deg);
  }

  .character-decor:nth-child(2) {
    transform: rotate(180deg);
  }

  .character-content {
    gap: 1.5rem;
  }
}

@media (max-width:930px) {
  .about-decor {
    width: 270px;
    height: 200px;
  }
}

@media (max-width:875px) {
  .about-decor {
    width: 240px;
    height: 190px;
  }
}

@media (max-width:795px) {
  .about-decor {
    width: 220px;
    height: 180px;
  }

  .character-content {
    gap: 2rem;
  }

  .about-decor:nth-child(1) {
    top: auto;
    bottom: 0;
    right: 0;
    transform: rotate(75deg);
  }

  .about-decor:nth-child(2) {
    top: 0;
    left: 0;
    bottom: auto;
    transform: rotate(255deg);
  }

  .character-video {
    width: 400px;
    height: 320px;
  }

  .character-decor:nth-child(1) {
    top: auto;
    bottom: 0;
    right: 0;
    transform: rotate(0deg);
  }

  .character-decor:nth-child(2) {
    top: 0;
    left: 0;
    bottom: auto;
    transform: rotate(180deg);
  }
}

@media (max-width:720px) {
  .about-decor {
    width: 200px;
    height: 170px;
  }
}

@media (max-width:680px) {
  .about-decor {
    width: 180px;
    height: 155px;
  }

  .about-decor:nth-child(1) {
    right: -10px;
  }

  .about-decor:nth-child(2) {
    left: -10px;
  }


  .about-text {
    padding: 0 1rem;
  }
}

@media (max-width:620px) {

  .about-decor:nth-child(1) {
    right: -20px;
  }

  .about-decor:nth-child(2) {
    left: -20px;
  }

  .character-content {
    gap: 1rem;
  }
}

@media (max-width:600px) {
  .about-decor:nth-child(1) {
    right: -30px;
  }

  .about-decor:nth-child(2) {
    left: -30px;
  }
}

@media (max-width:550px) {
  .about-decor:nth-child(1) {
    right: -40px;
  }

  .about-decor:nth-child(2) {
    left: -40px;
  }

  .character-video {
    width: 370px;
    height: 300px;
  }
}

@media (max-width:540px) {
  .about-decor {
    width: 170px;
    height: 145px;
  }
}

@media (max-width:515px) {
  .about-decor {
    width: 160px;
    height: 135px;
  }

  .about-text {
    padding: 0 0;
  }
}

@media (max-width:505px) {
  .about-decor {
    width: 140px;
    height: 120px;
  }
}

@media (max-width:480px) {
  .about-decor {
    width: 130px;
    height: 120px;
  }

  .character-video {
    width: 360px;
    height: 290px;
  }
}

@media (max-width:450px) {
  .character-video {
    width: 340px;
    height: 270px;
  }
}

@media (max-width:430px) {
  .about-image {
    width: 220px;
    height: 220px;
  }

  .character-video {
    width: 310px;
    height: 240px;
  }

  .AragornOverlay,
  .CountOlafOverlay {
    height: 469px;
  }
}

@media (max-width:410px) {
  .about-image {
    width: 210px;
    height: 210px;
  }

  .character-video {
    width: 310px;
    height: 240px;
  }
}

@media (max-width:390px) {
  .about-decor {
    width: 120px;
    height: 110px;
  }

  .character-video {
    width: 290px;
    height: 220px;
  }

  .play-button svg {
    height: 55px;
    width: 55px;
  }

  .AragornOverlay,
  .CountOlafOverlay {
    height: 420px;
  }
}

@media (max-width:370px) {
  .about-image {
    width: 200px;
    height: 200px;
  }

  .character-video {
    width: 270px;
    height: 200px;
  }
}

@media (max-width:360px) {
  .about-decor {
    width: 110px;
    height: 100px;
  }

  .about-text p,
  .spotlights-text p {
    font-size: 1rem;
  }

  .character-video {
    width: 250px;
    height: 180px;
  }

  .AragornOverlay,
  .CountOlafOverlay {
    height: 385px;
  }
}

@media (max-width:350px) {
  .about-image {
    width: 180px;
    height: 180px;
  }

  .character-video {
    width: 250px;
    height: 180px;
  }

  .play-button svg {
    height: 50px;
    width: 50px;
  }
}

@media (max-width:335px) {
  .about-image {
    width: 170px;
    height: 170px;
  }

  .character-video {
    width: 230px;
    height: 160px;
  }

  .AragornOverlay,
  .CountOlafOverlay {
    height: 380px;
  }
}

@media (max-width:325px) {
  .about-decor {
    width: 100px;
    height: 90px;
  }
}

/* Quotes Content */
@media (max-width:748px) {
  .quote-section .container {
    padding: 0;
  }
}

@media (max-width:680px) {
  #quoteContainer {
    font-size: 1.1rem;
    min-height: 100px;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
  }
}

@media (max-width:620px) {
  #quoteContainer {
    font-size: 1.05rem;
    min-height: 93px;
  }

  #quoteButton {
    width: 120px;
  }

  .quote-section .container {
    margin-top: 120px;
  }
}

@media (max-width:580px) {
  #quoteContainer {
    padding: 2rem 1rem 1.5rem 1rem;
  }
}

@media (max-width:560px) {
  #quoteContainer {
    padding: 2rem 0.5rem 1.5rem 0.5rem;
  }
}

@media (max-width:545px) {
  .quote-section {
    padding: 3rem 1rem;
  }
}

@media (max-width:515px) {
  #quoteContainer {
    min-height: 120px;
    padding: 2rem 0.5rem 0.3rem 0.5rem;
  }
}

@media (max-width:359px) {
  #quoteContainer {
    min-height: 147px;
    padding: 2.5rem 0.5rem 0.3rem 0.5rem;
  }

  .footer .container {
    padding: 0 1rem;
  }
}

/* Simple, robust mobile fix: disable fixed on touch devices */
@media (hover: none) and (pointer: coarse) {

  .quote-section .AragornOverlay,
  .CountOlafOverlay {
    background-attachment: scroll;
    /* prevents jumping when toolbars show/hide */
  }

  .poster27 video {
    display: none;
  }

  .poster27 img {
    display: block;
  }

  .poster35 video {
    display: none;
  }

  .poster35 img {
    display: block;
  }
}

.language-dropdown {
  position: relative;
}

.language-dropdown button {
  border-radius: 4px 0 0 4px !important;
}

/* Animated language dropdown like nav dropdown */
.language-dropdown .dropdown-menu {
  position: absolute;
  top: 105%;
  left: 0;
  display: flex;
  flex-direction: column;
  background: var(--header-bg);
  color: var(--text);
  border-radius: 14px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.18), 0 1.5px 0 var(--accent);
  z-index: 100;
  min-width: 75px;
  gap: 0.1rem;
  padding: 0.5rem;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.language-dropdown .dropdown-menu[data-open="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
}

.language-dropdown .dropdown-menu .dropdown-item {
  padding: 0.5rem 0.3rem !important;
  justify-content: center;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 8px !important;
  color: var(--text);
  opacity: 0;
  transform: scale(0.95) translateY(10px);
}

/* Staggered pop-in like nav items */
.language-dropdown .dropdown-menu[data-open="true"] .dropdown-item {
  animation: bubble-pop-in 0.35s cubic-bezier(.5, 1.7, .5, 1) forwards;
}

.language-dropdown .dropdown-menu[data-open="true"] .dropdown-item:nth-child(1) {
  animation-delay: 0.05s;
}

.language-dropdown .dropdown-menu[data-open="true"] .dropdown-item:nth-child(2) {
  animation-delay: 0.12s;
}

.language-dropdown .dropdown-menu[data-open="true"] .dropdown-item:nth-child(3) {
  animation-delay: 0.19s;
}

.language-dropdown .dropdown-menu[data-open="true"] .dropdown-item:nth-child(4) {
  animation-delay: 0.26s;
}

.language-dropdown .dropdown-menu[data-open="true"] .dropdown-item:nth-child(5) {
  animation-delay: 0.33s;
}

.language-dropdown .dropdown-menu[data-open="true"] .dropdown-item:nth-child(6) {
  animation-delay: 0.40s;
}

.language-dropdown .dropdown-menu[data-open="true"] .dropdown-item:nth-child(7) {
  animation-delay: 0.47s;
}

.language-dropdown .dropdown-menu .dropdown-item:hover {
  background: var(--accent);
  color: #fff;
}

.about-image.character-video {
  outline: none;
}

/* Custom video controls: hidden by default, visible on hover/focus */
.about-image.character-video .video-controls {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Visibility controlled by JS via controls-visible */

/* Explicit class to force controls visible (used by JS for mobile/desktop inactivity logic) */
.about-image.character-video.controls-visible .video-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Touch devices: hide by default, show when controls-visible */
@media (hover: none) and (pointer: coarse) {
  .about-image.character-video .video-controls {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
  }

  .about-image.character-video.controls-visible .video-controls {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* Slider thumb color (accent) */
.about-image.character-video .video-controls .video-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.about-image.character-video .video-controls .video-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.about-image.character-video .video-controls .video-seek::-ms-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* Hide Cursor on Character Videos */
.about-image.character-video.playing.hide-cursor {
  cursor: none;
}

/* Fix large-screen hero height */
@media (min-width: 1081px) {

  .homepage-video-section,
  .homepage-hero {
    min-height: auto;
    height: clamp(600px, 100vh, 800px);
  }
}

/* Book Modal Styles */
.category-bubble:hover {
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.13);
  background: #b0021f;
}

.book-action-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  padding: 0.6em 1.4em;
  font-size: 1.08em;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin: 0 auto 0.5em auto;
  transition: background 0.18s, color 0.18s;
}

.book-action-btn:hover,
.book-action-btn:focus {
  background: #b0021f;
  color: #fff !important;
  outline: none;
}

/* ─── Title Caption Overlays ─── */
.title-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-top: 1em;
  padding-right: 0.6em;
  padding-left: 0.6em;
  padding-bottom: 0.55em;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 60%,rgba(0, 0, 0, 0.15) 85%, transparent 100%);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Show on hover */
.collage-item:hover > .title-caption,
.spotlights-visual > div:hover > .title-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Title Caption Responsive ─── */
@media (max-width: 1080px) {
  .title-caption {
    font-size: 0.68rem;
    padding-left: 0.5em;
    padding-right: 0.5em;
  }
}

@media (max-width: 760px) {
  .title-caption {
    font-size: 0.52rem;
    padding-left: 0.35em;
    padding-right: 0.35em;
  }
}

@media (max-width: 560px) {
  .title-caption {
    font-size: 0.48rem;
    padding-left: 0.3em;
    padding-right: 0.3em;
    line-height: 1.25;
  }
}

@media (max-width: 480px) {
  .title-caption {
    font-size: 0.43rem;
    padding-left: 0.2em;
    padding-right: 0.2em;
    line-height: 1.15;
  }
}