/* ==========================================================
   TAGS PAGE SYSTEM
========================================================== */

/*
  CLEANUP NOTES:
  - Global systems removed
  - main.css now controls:
      body
      links
      media
      page
      topbar
      brand
      layout foundations
  - tags.css should ONLY contain
    tag-page-specific systems
*/
/* ==========================================================
   TAGS PAGE HEADER ACTIONS
========================================================== */

.top-actions {

  display: flex;

  align-items: center;

  justify-content: flex-end;

  flex-wrap: wrap;

  gap: 10px;
}

/* ==========================================================
   TAGS PAGE BUTTONS
========================================================== */

.pill,
.ghost-btn,
.solid-btn {

  transition:
    transform var(--motion-fast),
    border-color var(--motion-fast),
    background var(--motion-fast),
    box-shadow var(--motion-fast);
}

/* ==========================================================
   GLOBAL TAG PAGE HOVER
========================================================== */

.tag-card:hover,
.model-card:hover,
.hero-card:hover,
.insight-stat:hover,
.mini-panel:hover,
.accordion-item:hover {

  transform: translateY(-2px);

  border-color:
    rgba(255,255,255,0.10);
}
/* ==========================================================
   HERO
========================================================== */

.hero {

  display: grid;

  grid-template-columns:
    minmax(0,1.55fr)
    minmax(320px,0.95fr);

  gap: 20px;

  margin-top: 20px;
}

/* ==========================================================
   HERO CARD
========================================================== */

.hero-card {

  position: relative;

  isolation: isolate;

  overflow: clip;

  min-height: 460px;

  display: grid;

  align-items: flex-end;

  border-radius: 30px;

  background:
    color-mix(
      in srgb,
      var(--card) 94%,
      transparent
    );

  border:
    1px solid var(--border-soft);

  backdrop-filter: blur(12px);

  box-shadow:
    var(--glow-mid);
}

/* ==========================================================
   HERO OVERLAY
========================================================== */

.hero-card::before {

  content: "";

  position: absolute;

  inset: 0;

  z-index: 1;

  background:
    linear-gradient(
      180deg,
      color-mix(
        in srgb,
        transparent 94%,
        var(--bg)
      ) 0%,

      color-mix(
        in srgb,
        var(--bg) 68%,
        black
      ) 65%,

      color-mix(
        in srgb,
        var(--bg) 92%,
        black
      ) 100%
    );
}

/* ==========================================================
   HERO ATMOSPHERE
========================================================== */

.hero-card::after {

  content: "";

  position: absolute;

  inset: 0;

  border-radius: inherit;

  background:
    var(--glow-orb);

  opacity: 0.45;

  pointer-events: none;
}

/* ==========================================================
   HERO BG
========================================================== */

.hero-bg {

  position: absolute;

  inset: 0;

  background-size: cover;
  background-position: center;

  transform: scale(1.02);

  transition:
    transform var(--motion-mid);
}

/* ==========================================================
   HERO CONTENT
========================================================== */

.hero-content {

  position: relative;

  z-index: 2;

  padding: 26px;
}
/* ==========================================================
   KICKER
========================================================== */

.kicker {

  display: inline-flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 14px;

  padding: 8px 12px;

  border-radius: 999px;

  background:
    color-mix(
      in srgb,
      var(--card) 82%,
      transparent
    );

  border:
    1px solid var(--border-soft);

  backdrop-filter: blur(10px);

  font-size: 0.8rem;

  font-weight: 700;

  color: var(--text);
}

/* ==========================================================
   HERO TITLE
========================================================== */

.hero-title {

  max-width: 16ch;

  margin: 0 0 12px;

  font-size:
    clamp(2rem, 3vw, 3.2rem);

  line-height: 1.02;

  letter-spacing: -0.04em;

  font-weight: 800;

  color: var(--text);
}

/* ==========================================================
   HERO SUB
========================================================== */

.hero-sub {

  max-width: 62ch;

  margin: 0 0 16px;

  font-size: 1rem;

  line-height: 1.7;

  color:
    color-mix(
      in srgb,
      var(--text) 86%,
      transparent
    );
}

/* ==========================================================
   BUTTON ROW
========================================================== */

.button-row {

  display: flex;

  align-items: center;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 18px;
}

