:root {
    --crimson: #880808;
    --crimson-bright: #cc0000;
    --crimson-dark: #a30000;
}

* {
    box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, black, #880808);
  background-attachment: fixed;
  color: white;
}

.title {
  text-align: center;
  font-size: 3em;
  color: white;
  text-shadow: 2px 2px red, 4px 4px black;
  margin-top: 20px;
}

/* ---------------- NAVBAR ---------------- */

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: linear-gradient(to right, #880808, black);
    padding: 8px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease, padding 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
    padding: 4px 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
    background: linear-gradient(to right, #6b0606, #0a0a0a);
}

.nav-left {
    display: flex;
    align-items: center;
    justify-self: start;
    position: relative;
}

.nav-center {
    justify-self: center;
    text-align: center;
}

.nav-right {
    justify-self: end;
}

.brand-text {
    font-size: 1.5em;
    font-weight: bold;
    letter-spacing: 2px;
    color: white;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(204, 0, 0, 0.7);
}

.nav-logo-link {
    display: block;
    line-height: 0;
}

.navbar img.nav-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar img.nav-logo:hover {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 0 16px rgba(204, 0, 0, 0.8);
}

/* Hamburger toggle */
.menu-toggle {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    border-radius: 6px;
    transition: background 0.25s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--crimson-bright);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--crimson-bright);
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background: rgba(10, 10, 10, 0.97);
    border: 1px solid rgba(204, 0, 0, 0.4);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    padding: 8px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dropdown-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    color: white;
    text-decoration: none;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
}

.dropdown-menu a i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
    color: var(--crimson-bright);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    background: rgba(204, 0, 0, 0.18);
    padding-left: 18px;
    color: #ffdede;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 90;
}

.menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* ---------------- PAGE CONTENT ---------------- */

.container {
  text-align: center;
  padding: 20px;
  padding-top: 100px;
}

h2 {
  margin-top: 20px;
  font-size: 2em;
}

p {
  font-size: 1.2em;
  margin: 20px 0;
}

/* Scroll-reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.footer {
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
}

.footer a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
  font-size: 1em;
  transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--crimson-bright);
}

.footer img {
  vertical-align: middle;
  margin-left: 10px;
  width: 150px;
  height: 150px;
}

.button {
  display: inline-block;
  background-color: #8b0000;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1.2em;
  margin: 10px 10px 0 0;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}

.button:hover {
  background-color: #a00000;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(139, 0, 0, 0.4);
}

.button:active {
    transform: translateY(0);
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.grid-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}

/* ---------------- SLIDESHOW ----------------
   Responsive: width always fills its grid cell, height is driven
   by aspect-ratio so the same container auto-fits any screen width
   instead of relying on one fixed pixel height. The ratio is set to
   2362:1181 to match the actual source image dimensions exactly, so
   every picture fills the frame edge-to-edge with no cropping and
   no letterboxing at any screen size.

   Transition: slides are stacked directly on top of each other and
   crossfade via opacity (a "dimming" dissolve) rather than sliding
   left/right — simpler and more reliable than position-based motion,
   and it's what was asked for. */

.slideshow-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2362 / 1181;
  max-height: 480px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.slideshow-container img,
.slideshow-container p {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
  pointer-events: none;
}

.slideshow-container img {
  object-fit: cover;
  z-index: 1;
  padding: 0;
}

.slideshow-container p {
  color: white;
  font-size: 1.5em;
  z-index: 2;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.slideshow-container img.active,
.slideshow-container p.active {
  opacity: 1;
  pointer-events: auto;
}

/* A thin black scrim that briefly darkens the whole frame at the
   midpoint of every cut — the "dip to black" that makes a crossfade
   read as a film dissolve rather than a plain cross-dissolve. It is
   driven purely by JS toggling .dissolving on the container, so it
   fires once per cut regardless of which slide is entering/leaving. */
.slideshow-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: black;
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.7s ease-in-out;
}

.slideshow-container.dissolving::after {
  opacity: 0.35;
}

/* Slow continuous zoom on the visible image while it's active, for
   a livelier, less static feel between transitions. This only
   animates transform, so it never fights the opacity crossfade. */
.slideshow-container img.active {
  animation: cb-kenburns 7s ease-in-out forwards;
}

@keyframes cb-kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

.slideshow-container a {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .slideshow-container {
        max-height: 420px;
    }
}

@media (max-width: 640px) {
    .title {
        font-size: 2em;
    }

    .brand-text {
        font-size: 1.05em;
        letter-spacing: 1px;
    }

    .navbar img.nav-logo {
        width: 46px;
        height: 46px;
    }

    .slideshow-container {
        max-height: 340px;
    }

    .slideshow-container p {
        font-size: 1em;
        padding: 12px;
    }

    .button {
        display: block;
        margin: 10px auto 0 auto;
        width: 100%;
        max-width: 320px;
    }

    .dropdown-menu {
        min-width: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Animations are purely decorative (Ken Burns zoom, hover
       flourishes) so they're fully disabled here. Transitions are
       disabled everywhere EXCEPT the slideshow's own opacity
       crossfade, which is functional — it's how a slide change is
       communicated, not just flourish — so it keeps working (at a
       slightly faster pace) instead of going silent. */
    * {
        animation: none !important;
    }

    *:not(.slideshow-container img):not(.slideshow-container p) {
        transition: none !important;
    }

    .slideshow-container img,
    .slideshow-container p {
        transition-duration: 0.4s !important;
    }
}
