/* ============================================================
   INDEX PAGE STYLES
   ============================================================ */

/* ==================== HERO SECTION ==================== */
.main-content {
  padding-top: 0; /* removes the gap under the breadcrumb (this page only) */
}

.hero-section {
  position: relative;
  z-index: 20; /* keeps the search dropdown above the cards' text */
  padding: 36px 20px 32px;
  text-align: center;
  overflow: visible;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 0 0 40px 40px;
  margin: 0 -20px 32px; /* stretches edge to edge, cancelling .main-content's side padding */
}

/* ==================== ANIMATED HERO BACKGROUND ==================== */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

/* --- Soft colour glows --- */
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
}
.aurora-1 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #caffde 0%, rgba(202,255,222,0) 70%);
  top: -160px; right: -80px;
  animation: auroraA 30s ease-in-out infinite;
}
.aurora-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #ffd86b 0%, rgba(255,216,107,0) 70%);
  bottom: -180px; left: -100px;
  animation: auroraB 36s ease-in-out infinite;
}
.aurora-3 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #8cc4ff 0%, rgba(140,196,255,0) 70%);
  top: 20%; left: 38%;
  animation: auroraC 42s ease-in-out infinite;
}
@keyframes auroraA {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-90px,70px) scale(1.15); }
}
@keyframes auroraB {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(120px,-50px) scale(1.15); }
}
@keyframes auroraC {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-70px,40px) scale(1.1); }
}

/* --- Faint static grid --- */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(53,122,189,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,122,189,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
}

@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: "Note This", sans-serif;
  font-size: 76px;
  color: var(--dark);
  letter-spacing: 2px;
  margin-bottom: -12px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 20px;
  color: var(--mid);
  margin: 0 0 32px;
  animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==================== HERO SEARCH BAR ==================== */
.hero-search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 1s ease-out 0.5s both;
  z-index: 100;
}

@property --search-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes searchSpin {
  to { --search-angle: 360deg; }
}

.hero-search-box {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  border-radius: 28px;
  padding: 0 6px 0 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* spinning gradient ring (hidden until hover / focus) */
.hero-search-box::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 31px;
  z-index: -2;
  background: conic-gradient(from var(--search-angle),
              #caffde, #8cc4ff, #ffd86b, #caffde 75%, #caffde);
  opacity: 0;
  transition: opacity 0.35s ease;
  animation: searchSpin 3s linear infinite;
}

/* grey fill that sits on top of the ring */
.hero-search-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  z-index: -1;
  background: var(--bg-grey);
}

.hero-search-box:hover,
.hero-search-box:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
              0 0 22px rgba(202, 255, 222, 0.9);
}

.hero-search-box:hover::before,
.hero-search-box:focus-within::before {
  opacity: 1;
}

.hero-search-box:focus-within::before {
  animation-duration: 1.6s; /* spins faster while typing */
}

@media (prefers-reduced-motion: reduce) {
  .hero-search-box::before { animation: none; }
}

.hero-search-icon {
  flex-shrink: 0;
}

.hero-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 16px;
  color: var(--dark);
  opacity: 0.8;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-search-input::placeholder {
  color: var(--dark);
  opacity: 0.749;
}

/* Search Dropdown: base look comes from style.css (.search-dropdown) */
.hero-search-dropdown.search-dropdown {
  width: 100%;       /* same width as the search bar */
  max-height: 540px; /* longer than the 340px in style.css */
  text-align: left;  /* hero section is text-align:center */
  animation: slideUp 0.3s ease-out;
}

/* Year filter button (same as nav) */
.search-year-filter {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-year-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.search-year-filter-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.syf-img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

.syf-img-fallback {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  display: none;
}

.search-year-filter-drop {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--bg-grey);
  min-width: 148px;
  z-index: 10001;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

.search-year-filter.open .search-year-filter-drop {
  display: block;
}

.syf-drop-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}

.syf-drop-item:hover       { background: var(--bg-grey); color: var(--mid); }
.syf-drop-item.active      { color: var(--mid); font-weight: 600; }
.syf-drop-item img         { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }

.syf-check {
  margin-left: auto;
  padding-left: 8px;
  opacity: 0;
  display: flex;
  align-items: center;
}

.syf-drop-item.active .syf-check {
  opacity: 1;
}

.syf-check svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #5a9e7a;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== SECTIONS ==================== */
.home-section {
  margin-bottom: 50px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-grey);
}

.section-title {
  font-family: "Cruyff Sans Expanded", sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--dark);
  margin: 0;
  letter-spacing: 0.5px;
}

