/* ==========================================================================
   Beachfront Blog — listing + single post
   Design system lifted from the approved static mockup.

   Everything is scoped under .bfb so the Elementor header/footer that wrap
   these templates keep their own styling. Do not remove the wrapper.
   ========================================================================== */

.bfb {
  --ink: #0D0F0E;
  --parchment: #F4F1EB;
  --paper: #FBFAF7;
  --blue: #007BC1;
  --blue-deep: #045D8E;
  --blue-mid: #85BDE1;
  --sand: #E0BB7F;
  --sand-light: #F2D3A4;
  --rule: rgba(13, 15, 14, .11);
  --ink-soft: #3a3a35;
  --fd: 'Cormorant Garamond', Georgia, serif;
  --fb: 'Inter', system-ui, sans-serif;
  --fx: 'Archivo Expanded', system-ui, sans-serif;

  background: var(--parchment);
  color: var(--ink);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bfb *,
.bfb *::before,
.bfb *::after { box-sizing: border-box; }

.bfb a { color: inherit; }

/* ---------- placeholder tile (shown when a post has no featured image) ---- */
.bfb .ph {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2a33 0%, #0D0F0E 55%, #12232b 100%);
  display: flex;
  align-items: flex-end;
  min-height: 100%;
}
.bfb .ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 123, 193, .28) 0%, transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(224, 187, 127, .16) 0%, transparent 50%);
}
.bfb .ph-cap {
  position: relative;
  z-index: 1;
  padding: 1rem 1.25rem;
  font-family: var(--fx);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  border-top: 1px solid rgba(255, 255, 255, .14);
  width: 100%;
  background: rgba(13, 15, 14, .35);
}

/* ---------- shared type ---------- */
.bfb .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  font-family: var(--fx);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.4rem;
}
.bfb .eyebrow::before {
  content: '';
  width: 2.5rem;
  height: 2px;
  background: var(--sand);
}
.bfb .h2 {
  font-family: var(--fd);
  font-weight: 300;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -.01em;
  margin: 0;
}
.bfb .h2 em { font-style: italic; color: var(--blue); }

.bfb .btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--fx);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .85rem 1.6rem;
  transition: all .25s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.bfb .btn-primary { background: var(--blue); color: #fff; }
.bfb .btn-primary:hover { background: var(--blue-deep); color: #fff; }
.bfb .btn-outline-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.bfb .btn-outline-light:hover { background: #fff; color: var(--ink); }

/* ---------- page hero ---------- */
.bfb .page-hero {
  position: relative;
  height: 66vh;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #fff;
}
.bfb .page-hero-img { position: absolute; inset: 0; }
.bfb .page-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.bfb .page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 15, 14, .94) 12%, rgba(13, 15, 14, .4) 55%, rgba(13, 15, 14, .15) 100%);
}
.bfb .page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 3rem 3.5rem;
  width: 100%;
}
.bfb .page-hero h1 {
  font-family: var(--fd);
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.1;
  color: #fff;
  max-width: 20ch;
  margin: 0 0 1.25rem;
}
.bfb .page-hero h1 em { font-style: italic; color: var(--sand-light); }
.bfb .page-hero p {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, .7);
  max-width: 56ch;
  line-height: 1.7;
  margin: 0;
}
.bfb .breadcrumb {
  font-family: var(--fx);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  margin-bottom: 1.5rem;
}
.bfb .breadcrumb a { color: rgba(255, 255, 255, .5); text-decoration: none; }
.bfb .breadcrumb a:hover { color: var(--sand-light); }

/* ---------- listing grid ---------- */
.bfb .portfolio-section {
  max-width: 1500px;
  margin: 0 auto;
  padding: 3.5rem 3rem 2rem;
}
.bfb .portfolio-section-head { margin-bottom: 2.5rem; }
.bfb .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
/* Cards are flex columns so every "Read More" in a row lines up. */
.bfb .project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/*
 * display:block matters — the media is an <a>, and an inline box ignores
 * aspect-ratio, which collapses the tile and lets cards overlap.
 */
.bfb .project-card-media {
  display: block;
  position: relative;
  aspect-ratio: 5/4;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--paper);
}
.bfb .project-card-media .ph { position: absolute; inset: 0; }
.bfb .project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.bfb .project-card:hover .project-card-media img { transform: scale(1.05); }
.bfb .article-meta {
  font-family: var(--fx);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .65;
  margin-bottom: .85rem;
}
.bfb .project-name {
  font-family: var(--fd);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .6rem;
}
.bfb .project-name a { text-decoration: none; }
.bfb .project-name a:hover { color: var(--blue); }
.bfb .project-desc {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 .85rem;
}
.bfb .project-link {
  font-family: var(--fx);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  margin-top: auto;
  align-self: flex-start;
  padding-top: .35rem;
}
.bfb .project-link:hover { color: var(--blue-deep); }

.bfb .load-more-note {
  max-width: 1500px;
  margin: 0 auto;
  padding: 1rem 3rem 6.5rem;
  text-align: center;
}
.bfb .load-more-note p { font-size: .86rem; color: var(--ink-soft); font-style: italic; margin: 0; }

/* ---------- pagination ---------- */
.bfb .bfb-pagination {
  max-width: 1500px;
  margin: 0 auto;
  padding: 2rem 3rem 6.5rem;
}
.bfb .bfb-pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.bfb .bfb-pagination .page-numbers {
  font-family: var(--fx);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: .75rem 1.05rem;
  min-width: 2.75rem;
  text-align: center;
  transition: all .2s;
}
.bfb .bfb-pagination .page-numbers:hover { background: var(--ink); color: var(--parchment); border-color: var(--ink); }
.bfb .bfb-pagination .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }
.bfb .bfb-pagination .page-numbers.dots { border-color: transparent; }

