/* =============================================
   pages.css — Inner pages additional styles (Dark Theme)
   ============================================= */

/* ===== PAGE HERO ===== */
.page-hero {
  padding-top: calc(var(--header-h) + 20px);
  background: var(--bg-body);
  position: relative;
}

.page-hero-yellow {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  height: 2px;
  width: 100%;
}

.page-hero-content {
  padding: 72px 24px 80px;
}

.page-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 12px 0 24px;
}

.page-hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  text-shadow: 0 1px 3px rgba(2, 6, 23, 0.8);
  line-height: 1.6;
  max-width: 600px;
  font-weight: 400;
}

/* ===== CONTENT SECTION ===== */
.content-section {
  padding: 120px 0;
}

.content-section.bg-light {
  background: rgba(255,255,255,0.01);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* ===== TWO COLUMN GRID ===== */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

@media (max-width: 800px) {
  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ===== VALUE CARDS ===== */
.mission-values {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.value-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--bg-surface);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
}

.value-card:hover {
  border-color: rgba(0, 166, 235, 0.4);
  box-shadow: 0 10px 30px rgba(0, 166, 235, 0.15);
  transform: translateX(8px);
  background: var(--bg-surface-hover);
}

.value-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  opacity: 0.8;
}

.value-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.value-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== TIMELINE ===== */
.timeline {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-gold), var(--accent-primary));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  margin-bottom: 56px;
  align-items: flex-start;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -44px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--bg-body);
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  box-shadow: var(--glow-gold);
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #00A6EB;
  padding-top: 2px;
}

.timeline-content {
  background: var(--bg-surface);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
}

.timeline-content:hover {
  border-color: var(--accent-primary-hover);
  box-shadow: var(--glow-primary);
  background: var(--bg-surface-hover);
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== SEARCH BAR ===== */
.search-bar-wrap {
  max-width: 600px;
  margin: 0 auto 32px auto;
  text-align: center;
}

.search-bar-inner {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 0 20px;
  transition: all var(--transition);
}

.search-bar-inner:focus-within {
  border-color: #00A6EB;
  box-shadow: 0 0 0 4px rgba(0, 166, 235, 0.15);
  background: var(--bg-surface-hover);
}

.search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color 0.3s;
}

.search-bar-inner:focus-within .search-icon {
  color: #00A6EB;
}

.search-bar-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px 16px;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  width: 100%;
}

.search-bar-input::placeholder {
  color: var(--text-tertiary);
}

.search-bar-input::-webkit-search-decoration,
.search-bar-input::-webkit-search-cancel-button,
.search-bar-input::-webkit-search-results-button,
.search-bar-input::-webkit-search-results-decoration {
  display: none;
}

.search-clear-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.search-results-count {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  min-height: 20px;
}

/* ===== LEADERS PAGE — CATEGORY FILTER COMPONENT ===== */
.category-filter-section {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 32px auto 48px auto;
  box-sizing: border-box;
}

.category-scroll-container {
  position: relative;
  width: 100%;
}

.category-filter-track,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 48px 0;
  padding: 0;
  box-sizing: border-box;
}

.category-chip,
.filter-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  height: 50px;
  padding: 0 20px;
  background: rgba(10, 16, 40, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: #D6DCEF;
  font-family: var(--font-main, 'Outfit UZ', 'Outfit', sans-serif);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  position: relative;
  outline: none;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.category-chip-icon-wrap,
.filter-btn .cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #00A6EB;
  transition: color 200ms ease, filter 200ms ease, transform 200ms ease;
}

.category-chip-icon,
.filter-btn .cat-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  display: block;
}

.category-chip-text {
  display: inline-block;
  letter-spacing: -0.01em;
}

/* Inactive Hover */
.category-chip:hover:not(.active),
.filter-btn:hover:not(.active) {
  transform: translateY(-2px);
  background: rgba(18, 28, 64, 0.85);
  border-color: rgba(0, 166, 235, 0.38);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), 0 0 14px rgba(0, 166, 235, 0.12);
}

.category-chip:hover:not(.active) .category-chip-icon-wrap,
.filter-btn:hover:not(.active) .cat-icon {
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(0, 166, 235, 0.5));
}

