/* Standard Styles */

h1 {
  font-family: "Lora", serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  text-transform: uppercase;
  color: #235347;
}

h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.3;
  text-transform: uppercase;
  color: #c97d60;
}

h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.4;
  color: #6d4e75;
}

h4 {
  font-family: "Lora", serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  text-transform: none;
  color: #235347;
}

h5 {
  font-family: "Lora", serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.5;
  color: #c97d60;
}

.h5-subtitle {
  font-size: 1.1rem;
  font-style: italic;
}

.modify-header-green {
  color: #235347;
}

.modify-header-purple {
  color: #6d4e75;
}

.modify-header-orange {
  color: #c97d60;
}

body {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  line-height: 1.6;
  color: #2b2b2b;
}

p {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #2b2b2b;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

a {
  color: #c97d60;
  text-decoration: underline;
}

a:hover {
  color: #585e5a;
}

.toc-link {
  color: #6d4e75;
  text-decoration: none;
}

.toc-link:hover {
  color: #c97d60;
  text-decoration: underline;
}

.back-to-top-link {
  text-decoration: none;
  font-weight: bold;
}

.album-link {
  text-decoration: none;
  color: #6d4e75;
}

.album-link:hover {
  color: none;
}

strong,
b {
  font-weight: bold;
}

em,
i {
  font-style: italic;
}

ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.no-bullet {
  li {
    list-style: none;
  }
}

.toc-list {
  padding-left: 0rem !important;

  li {
    list-style: none;
  }
}

.fun-facts-list {
  padding-left: 2rem !important;
  margin-bottom: 0 !important;

  li {
    list-style: none;
  }
}

@media (max-width: 1024px) {
  ul,
  ol {
    list-style-position: inside;
    padding-left: 0;
    text-align: center;
  }

  li {
    display: list-item;
    text-align: center;
  }

  .fun-facts-list {
    padding-left: 0 !important;
    margin-bottom: 0 !important;

    li {
      list-style: none;
    }
  }
}

@media (max-width: 768px) {
  /* Headings scale down proportionally */
  h1 {
    font-size: 1.9rem;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.4rem;
    line-height: 1.35;
  }

  h4 {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  h5 {
    font-size: 1.05rem;
    line-height: 1.4;
  }

  /* Body text slightly smaller but still readable */
  body,
  p {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* Lists & spacing adjustments for tighter layouts */
  ul,
  ol {
    padding-left: 1rem;
  }

  li {
    margin-bottom: 0.4rem;
  }
}

@media (max-width: 480px) {
  /* Extra-small screens: further adjustments */
  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  body,
  p {
    font-size: 0.95rem;
  }
}

input,
textarea,
select,
button {
  font: inherit;
  color: inherit;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.col {
  padding: 0 10px;
}

/* Header styling */

#header-logo {
  height: 150px;
  padding: 15px;
}

.fake-nav-bar {
  width: 100%;
  height: 70px;
}

.nav-bar-overlay {
  background-color: #ffffff80;
}

.nav-bar {
  padding: 0 !important;
  margin: 0 !important;
  justify-content: space-evenly;
  width: 100%;
}

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: white;
}

.nav-desktop-spaced {
  display: flex;
  flex-direction: column; /* default for mobile */
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-link {
  color: #c97d60;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: bold;
  text-transform: uppercase;
}

.nav-link:hover {
  color: #6d4e75;
  cursor: pointer;
}

.nav-link:focus,
.nav-link:active {
  color: #235347 !important;
}

.dropdown-item {
  color: #6d4e75;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* Hover state */
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #6d4e75; /* your plum brand color */
  color: #ffffff; /* white text on hover */
}

/* Active/selected state (e.g., using keyboard or programmatically) */
.dropdown-item.active,
.dropdown-item:active {
  background-color: #235347; /* your dark teal */
  color: #ffffff;
}

@media (min-width: 992px) {
  /* Bootstrap lg breakpoint */
  .nav-desktop-spaced {
    flex-direction: row;
    justify-content: space-evenly;
    padding: 0 20px;
    width: 80%;
  }

  .nav-desktop-spaced .nav-item {
    flex-shrink: 0;
  }
}

/* Footer styling */

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-links-container {
  display: contents;
}

.copywright-text {
  font-size: 0.75rem !important;
  font-style: italic;
}

.footer-link {
  color: #6d4e75 !important;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  text-align: left;
  list-style: none;
  padding-left: 0;
}

.footer-link:hover {
  color: #c97d60 !important;
  cursor: pointer;
}

.footer-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

#footer-grid-1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links-group {
    flex-direction: column;
    align-items: center;
  }

  .footer-links li {
    text-align: center;
  }

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

.centered-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Login Form */

.login-container {
  width: 90%;
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background-color: #c7c6c180;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-family: "Barlow Condensed", sans-serif;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-label-text {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.15rem;
  text-align: left;
  text-transform: uppercase;
  font-weight: bold;
}

.login-form input {
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #235347;
}

.error-message {
  color: #c97d60;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* General Styling */

.bounded-container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.stretch-container {
  width: 100%;
  margin: 3rem 0;
}

.responsive-graphic {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 25px;
}

.fun-facts-container {
  width: 50%;
  border-radius: 25px;
  padding: 1rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sub-header-italic {
  font-style: italic;
  margin-bottom: 0 !important;
}

.bold-dk-green {
  font-weight: bold;
  color: #235347;
}

.bold-dk-purple {
  font-weight: bold;
  color: #6d4e75;
}

.bold-dk-orange {
  font-weight: bold;
  color: #c97d60;
}

.handwriting {
  font-family: "Shadows Into Light", cursive;
}

.mobile-only {
  display: none;
}

@media (max-width: 1024px) {
  .bounded-container,
  .stretch-container {
    text-align: center;
  }

  .responsive-graphic {
    border-radius: 0px;
  }

  .fun-facts-wrapper {
    display: flex;
    justify-content: center;
  }

  .fun-facts-container {
    width: 90%;
  }
}

.back-to-top-container {
  text-align: center;
}

.centered-text {
  text-align: center;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
}

/* 3 Image Gallery */

.card-gallery-three {
  padding: 3rem 0;
}

.gallery-header {
  text-align: center;
  padding-bottom: 1rem;
}

.card-gallery-three-inner-container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-evenly;
  gap: 2rem;
  padding: 0 1rem;
  margin: 0 2rem;
}

.gallery-card {
  flex: 1 1 30%;
  min-width: 250px;
  max-width: 100%;
  background-color: white;
  padding: 1.25rem 1.25rem 0.25rem 1.25rem;
  border-radius: 25px;
  box-sizing: border-box;
}

.gallery-image {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 3 / 2.5;
  object-fit: cover;
}

.gallery-title {
  text-align: center;
  padding-top: 0.5rem;
  margin-bottom: 0 !important;
}

.gallery-title-link {
  text-decoration: none;
}

.gallery-subtitle {
  text-align: center;
  margin-top: 0 !important;
  font-style: italic;
  color: #235347;
}

.flip-card {
  width: 100%;
  aspect-ratio: 3 / 2.5;
  perspective: 1000px;
  border-radius: 20px;
  display: block;
  position: relative;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  border-radius: 20px;
  position: relative;
  -webkit-transform-style: preserve-3d;
}

@media (hover: hover) and (pointer: fine) {
  .flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
  }
}

.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

@media (hover: none) {
  .flip-card-front a {
    pointer-events: none !important;
  }

  .flip-card-back a {
    pointer-events: auto !important;
  }
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-card-front {
  transform: rotateY(0deg);
}
.flip-card-back {
  transform: rotateY(180deg);
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

.flip-card-back {
  background-color: #a8b9a3;
  transform: rotateY(180deg);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  text-align: center;
}

.flip-link {
  color: white !important;
  text-decoration: none;
  font-size: 1.15rem;
}

.flip-link:hover {
  color: #235347 !important;
  text-decoration: none;
}

@media (max-width: 768px) {
  .gallery-card {
    flex: 1 1 100%;
  }
}

/* Tablet-specific layout rearrangement */
@media (min-width: 769px) and (max-width: 1024px) {
  .gallery-card {
    flex: 1 1 48%; /* allow cards to sit side-by-side if possible */
  }

  .gallery-card:nth-child(2) {
    order: -1; /* Move to the top */
    flex: 1 1 100%; /* Take full width */
  }
}

/* Round Image Gallery */

.round-image-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.round-image-gallery-card {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
  align-items: top;
  text-align: left;
  padding: 1rem;
  box-sizing: border-box;
  justify-content: center;
  min-width: 250px;
  max-width: 100%;
}

.round-image {
  height: 250px;
  border-radius: 50%;
  margin: 1rem 0;
}

.card-text {
  flex-grow: 1;
}

.card-button {
  margin-top: auto;
  width: 100%;
}

@media (max-width: 1024px) {
  .round-image-gallery {
    flex-direction: column;
  }

  .round-image-gallery-card {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .card-button {
    margin-bottom: 1rem;
  }

  .card-text {
    padding: 0 1.5rem;
  }
}

/* Featurettes */

.featurette-right-image,
.featurette-left-image {
  display: flex;
  gap: 2rem;
  align-items: center;
  border-top: 1.5px solid #c97d60;
  border-bottom: 1.5px solid #c97d60;
  box-shadow: 0 1px 0px #9d9b94, 0 -1px 0px #9d9b94;
  padding: 3rem 1.5rem;
}

.featurette-right-image-no-border,
.featurette-left-image-no-border {
  display: flex;
  gap: 2rem;
  align-items: center;
  padding: 3rem 1.5rem;
}

.featurette-RI-left-box,
.featurette-LI-right-box {
  flex: 2; /* 2 parts out of 2 */
  display: flex;
  flex-direction: column;
  border: 0px solid black;
}

.featurette-RI-right-box {
  flex: 1; /* 1 part out of 2 */
  display: flex;
  justify-content: flex-end;
  border: 0px solid black;
}

.featurette-LI-left-box {
  flex: 1; /* 1 part out of 2 */
  display: flex;
  justify-content: flex-start;
  border: 0px solid black;
}

.featurette-image {
  width: 350px;
  height: 350px;
  border-radius: 25px;
  object-fit: cover;
  object-position: center;
}

.featurette-polaroid-on-right,
.featurette-polaroid-on-left {
  display: flex;
  gap: 4rem;
  align-items: center;
  padding: 3rem 1.5rem;
  justify-content: center;
}

.featurette-PoR-left-box,
.featurette-PoL-right-box {
  flex: 1; /* 1 parts out of 2 */
  display: flex;
  flex-direction: column;
  border: 0px solid black;
  text-align: center;
}

.featurette-PoR-right-box {
  flex: 1; /* 1 part out of 2 */
  display: flex;
  justify-content: flex-start;
  text-align: center;
}

.featurette-PoL-left-box {
  flex: 1; /* 1 part out of 2 */
  display: flex;
  justify-content: flex-end;
  text-align: center;
}

.outer-tilt-container {
  overflow: visible;
}

.inner-tilt-container-right {
  top: 50%;
  left: 50%;
  width: 350px;
  transform: rotate(10deg);
}

.inner-tilt-container-left {
  top: 50%;
  left: 50%;
  width: 350px;
  transform: rotate(-10deg);
}

.polaroid-back {
  display: none;
}

.polaroid-stack {
  position: relative;
  width: 350px; /* match your existing size */
  height: 400px;
  margin: 2rem auto;
  cursor: pointer;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 3.25;
  object-fit: cover;
  display: block;
}

/* subtle “on-top” affordance */
.polaroid-stack .ps-card:nth-child(1):hover {
  transform: translateY(calc(-1 * var(--lift))) rotate(var(--r, 0deg));
}

/* initial scattered angles/offsets applied by JS via CSS vars. 
   Add a safe default so non-JS still looks okay */
.polaroid-stack .ps-card {
  --r: -4deg;
  --ty: 0px;
  --tx: 0px;
  transform: translate(var(--tx), var(--ty)) rotate(var(--r));
}

/* depth cue: cards further back slightly dim */
.polaroid-stack .ps-card[data-depth="1"] {
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
}
.polaroid-stack .ps-card[data-depth="2"] {
  opacity: 0.96;
}
.polaroid-stack .ps-card[data-depth="3"] {
  opacity: 0.92;
}
.polaroid-stack .ps-card[data-depth="4"] {
  opacity: 0.9;
}

/* click “whoosh” class for the outgoing top card */
.ps-card.to-back {
  transition: transform 460ms cubic-bezier(0.18, 0.67, 0.2, 1),
    opacity 320ms ease;
  /* little arc motion upward then down/back */
  transform: translate(0, -12px) rotate(var(--r)) scale(0.98);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ps-card {
    transition: none !important;
  }
}

/* Responsive fit — your mobile CSS already narrows inner containers; follow that width */
@media (max-width: 768px) {
  .polaroid-stack {
    --card-w: min(90vw, 440px);
    min-height: 380px;
  }
}

@media (max-width: 768px) {
  .featurette-right-image,
  .featurette-left-image {
    flex-direction: column;
  }

  .featurette-right-image-no-border,
  .featurette-left-image-no-border {
    flex-direction: column;
  }

  .featurette-RI-right-box {
    order: -1;
  }

  .featurette-RI-left-box,
  .featurette-LI-right-box {
    padding: 0 1.5rem;
  }

  .featurette-polaroid-on-left {
    align-items: center;
    padding: 0 !important;
    margin: 0 0 2rem 2rem;
  }
  .featurette-polaroid-on-right {
    align-items: center;
    padding: 0 !important;
    margin: 0 2rem 2rem 0;
  }

  #top-polaroid {
    margin-top: 6rem;
  }

  /* hide desktop-side text on mobile */
  .featurette-PoR-left-box,
  .featurette-PoL-right-box {
    display: none;
  }

  .featurette-PoL-left-box,
  .featurette-PoR-right-box {
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 90%;
    max-width: 480px;
    margin: 0 2rem;
  }

  /* Stagger the cards */
  .featurette-PoL-left-box {
    transform: translateX(-10%);
  }
  .featurette-PoR-right-box {
    transform: translateX(10%);
  }

  .outer-tilt-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* ✅ flatten the nested selector */
  .inner-tilt-container-right,
  .inner-tilt-container-left {
    width: 90%;
    min-width: 200px;
    min-height: 150px;
    transform: rotate(10deg);
    transform-origin: center;
  }
  .inner-tilt-container-left {
    transform: rotate(-10deg);
  }

  .inner-tilt-container-right .outer-polaroid,
  .inner-tilt-container-left .outer-polaroid {
    padding-bottom: 0 !important;
    position: relative;
  }

  /* Flip setup */
  .polaroid-card {
    perspective: 1000px;
    cursor: pointer;
  }

  .polaroid-inner {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 450ms ease;
    min-height: 100%;
  }

  .polaroid-card.is-flipped .polaroid-inner {
    transform: rotateY(180deg);
  }

  .polaroid-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .polaroid-front {
    position: relative;
  }

  .polaroid-back {
    display: flex;
    flex-direction: column;
    align-items: center; /* horizontal centering */
    justify-content: flex-start; /* start at top */
    position: absolute;
    inset: 0; /* fill the front footprint */
    padding: 1rem 1.25rem;
    border-radius: inherit;
    transform: rotateY(180deg);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    overflow: auto; /* scroll if the text is long */
    font-size: clamp(0.8rem, 3.2vw, 1rem);
    line-height: 1.45;
  }

  /* give extra space when hint exists */
  .polaroid-back.has-overflow {
    padding-bottom: 1.5rem;
  }

  .polaroid-back.has-overflow::after {
    /* the fade itself, without text */
    content: "";
    position: sticky;
    bottom: 0;
    display: block;
    height: 2.5rem; /* space for fade + hint */
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 1) 100%
    );
    pointer-events: none;
    z-index: 0;
  }

  .polaroid-back .scroll-hint {
    position: sticky;
    bottom: 0.4rem; /* float just above the fade edge */
    display: inline-block;
    margin: 0 auto;
    text-align: center;
    color: #000; /* black text */
    font-size: 0.8em;
    background: #a8b9a3;
    padding: 0.25rem 0.6rem;
    border-radius: 6px; /* rounded small box */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);

    pointer-events: none;
    transition: opacity 200ms ease, visibility 200ms ease;
  }

  .polaroid-back .scroll-hint.hidden {
    opacity: 0;
    visibility: hidden;
  }

  .polaroid-back h3 {
    font-size: 1.25em; /* scales with base */
    line-height: 1.2;
    text-wrap: balance;
    margin-bottom: 0.5rem;
  }

  .polaroid-back ul {
    margin: 0;
    padding-left: 0;
  }

  /* Motion respect */
  @media (prefers-reduced-motion: reduce) {
    .polaroid-inner {
      transition: none;
    }
    .polaroid-back .scroll-hint {
      transition: none;
    }
  }
}

/* Slideshow Featurette */
.featurette-right-image-ss,
.featurette-left-image-ss {
  display: flex;
  gap: 2rem;
  align-items: center;
  padding: 3rem 1.5rem;
  justify-content: space-evenly;
  margin: 0 auto;
  box-sizing: border-box;
}

.featurette-RI-left-box-ss,
.featurette-LI-right-box-ss {
  flex: 0 1 40%;
  min-width: 0;
  justify-content: center;
  text-align: center;
  align-content: center;
}

.featurette-RI-right-box-ss,
.featurette-LI-left-box-ss {
  flex: 0 1 60%;
  width: 100%;
  max-width: none;
  aspect-ratio: 5 / 4;
  border-radius: 12px;
  overflow: hidden;
  align-content: center;
}

.slideshow-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  max-width: 500px;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  justify-content: center;
  margin: 0 auto;
  touch-action: pan-y;
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  border-radius: 25px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slide.active {
  display: block;
}

.slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 1rem;
  border-radius: 25px;
  color: #fff;
  line-height: 1.35;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(0.9rem, 2.3vw, 1.05rem);
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0) 80%
  );
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

