/* ========================================
   Wonderland Section - Modern Glassmorphism Design
   ======================================== */

.section-wonderland {
  min-height: 100vh;
  padding: 4rem 8rem 10rem;
  position: relative;
  overflow: hidden;
  /* Celestial midnight gradient background */
  background: linear-gradient(135deg, #021826 0%, #011C26 30%, #012840 70%, #021826 100%);
}

/* Atmospheric celestial midnight mesh */
.section-wonderland::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(at 15% 20%, rgba(15, 140, 140, 0.05) 0px, transparent 50%),
    radial-gradient(at 85% 30%, rgba(2, 89, 89, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 60%, rgba(15, 140, 140, 0.07) 0px, transparent 50%),
    radial-gradient(at 20% 80%, rgba(1, 40, 64, 0.10) 0px, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Canvas container for particle system */
.section-wonderland .particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Section Container */
.section-wonderland .section-container {
  max-width: 1400px;
  padding-bottom: 8rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Section Intro */
.section-wonderland .section-intro {
  margin-bottom: 8rem;
}

/* Section Title */
.section-wonderland .section-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--font-size-8xl);
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  z-index: 10;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Section Subtitle */
.section-subtitle {
  font-family: var(--font-tagline);
  font-weight: 400;
  font-size: var(--font-size-5xl);
  color: var(--color-primary);
  text-align: center;
  margin: 1rem 0 6rem;
  opacity: 0.8;
}

/* Section Description */
.section-wonderland .section-description {
  max-width: 1200px;
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: var(--font-size-base);
  color: var(--color-white);
  text-align: center;
  margin: 4rem auto;
}

/* ========================================
   Featured Article Section
   ======================================== */

.featured-section {
  margin-bottom: 5rem;
  position: relative;
  z-index: 2;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  background: rgba(255, 255, 255, 0.85);
  border: 4px solid rgba(255, 180,111, 0.3);
  border-radius: 24px;
  padding: 3rem;
  /* Glassmorphism effect */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Glass highlight on top edge */
.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.9),
    transparent
  );
}

.featured-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 1);
  border-color: rgba(255, 180, 111, 1);
  box-shadow:
    0 16px 56px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Featured Image Container: 16:9 at every width. Beside the text it sits at the top of its column
   rather than stretching to the text's height, which cropped a thumbnail to a narrow slice. */
.featured-image-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  align-self: start;
}

.featured-image-link {
  display: block;
  height: 100%;
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(255, 215, 0, 0.85);
  color: var(--color-black-100);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-tiny);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.5);
}

/* Featured Content */
.featured-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured-metadata {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.featured-category {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-small);
  color: var(--color-black-100);
  background: rgba(255, 180, 111, 0.85);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 2px solid rgba(255, 180, 111, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.featured-date {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-small);
  color: var(--color-black-10);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.featured-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-4xl);
  color: var(--color-black-100);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.featured-title-link {
  color: inherit;
  text-decoration: none;
}

.featured-title-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.featured-description {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: var(--font-size-large);
  color: var(--color-black-10);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Featured Author Info */
.featured-author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  /* A long @handle wraps instead of widening the card's column */
  overflow-wrap: anywhere;
}

.featured-author {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-black-10);
}

.featured-source {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: var(--font-size-base);
  color: var(--color-black-10);
  /* 0.8, not lower: keeps 4.5:1 on the card over the midnight background */
  opacity: 0.8;
}

.featured-author::after {
  content: '•';
  margin-left: 1rem;
  color: var(--color-black-10);
  opacity: 0.5;
}

/* "Read Carlo's take" and the source button */
.featured-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 3rem;
}

.featured-take-link {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-large);
  /* The post page's take label color: 4.5:1 or more on the card, where Wonderland's #0d7ea8 isn't */
  color: #0a5f80;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.featured-take-link:hover {
  text-decoration-thickness: 2px;
}

