/* /includes/archive-scroll-reveal.css */

/* hide theme header */
header {
  display: none !important;
}

/* page body font */
.srp-archive-main,
.srp-archive-main * {
  font-family: 'Noto Sans', sans-serif;
}

/* page background */
.srp-archive-main {
  position: relative;
  min-height: 100vh;
  background: #0f172a;
  color: #fff;
}

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600;700&display=swap");

/* ── Shared pill style ── */
.pill-base,
.secondary-menu a,
.sfh-close,
.sfh-chip,
.sfh-pill,
.srp-pill {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  background: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.45rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.secondary-menu a:hover,
.sfh-close:hover,
.sfh-chip:hover,
.sfh-pill:hover,
.srp-pill:hover {
  background: #ffcc00 !important;
  color: #000 !important;
  transform: translateY(-2px);
}

/* Close button — circle, fixed size on all screens */
.srp-archive-close {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 1rem !important;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  box-sizing: border-box;
  flex-shrink: 0;
}
.srp-archive-close:hover {
  background: #ffcc00 !important;
  transform: scale(1.05) !important;
}

/* Title — yellow pill, fixed 34px height on all screens */
.srp-archive-title,
.srp-pill--yellow {
  margin: 0 !important;
  background: #ffcc00 !important;
  font-family: 'Noto Sans', sans-serif !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 1.5px !important;
  color: #000 !important;
  height: 34px !important;
  padding: 0 12px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  text-transform: uppercase !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}
.srp-archive-title:hover,
.srp-pill--yellow:hover {
  background: #fff !important;
}




/* ── Fixed header: left (X + title) ── */
.srp-archive-header {
  position: fixed;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
}
.srp-archive-header-left {
  top: 1.5rem;
  left: 2rem;
}

/* ── Fixed header: right — burger + dropdown ── */
.srp-archive-header-right {
  top: 1.5rem;
  right: 2rem;
  gap: 0.6rem;
  flex-direction: row-reverse;
}

.srp-archive-desc {
  font-size: 0.7rem;
  opacity: 1;
  letter-spacing: 1px;
}

/* scrollable area */
.srp-archive-viewport {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding: 110px 0 80px;
}

/* base grid */
.srp-archive-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;     /* mobile FIRST: 1 col */
  gap: 1.3rem;
}

