:root {
  --page-bg: #F7E5D7;
  --text: #1f2933;
}

/* ========== GLOBAL ========== */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--page-bg);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
}

/* ========== HEADER / NAV (match index + comedian pages) ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 24px;
  background-color: var(--page-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.logo {
  height: 56px;
  width: auto;
  display: block;
}

/* Desktop nav */

.navigation {
  margin-left: 0;
  flex: 0 0 auto;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  align-items: center;
}

.navigation ul li {
  margin: 0;
  padding: 0;
}

.navigation ul li a {
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: #333;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Active link */
.navigation ul li a.active {
  background-color: #3E0076;
  color: #ffffff;
}

/* Hover */
.navigation ul li a:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: #111;
}

/* Mobile menu button */

.menu-button {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/* Mobile header layout */

@media (max-width: 768px) {
  .site-header {
    justify-content: center;
    padding: 10px 16px;
  }

  .logo {
    height: 48px;
  }

  .menu-button {
    display: block;
    position: absolute;
    left: 12px;
    top: 12px;
  }

  .navigation {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    background-color: var(--page-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
  }

  .navigation.open {
    display: block;
  }

  .navigation ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 4px 12px;
  }

  .navigation ul li a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-radius: 8px;
  }
}

/* ========== FINDER PAGE ========== */

#finder {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 10px 16px 40px;
}

#finder > h1 {
  text-align: center;
  font-size: 2rem;
  margin: 20px 0 18px;
  color: #333;
  font-family: "Montserrat", sans-serif;
}

/* Tabs */

.tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.tab-button {
  padding: 10px 20px;
  border: none;
  background-color: #ddd;
  color: #333;
  cursor: pointer;
  transition: background-color 0.25s ease;
  font-size: 16px;
  border-radius: 5px;
}

.tab-button.active {
  background-color: #B5A79E;
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* "Search All" button */

.search-all-button {
  font-size: 16px;
  color: #333;
  background-color: #ddd;
  text-decoration: none;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 5px;
  margin-top: 10px;
  margin-bottom: 20px;
  border: none;
  max-width: 220px;
  display: block;
  text-align: center;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
  margin-left: auto;
  margin-right: auto;
}

.search-all-button:hover {
  background-color: #a29082;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ========== PREVIEW STRIPS ========== */

.preview-container {
  position: relative;
  max-width: 100%;
  margin: 10px auto;
  padding: 15px;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-container > h1 {
  font-size: 1.3rem;
  margin: 0 0 8px;
  text-align: center;
  color: #333;
}

/* Shared horizontal scroll section */

.preview-section {
  display: flex;
  gap: 25px;
  align-items: stretch;
  overflow-x: auto;
  padding: 20px 0;
  width: 100%;
  white-space: nowrap;
  scroll-behavior: smooth;
}

/* Cards (comedians and specials) */

.special,
.special-preview,
.comedian,
.comedian-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 120px;         /* fixed width for consistency */
  max-width: 120px;     /* prevents excessive stretching */
  height: auto;         /* let content determine the height */
  padding: 15px;
  background-color: transparent;  /* transparent, like before */
  border-radius: 15px;
  text-align: center;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1),
              0px 1px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Images */

.comedian img,
.comedian-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  margin-bottom: 5px;
}

.special img,
.special-preview img {
  width: 100px;
  height: 140px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  margin-bottom: 5px;
}

/* Text inside cards */

.comedian p,
.comedian-preview p,
.special p,
.special-preview p {
  font-size: 14px;
  color: #333;
  margin: 5px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.special-title {
  font-weight: 600;
  margin: 5px 0;
  height: calc(1.2em * 3);
  line-height: 1.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.special-comedian {
  font-size: 12px;
  color: #777;
  margin: 0;
  font-weight: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hover effect */

.comedian:hover,
.comedian-preview:hover,
.special:hover,
.special-preview:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 6px 18px rgba(0, 0, 0, 0.1);
}

/* Responsive tweaks for card size */

@media (max-width: 768px) {
  .special,
  .special-preview,
  .comedian,
  .comedian-preview {
    width: 150px;
    max-width: 140px;
  }

  .preview-section {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .special,
  .special-preview,
  .comedian,
  .comedian-preview {
    width: 150px;
    max-width: 120px;
  }

  .preview-section {
    gap: 8px;
  }
}

/* ========== ARROWS ========== */

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  width: 50px;
  height: auto;
  padding: 5px;
  transition: opacity 0.25s ease;
}

.arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.left-arrow {
  left: -10px;
}

.right-arrow {
  right: -10px;
}

.arrow-image {
  width: 100%;
  height: auto;
  transition: transform 0.25s ease;
}

.arrow:hover .arrow-image {
  transform: scale(1.1);
}

/* ========== ERROR MESSAGE ========== */

.error-message {
  text-align: center;
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  background-color: #ffe5e5;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-family: "Montserrat", sans-serif;
}

.error-message h1 {
  font-size: 22px;
  color: #cc0000;
  margin-bottom: 10px;
}

.error-message p {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
}

.retry-button {
  background-color: #cc0000;
  color: white;
  font-size: 16px;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.25s;
}

.retry-button:hover {
  background-color: #a00000;
}

/* Optional filter hint text */

#filter-info {
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  color: #5C4033;
  margin-top: 0;
  margin-bottom: 25px;
  font-style: italic;
}