/* ================================================================
   TAG ARCHIVE — FINAL OVERRIDES (Paste at VERY BOTTOM)
   Portfolio-clean + newsroom controls + related tags + pagination
   Uses Astra Global Color 0: var(--ast-global-color-0)
   ================================================================ */

:root{
  --cd-accent: var(--ast-global-color-0);
}

/* -----------------------------
   INTRO: clean, wide, editorial
------------------------------ */
body.tag .tag-archive-page-intro{
  width: 96% !important;
  max-width: 1440px !important;
  margin: 1.1rem auto 0.75rem !important;
  padding: 0.9rem 1.05rem !important;
  background: #f7f7f7 !important;
  border-left: 5px solid var(--cd-accent) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

body.tag .tag-archive-page-intro h2{
  font-size: 1.7rem !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 0.35rem !important;
}

body.tag .tag-archive-page-intro .tag-intro-subtitle{
  font-size: 1.0rem !important;
  line-height: 1.4 !important;
  margin: 0 0 0.35rem !important;
  color: rgba(0,0,0,0.70) !important;
}

body.tag .tag-archive-page-intro .tag-intro-text,
body.tag .tag-archive-page-intro p{
  font-size: 0.98rem !important;
  line-height: 1.6 !important;
  color: rgba(0,0,0,0.78) !important;
  margin: 0 0 0.35rem !important;
}

/* -----------------------------
   RELATED TAGS
   <div class="tag-related">
     <span class="tag-related-label">RELATED:</span>
     <a class="tag-related-link" ...>Tag</a>...
   </div>
------------------------------ */
body.tag .tag-related{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}

body.tag .tag-related-label{
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(0,0,0,0.45);
  margin-right: 0.15rem;
}

body.tag .tag-related-link{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.75);
  color: rgba(0,0,0,0.72);
  text-decoration: none !important;
  font-size: 0.85rem;
  line-height: 1.1;
  transition: transform .15s ease, border-color .15s ease, color .15s ease, background .15s ease;
}

body.tag .tag-related-link:hover{
  border-color: var(--cd-accent);
  color: var(--cd-accent);
  background: rgba(0,0,0,0.02);
  transform: translateY(-1px);
}

/* -----------------------------
   HEADER ROW: meta left + actions right
------------------------------ */
body.tag .tag-archive-header-row{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;

  margin-top: 0.65rem !important;
  padding-top: 0.65rem !important;
  border-top: 1px solid rgba(0,0,0,0.08) !important;
}

/* Meta chips */
body.tag .tag-archive-meta{
  display: flex !important;
  gap: 0.45rem !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  margin: 0 !important;
}

body.tag .tag-archive-meta .tag-archive-count,
body.tag .tag-archive-meta .tag-archive-years{
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 999px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;

  border: 1px solid rgba(0,0,0,0.14) !important;
  background: rgba(255,255,255,0.75) !important;
  color: rgba(0,0,0,0.72) !important;
}

/* Actions container */
body.tag .tag-archive-actions{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.85rem !important;
  flex-wrap: wrap !important;
}

/* Sort: minimal newsroom */
body.tag .tag-archive-sort{
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.55rem !important;
  flex-wrap: wrap !important;
  font-size: 0.86rem !important;
  line-height: 1.1 !important;
}

body.tag .tag-sort-label{
  font-size: 0.72rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(0,0,0,0.45) !important;
  font-weight: 700 !important;
}

body.tag .tag-sort-link{
  color: rgba(0,0,0,0.55) !important;
  text-decoration: none !important;
  padding: 0.22rem 0.42rem !important;
  border-radius: 999px !important;
  line-height: 1.1 !important;
  font-weight: 600 !important;
}

body.tag .tag-sort-link:hover{
  color: #111 !important;
  background: rgba(0,0,0,0.04) !important;
}

body.tag .tag-sort-link.is-active{
  color: #111 !important;
  background: rgba(0,0,0,0.08) !important;
}

/* Photo Archive: distinct action pill */
body.tag .tag-return-link{
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;

  font-size: 0.86rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;

  color: #111 !important;
  padding: 0.35rem 0.65rem !important;
  border: 1px solid rgba(0,0,0,0.14) !important;
  border-radius: 999px !important;
  background: #fff !important;
}

