/* Global styles */
:root {
    --bs-primary: #7FC1F4;
    --bs-secondary: #8C6B44;
}
body {
    background: var(--bs-body-bg);
    color: var(--bs-body-color, #212529);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-primary:hover {
    background-color: #6AAEDB;
    border-color: #6AAEDB;
}
.card {
    border: 1px solid var(--bs-border-color);;
    border-radius: 10px;
}
a {
    color: var(--bs-dark-rgb);
}
.text-bg-info {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-primary) !important;
    border-radius: 8px;
}
h1.card-title a, h2.card-title a, h3.card-title a, h4.card-title a, h5.card-title a, h6.card-title a {
    text-decoration: none;
}
.pagination {
  --bs-pagination-active-color: #7FC1F4;
  --bs-pagination-active-bg: transparent;
  --bs-pagination-active-border-color: #7FC1F4;
}
.pagination li.active a.page-link {
    background-color: var(--bs-pagination-active-color);
    color: #fff;
}
.pagination a.page-link {
    color: var(--bs-primary);
}

/* Header */
.header p {
  white-space: normal;
}
.tagline-part-1 {
  font-family: 'Dancing Script', cursive;
  font-size: 1.75rem;
  color: #212529;
  /* drop shadow: x-offset, y-offset, blur, color */
  text-shadow: -4px 3px 0 #6AAEDB;
}
.tagline-part-2 {
  font-family: 'Dancing Script', cursive;
  font-size: 1.75rem;
  color: #6AAEDB;
  /* drop shadow: x-offset, y-offset, blur, color */
  text-shadow: -4px 3px 0 #212529;;
}

/* Top navigation */
nav#top {
    background-color: #f8f8f8;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);  
}
nav#top .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}
nav#top .nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
nav#top .nav-links a:hover {
    color: #fff;
    background-color: #7FC1F4;
    transform: translateY(-2px);
}
nav#top .nav-links a.active {
    color: #fff;
    background-color: #7FC1F4;
}
@media (max-width: 500px) {
    nav#top {
        padding: .5rem;
        font-size: .8rem;
    }
    nav#top .nav-links {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    nav#top .nav-links a {
        padding: 5px;
    }
}

/* Main */
section {
    margin: 3rem 0;
}
hr {
  margin: 4rem auto;
  width: 100%;
  max-width: 648px;
}
@media (max-width: 576px) {
  hr {
    margin: 2rem auto;
  }
}
.headshot {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 10px;
}
.headshot-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
}
.headshot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block; /* avoid inline baseline gaps */
}

/* Announcements */
ul#announcements {
    padding-left: 0 !important;
}
ul#announcements .list-group-item {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
}

/* Navbar */
.navbar, footer {
    background-color: #7FC1F4 !important;
    color: #000 !important;
}
.navbar {
    position: relative;
}
.navbar-brand img {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
.navbar-brand {
    justify-content: center;
}
.navbar-brand small {
    font-size: .875rem;
}
.navbar a, footer a, .navbar-brand {
   color: #000 !important;
}
.navbar a:hover, footer a:hover {
    color: #333 !important;
}
/* Desktop: Logo left, text perfectly centered vertically and horizontally */
@media (min-width: 768px) {
    .navbar {
        position: relative;
    }

    .navbar-brand {
        justify-content: center !important;
        align-items: center !important; /* vertical alignment */
    }

    .navbar-brand img {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .navbar-brand > div:last-child {
        text-align: center;
    }
}

/* Mobile: Keep stacked layout intact */
@media (max-width: 767.98px) {
    .navbar-brand img {
        position: static;
        transform: none;
        margin-bottom: 0.5rem;
    }

    .navbar-brand {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }
}

/* Character Gallery */
.character-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
#characterGallery {
    scroll-behavior: smooth;
}
#characterGallery::-webkit-scrollbar {
    height: 8px;
}
#characterGallery::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
#characterGallery .card {
    flex: 0 0 419px;
}
#characterGallery .headshot {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Desktop grid */
@media (min-width: 992px) {
  #characterGallery {
    flex-wrap: wrap;
  }
  #characterGallery .card {
    flex: 1 1 calc(33.333% - 1rem);
  }
}

