/* ================================
   RESET & BASE
================================ */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

* {
  color: white;
  box-sizing: border-box;
}

body {
  font-family: 'Mali', cursive;
  background-color: #290922;
  overflow-x: hidden;
}

/* ================================
   LAYOUT STRUCTURE
================================ */
.container {
  margin: 0 auto;
  width: 960px;
  max-width: 100%;
  padding: 0 20px;
  font-size: 100%;
  line-height: 1.75;
  text-align: center;
}

.container > section:first-child {
  margin-top: 0;
}

section {
  width: 100%;
  margin: 0;
  padding: 40px 0;
  background-color: #290922;
}

section:nth-of-type(even) {
  background-color: #a92a8d;
}

header,
footer {
  background-color: #d426af;
  text-align: center;
}

footer {
  padding: 20px 0;
  margin-top: 0; /* bands touch footer cleanly */
}

/* ================================
   HEADER & NAVBAR
================================ */
header img {
  width: 550px;
  margin: 10px;
}

.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background-color: rgba(212, 38, 175, 0);
  transition: background-color 0.4s ease, box-shadow 0.3s ease;
  z-index: 1000;
}

.navbar.scrolled {
  background-color: rgba(212, 38, 175, 0.95);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.nav-links {
  display: flex;
  gap: 50px;
}

.nav-links a {
  font-family: 'Darumadrop One', serif;
  font-size: 30px;
  text-decoration: none;
  color: white;
  display: inline-block;
  padding: 0 0.4em;
  line-height: 1.5em;
  text-align: center;
  transition: color 0.3s ease, opacity 0.3s ease;
  box-sizing: border-box;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 0.7);
}

.nav-links .current {
  background-color: rgba(0,0,0,0.6);
  border-radius: 4px;
  line-height: 1.5em;
}

/* ================================
   HERO SECTION
================================ */
.hero {
  position: relative;
  width: 100%;
  height: 40vh; /* change to 100vh for fullscreen */
  background: url("../img/background.gif") no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.hero .center-img {
  position: absolute;
  top: 57%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: clamp(280px, 100vw, 700px);
  height: auto;
  border-radius: 12px;
  z-index: 1;
  animation: popIn 0.8s ease-out forwards;
}

/* ================================
   PAGE SECTIONS
================================ */
.pageheader {
  padding-bottom: 25px;
  margin-bottom: 25px;
  text-align: center;
}

.about .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
}

.about img {
  width: 310px;
  max-width: 100%;
  margin-top: 5px;
}


/* ================================
   GALLERY SECTION
================================ */
.gallery {
  padding: 40px 0;
}

