/* Global styles */
/* load fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Luckiest+Guy&display=swap');

body {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  background-color: #334443;
  margin: 0;
  min-height: 100vh;
  color: #FAF8F1;
}

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

a:hover {
  color: var(--off-white);
  text-decoration: underline;
  cursor: pointer;
}

img,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* typography */
h1,
h2,
h3 {
  font-family: "Luckiest Guy", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #FAEAB1;
}

h1 {
  font-size: 72px;
  text-decoration: underline;
  text-align: center;
}

h2 {
  text-decoration: underline;
}

/*color-vars*/
:root {
  --off-white: #FAF8F1;
  --gold: #FAEAB1;
  --light-green: #34656D;
  --dark-green: #334443;
  --header-height: 113px;
}

.hover {
  transition: color 0.3s;
  color: #FAF8F1;
}

/* navigation */

nav {
  width: 100%;
  height: var(--header-height);
  background: #34656D;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.nav-logo img,
.nav-logo .nav-logo-img {
  display: block;
  max-height: 80px;
  height: auto;
  width: auto;
}

.flex-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px;
}

/* button styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--dark-green);
  height: 55px;
  width: 95%;
  text-decoration: none;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.btn:hover,
.btn:focus {
  background-color: var(--off-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.32);
  opacity: 0.98;
}

.btn:focus {
  outline: 3px solid rgba(250, 234, 177, 0.18);
  outline-offset: 3px;
}

.btn-small {
  padding: 6px 10px;
  font-size: 25px;
  border-radius: 25px;
}

/* Utility: hide elements visually but keep accessible to screen readers */
.sr-only {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
  white-space: nowrap;
}

/* Accessible focus state for keyboard users */
.nav-logo:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Optional: small viewport adjustments */
@media (max-width: 480px) {

  .nav-logo img,
  .nav-logo .nav-logo-img {
    max-height: 56px;
  }
}

/* Hamburger Icon */
.nav-toggle::before {
  content: "☰";
  font-size: 18px;
  line-height: 1;
}

.nav-toggle[aria-expanded="true"]::before {
  content: "✕";
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header layout - fixed top bar */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
}

/* Remove nav margin when inside the fixed header */
header nav {
  margin: 0;
}

/* Push body content below the fixed header */
body {
  padding-top: var(--header-height);
}

/* Basic nav list layout and behavior */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
  align-items: center;
}

nav li {
  list-style: none;
}

nav a:not(.nav-logo) {
  color: var(--gold);
  padding: 6px 10px;
  display: inline-block;
  transition: color 0.12s ease;
}

nav a:not(.nav-logo):hover,
nav a:not(.nav-logo):focus {
  color: var(--off-white);
  text-decoration: underline;
}

/* Mobile layout: toggle button visible, list hidden until open */
.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--off-white);
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  nav ul {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    padding: 8px 0;
    gap: 0;
    background: var(--light-green);
  }

  /* Show when aria-expanded is true */
  nav ul[aria-expanded="true"] {
    display: flex;
  }

  nav a:not(.nav-logo) {
    padding: 12px 20px;
  }
}



/* Flex container utility */
.about-container {
  display: flex;
  max-width: 800px;
  height: auto;
  padding: 37px 30px;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex: 1 0 0;
  box-sizing: border-box;
}

.about-container > img {
  width: 800px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.character-description {
  display: flex;
  max-width: 1240px;
  height: auto;
  padding: 37px 30px;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex: 1 0 0;
  box-sizing: border-box;
}

.movie-description {
  display: flex;
  flex-wrap: wrap;
  background: var(--light-green);
  gap: 30px;
  max-width: 1240px;
  margin: 30px auto;
  padding: 0 25px;
  box-sizing: border-box;
  justify-content: center;
  align-items: stretch;
}

.movie-description .movie-reviews-title {
  width: 100%;
  text-align: center;
  margin: 18px 0;
  font-size: 28px;
}

/* ensure movie-reviews container exists and uses the transparent card layout */
.movie-reviews {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 24px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.review-card {
  flex: 1 1 0;
  min-width: 240px;
  padding: 18px;
  background: transparent; 
  border: none; 
  color: var(--off-white);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-card h3 {
  margin: 0;
  font-size: 20px;
}

.review-card p {
  margin: 0;
  line-height: 1.4;
  opacity: 0.95;
}

/* Three-column flex row container */
.container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1240px;
  margin: 200px auto;
  padding: 0 25px;
  box-sizing: border-box;
  justify-content: center;
  align-items: stretch;
}

.character-cards {
  flex: 1 1 0;
  min-width: 260px;
  min-height: 0;
  background: var(--light-green);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  color: var(--off-white);
}

/* Make character card images uniform height while staying responsive */
.character-cards img {
  display: block;
  width: 300px;
  height: 400px;
  max-width: 100%;
  object-fit: cover;
  margin: 0 auto 12px;
}

.site-footer {
  width: 100%;
  background: var(--light-green);
  padding: 18px 0;
  margin-top: 40px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .character-cards img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 16px;
    padding: 0 12px;
  }

  .container .character-cards {
    width: 100%;
    min-width: 0;
    min-height: auto;
    padding: 16px;
    box-sizing: border-box;
  }

  @media (max-width: 480px) {
  .container {
    margin: 40px auto;
  }
}

  .character-description iframe {
    width: 100%;
    max-width: 1200px;
    height: 720px;
    display: block;
    margin: 20px auto;
    border: 0;
  }

  @media (max-width: 768px) {
    .character-description iframe {
      height: auto;
      aspect-ratio: 16 / 9;
      max-width: 100%;
    }
  }

/* Page Styling */
/* Media Queries */
@media (max-width: 768px) {

  /* mobile layout adjustments */
  header nav {
    padding: 0 12px;
  }

  header {
    height: 113px;
  }

  .nav-logo img,
  .nav-logo .nav-logo-img {
    max-height: 56px;
  }

  /* About-container: make full-width and reduce padding on small screens */
  .About-container {
    max-width: 100%;
    padding: 16px;
    align-items: center;
    gap: 18px;
  }

  .About-container img {
    width: 100%;
    height: auto;
    max-width: 520px;
  }
}

@media (max-width: 768px) {
  .about-container > img {
    width: 100%;
    max-width: 520px;
    height: auto;
  }
}

@media (max-width: 768px) {
  .movie-reviews {
    flex-direction: column;
    gap: 16px;
    margin: 20px auto;
    padding: 0 12px;
  }

  .review-card {
    width: 100%;
    min-width: 0;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 12px 8px;
    font-size: 14px;
  }
}