/* Featured Link */
.featured-link {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-large);
  color: var(--color-black-10);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: rgba(252, 231, 134, 0.25);
  border: 2px solid rgba(252, 231, 134, 0.5);
  border-radius: 12px;
  /* The focus ring appears at once rather than animating in */
  transition: all 0.3s ease, outline 0s, outline-offset 0s;
  backdrop-filter: blur(8px);
}

.featured-link:hover {
  background: rgba(246, 202, 0, 0.35);
  border-color: rgb(246, 202, 0, 0.7);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(246, 202, 0, 0.3);
}

/* ========================================
   Tab Navigation
   ======================================== */

.wonderland-tabs {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.5rem;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-black-100);
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  /* Glassmorphism effect */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Shimmer effect on hover */
.tab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.tab-button:hover::before {
  left: 100%;
}

.tab-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.tab-button:active {
  transform: translateY(0);
}

/* Active tab state */
.tab-button.active {
  background: rgba(119, 191, 226, 0.4);
  border-color: rgba(119, 191, 226, 0.8);
  border-width: 2px;
  color: var(--color-black-100);
  font-weight: 700;
  transform: translateY(-1px);
  box-shadow:
    0 8px 30px rgba(119, 191, 226, 0.4),
    0 4px 15px rgba(119, 191, 226, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(119, 191, 226, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.tab-button.active:hover {
  transform: translateY(-1px);
  background: rgba(119, 191, 226, 0.45);
}

.tab-button.active .tab-count {
  background: rgba(119, 191, 226, 0.8);
  color: white;
  font-weight: 700;
}

/* Tab icon */
.tab-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tab-text {
  letter-spacing: 0.02em;
}

/* Tab count badge */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.6rem;
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--color-black-100);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  transition: all 0.3s ease;
}

/* ========================================
   Search Controls
   ======================================== */

.search-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Search Bar */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50px;
  padding: 0.8rem 1.5rem;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  /* The focus ring appears at once rather than animating in */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), outline 0s, outline-offset 0s;
}

.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(119, 191, 226, 0.85);
  box-shadow:
    0 8px 32px rgba(119, 191, 226, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-icon {
  color: var(--color-black-10);
  opacity: 0.6;
  flex-shrink: 0;
  margin-right: 1rem;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: var(--font-size-base);
  color: var(--color-black-100);
  outline: none;
  padding: 0.4rem 0;
}

.search-input::placeholder {
  color: var(--color-black-10);
  opacity: 1;
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.clear-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
  color: var(--color-black-10);
}

.clear-search-btn:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
}

.clear-search-btn:active {
  transform: scale(0.95);
}

.clear-search-btn[hidden] {
  display: none;
}

/* Search Scope Indicator */
.search-scope-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.scope-label {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-small);
  color: var(--color-black-10);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scope-text {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-small);
  color: var(--color-black-100);
  background: rgba(119, 191, 226, 0.25);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(119, 191, 226, 0.4);
  backdrop-filter: blur(5px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-scope-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 2px solid rgba(119, 191, 226, 0.5);
  background: rgba(119, 191, 226, 0.15);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--color-primary);
  backdrop-filter: blur(5px);
}

.search-scope-toggle-btn:hover {
  background: rgba(119, 191, 226, 0.25);
  border-color: rgba(119, 191, 226, 0.6);
  transform: rotate(180deg) scale(1.1);
}

.search-scope-toggle-btn:active {
  transform: rotate(180deg) scale(0.95);
}

/* Shown only in a category tab: on the All tab the search already covers every category */
.search-scope-toggle-btn[hidden] {
  display: none;
}

/* Search Results Status (Screen Reader Only) */
.search-results-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Sort Controls
   ======================================== */

.sort-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
}

.sort-label {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-small);
  color: var(--color-neutral);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sort-dropdown {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-black-100);
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 0.8rem 2.5rem 0.8rem 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  /* The focus ring appears at once rather than animating in */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), outline 0s, outline-offset 0s;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}