/* Active State */
.category-chip.active,
.filter-btn.active {
  background: linear-gradient(135deg, #00A6EB 0%, #0056b3 100%);
  border-color: #38bdf8;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0, 166, 235, 0.35),
              0 0 1px 1px rgba(56, 189, 248, 0.5),
              inset 0 1px 1px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transform: translateY(0);
}

.category-chip.active .category-chip-icon-wrap,
.filter-btn.active .cat-icon {
  color: #ffffff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

/* Focus Visible */
.category-chip:focus-visible,
.filter-btn:focus-visible {
  outline: none;
  border-color: #00A6EB;
  box-shadow: 0 0 0 3px rgba(0, 166, 235, 0.45);
}

/* Leaders Grid Smooth Transition */
#leaders-grid {
  transition: opacity 220ms ease, transform 220ms ease;
}

#leaders-grid.is-filtering {
  opacity: 0.35;
  transform: scale(0.995);
  pointer-events: none;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .category-filter-section {
    margin-top: 28px;
    margin-bottom: 40px;
  }
  .category-filter-track,
  .filter-bar {
    gap: 10px;
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .category-filter-section {
    margin-top: 20px;
    margin-bottom: 32px;
    padding: 0;
  }

  .category-scroll-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 6px 20px 14px 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box;
    mask-image: linear-gradient(to right, transparent 0%, black 24px, black calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 24px, black calc(100% - 24px), transparent 100%);
  }

  .category-scroll-container::-webkit-scrollbar {
    display: none;
  }

  .category-filter-track,
  .filter-bar {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 10px;
    width: max-content;
    margin-bottom: 0;
    padding-right: 24px;
  }

  .category-chip,
  .filter-btn {
    min-height: 46px;
    height: 46px;
    padding: 0 16px;
    font-size: 0.86rem;
    border-radius: 14px;
    gap: 8px;
    flex-shrink: 0;
  }

  .category-chip-icon-wrap,
  .filter-btn .cat-icon {
    width: 17px;
    height: 17px;
  }

  .category-chip-icon,
  .filter-btn .cat-icon {
    width: 16px;
    height: 16px;
  }
}

/* ===== LEADERS FULL GRID ===== */
.leaders-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

/* ===== QUOTES PAGE ===== */
.quotes-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

/* ===== TOP 100 PAGE ===== */
.top100-section {
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.top100-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

@media (max-width: 768px) {
  .top100-inner {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
}

.top100-badge {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-gold);
}

.top100-num {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: #00A6EB;
  line-height: 1;
}

.top100-text {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
}

.top100-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.1;
}

.top100-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

.top100-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.top100-item {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-surface);
  padding: 24px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
}

.top100-item:hover {
  border-color: rgba(0, 166, 235, 0.4);
  box-shadow: 0 10px 30px rgba(0, 166, 235, 0.15);
  transform: translateX(8px);
  background: var(--bg-surface-hover);
}

.top100-rank {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--border-subtle);
  min-width: 64px;
  text-align: center;
}

.top100-item:nth-child(1) .top100-rank { color: #FBBF24; text-shadow: 0 0 20px rgba(251,191,36,0.5); }
.top100-item:nth-child(2) .top100-rank { color: #E5E7EB; text-shadow: 0 0 20px rgba(229,231,235,0.5); }
.top100-item:nth-child(3) .top100-rank { color: #B45309; text-shadow: 0 0 20px rgba(180,83,9,0.5); }

.top100-item-info {
  flex: 1;
}

.top100-item-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.top100-item-sphere {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.top100-item-score {
  background: rgba(0, 166, 235, 0.1);
  color: #00A6EB;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(0, 166, 235, 0.25);
}

/* ===== APPLY PAGE ===== */
.apply-page-section {
  padding: 120px 0;
}

.apply-page-inner {
  max-width: 720px;
  margin: 0 auto;
}

.apply-page-form {
  background: var(--bg-surface);
  padding: 64px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 600px) {
  .apply-page-form {
    padding: 32px 24px;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-item {
    grid-template-columns: 80px 1fr;
    gap: 16px;
  }
}


/* ===== ADDITIONAL MOBILE TWEAKS FOR PAGES ===== */
@media (max-width: 768px) {
  .page-hero-title {
    font-size: 2rem;
  }
  
  .page-hero-content {
    padding: 40px 16px 48px;
  }
  
  .top100-title {
    font-size: 2rem;
  }
  
  .top100-badge {
    width: 100px;
    height: 100px;
  }
  
  .top100-num {
    font-size: 2.5rem;
  }
  
  .top100-item {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
    gap: 16px;
  }
  
  .top100-rank {
    min-width: auto;
    font-size: 1.5rem;
  }
  
  .value-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 24px;
  }
  
  .timeline::before {
    left: 16px;
  }
  
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-left: 48px;
  }
  
  .timeline-item::before {
    left: 11px;
    top: 4px;
  }
  
  .timeline-year {
    font-size: 1.25rem;
  }
  
  .timeline-content {
    padding: 20px;
  }
}