/* ---------- single post ---------- */
.bfb .post-meta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--fx);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  margin-top: 1.5rem;
}
.bfb .post-meta-row span + span::before {
  content: '·';
  margin-right: 1.25rem;
  opacity: .5;
}

/* Article measure. Change --post-measure to widen or narrow the whole body. */
.bfb .post-wrap {
  --post-measure: 1240px;

  max-width: var(--post-measure);
  margin: 0 auto;
  padding: 5rem 3rem 6.5rem;
}
.bfb .post-body { max-width: none; margin: 0 auto; }

/* prose */
.bfb .post-body > *:first-child { margin-top: 0; }
.bfb .post-body p {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--ink-soft);
  margin: 0 0 1.35rem;
}
.bfb .post-body p:first-of-type {
  font-size: 1.18rem;
  line-height: 1.8;
  color: var(--ink);
}
.bfb .post-body h2,
.bfb .post-body h3,
.bfb .post-body h4 {
  font-family: var(--fd);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  margin: 2.75rem 0 1rem;
}
.bfb .post-body h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); font-weight: 300; }
.bfb .post-body h3 { font-size: 1.45rem; }
.bfb .post-body h4 { font-size: 1.2rem; }
.bfb .post-body h5,
.bfb .post-body h6 {
  font-family: var(--fx);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 2.25rem 0 .85rem;
}
.bfb .post-body a { color: var(--blue); text-decoration: underline; text-underline-offset: .18em; }
.bfb .post-body a:hover { color: var(--blue-deep); }
.bfb .post-body strong { font-weight: 600; color: var(--ink); }
.bfb .post-body ul,
.bfb .post-body ol { margin: 0 0 1.35rem; padding-left: 1.35rem; color: var(--ink-soft); }
.bfb .post-body li { margin-bottom: .6rem; line-height: 1.8; }
.bfb .post-body blockquote {
  border-left: 2px solid var(--sand);
  padding: .25rem 0 .25rem 1.75rem;
  margin: 2.25rem 0;
}
.bfb .post-body blockquote p {
  font-family: var(--fd);
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--ink);
}
.bfb .post-body blockquote cite {
  display: block;
  margin-top: .9rem;
  font-family: var(--fx);
  font-style: normal;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
}
.bfb .post-body img {
  max-width: 100%;
  height: auto;
  display: block;
}
.bfb .post-body figure { margin: 2.25rem 0; }
.bfb .post-body figcaption {
  font-family: var(--fx);
  font-size: .6rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .7;
  margin-top: .75rem;
}
.bfb .post-body hr { border: none; border-top: 1px solid var(--rule); margin: 3rem 0; }
.bfb .post-body iframe,
.bfb .post-body video { max-width: 100%; }
.bfb .post-body table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: .92rem; }
.bfb .post-body th,
.bfb .post-body td { border: 1px solid var(--rule); padding: .75rem 1rem; text-align: left; }

/* ---------- galleries ----------
   WordPress prints its own column widths and clearing <br>s for [gallery];
   the !important flags below are what override them. */
.bfb .post-body .gallery,
.bfb .post-body .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin: 2.75rem 0;
}
.bfb .post-body .gallery br { display: none; }
.bfb .post-body .gallery-item {
  margin: 0 !important;
  width: auto !important;
  float: none !important;
  overflow: hidden;
  background: var(--paper);
}
.bfb .post-body .gallery-icon { margin: 0; line-height: 0; }
.bfb .post-body .gallery-icon a { display: block; overflow: hidden; }
.bfb .post-body .gallery img {
  border: none !important;
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .6s ease;
}
.bfb .post-body .gallery-item:hover img { transform: scale(1.05); }
.bfb .post-body .gallery-caption {
  font-family: var(--fx);
  font-size: .58rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .7;
  margin: .6rem 0 0;
  padding: 0 .25rem;
}

@media (max-width: 900px) {
  .bfb .post-body .gallery,
  .bfb .post-body .wp-block-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .bfb .post-body .gallery,
  .bfb .post-body .wp-block-gallery { grid-template-columns: 1fr; }
}

/* article footer + sidebar */
.bfb .post-footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.bfb .post-tags {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.bfb .post-tags a {
  font-family: var(--fx);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: .5rem .9rem;
  text-decoration: none;
  transition: all .2s;
}
.bfb .post-tags a:hover { background: var(--ink); color: var(--parchment); border-color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .bfb .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .bfb .page-hero { height: 56vh; min-height: 420px; }
  .bfb .page-hero-inner { padding: 0 1.5rem 2.5rem; }
  .bfb .portfolio-section { padding: 2.5rem 1.5rem 1rem; }
  .bfb .portfolio-grid { grid-template-columns: 1fr; }
  .bfb .post-wrap { padding: 3rem 1.5rem 4rem; }
  .bfb .load-more-note,
  .bfb .bfb-pagination { padding-left: 1.5rem; padding-right: 1.5rem; }
  .bfb .load-more-note { padding-bottom: 4rem; }
}

/* Extra breathing room when the listing has no Elementor banner above it. */
.bfb-listing--nobanner .portfolio-section { padding-top: 6rem; }