/* ==========================================================
   SIDE HERO
========================================================== */

.side-hero {

  display: grid;

  gap: 16px;
}

/* ==========================================================
   SIDE HERO CARD
========================================================== */

.side-hero-card {

  position: relative;

  overflow: hidden;

  display: flex;

  align-items: flex-end;

  min-height: 142px;

  padding: 18px;

  border-radius: 24px;

  background:
    color-mix(
      in srgb,
      var(--card) 92%,
      transparent
    );

  border:
    1px solid var(--border-soft);

  backdrop-filter: blur(12px);

  box-shadow:
    var(--glow-mid);

  transition:
    transform var(--motion-fast),
    box-shadow var(--motion-fast);
}

.side-hero-card:hover {

  transform: translateY(-2px);
}

/* ==========================================================
   SIDE HERO BG
========================================================== */

.side-hero-card .card-bg {

  position: absolute;

  inset: 0;

  background-size: cover;
  background-position: center;

  opacity: 0.22;

  filter: blur(8px);
}

.side-hero-card::after {

  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      180deg,
      color-mix(
        in srgb,
        transparent 80%,
        var(--bg)
      ),
      color-mix(
        in srgb,
        var(--bg) 78%,
        black
      )
    );
}

.side-hero-card .card-content {

  position: relative;

  z-index: 2;
}
/* ==========================================================
   TAG CARD EXTRAS
========================================================== */

/*
  Removed from tags.css because main.css now controls:

  - card-body
  - card-topline
  - viewer-number
  - card-meta
  - chip-row
  - chip
  - card-footer
  - card-cta
  - shared hover behavior

  Keeping only tag-page-specific enhancements below.
*/

/* ==========================================================
   THUMB VIEWERS
========================================================== */

.thumb-viewers {

  position: absolute;

  bottom: 10px;
  left: 10px;

  z-index: 3;

  padding: 6px 10px;

  border-radius: 999px;

  background:
    var(--glass-elevated);

  border:
    1px solid var(--border-soft);

  backdrop-filter: blur(8px);

  font-size: 0.74rem;

  font-weight: 700;

  color: var(--text);
}

/* ==========================================================
   TREND
========================================================== */

.trend-up {

  font-size: 0.74rem;

  font-weight: 700;

  color: var(--ok);
}

/* ==========================================================
   URGENCY BAR
========================================================== */

.urgency-bar {

  position: absolute;

  bottom: 0;
  left: 0;

  width: 100%;
  height: 3px;

  background: var(--grad-primary);

  opacity: 0.82;

  z-index: 4;

  animation:
    urgencyMove 2.5s linear infinite;
}

/* ==========================================================
   URGENCY MOTION
========================================================== */

@keyframes urgencyMove {

  0% {

    transform: translateX(-100%);
  }

  100% {

    transform: translateX(100%);
  }
}

/* ==========================================================
   STATUS
========================================================== */

.status-text {

  color: var(--muted);
}
/* ==========================================================
   TAG PAGE GRIDS
========================================================== */

.grid-3 {

  display: grid;

  grid-template-columns:
    repeat(3,minmax(0,1fr));

  gap: 16px;
}

.grid-4 {

  display: grid;

  grid-template-columns:
    repeat(4,minmax(0,1fr));

  gap: 18px;
}

/* ==========================================================
   TAG CARD
========================================================== */

.tag-card {

  position: relative;

  overflow: hidden;

  min-height: 150px;

  padding: 18px;

  border-radius: 22px;

  background:
    color-mix(
      in srgb,
      var(--card) 92%,
      transparent
    );

  border:
    1px solid var(--border-soft);

  backdrop-filter: blur(12px);

  box-shadow:
    var(--glow-mid);
}

/* ==========================================================
   TAG GLOW
========================================================== */

.tag-card::after {

  content: "";

  position: absolute;

  right: -20px;
  bottom: -60px;

  width: 140px;
  height: 140px;

  border-radius: 50%;

  background:
    var(--glow-orb);

  opacity: 0.42;

  pointer-events: none;
}

/* ==========================================================
   TAG COUNT
========================================================== */

.tag-card .count {

  margin: 10px 0 8px;

  font-size: 2rem;

  font-weight: 900;

  letter-spacing: -0.04em;

  color: var(--text);
}