body.tag .tag-return-link:hover{
  border-color: rgba(0,0,0,0.22) !important;
  background: rgba(0,0,0,0.03) !important;
  color: var(--cd-accent) !important;
}

/* -----------------------------
   GRID: lead feature + 2 columns desktop
------------------------------ */
body.tag .photo-tag-grid{
  width: 96% !important;
  max-width: 1440px !important;
  margin: 0 auto 1.75rem !important;
  box-sizing: border-box !important;

  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.6rem !important;
}

@media (min-width: 980px){
  body.tag .photo-tag-grid{
    grid-template-columns: 1fr 1fr !important;
    gap: 2.0rem 1.8rem !important;
  }
  body.tag .photo-tag-grid > .photo-tag-item:first-child{
    grid-column: 1 / -1 !important;
  }
}

/* Item */
body.tag .photo-tag-item{
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Image */
body.tag .photo-tag-thumb{
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.10),
    0 2px 8px rgba(0,0,0,0.06) !important;
  transition: transform .22s ease, box-shadow .22s ease !important;
}

body.tag .photo-tag-thumb:hover{
  transform: translateY(-2px) !important;
  box-shadow:
    0 16px 44px rgba(0,0,0,0.14),
    0 6px 16px rgba(0,0,0,0.08) !important;
}

body.tag .photo-tag-thumb img{
  display: block;
  width: 100%;
  height: auto;
}

/* Title + caption */
body.tag .photo-tag-title{
  font-size: 1.0rem !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  margin: 0.55rem 0 0.25rem !important;
  color: #111 !important;
}

body.tag .photo-tag-caption{
  max-width: 100% !important;
  font-size: 0.92rem !important;
  line-height: 1.45 !important;
  color: rgba(0,0,0,0.70) !important;
}

body.tag .photo-tag-caption p{ margin: 0 !important; }

body.tag .photo-tag-date-inline{
  font-style: italic;
  font-weight: 400 !important;
  color: rgba(0,0,0,0.52) !important;
}

/* =============================
   LEAD FEATURE BREAKOUT (FIX)
   Makes first image wider AND keeps title+caption aligned
============================= */
@media (min-width: 1100px){

  /* widen the whole first block (image + text) */
  body.tag .photo-tag-grid > .photo-tag-item:first-child{
    width: min(1800px, calc(100vw - 48px)) !important;
    margin-left: calc(50% - min(1800px, calc(100vw - 48px)) / 2) !important;
    margin-right: auto !important;
  }

  /* ensure the text follows the widened block */
  body.tag .photo-tag-grid > .photo-tag-item:first-child .photo-tag-title,
  body.tag .photo-tag-grid > .photo-tag-item:first-child .photo-tag-caption{
    max-width: 100% !important;
  }

  /* feature type sizing */
  body.tag .photo-tag-grid > .photo-tag-item:first-child .photo-tag-title{
    font-size: 1.45rem !important;
    font-weight: 850 !important;
    letter-spacing: -0.02em !important;
    margin-top: 0.8rem !important;
  }

  body.tag .photo-tag-grid > .photo-tag-item:first-child .photo-tag-caption{
    font-size: 1.0rem !important;
    line-height: 1.5 !important;
  }

  body.tag .photo-tag-grid > .photo-tag-item:first-child .photo-tag-thumb{
    border-radius: 14px !important;
  }
}