.view-more-btn {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--mid);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 24px;
  background: var(--bg-grey);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-more-btn:hover {
  background: var(--dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ==================== SLIDER ==================== */
.slider-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-wrapper {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.slider-wrapper::-webkit-scrollbar {
  display: none;
}

.slider-track {
  display: flex;
  gap: 16px;
  padding: 4px;
  width: max-content;
}

.slider-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--bg-grey);
  background: var(--white);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
}

.slider-arrow:hover {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
  transform: scale(1.1);
}

.slider-arrow:active {
  transform: scale(0.95);
}

.slider-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slider-arrow:disabled:hover {
  background: var(--white);
  color: var(--mid);
  border-color: var(--bg-grey);
  transform: none;
}

/* ==================== PREVIEW CARDS ==================== */
.preview-card {
  background: var(--white);
  border-radius: 16px;
  padding: 16px;
  border: 2px solid var(--bg-grey);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-width: 220px;
  max-width: 220px;
  flex-shrink: 0;
}

.preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #caffde, #a8f0d0);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.preview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border-color: #caffde;
}

.preview-card:hover::before {
  transform: scaleX(1);
}

.preview-card-image {
  width: 100%;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-grey);
  flex-shrink: 0;
}

.preview-card-badge {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-grey);
  flex-shrink: 0;
  margin: 0 auto;
}

.preview-card-image[style*="display: none"],
.preview-card-badge[style*="display: none"] {
  display: none !important;
}

.preview-card-title {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-card-meta {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-top: auto;
}

.preview-card-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-grey);
  color: var(--mid);
}

/* SBC Card Style */
.sbc-card {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  max-width: 280px;
}

.sbc-card-badge {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-grey);
  flex-shrink: 0;
  margin: 0;
}

/* ==================== LOADING STATES ==================== */
.loading-skeleton {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: var(--bg-grey);
  border-radius: 16px;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 14px;
  color: var(--muted);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ==================== SHORTCUTS ==================== */
.shortcuts-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid var(--bg-grey);
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.shortcut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: var(--white);
  border-radius: 16px;
  border: 2px solid var(--bg-grey);
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
}

.shortcut-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: #caffde;
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
}

.shortcut-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shortcut-icon-text {
  font-family: "Cruyff Sans Expanded", sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--white);
}

.shortcut-label {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

/* ==================== EMPTY & ERROR STATES ==================== */
.empty-state,
.error-state {
  width: 100%;
  padding: 40px 20px;
  text-align: center;
  background: var(--bg-grey);
  border-radius: 16px;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 14px;
  color: var(--muted);
}

.error-state {
  background: #ffe0e0;
  color: #c00;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  .hero-section {
    padding: 28px 16px 26px;
    border-radius: 0 0 30px 30px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-search-box {
    height: 48px;
    padding: 0 6px 0 16px;
  }

  .hero-search-input {
    font-size: 14px;
  }

  .hero-search-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .section-title {
    font-size: 24px;
  }

  .slider-container {
    gap: 8px;
  }

  .slider-arrow {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .preview-card {
    min-width: 180px;
    max-width: 180px;
  }

  .sbc-card {
    min-width: 240px;
    max-width: 240px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .view-more-btn {
    width: 100%;
    justify-content: center;
  }

  .shortcuts-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

  .preview-card {
    min-width: 160px;
    max-width: 160px;
  }

  .sbc-card {
    min-width: 200px;
    max-width: 200px;
  }
}

/* ==================== LATEST CARDS ==================== */
/* "View More" sits right next to the heading instead of far right */
.section-header.section-header--inline {
  justify-content: flex-start;
  align-items: center;
  flex-direction: row;
  gap: 16px;
}
.section-header.section-header--inline .view-more-btn {
  width: auto;
  padding: 8px 16px;
}

/* the grid itself becomes #card-container (set in JS), so your
   small-card styles and column sizes apply to it directly */
#card-container.latest-cards-grid {
  margin: 0;
  overflow: visible;
}
#card-container.latest-cards-grid .fatals {
  display: none !important; /* no fatal stats */
}
.latest-cards-grid .loading-skeleton,
.latest-cards-grid .error-state {
  grid-column: 1 / -1;
}

.latest-card-link {
  display: block;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.latest-card-link:hover {
  transform: translateY(-4px);
}

/* placeholder cards shown while the real ones load */
.latest-card-placeholder {
  width: 120px;
  margin: 0 auto;
  animation: pulse 1.5s ease-in-out infinite;
  pointer-events: none;
}
.latest-card-placeholder img {
  display: block;
  width: 100%;
  opacity: 50%;
  height: auto;
}
@media (max-width: 768px) {
  /* real small cards are scaled to ~0.53 on mobile */
  .latest-card-placeholder { width: 64px; }
}


.hero-search-box { cursor: text; }
.hero-search-box .search-year-filter-btn { cursor: pointer; }

.breadcrumb-bar{
  display: none;
}