/* ==========================================================
   TAG META
========================================================== */

.tag-meta {

  font-size: 0.9rem;

  line-height: 1.6;

  color: var(--muted);
}
/* ==========================================================
   MINI PANEL
========================================================== */

.mini-panel {

  min-height: 100%;

  padding: 18px;

  border-radius: 22px;

  background:
    color-mix(
      in srgb,
      var(--card) 92%,
      transparent
    );

  border:
    1px solid var(--border-soft);

  backdrop-filter: blur(12px);

  box-shadow:
    var(--glow-mid);
}

/* ==========================================================
   METRIC ROW
========================================================== */

.metric-row {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  padding: 10px 0;

  border-bottom:
    1px solid var(--border-soft);

  font-size: 0.92rem;
}

.metric-row:last-child {

  padding-bottom: 0;

  border-bottom: 0;
}

/* ==========================================================
   ACCORDION
========================================================== */

.accordion-wrap {

  display: none;

  margin-top: 26px;
}

.accordion-item {

  overflow: hidden;

  padding: 18px;

  border-radius: 22px;

  background:
    color-mix(
      in srgb,
      var(--card) 92%,
      transparent
    );

  border:
    1px solid var(--border-soft);

  backdrop-filter: blur(12px);

  box-shadow:
    var(--glow-mid);
}

/* ==========================================================
   ACCORDION HEAD
========================================================== */

.accordion-head {

  display: flex;

  align-items: center;

  width: 100%;

  justify-content: space-between;

  gap: 12px;

  padding: 0;

  border: 0;

  background: transparent;

  color: inherit;

  cursor: pointer;

  text-align: left;
}

/* ==========================================================
   ICON
========================================================== */

.accordion-icon {

  font-size: 1.2rem;

  transition:
    transform var(--motion-fast);
}

.accordion-item.open .accordion-icon {

  transform: rotate(45deg);
}

/* ==========================================================
   BODY
========================================================== */

.accordion-body {

  max-height: 0;

  overflow: hidden;

  padding-top: 0;

  transition:
    max-height .32s ease;
}

.accordion-item.open .accordion-body {

  max-height: 600px;

  padding-top: 16px;
}
/* ==========================================================
   PAGINATION
========================================================== */

.pagination {

  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 14px;

  margin-top: 36px;
}

.pagination .pill {

  font-weight: 700;
}

/* ==========================================================
   FOOTER NOTE
========================================================== */

.footer-note {

  margin: 30px 0 12px;

  text-align: center;

  font-size: 0.9rem;

  line-height: 1.6;

  color: var(--muted);
}
/* ==========================================================
   TOP CARD
========================================================== */

.model-card.top-card {

  transform: translateY(-2px);

  border-color:
    color-mix(
      in srgb,
      var(--accent) 20%,
      var(--border)
    );

  box-shadow:
    var(--glow-strong);
}

.model-card.top-card:hover {

  transform:
    translateY(-5px)
    scale(1.01);
}

/* ==========================================================
   TOP BADGES
========================================================== */

.model-card:not(.top-card) .badge.highlight {

  background:
    color-mix(
      in srgb,
      var(--card) 82%,
      transparent
    );

  box-shadow: none;
}

.model-card.top-card .badge.highlight {

  background: var(--grad-primary);

  box-shadow:
    var(--glow-soft);
}

/* ==========================================================
   URGENCY
========================================================== */

.model-card:not(.top-card) .urgency-bar {

  display: none;
}

.model-card:not(.top-card) .thumb-viewers {

  opacity: 0.78;
}

.model-card.top-card .thumb-viewers {

  opacity: 1;
}

/* ==========================================================
   INFO PANEL
========================================================== */

.info-panel.premium {

  position: relative;

  overflow: hidden;

  margin: 22px 0 30px;

  padding: 20px 22px;

  border-radius: 22px;

  background:
    color-mix(
      in srgb,
      var(--card) 92%,
      transparent
    );

  border:
    1px solid var(--border-soft);

  box-shadow:
    var(--glow-mid);
}

/* ==========================================================
   ATMOSPHERE
========================================================== */

