/* -----------------------------------------------------------
   FONT OPTIMIZATION — FOIT FIXES + GLOBAL FONT STACK
----------------------------------------------------------- */

/* Fix FOIT for Archivo Narrow (used in headings + navigation) */
@font-face {
  font-family: 'Archivo Narrow';
  font-display: swap;
}

/* Ensure Cooper Hewitt also uses swap */
@font-face {
  font-family: 'Cooper Hewitt';
  font-display: swap;
}

/* Global fallback stack */
:root {
  --tdinh-font-body: "Cooper Hewitt", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --tdinh-font-heading: "Archivo Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Apply optimized stack */
body {
  font-family: var(--tdinh-font-body);
}

h1, h2, h3, h4, h5, h6,
.main-navigation a,
.site-title,
.widget-title {
  font-family: var(--tdinh-font-heading);
}

/* Paragraph font size override */
p {
  font-size: var(--wp--preset--font-size--medium) !important;
}


/* -----------------------------------------------------------
   TDINH — TAG PAGE CUSTOM HEADER INJECTION
----------------------------------------------------------- */

body.tag h1,
body.tag header h1,
body.tag .archive-title,
body.tag .page-title,
body.tag .entry-title,
body.tag .archive-header,
body.tag .page-header {
  display: none !important;
}

body.tag .site-main::before {
  content: "On This Day in Norwood History";
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

body.tag .site-main::after {
  content: "Explore the events, people, and stories that happened on this date throughout Norwood’s history.";
  display: block;
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-align: center;
  color: #444;
}

.tdinh-header-center {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  width: 100%;
}


/* -----------------------------------------------------------
   HEADINGS + FEATURED IMAGE CENTERING
----------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  text-align: center;
}

.single-post .jetpack-featured-image,
.single-post .jetpack-featured-image img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}


/* -----------------------------------------------------------
   FRONT PAGE — HIDE RECENT POSTS BLOCK
----------------------------------------------------------- */

#front-page-recent-posts {
  display: none;
}


/* -----------------------------------------------------------
   JETPACK TILED GALLERY — CAPTION OVERLAY
----------------------------------------------------------- */

.tiled-gallery .tiled-gallery-item {
  position: relative;
  overflow: hidden;
}

.tiled-gallery .tiled-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* Caption overlay */
.tiled-gallery .tiled-gallery-caption,
.tiled-gallery .tiled-gallery-item .wp-caption-text,
.tiled-gallery .tiled-gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75em 1em;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow-y: auto;
}

/* Show overlay on hover/focus */
.tiled-gallery .tiled-gallery-item:hover .tiled-gallery-caption,
.tiled-gallery .tiled-gallery-item:focus-within .tiled-gallery-caption,
.tiled-gallery .tiled-gallery-item:hover .wp-caption-text,
.tiled-gallery .tiled-gallery-item:focus-within .wp-caption-text,
.tiled-gallery .tiled-gallery-item:hover figcaption,
.tiled-gallery .tiled-gallery-item:focus-within figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* Hide image title */
.tiled-gallery .tiled-gallery-item .wp-caption-title,
.tiled-gallery .tiled-gallery-item .gallery-caption-title,
.tiled-gallery .tiled-gallery-item .jetpack-image-title {
  display: none !important;
}