.sort-dropdown:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(119, 191, 226, 0.9);
  box-shadow:
    0 6px 20px rgba(119, 191, 226, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sort-dropdown:focus {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(119, 191, 226, 0.9);
  box-shadow:
    0 6px 20px rgba(119, 191, 226, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.sort-indicator {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.sort-indicator-label {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-small);
  color: var(--color-neutral);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sort-indicator-text {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-small);
  color: var(--color-black-100);
  background: rgba(255, 180, 111, 0.85);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(223, 136, 124, 0.6);
  backdrop-filter: blur(5px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   No Results State
   ======================================== */

.no-results-state {
  display: none;
  padding: 4rem 2rem;
  text-align: center;
}

.no-results-state[hidden] {
  display: none;
}

.no-results-state:not([hidden]) {
  display: block;
}

.no-results-content {
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  padding: 3rem 2rem;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.no-results-icon {
  color: var(--color-black-10);
  opacity: 0.4;
  margin-bottom: 2rem;
}

.no-results-headline {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-3xl);
  color: var(--color-black-100);
  margin-bottom: 1rem;
}

.no-results-tip {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: var(--font-size-base);
  color: var(--color-black-10);
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 1;
}

.no-results-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.no-results-action-btn {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-black-100);
  background: rgba(119, 191, 226, 0.9);
  border: 2px solid rgba(119, 191, 226, 0.8);
  border-radius: 12px;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.no-results-action-btn:hover {
  background: rgba(119, 191, 226, 0.75);
  border-color: rgba(119, 191, 226, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(119, 191, 226, 0.3);
}

.no-results-action-btn:active {
  transform: translateY(0);
}

.no-results-action-btn.secondary {
  background: rgba(139, 127, 214, 0.85);
  border-color: rgba(139, 127, 214, 0.7);
  color: var(--color-black-100);
}

.no-results-action-btn.secondary:hover {
  background: rgba(139, 127, 214, 0.65);
  border-color: rgba(139, 127, 214, 0.9);
  box-shadow: 0 4px 16px rgba(139, 127, 214, 0.3);
}

/* ========================================
   Tab Content Panels
   ======================================== */

.wonderland-content {
  position: relative;
  min-height: 500px;
}

.tab-panel {
  display: none;
  opacity: 0;
}

.tab-panel.active {
  display: block !important;
  opacity: 1 !important; /* Force panel to be visible */
  animation: tabFadeIn 250ms ease-out forwards;
}

/* Tab switch fade-in animation */
@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade out animation for tab panels being hidden */
.tab-panel.fade-out {
  animation: tabFadeOut 200ms ease-in forwards;
}

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

/* ========================================
   Page Load Animations
   ======================================== */

/* Fade-in animation for cards on page load */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide-up animation for cards on page load */
@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   News Grid & Cards
   ======================================== */

.news-grid {
  display: grid;
  /* Using 3 instead of auto-fit */
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.news-card {
  background: rgba(255, 255, 255, 0.85);
  border: 4px solid rgba(119, 191, 226, 0.3);
  border-radius: 20px;
  padding-bottom: 1rem;
  /* Glassmorphism effect */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  /* The focus ring appears at once rather than animating in */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), outline 0s, outline-offset 0s;
  position: relative;
  overflow: hidden;
  /* Page load animation initial state */
  opacity: 0;
  transform: translateY(30px);
  display: flex;
  flex-direction: column;
}

/* Cards in active tab panels should be visible (except those being animated) */
.tab-panel.active .news-card:not(.initial-load):not(.newly-loaded) {
  opacity: 1;
  transform: translateY(0);
}

/* Apply page load animation to initial cards with stagger */
.news-card.initial-load {
  animation: cardSlideUp 250ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger delays for up to 12 initial cards (2 rows on desktop) */
.news-card.initial-load:nth-child(1) { animation-delay: 0ms; }
.news-card.initial-load:nth-child(2) { animation-delay: 40ms; }
.news-card.initial-load:nth-child(3) { animation-delay: 80ms; }
.news-card.initial-load:nth-child(4) { animation-delay: 120ms; }
.news-card.initial-load:nth-child(5) { animation-delay: 160ms; }
.news-card.initial-load:nth-child(6) { animation-delay: 200ms; }
.news-card.initial-load:nth-child(7) { animation-delay: 240ms; }
.news-card.initial-load:nth-child(8) { animation-delay: 280ms; }
.news-card.initial-load:nth-child(9) { animation-delay: 320ms; }
.news-card.initial-load:nth-child(10) { animation-delay: 360ms; }
.news-card.initial-load:nth-child(11) { animation-delay: 400ms; }
.news-card.initial-load:nth-child(12) { animation-delay: 440ms; }

/* News Card Image: 16:9 at every width */
.news-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 20px 20px 0 0;
}

/* Staggered fade-in animation */
.news-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}


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

/* Glass highlight on top edge */
.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
}

/* Hover effect */
.news-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 1);
  border-color: rgba(119, 191, 226, 1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Card Content Wrapper */
.news-card > *:not(.news-image) {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.news-card-header {
  padding-top: 2rem;
}

/* Card Header */
.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.news-date {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: var(--font-size-tiny);
  color: var(--color-black-10);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /* 0.8, not lower: keeps 4.5:1 on the card over the midnight background */
  opacity: 0.8;
}

.news-tag {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-micro);
  color: var(--color-black-100);
  background: rgba(119, 191, 226, 0.25);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(119, 191, 226, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(5px);
}

/* Card Title */
.news-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-xl);
  color: var(--color-black-100);
  line-height: 1.3;
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}

/* The title is the card's link to the post page, stretched over the whole card;
   the source button sits above it (z-index 2) and stays its own link */
.news-title-link {
  color: inherit;
  text-decoration: none;
}

.news-title-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.news-card:hover .news-title-link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Card Description: cut to 3 lines; the full text stays in the markup for search */
.news-description {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: var(--font-size-base);
  color: var(--color-black-10);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* News Meta - Author & Source, under the title */
.news-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  /* A long @handle wraps instead of widening the card */
  overflow-wrap: anywhere;
}

.news-author {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-small);
  color: var(--color-black-10);
}

.news-source {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: var(--font-size-small);
  color: var(--color-black-10);
  /* 0.8, not lower: keeps 4.5:1 on the card over the midnight background */
  opacity: 0.8;
}

.news-author::after {
  content: '•';
  margin-left: 1rem;
  color: var(--color-black-10);
  opacity: 0.5;
}

/* Card footer: the decorative "Read more" and the source button, kept at the card's bottom edge */
.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  margin-top: auto;
  padding-bottom: 0.6rem;
}

.news-read-more {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-base);
  /* The post page's link color: 4.5:1 or more on the card */
  color: #0a5f80;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Source button */
.news-link {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--font-size-base);
  background: linear-gradient(135deg, var(--color-black-1) 0%, rgba(26, 26, 25, 0.95) 100%);
  color: var(--color-accent-1);
  border: 3px solid rgba(252, 231, 134, 0.8);
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  /* The focus ring appears at once rather than animating in */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), outline 0s, outline-offset 0s;
  position: relative;
  /* Above the title link stretched over the card */
  z-index: 2;
  overflow: hidden;
  /* Glassmorphism & depth */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(252, 231, 134, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Shimmer effect */
.news-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(77, 69, 69, 0.2),
    transparent
  );
  transition: left 0.75s ease;
}