.info-panel.premium::before {

  content: "";

  position: absolute;

  top: -120px;
  right: -120px;

  width: 260px;
  height: 260px;

  border-radius: 50%;

  background:
    var(--glow-orb);

  opacity: 0.38;

  pointer-events: none;
}

/* ==========================================================
   INNER
========================================================== */

.info-inner {

  position: relative;

  z-index: 2;
}

/* ==========================================================
   HEADER
========================================================== */

.info-header {

  display: flex;

  align-items: center;

  gap: 10px;

  margin-bottom: 12px;
}

.info-header h3 {

  margin: 0;

  font-size: 1.04rem;

  font-weight: 800;

  color: var(--text);
}

/* ==========================================================
   ICON
========================================================== */

.info-icon {

  font-size: 1.1rem;
}

/* ==========================================================
   TEXT
========================================================== */

.info-text {

  font-size: 0.94rem;

  line-height: 1.7;

  color: var(--muted);
}

/* ==========================================================
   HIGHLIGHTS
========================================================== */

.info-highlight {

  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-top: 16px;
}
/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1180px) {

  .hero {

    grid-template-columns: 1fr;
  }

  .stats-grid,
  .grid-4 {

    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .mini-panel-grid,
  .grid-3,
  .accordion-grid {

    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   FOOTER RESPONSIVE
========================================================== */

@media (max-width: 900px) {

  .footer-grid {

    grid-template-columns:
      1fr 1fr;

    gap: 24px;
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 820px) {

  .page,
  .topbar-inner {

    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar-inner {

    flex-direction: column;

    align-items: flex-start;

    gap: 10px;
  }

  .top-actions {

    width: 100%;

    justify-content: flex-start;
  }

  .rail-controls {

    display: none;
  }

  .grid-3,
  .grid-4,
  .stats-grid,
  .mini-panel-grid,
  .accordion-grid {

    grid-template-columns: 1fr;
  }

  .desktop-only {

    display: none !important;
  }

  .accordion-wrap {

    display: block;
  }

  .hero-card {

    min-height: 420px;
  }

  .hero-title {

    max-width: none;
  }

  /* softer mobile rail */

  .rail {

    grid-auto-columns: 82%;
  }

  .model-card {

    min-height: auto;
  }

  .card-body {

    padding: 14px;
  }

  .thumb-viewers {

    bottom: 8px;
    left: 8px;
  }

  .info-panel.premium {

    padding: 18px;
  }
}

/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 600px) {

  .footer-grid {

    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   DESKTOP ONLY
========================================================== */

@media (min-width: 821px) {

  .mobile-only {

    display: none !important;
  }
}
/* ==========================================================
   HERO SIDE
========================================================== */

.hero-side {

  display: grid;

  gap: 16px;
}

/* ==========================================================
   SIDE PANEL
========================================================== */

.side-panel {

  position: relative;

  overflow: hidden;

  padding: 18px;

  border-radius: 22px;

  background:
    color-mix(
      in srgb,
      var(--card) 92%,
      transparent
    );

  border:
    1px solid var(--border-soft);

  box-shadow:
    var(--glow-mid);

  transition:
    transform var(--motion-fast),
    border-color var(--motion-fast),
    box-shadow var(--motion-fast);
}

/* ==========================================================
   HOVER
========================================================== */

.side-panel:hover {

  transform: translateY(-2px);

  border-color:
    color-mix(
      in srgb,
      var(--accent) 20%,
      var(--border)
    );

  box-shadow:
    var(--glow-strong);
}

/* ==========================================================
   ATMOSPHERE
========================================================== */

.side-panel::after {

  content: "";

  position: absolute;

  top: -80px;
  right: -80px;

  width: 180px;
  height: 180px;

  border-radius: 50%;

  background:
    var(--glow-orb);

  opacity: 0.34;

  pointer-events: none;
}
/* ==========================================================
   PANEL LINKS
========================================================== */

.side-panel .big-stat a {

  color: var(--text);

  text-decoration: none;

  transition:
    color var(--motion-fast),
    opacity var(--motion-fast);
}

.side-panel .big-stat a:hover {

  color:
    color-mix(
      in srgb,
      var(--accent) 72%,
      var(--text)
    );
}
.chip.non-linked {
    cursor: default;
    opacity: .88;
}