/* IMPORTANT: kill theme floats/widths on posts in our archive */
.srp-archive-grid > .srp-archive-item,
.srp-archive-grid > article,
.srp-archive-grid > .hentry {
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* each post card */
.srp-archive-grid {
  perspective: 1000px;   /* 3D stage for card tilt */
}

.srp-archive-item {
  background: rgba(15,23,42, .4);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  opacity: 0;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: translateY(20px) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
  transition: opacity .25s ease, box-shadow .25s ease;
  will-change: transform;
  transform-style: flat;
}
.srp-archive-item.is-visible {
  opacity: 1;
  transform: translateY(0) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
}
.srp-archive-item.is-tilting {
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  z-index: 2;
}

/* thumb */
.srp-archive-thumb {
  display: block;
  width: 100%;
  height: 180px;
  background: rgba(255,255,255,.05);
}
.srp-archive-thumb img,
.srp-archive-thumb .srp-archive-thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* body */
.srp-archive-body {
  padding: 1.1rem 1.1rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
/* title + meta on same row */
.srp-archive-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.srp-archive-item-title {
  margin: 0;
  font-size: 1.05rem;
  flex: 1 1 auto;
  min-width: 0;
}
.srp-archive-item-title a {
  color: #fff;
  text-decoration: none;
}
.srp-archive-item-title a:hover {
  text-decoration: underline;
}

/* meta */
.srp-archive-meta {
  display: flex;
  gap: .75rem;
  align-items: center;
  font-size: 0.7rem;
  opacity: 1;
  flex-wrap: wrap;
  flex-shrink: 0;
  justify-content: flex-end;
}
.srp-archive-cats {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.srp-archive-cat {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  background: #fff;
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.25s ease;
}
.srp-archive-cat:hover {
  background: #ffcc00;
  color: #000;
  transform: translateY(-2px);
}

/* Active / current category chip — yellow */
.srp-archive-cat.is-current-cat {
  background: #ffcc00;
  color: #000;
}

/* "also found in" — plain text, yellow, vertically centred with pills */
.srp-archive-also-in {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffcc00;
  cursor: default;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.srp-archive-tags {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.srp-archive-tag {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: #000;
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.25s ease;
}
.srp-archive-tag:hover {
  background: #ffcc00;
  color: #000;
  transform: translateY(-2px);
}

.srp-archive-excerpt {
  font-size: .85rem;
  line-height: 1.5;
  padding-top: 10px;
}

/* pagination */
.srp-archive-pagination {
  width: 100%;
  margin: 2rem 0 0;
  padding: 0 16px;
}
.srp-archive-pagination .page-numbers {
  background: rgba(0,0,0,.3);
  color: #fff;
  padding: .4rem .7rem;
  margin-right: .4rem;
  border-radius: .4rem;
  text-decoration: none;
}
.srp-archive-pagination .page-numbers.current {
  background: rgba(0,0,0,.7);
}

/* empty */
.srp-archive-empty {
  text-align: center;
  margin-top: 30vh;
  color: #fff;
  opacity: .7;
}

/* ====== breakpoints ====== */

/* from 901px and up → 2 columns */
@media screen and (min-width: 901px) {
  .srp-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* small screens — see end of file */

/* ── Burger circle ── */
.srp-burger {
  pointer-events: auto;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: none;
  padding: 0;
  color: #000;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  font-family: 'Noto Sans', sans-serif;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.srp-burger:hover {
  background: #ffcc00;
  transform: scale(1.05);
}

/* ── Dropdown: hidden, slides in from right, opens left ── */
.srp-burger-menu {
  pointer-events: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.srp-burger-menu.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════════════
   MOBILE — max-width 600px
   Matches image 001: vertical stacks, fixed sizes
   ══════════════════════════════════════════════ */
@media (max-width: 600px) {

  /* ── Left: X row1 aligned with burger, title row2 aligned with first dropdown item ── */
  .srp-archive-header-left {
    top: 1rem;
    left: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;                    /* same gap as dropdown items */
    max-width: calc(100vw - 5rem);
  }
  /* Make sure close is exactly 34px so title sits at 1rem+34px+6px */
  .srp-archive-close {
    height: 34px !important;
    width: 34px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
  }
  /* Title and desc have no extra margin */
  .srp-archive-title,
  .srp-archive-desc {
    margin: 0 !important;
  }


  /* ── Right header: burger pinned top-right ── */
  .srp-archive-header-right {
    top: 1rem;
    right: 1rem;
  }

  /* ── Burger: keep exact desktop size ── */
  .srp-burger {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    font-size: 1.3rem !important;
    flex-shrink: 0;
  }

  /* ── Dropdown: vertical column, right-aligned, fixed below burger ── */
  .srp-burger-menu {
    position: fixed !important;
    top: calc(1rem + 34px + 6px) !important;
    right: 1rem !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 6px !important;
    transform: translateY(-8px) !important;
  }
  .srp-burger-menu.is-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* ── Pills: fixed 34px height, no font shrink ── */
  .srp-pill {
    height: 34px !important;
    font-size: 12px !important;
    padding: 0 12px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  /* ── X close: keep circle size ── */
  .srp-archive-close {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

  /* ── Title: keep fixed pill size ── */
  .srp-archive-title,
  .srp-pill--yellow {
    height: 34px !important;
    font-size: 12px !important;
    padding: 0 12px !important;
  }

  .srp-archive-viewport {
    padding-top: 120px;
  }

  /* "also found in" + category pills stack vertically, right-aligned */
  .srp-archive-cats {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
  }

  /* title row: align items to top so title and also-in share the same horizontal line */
  .srp-archive-title-row {
    align-items: flex-start;
  }
}