.news-link:hover::before {
  left: 100%;
}

.news-link:hover {
  color: var(--color-black-100);
  background: linear-gradient(135deg, rgba(246, 202, 0, 0.85) 0%, rgba(252, 231, 134, 0.75) 100%);
  border-color: rgba(246, 202, 0, 1);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 24px rgba(246, 202, 0, 0.3),
    0 0 32px rgba(246, 202, 0, 0.2),
    0 0 0 1px rgba(246, 202, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.news-link:hover::after {
  transform: translateX(4px);
}

.news-link:active {
  transform: translateY(-1px) scale(1.01);
}

/* ----------------------------------------
   Focus: 3px ring with a 3px gap, as on the post page: dark on the light cards, yellow on the
   midnight background. A focused title link rings the whole card, since the link covers it.
   ---------------------------------------- */

.news-card:has(.news-title-link:focus-visible) {
  outline: 3px solid var(--color-accent-2);
  outline-offset: 3px;
}

.news-title-link:focus-visible {
  outline: none;
}

.news-link:focus-visible,
.featured-title-link:focus-visible,
.featured-take-link:focus-visible,
.featured-link:focus-visible {
  outline: 3px solid var(--color-tertiary);
  outline-offset: 3px;
}

/* The search box and sort menu only tinted their border; they get the same ring, on the midnight background */
.search-bar:focus-within,
.sort-dropdown:focus-visible {
  outline: 3px solid var(--color-accent-2);
  outline-offset: 3px;
}

/* Browsers without :has() ring the title itself */
@supports not selector(:has(*)) {
  .news-title-link:focus-visible {
    outline: 3px solid var(--color-tertiary);
    outline-offset: 3px;
  }
}

/* ========================================
   Load More Button
   ======================================== */

.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.load-more-btn {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-black-100);
  background: rgba(255, 255, 255, 0.85);
  border: 4px solid rgba(252, 231, 134, 0.4);
  border-radius: 50px;
  padding: 1.2rem 3rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  /* Glassmorphism effect */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.load-more-text {
  display: inline-block;
}

.load-more-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.load-more-spinner[hidden] {
  display: none;
}

.spinner-icon {
  animation: spin 0.8s linear infinite;
  color: var(--color-black-100);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Loading state */
.load-more-btn.loading {
  cursor: wait;
  opacity: 0.7;
}

.load-more-btn.loading .load-more-text {
  opacity: 0.5;
}

/* Shimmer effect on hover */
.load-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.load-more-btn:hover::before {
  left: 100%;
}

.load-more-btn:hover {
  background: rgba(252, 231, 134, .95);
  border-color: rgba(246, 202, 0, 1);
  transform: translateY(-2px);
  box-shadow:
    0 12px 40px rgba(252, 231, 134, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.load-more-btn:active {
  transform: translateY(0);
}

.load-more-btn[hidden] {
  display: none;
}

/* Load More Status (Screen Reader Only) */
.load-more-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Load More Animations
   ======================================== */

/* Fade-in animation for newly loaded cards */
@keyframes loadMoreFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Apply animation to newly loaded cards */
.news-card.newly-loaded {
  animation: loadMoreFadeIn 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger delays for newly loaded cards (up to 15 cards per load) */
.news-card.newly-loaded:nth-child(1) { animation-delay: 0ms; }
.news-card.newly-loaded:nth-child(2) { animation-delay: 40ms; }
.news-card.newly-loaded:nth-child(3) { animation-delay: 80ms; }
.news-card.newly-loaded:nth-child(4) { animation-delay: 120ms; }
.news-card.newly-loaded:nth-child(5) { animation-delay: 160ms; }
.news-card.newly-loaded:nth-child(6) { animation-delay: 200ms; }
.news-card.newly-loaded:nth-child(7) { animation-delay: 240ms; }
.news-card.newly-loaded:nth-child(8) { animation-delay: 280ms; }
.news-card.newly-loaded:nth-child(9) { animation-delay: 320ms; }
.news-card.newly-loaded:nth-child(10) { animation-delay: 360ms; }
.news-card.newly-loaded:nth-child(11) { animation-delay: 400ms; }
.news-card.newly-loaded:nth-child(12) { animation-delay: 440ms; }
.news-card.newly-loaded:nth-child(13) { animation-delay: 480ms; }
.news-card.newly-loaded:nth-child(14) { animation-delay: 520ms; }
.news-card.newly-loaded:nth-child(15) { animation-delay: 560ms; }

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet - 2-column layout */
@media (min-width: 768px) and (max-width: 1023px) {
  .section-wonderland {
    padding: 4rem 6rem 8rem;
  }

  .section-wonderland .section-title {
    font-size: var(--font-size-7xl);
  }

  .section-subtitle {
    font-size: var(--font-size-4xl);
    margin-bottom: 4rem;
  }

  /* Featured Section Tablet (the card's layout comes from the max-width: 1200px block) */
  .featured-section {
    margin-bottom: 4rem;
  }

  /* Tab Navigation Tablet */
  .wonderland-tabs {
    gap: 1.2rem;
  }

  .tab-button {
    padding: 1rem 2rem;
    font-size: var(--font-size-small);
  }

  .tab-icon {
    font-size: 1.8rem;
  }

  /* Search and Sort Controls Tablet */
  .search-controls,
  .sort-controls {
    max-width: 550px;
  }

  /* Tablet 2-column card layout */
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Adjust card spacing for tablet */
  .news-card {
    border-width: 3px;
  }

  .news-card > *:not(.news-image) {
    padding-left: 2.2rem;
    padding-right: 2.2rem;
  }

  .news-card-header {
    padding-top: 1.8rem;
    margin-bottom: 1.4rem;
  }

  /* Typography adjustments for tablet */
  .news-title {
    font-size: var(--font-size-2xl);
    line-height: 1.35;
  }

  .news-description {
    font-size: var(--font-size-base);
    line-height: 1.65;
  }

  .news-meta {
    margin-bottom: 1.4rem;
  }

  .news-author,
  .news-source {
    font-size: var(--font-size-small);
  }

  /* Card link button tablet */
  .news-link {
    font-size: var(--font-size-base);
    padding: 1rem 2rem;
  }

  /* Load More Button Tablet */
  .load-more-container {
    margin-top: 3.5rem;
  }

  .load-more-btn {
    font-size: var(--font-size-base);
    padding: 1.1rem 2.5rem;
  }
}

/* Featured card single-column for narrower desktops */
@media (max-width: 1200px) {
  .featured-card {
    /* minmax(0, ...): the column never grows past the card to fit its widest word */
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 2.5rem;
  }

  .featured-title {
    font-size: var(--font-size-3xl);
  }

  .featured-description {
    font-size: var(--font-size-base);
  }

  /* Centered under the text, as the source button alone was */
  .featured-actions {
    justify-content: center;
  }
}

/* Featured card 2-column for wide desktops */
@media (min-width: 1201px) {
  .featured-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 3rem;
    padding: 3rem;
  }

  .featured-title {
    font-size: var(--font-size-4xl);
  }

  .featured-description {
    font-size: var(--font-size-large);
  }
}

/* Desktop - 3-column layout */
@media (min-width: 1024px) {
  .section-wonderland {
    padding: 4rem 8rem 10rem;
  }

  .section-wonderland .section-container {
    max-width: 1400px;
  }

  .section-wonderland .section-title {
    font-size: var(--font-size-8xl);
  }

  .section-subtitle {
    font-size: var(--font-size-5xl);
    margin-bottom: 6rem;
  }

  /* Featured Section Desktop - keeping general styles */
  .featured-section {
    margin-bottom: 5rem;
  }

  /* Tab Navigation Desktop */
  .wonderland-tabs {
    gap: 1.5rem;
    margin-bottom: 4rem;
  }

  .tab-button {
    padding: 1.2rem 2.5rem;
    font-size: var(--font-size-base);
  }

  .tab-icon {
    font-size: 2rem;
  }

  /* Search and Sort Controls Desktop */
  .search-controls {
    max-width: 600px;
    margin-bottom: 3rem;
  }

  .sort-controls {
    max-width: 600px;
    margin-bottom: 3rem;
  }

  /* Desktop 3-column card layout */
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  /* Desktop card spacing */
  .news-card {
    border-width: 4px;
  }

  .news-card > *:not(.news-image) {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .news-card-header {
    padding-top: 2rem;
    margin-bottom: 1.5rem;
  }

  /* Desktop typography */
  .news-title {
    font-size: var(--font-size-xl);
    line-height: 1.3;
    margin-bottom: 0.6rem;
  }

  .news-description {
    font-size: var(--font-size-base);
    line-height: 1.7;
    margin-bottom: 1.2rem;
  }

  .news-meta {
    margin-bottom: 1.5rem;
  }

  .news-author,
  .news-source {
    font-size: var(--font-size-small);
  }

  /* Desktop card link button */
  .news-link {
    font-size: var(--font-size-base);
    padding: 1rem 2rem;
  }

  /* Load More Button Desktop */
  .load-more-container {
    margin-top: 4rem;
    margin-bottom: 2rem;
  }

  .load-more-btn {
    font-size: var(--font-size-base);
    padding: 1.2rem 3rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .section-wonderland {
    padding: 6rem 4rem 4rem;
  }

  .section-wonderland .section-title {
    font-size: var(--font-size-6xl);
    margin-bottom: 0.8rem;
  }

  .section-subtitle {
    font-size: var(--font-size-3xl);
    margin-bottom: 3rem;
  }

  /* Featured Section Mobile */
  .featured-section {
    margin-bottom: 3rem;
  }

  .featured-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 2rem;
  }

  .featured-title {
    font-size: var(--font-size-3xl);
  }

  .featured-description {
    font-size: var(--font-size-base);
  }

  .featured-take-link {
    font-size: var(--font-size-base);
  }

  .featured-link {
    font-size: var(--font-size-base);
    padding: 0.8rem 1.6rem;
  }

  /* Search Controls Mobile */
  .search-controls {
    max-width: 100%;
    margin-bottom: 2.5rem;
  }

  .search-bar {
    padding: 0.7rem 1.2rem;
  }

  .search-input {
    font-size: var(--font-size-small);
  }

  .search-scope-indicator {
    padding: 0.7rem 1.2rem;
    gap: 0.6rem;
  }

  .scope-label,
  .scope-text {
    font-size: var(--font-size-micro);
  }

  /* Sort Controls Mobile */
  .sort-controls {
    max-width: 100%;
    margin-bottom: 2.5rem;
    gap: 1rem;
  }

  .sort-dropdown {
    font-size: var(--font-size-small);
    padding: 0.7rem 2rem 0.7rem 1rem;
  }

  .sort-indicator {
    padding: 0.7rem 1.2rem;
    gap: 0.6rem;
  }

  .sort-indicator-label,
  .sort-indicator-text {
    font-size: var(--font-size-micro);
  }

  /* No Results State Mobile */
  .no-results-state {
    padding: 3rem 1.5rem;
  }

  .no-results-content {
    padding: 2rem 1.5rem;
  }

  .no-results-headline {
    font-size: var(--font-size-2xl);
  }

  .no-results-tip {
    font-size: var(--font-size-small);
  }

  .no-results-actions {
    flex-direction: column;
  }

  .no-results-action-btn {
    width: 100%;
  }

  /* Tab navigation container with arrows */
  .wonderland-tabs-container {
    position: relative;
    margin-bottom: 3rem;
    /* No padding - just positioning context */
  }

  /* Scroll wrapper - handles horizontal overflow with vertical space for glows */
  .wonderland-tabs-scroll-wrapper {
    overflow-x: auto;
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Hide scrollbar but keep functionality */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 2.5rem 1.5rem; /* Vertical padding for glows, horizontal for edge tabs */
    margin: 0 -1.5rem; /* Negative horizontal margin to maintain alignment */
  }

  /* Hide scrollbar for Chrome, Safari, and Opera */
  .wonderland-tabs-scroll-wrapper::-webkit-scrollbar {
    display: none;
  }

  /* Horizontal tabs flex container */
  .wonderland-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1rem;
  }

  /* Fade gradients removed - arrows provide sufficient scroll indication */

  .tab-button {
    flex-shrink: 0;
    min-width: fit-content;
    justify-content: center;
    padding: 1.2rem 2rem;
  }

  /* Tab scroll arrow buttons - centered with visible tab buttons */
  .tab-scroll-arrow {
    position: absolute;
    top: 5rem; /* Center of tab button area */
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(119, 191, 226, 0.6);
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
    color: var(--color-black-100);
  }

  .tab-scroll-arrow:hover {
    background: rgba(119, 191, 226, 0.3);
    border-color: rgba(119, 191, 226, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow:
      0 6px 16px rgba(119, 191, 226, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }

  .tab-scroll-arrow:active {
    transform: translateY(-50%) scale(0.95);
  }

  .tab-scroll-arrow[hidden] {
    display: none;
  }

  /* Position left arrow */
  .tab-scroll-left {
    left: -1rem;
  }

  /* Position right arrow */
  .tab-scroll-right {
    right: -1rem;
  }

  /* Arrow icon styling */
  .tab-scroll-arrow svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 2.5;
  }

  /* Mobile single-column card layout */
  .news-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 100%;
  }

  /* Adjust card internal spacing for mobile */
  .news-card {
    border-width: 3px;
  }

  .news-card > *:not(.news-image) {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .news-card-header {
    padding-top: 1.5rem;
    margin-bottom: 1.2rem;
  }

  /* Optimize typography for mobile reading */
  .news-title {
    font-size: var(--font-size-2xl);
    margin-bottom: 0.6rem;
    line-height: 1.4;
  }

  .news-description {
    font-size: var(--font-size-small);
    line-height: 1.6;
    margin-bottom: 1.2rem;
  }

  /* Adjust metadata for mobile */
  .news-meta {
    margin-bottom: 1.2rem;
  }

  .news-author,
  .news-source {
    font-size: var(--font-size-tiny);
  }

  /* Optimize card link button for mobile */
  .news-read-more,
  .news-link {
    font-size: var(--font-size-small);
  }

  .news-link {
    padding: 0.9rem 1.8rem;
  }

  /* Load More Button Mobile */
  .load-more-container {
    margin-top: 3rem;
  }

  .load-more-btn {
    font-size: var(--font-size-small);
    padding: 1rem 2rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  /* Featured Section Small Mobile */
  .featured-card {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .featured-title {
    font-size: var(--font-size-2xl);
  }

  .featured-description {
    font-size: var(--font-size-small);
  }

  .featured-category,
  .featured-date {
    font-size: var(--font-size-micro);
  }

  .featured-author,
  .featured-source {
    font-size: var(--font-size-small);
  }

  .featured-take-link {
    font-size: var(--font-size-small);
  }

  .featured-link {
    font-size: var(--font-size-small);
    padding: 0.7rem 1.4rem;
  }

  .tab-button {
    padding: 1rem 1.5rem;
    font-size: var(--font-size-small);
  }

  .tab-icon {
    font-size: 1.8rem;
  }

  .news-card > *:not(.news-image) {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .news-card-header {
    padding-top: 1.2rem;
  }

  .news-title {
    font-size: var(--font-size-xl);
  }

  /* Load More Button Small Mobile */
  .load-more-container {
    margin-top: 2.5rem;
  }

  .load-more-btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .section-wonderland,
  .featured-card,
  .tab-button,
  .tab-panel,
  .tab-panel.active,
  .tab-panel.fade-out,
  .news-card,
  .news-card.initial-load,
  .news-card.newly-loaded,
  .news-link,
  .news-link::before,
  .featured-link,
  .search-bar,
  .clear-search-btn,
  .search-scope-toggle-btn,
  .sort-dropdown,
  .load-more-btn,
  .spinner-icon {
    animation: none !important;
    transition: none !important;
  }

  /* Ensure elements are visible when animations are disabled */
  .news-card.initial-load,
  .news-card.newly-loaded,
  .tab-panel.active {
    opacity: 1 !important;
    transform: none !important;
  }

  .featured-card:hover,
  .tab-button:hover,
  .news-card:hover,
  .news-link:hover,
  .news-link:active,
  .featured-link:hover,
  .clear-search-btn:hover,
  .search-scope-toggle-btn:hover,
  .search-scope-toggle-btn:active,
  .sort-dropdown:hover,
  .load-more-btn:hover {
    transform: none !important;
  }
}