/* Quote Gallery */
.quote-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
#quoteGallery {
    scroll-behavior: smooth;
}
#quoteGallery::-webkit-scrollbar {
    height: 8px;
}
#quoteGallery::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
#quoteGallery .card {
  flex: 0 0 419px;
}
#quoteGallery .headshot {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Table border colors for about page */
.border-top-primary-s1 {
    border-top: 3px solid #56a0d3 !important
}
.border-top-primary-s2 {
    border-top: 3px solid #eac7d8 !important
}
.border-top-primary-s3 {
    border-top: 3px solid #bccbe4 !important
}
.border-top-primary-s4 {
    border-top: 3px solid #9a9b9d !important
}
.bg-56a0d3, .background-s1 {
    background-color: #56a0d3 !important;
}
.bg-eac7d8, .background-s2 {
    background-color: #eac7d8 !important;
}
.bg-bccbe4, .background-s3 {
    background-color: #bccbe4 !important;
}
.bg-9a9b9d, .background-s4 {
    background-color: #9a9b9d !important;
}

/* Character detail pages */
blockquote {
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
}
.modal {
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease-in-out;

}
.modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 30px;
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    animation: slideDown 0.3s ease-out;
    font-family: system-ui, sans-serif;
}
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}
.modal-content input,
.modal-content textarea,
.modal-content select,
.modal-content button {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}
.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #007bff;
}
.modal-content button {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}
.modal-content button:hover {
    background-color: #0056b3;
}
.close {
    position: absolute;
    right: 14px; top: 14px;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.table-fixed {
  table-layout: fixed;
}

/* Episode detail pages */
.hidden-quote {
  display: none !important;
}
.episode-pagination {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  align-items: center;
}
.pagination-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pagination-button {
  padding: 0.4rem 0.8rem;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}
.episode-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem; /* space between videos */
}
.episode-video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
}
.episode-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.episode-clips h3 a {
  color: #ff0000; /* YouTube-red style */
  text-decoration: none;
}
.episode-clips h2 a:hover {
  text-decoration: underline;
}

/* Episode cards wrapper */
.episode-wrapper {
    display: flex;
    flex-wrap: nowrap;       /* Mobile: single row, swipeable */
    gap: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.episode-wrapper::-webkit-scrollbar {
    height: 8px;
}

.episode-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* Each card width for mobile swipe */
.episode-card {
    flex: 0 0 260px; /* Minimum width for swipeable cards */
}

/* Desktop: wrap into grid */
@media(min-width: 768px) {
    .episode-wrapper {
        flex-wrap: wrap;
        overflow-x: visible;
    }
    .episode-card {
        flex: 1 1 calc(33.333% - 1rem); /* 3 columns with gap */
    }
}

.merch-section {
  margin-top: 2rem;
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Mobile: switch to horizontal scroll */
@media (max-width: 768px) {
  .merch-grid {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }

  .merch-card {
    flex: 0 0 75%; /* take most of viewport width */
    max-width: 300px;
  }

  .merch-grid::-webkit-scrollbar {
    height: 8px;
  }
  .merch-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
}

/* Merch section */
.merch-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  background: #fff;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.merch-card img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}
.merch-card h4 {
  font-size: 1.1rem;
}
.merch-card h4 a {
    text-decoration: none;
}
.merch-card p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: #555;
}

/* Changelog */
.changelog-entry span {
    display: inline-block;
}
.changelog-entry div {
    margin-left: 1em;
}
.type-label {
    display: inline-block;
    padding: 0.1em 0.5em;
    margin-left: 0.5em;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    color: #fff;
}
.type-episode {
    background-color: #4CAF50;
}
.type-character {
    background-color: #2196F3;
}
.type-soundtrack {
    background-color: #FF9800;
}
.type-bugfix {
    background-color: #F44336;
}
.type-design {
    background-color: #9C27B0;
}
.type-feature {
    background-color: #00BCD4;
}
.type-content {
    background-color: #FF5722;
}

/* Social Follow */
.social-follow {
    gap: 15px;
}
.social-follow a img {
    width: 36px;
    height: 36px;
    transition: transform 0.2s ease;
}
.social-follow a:hover img {
    transform: scale(1.2);
}

/* Footer */
footer {
    text-align: center;
    font-size: .8rem;
}
footer a {
    text-decoration: underline;
}

/* Media rules: max-width = 576px */
@media (max-width: 576px) {
  .card-body {
    font-size: 0.875rem;
  }
  .social-follow img {
    width: 30px;
    height: 30px;
  }
}