.gallery h2 {
  text-align: center;
  margin-bottom: 30px;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.gallery-item {
  width: calc(33.333% - 20px); /* 3 per row */
  text-align: center;
}

.gallery-item img {
  width: 100%;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

.gallery-item .caption {
  margin-top: 8px;
  font-size: 17px;
  font-weight: bold;
}

/* Description under entire gallery */
.gallery-description {
  margin-top: 30px;
  font-size: 16px;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================
   CHARACTER CATEGORY PAGE
================================ */
.character-category {
  padding: 60px 0;
}

.character-category h1 {
  font-family: 'Darumadrop One', serif;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 40px;
}

.character-category h2 {
  line-height: 1.2;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
}

.character-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.character-item {
  flex: 0 0 calc(20% - 20px);
  max-width: calc(20% - 20px);
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.character-item img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.character-item img:hover {
  transform: scale(1.05);
  z-index: 10;
  position: relative;
}

.character-item p {
  margin-top: 10px;
  font-size: 17px;
  width: auto;
  text-align: center;
  font-weight: bold;
}

.character-grid {
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.collapsible-title {
  cursor: pointer;
  user-select: none;
}

.collapsible-content {
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.character-grid.collapsed {
  max-height: 0;
}

.collapsible-content.collapsed {
  max-height: 0;
}

.collapsible-indicator {
  font-size: 0.9em;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

/* ================================
   ARCHIVE SECTION
================================ */

.archive-page .container {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 20px;
}

.archive-page .collapsible-content {
  max-height: 0;
  overflow: hidden;
}

.year-category {
  padding: 60px 0;
}

.year-category h1 {
  font-family: 'Darumadrop One', serif;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 40px;
}

.year-category h2 {
  line-height: 1.2;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
}

.year-item {
  width: calc(20% - 20px);
  max-width: calc(20% - 20px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.year-item img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.year-item img:hover {
  transform: scale(1.05);
  z-index: 10;
  position: relative;
}

.year-item p {
  margin-top: 10px;
  font-size: 17px;
  font-weight: bold;
  width: auto;
  text-align: center;
}

.year-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  overflow: hidden;
  transition: max-height 0.35s ease;
  gap: 20px;
}

/* ================================
   ABOUT SECTION
================================ */
.slideshow-title {
  text-align: center;
  margin-bottom: 20px; /* space between title and slideshow */
}

.slideshow-wrapper {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

.slideshow .slide > div {
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical centering */
  text-align: center;      /* horizontal centering */
}

.slideshow .slide h2 {
    line-height: 75px;
}

.slideshow .slide a {
  font-size: 20px;
  font-weight: bold;
}

.slideshow .slide p {
  line-height: 1.75;
}

.slides-container {
  padding: 0 60px;
  box-sizing: border-box;
  position: relative;
}

.slide {
  display: none;
  flex-direction: row;
  align-items: center; /* vertically center text */
  gap: 20px;
  text-align: left;
}

.slide.active {
  display: flex;
}

.slide img {
  width: 310px;
  max-width: 100%;
  margin-top: 5px;
}

.slide div {
  flex: 1; /* text takes remaining space */
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(212, 38, 175, 0.8);
  border: none;
  color: white;
  font-size: 24px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
  z-index: 10;
}

.slide-btn.left {
  left: 10px;
}

.slide-btn.right {
  right: 10px;
}

.slide-btn:hover {
  background-color: rgba(212, 38, 175, 1);
}

@media (max-width: 768px) {
  .slide {
    flex-direction: column;
    text-align: center;
  }

  .slide-btn.left {
    left: 10px;
  }

  .slide-btn.right {
    right: 10px;
  }
}

/* ================================
   SOCIALS SECTION
================================ */
.socials-intro img {
  width: 310px;
  max-width: 100%;
  margin-top: 5px;
  border-radius: 50%;
}

.socials-intro p {
  margin-top: 25px;
}

.socials {
  padding: 40px 0;
}

.socials h2 {
  text-align: center;
  margin-bottom: 30px;
}

.socials-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.socials-item {
  width: calc(25% - 20px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.socials-item img {
  width: 125px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.socials-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.socialname {
  margin-top: 6px;
  font-size: 25px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  width: auto;
  max-width: 100%;
  text-decoration: none;
  font-weight: bold;
}

.socialuser {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  width: auto;
  max-width: 100%;
  text-decoration: none;
}

.socials-item img:hover {
  transform: scale(1.05);
}

.socials-item .caption {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

/* ================================
   FOOTER
================================ */
footer img {
  width: 250px;
  margin-bottom: 10px;
}

/* ================================
   TYPOGRAPHY
================================ */
h1 {
  font-family: 'Darumadrop One', serif;
  font-size: 70px;
  line-height: 140px;
}

h2 {
  font-family: 'Darumadrop One', serif;
  font-size: 40px;
  padding-bottom: 5px;
}

p {
  font-size: 17px;
  margin-bottom: 10px;
}

.credit {
  font-size: 15px;
}

span {
  font-weight: 500;
  font-style: italic;
}

/* ================================
   ANIMATIONS
================================ */
@keyframes popIn {
  0%   { transform: translate(-50%, -50%) scale(0); }
  70%  { transform: translate(-50%, -50%) scale(1.1); } /* overshoot */
  100% { transform: translate(-50%, -50%) scale(1); }   /* settle back */
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1100px) {
  .nav-links a {
    font-size: 22px;
    line-height: 1.5em;
  }
}

@media (max-width: 900px) {
  .nav-links a {
    font-size: 18px;
    line-height: 1.5em;
  }
}

@media (max-width: 768px) {
  .hero .center-img {
    width: 100vw;
    max-width: none;
  }
  .about .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .gallery-item {
    width: calc(50% - 20px); /* 2 per row */
  }
}

@media (max-width: 600px) {
  .gallery-item {
    width: 100%; /* 1 per row */
  }
}

@media (max-width: 1100px) {
  .character-item {
    flex: 1 1 calc(20% - 20px); /* 5 per row */
    max-width: calc(20% - 20px);
  }
}

@media (max-width: 1000px) {
  .character-item {
    flex: 1 1 calc(25% - 20px); /* 4 per row */
    max-width: calc(25% - 20px);
  }
}

@media (max-width: 800px) {
  .character-item {
    flex: 1 1 calc(33.33% - 20px); /* 3 per row */
    max-width: calc(33.33% - 20px);
  }
}

@media (max-width: 600px) {
  .character-item {
    flex: 1 1 calc(50% - 20px); /* 2 per row */
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 400px) {
  .character-item {
    flex: 1 1 100%; /* 1 per row */
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .socials-grid {
    gap: 20px;
  }
  .social-item {
    width: 140px;
  }
  .social-item img {
    width: 80px;
    height: 80px;
  }
}