@media (max-width: 768px) {
  .featurette-right-image-ss,
  .featurette-left-image-ss {
    flex-direction: column;
  }

  .featurette-RI-right-box-ss {
    order: -1;
  }

  .featurette-RI-left-box-ss,
  .featurette-LI-right-box-ss {
    padding: 0 1.5rem;
  }
}

/* Arrow styling */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 10px;
  color: #c7c6c1;
  font-weight: bold;
  font-size: 20px;
  background: #585e5ae6;
  border-radius: 50%;
  transform: translateY(-50%);
  user-select: none;
  text-decoration: none;
  z-index: 2;
}
.prev {
  left: 10px;
}
.next {
  right: 10px;
}
.prev:hover,
.next:hover {
  background: #c97d60e6;
  color: white;
}

/* Album Gallery */

.album-header-container {
  background-color: #6d4e75;
  padding: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.album-section-header {
  text-align: center !important;
  color: white;
  margin: 0 !important;
  padding: 0 !important;
}

.album-cover-row {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-evenly;
  gap: 1rem;
  margin-bottom: 2rem;
}

.album-cover-card {
  flex: 1 1 30%;
  min-width: 250px;
  max-width: 100%;
  background-color: white;
  box-sizing: border-box;
}

.album-cover-card:hover .fade-in-button {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Button: hidden by default */
.fade-in-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  white-space: nowrap;
}

.album-cover-card:hover .album-cover-image {
  opacity: 0.6;
}

.outer-polaroid {
  background: white;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 15px 15px 10px 15px;
  width: 100%;
  height: auto;
}

.polaroid-image-container {
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
}

.album-cover-image {
  height: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3.25;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.album-cover-title {
  padding-top: 10px;
  text-align: center;
  h3 {
    margin-bottom: 0;
  }
  p {
    margin-top: 0;
  }
}

.polaroid-title {
  font-family: "Shadows Into Light", cursive;
  position: relative;
  display: inline-block;
}

.polaroid-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  font-family: "Shadows Into Light", cursive;
  color: transparent;
  -webkit-text-stroke: 1px #c97d60;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  pointer-events: none;
  transition: width 2s ease;
  opacity: 0;
}

.polaroid-title-no-hover-effect {
  font-family: "Shadows Into Light", cursive;
  position: relative;
  display: inline-block;
  color: #c97d60;
}

/* Hides filled text and reveals stroke on hover */
.album-cover-title:hover .polaroid-title {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.album-cover-title:hover .polaroid-title::after {
  width: 100%;
  opacity: 1;
}

.album-button-container {
  display: flex;
  justify-content: center;
}

.album-button-container .tertiary-button {
  margin: 0px !important;
}

.album-button-container .primary-button {
  margin: 0px !important;
}

/* Buttons */

.primary-button {
  display: inline-block;
  background-color: #235347;
  border-radius: 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  padding: 10px 25px;
  margin: 1rem 0px;
}

.primary-button:hover {
  background-color: #a8b9a3;
  color: #2b2b2b;
  cursor: pointer;
}

.secondary-button {
  display: inline-block;
  background-color: #6d4e75;
  border: none;
  border-radius: 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  padding: 10px 25px;
  margin: 1rem 0px;
}

.secondary-button:hover {
  background-color: #c0b7cc;
  color: #2b2b2b;
  cursor: pointer;
}

.tertiary-button {
  display: inline-block;
  background-color: #c97d60;
  border: none;
  border-radius: 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  padding: 10px 25px;
  margin: 1rem 0px;
}

.tertiary-button:hover {
  background-color: #d8b4a0;
  color: #2b2b2b;
  cursor: pointer;
}

.orange-to-green-button {
  display: inline-block;
  background-color: #c97d60;
  border: none;
  border-radius: 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  padding: 10px 25px;
  margin: 1rem 0px;
}

.neutral-button {
  display: inline-block;
  background-color: #585e5a;
  border: none;
  border-radius: 8px;
  border: solid 2px #585e5a;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  padding: 10px 25px;
  margin: 1rem 0px;
}

.neutral-button:hover {
  background-color: #c7c6c1;
  border: solid 2px #585e5a;
  color: #2b2b2b;
  cursor: pointer;
}

.logout-button {
  display: inline-block;
  background-color: #6d4e75;
  border: none;
  border-radius: 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  padding: 10px 25px;
  margin: 1rem 0px;
}

.logout-button:hover {
  background-color: #c97d60;
  color: #2b2b2b;
  cursor: pointer;
}

@media (min-width: 577px) and (max-width: 1024px) {
  .primary-button,
  .secondary-button,
  .tertiary-button,
  .neutral-button,
  .logout-button {
    display: block;
    margin: 1rem auto !important;
    text-align: center;
    width: 40%;
  }
}

@media (max-width: 576px) {
  .primary-button,
  .secondary-button,
  .tertiary-button,
  .neutral-button,
  .logout-button {
    width: 100%;
    text-align: center;
  }
}

/* Timeline */

#timeline-top {
  margin: 0 0 4rem 0 !important;
  padding: 0 !important;

  .bounded-container {
    margin-top: 0;
    margin-bottom: 0;
  }
}

.timeline-row {
  margin: 0 !important;
  padding: 0 !important;

  .bounded-container {
    margin-top: 0;
    margin-bottom: 0;
  }
}

.timeline-start-container {
  display: flex;
  justify-content: center;
}

.timeline-start {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  padding: 25px;
  width: 50%;
  min-height: 10px;
  max-height: 200px;
  border-radius: 35px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

#timeline-start-header {
  padding: 0;
  margin: 0;
}

.timeline-item-grid {
  display: grid;
  grid-template-columns: 45% 5% 5% 45%;
  grid-template-rows: auto auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-center-top-left {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  border-right: 2.5px solid #c97d60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  min-height: 1rem;
}

.timeline-center-top-right {
  grid-column: 3/ 4;
  grid-row: 1 / 2;
  border-left: 2.5px solid #c97d60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  min-height: 1rem;
}

.timeline-center-bottom-left {
  grid-column: 2 / 3;
  grid-row: 2 / 2;
}

.timeline-center-bottom-right {
  grid-column: 3 / 4;
  grid-row: 2 / 2;
}

.timeline-vertical-line-left {
  border-right: 2.5px solid #c97d60;
}

.timeline-vertical-line-right {
  border-left: 2.5px solid #c97d60;
}

.timeline-horizontal-line-left {
  width: 100%;
  height: 5px;
  background-color: #235347;
  opacity: 0;
  transform-origin: right;
  transform: scaleX(0);
}

.timeline-horizontal-line-right {
  width: 100%;
  height: 5px;
  background-color: #235347;
  opacity: 0;
  transform-origin: left;
  transform: scaleX(0);
}

.timeline-item-left {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.timeline-item-right {
  grid-column: 4 / 5;
  grid-row: 1 / 3;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: transparent;
  padding: 1.5rem;
  width: 100%;
  min-height: 300px;
  max-height: 500px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.timeline-image {
  width: 100%;
  max-width: 150px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 100%;
  border: 2px solid black;
}

.event-title {
  text-decoration: none;
  padding-top: 10px;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  color: #6d4e75;
}

.event-date {
  text-decoration: none;
  font-style: italic;
  margin-bottom: 0 !important;
}

@media (min-width: 1025px) {
  .mobile-vertical-connector-grid {
    display: none;
  }
}

@media (max-width: 1024px) {
  #timeline-top {
    margin: 0 0 4rem 0 !important;
  }

  .timeline-start {
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 25px;
  }

  .timeline-item-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 100%;
    padding: 0 !important;
    margin: 0 !important;
  }

  .timeline-item-left,
  .timeline-item-right {
    grid-column: unset;
    grid-row: unset;
    width: 100%;
    margin: 0 !important;
  }

  .timeline-center-top-left,
  .timeline-center-top-right,
  .timeline-center-bottom-left,
  .timeline-center-bottom-right {
    display: none;
  }

  .timeline-content {
    width: 100%;
    max-width: 500px;
    padding: 1rem;
    box-sizing: border-box;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .mobile-vertical-connector-grid {
    display: grid;
    grid-template-columns: 1fr;
    height: 100px;
    align-items: center;
    justify-content: center;
  }

  .timeline-vertical-connector {
    width: 5px;
    height: 100px;
    border-left: 5px solid #c97d60;
    margin: 0 auto;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
  }

  .timeline-image {
    max-width: 120px;
  }

  .event-title,
  .event-date {
    text-align: center;
  }
}

/* Pattern Backgrounds */

.diagonal-stripe-background-purple {
  background-image: linear-gradient(
    45deg,
    #6d4e75 25%,
    #c0b7cc 25%,
    #c0b7cc 50%,
    #6d4e75 50%,
    #6d4e75 75%,
    #c0b7cc 75%,
    #c0b7cc 100%
  );
  background-size: 60px 60px;
}

/* Animations - backgrounds */

.multi-layered-effect {
  background: linear-gradient(
      120deg,
      #23534780,
      #a8b9a380,
      #6d4e7580,
      #c0b7cc80,
      #c97d6080,
      #d8b4a080
    ),
    url('data:image/svg+xml;utf8,<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="white"/></svg>');
  background-size: 200% 200%, 10px 10px;
  animation: gradient-animation 12s ease-in-out infinite;
}

/* This is an extra component needed for gradient functionality on Chrome */
@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.fade-between-colors-light {
  background: linear-gradient(120deg, #a8b9a3, #c0b7cc, #d8b4a0);
  background-size: 200% 200%;
  animation: color-fade 15s ease-in-out infinite;
}

@keyframes color-fade {
  0% {
    background: #a8b9a3;
  }
  33% {
    background: #c0b7cc;
  }
  66% {
    background: #d8b4a0;
  }
  100% {
    background: #a8b9a3;
  }
}

/* === Keyframes for Timeline === */
@keyframes draw-line-down {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    height: 100%;
    opacity: 1;
  }
}

@keyframes draw-line-horizontal-left {
  from {
    transform: scaleX(0);
    transform-origin: right;
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    transform-origin: right;
    opacity: 1;
  }
}

@keyframes draw-line-horizontal-right {
  from {
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
    opacity: 1;
  }
}

@keyframes fade-zoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes draw-vertical-connector {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* === Animation Classes for Timeline === */
.animate-line-down {
  animation: draw-line-down 0.5s ease-out forwards;
  animation-delay: 0s;
}

.animate-line-horizontal-left {
  transform-origin: right;
  animation: draw-line-horizontal-left 0.5s ease-out forwards;
  animation-delay: 0.5s;
  visibility: visible;
}

.animate-line-horizontal-right {
  transform-origin: left;
  animation: draw-line-horizontal-right 0.5s ease-out forwards;
  animation-delay: 0.5s;
  visibility: visible;
}

.animate-content-pop {
  animation: fade-zoom 0.4s ease-out forwards;
  animation-delay: 0s;
}

.animate-line-down-bottom {
  animation: draw-line-down 0.4s ease-out forwards;
  animation-delay: 0s;
}

.animate-vertical-connector {
  animation: draw-vertical-connector 0.5s ease-out forwards;
}

/* Initial state for all elements */
.timeline-center-top-left,
.timeline-center-top-right,
.timeline-left-line,
.timeline-right-line,
.timeline-content,
.timeline-center-bottom-left,
.timeline-center-bottom-right {
  opacity: 0;
  visibility: hidden;
}

/* When animating, make visible */
.animate-line-down,
.animate-line-horizontal-left,
.animate-line-horizontal-right,
.animate-content-pop,
.animate-line-down-bottom {
  visibility: visible;
}

/* Overrides */
.dark-green-container {
  background-color: #235347;
}

.dark-purple-container {
  background-color: #6d4e75;
}

.dark-orange-container {
  background-color: #c97d60;
}

.light-green-container {
  background-color: #a8b9a3;
}

.light-purple-container {
  background-color: #c0b7cc;
}

.light-orange-container {
  background-color: #d8b4a0;
}

.text-dark-purple {
  color: #6d4e75 !important;
}

/* =========================
   SCOPE: only inside stacks marked data-ps="v2"
   ========================= */

/* Remove caption + tighten padding/height JUST for v2 stacks */
.polaroid-stack[data-ps="v2"] .album-cover-title {
  display: none !important;
}
.polaroid-stack[data-ps="v2"] .outer-polaroid {
  padding: 15px 15px 10px 15px;
}
.polaroid-stack[data-ps="v2"] .album-cover-image {
  aspect-ratio: 4 / 3.5;
}
.polaroid-stack[data-ps="v2"] {
  min-height: 390px;
}

/* Animated stack cards (scoped) */
.polaroid-stack[data-ps="v2"] .ps-card {
  --r: -4deg;
  --tx: 0px;
  --ty: 0px;
  --invx: 0px; /* FLIP inverse delta (JS) */
  --invy: 0px;
  --whoosh: 0px; /* outgoing arc (JS toggles via class) */
  --scale: 1;

  position: absolute;
  inset: 0;
  transform: translate(var(--tx), var(--ty)) rotate(var(--r))
    translate(var(--invx), var(--invy)) translate(0, var(--whoosh))
    scale(var(--scale));
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 320ms ease,
    filter 320ms ease;
  will-change: transform;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
}

/* depth cue (scoped) */
.polaroid-stack[data-ps="v2"] .ps-card[data-depth="1"] {
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
}
.polaroid-stack[data-ps="v2"] .ps-card[data-depth="2"] {
  opacity: 0.96;
}
.polaroid-stack[data-ps="v2"] .ps-card[data-depth="3"] {
  opacity: 0.92;
}
.polaroid-stack[data-ps="v2"] .ps-card[data-depth="4"] {
  opacity: 0.9;
}

/* whoosh (scoped) */
.polaroid-stack[data-ps="v2"] .ps-card.to-back {
  --whoosh: -12px;
  --scale: 0.985;
}

/* =========================
   MOBILE TEXT VISIBILITY (scoped to the featurette wrapper)
   ========================= */
@media (max-width: 768px) {
  /* Only change layout where you add .keep-text-on-mobile */
  .keep-text-on-mobile {
    flex-direction: column !important;
    gap: 1.25rem;
    padding: 0 1rem !important;
    margin: 0 auto 2rem auto;
  }

  /* Un-hide text ONLY in these featurettes */
  .keep-text-on-mobile .featurette-PoR-left-box,
  .keep-text-on-mobile .featurette-PoL-right-box {
    display: block !important;
  }

  /* Order: polaroids first, then text */
  .keep-text-on-mobile .featurette-PoL-left-box,
  .keep-text-on-mobile .featurette-PoR-right-box {
    order: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    transform: none !important;
    display: flex;
    justify-content: center;
  }
  .keep-text-on-mobile .featurette-PoL-right-box,
  .keep-text-on-mobile .featurette-PoR-left-box {
    order: 2;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
  }

  .polaroid-stack[data-ps="v2"] .outer-polaroid {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    padding: 0.75rem;
  }

  .polaroid-stack[data-ps="v2"] .album-cover-image {
    aspect-ratio: 4 / 3.15;
  }
}

/* === keep the tilted box inside the viewport === */
.inner-tilt-container-right,
.inner-tilt-container-left {
  /* desktop goal + gutters */
  --w-desktop: 350px;
  --gutter: 24px;

  /* 10° tilt makes the rotated footprint ~1.19× wider than the un-rotated box */
  --rot-bbox-mult: 1.19;

  /* never let the rotated footprint exceed the viewport */
  width: clamp(
    240px,
    calc((100vw - var(--gutter) * 2) / var(--rot-bbox-mult)),
    var(--w-desktop)
  );
  height: auto;
}

@media (max-width: 480px) {
  .inner-tilt-container-right,
  .inner-tilt-container-left {
    --gutter: 16px;
  }
}

/* === lock the stack silhouette & override old fixed heights === */
.polaroid-stack[data-ps="v2"] {
  width: 100%;
  aspect-ratio: 350 / 400; /* same silhouette as 350×400 */
  height: auto !important;
  min-height: 0 !important; /* beat earlier min-height rules */
  margin: 2rem auto;
}

/* center the frame so a left-margin never pushes it off-screen */
.polaroid-stack[data-ps="v2"] .outer-polaroid {
  width: 100%;
  margin: 0 auto 2rem auto; /* overrides margin-left: 1rem from earlier */
}

/* === keep the original photo shape so the card proportions don't drift === */
.polaroid-stack[data-ps="v2"] .album-cover-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3.25; /* restore your baseline ratio */
}

/* show the 10° tilt & shadows instead of clipping them */
.featurette-polaroid-on-right,
.featurette-polaroid-on-left {
  overflow: visible;
}