/* -----------------------------
   MOBILE: more full-bleed
------------------------------ */
@media (max-width: 768px){
  body.tag .ast-container,
  body.tag .site-content .ast-container{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.tag .tag-archive-page-intro,
  body.tag .photo-tag-grid{
    width: calc(100vw - 12px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.tag .tag-archive-header-row{
    align-items: flex-start !important;
  }

  body.tag .tag-return-link{
    margin-left: 0 !important;
  }
}

/* ================================================================
   PAGINATION — Modern, horizontal, uses Astra Global Color 0
   Targets: nav.tag-archive-pagination ul.page-numbers
   ================================================================ */
body.tag .tag-archive-pagination{
  width: 96% !important;
  max-width: 1440px !important;
  margin: 1.75rem auto 3rem !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Keep it horizontal + remove bullets always */
body.tag .tag-archive-pagination ul.page-numbers{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;

  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.6rem !important;
}

body.tag .tag-archive-pagination ul.page-numbers > li{
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Base pills */
body.tag .tag-archive-pagination ul.page-numbers a,
body.tag .tag-archive-pagination ul.page-numbers span{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-width: 2.4rem !important;
  height: 2.4rem !important;
  padding: 0 0.85rem !important;

  border-radius: 999px !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
  background: #fff !important;

  font-size: 0.92rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;

  color: rgba(0,0,0,0.62) !important;
  transition: transform .15s ease, border-color .15s ease, color .15s ease, background .15s ease !important;
}

body.tag .tag-archive-pagination ul.page-numbers a:hover{
  transform: translateY(-1px) !important;
  border-color: var(--cd-accent) !important;
  color: var(--cd-accent) !important;
  background: rgba(0,0,0,0.02) !important;
}

body.tag .tag-archive-pagination ul.page-numbers .current{
  border-color: var(--cd-accent) !important;
  color: var(--cd-accent) !important;
  background: #fff !important;
  font-weight: 700 !important;
}

/* Prev/Next (“More”) — FIX: make it a real button so it doesn’t look “off” */
body.tag .tag-archive-pagination ul.page-numbers .prev,
body.tag .tag-archive-pagination ul.page-numbers .next{
  min-width: 0 !important;
  padding: 0 1.05rem !important;
  letter-spacing: 0.01em !important;
  color: rgba(0,0,0,0.72) !important;
  border-color: rgba(0,0,0,0.14) !important;
}

body.tag .tag-archive-pagination ul.page-numbers .prev:hover,
body.tag .tag-archive-pagination ul.page-numbers .next:hover{
  color: var(--cd-accent) !important;
  border-color: var(--cd-accent) !important;
}

/* Dots */
body.tag .tag-archive-pagination ul.page-numbers .dots{
  border-color: transparent !important;
  background: transparent !important;
  min-width: 1.25rem !important;
  padding: 0 0.25rem !important;
  color: rgba(0,0,0,0.45) !important;
}

/* Mobile: slightly tighter */
@media (max-width: 640px){
  body.tag .tag-archive-pagination ul.page-numbers a,
  body.tag .tag-archive-pagination ul.page-numbers span{
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    padding: 0 0.75rem !important;
    font-size: 0.88rem !important;
  }
}

/* =========================================================
   META CHIPS — Restore Light Accent Fill
   Uses Astra Global Color 0
   ========================================================= */

body.tag .tag-archive-meta .tag-archive-count,
body.tag .tag-archive-meta .tag-archive-years{
  border-color: var(--cd-accent) !important;
  background: color-mix(in srgb, var(--cd-accent) 6%, #ffffff) !important;
  color: rgba(0,0,0,0.75) !important;
}

/* Slightly stronger on hover (optional) */
body.tag .tag-archive-meta .tag-archive-count:hover,
body.tag .tag-archive-meta .tag-archive-years:hover{
  background: color-mix(in srgb, var(--cd-accent) 16%, #ffffff) !important;
}

/* Fallback if color-mix unsupported */
@supports not (color: color-mix(in srgb, #000 20%, #fff)){
  body.tag .tag-archive-meta .tag-archive-count,
  body.tag .tag-archive-meta .tag-archive-years{
    background: rgba(0,0,0,0.03) !important;
    border-color: var(--cd-accent) !important;
  }
}
/* ================================================================
   ALIGN LEAD IMAGE WITH PINK ACCENT STRIPE
   Matches intro container exactly (1440px)
   ================================================================ */

@media (min-width: 1100px){

  /* Ensure grid matches intro width */
  body.tag .photo-tag-grid{
    width: 96% !important;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Remove previous breakout behavior */
  body.tag .photo-tag-grid > .photo-tag-item:first-child{
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* Align image exactly with intro inner padding */
  body.tag .photo-tag-grid > .photo-tag-item:first-child .photo-tag-thumb{
    margin-left: 0 !important;
  }

  /* Keep title + caption aligned with image */
  body.tag .photo-tag-grid > .photo-tag-item:first-child .photo-tag-title,
  body.tag .photo-tag-grid > .photo-tag-item:first-child .photo-tag-caption{
    max-width: 100% !important;
  }

}