/* =================================================================
   Sallaum Lines — WordPress bridges
   Lets real uploaded images sit on top of the gradient .photo
   placeholders, and keeps menus / admin-bar offsets correct.
   Loaded last, after tokens.css + site.css.
   ================================================================= */

/* ---- Real image inside a .photo placeholder ---------------------- */
.photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: block;
}
/* When a real photo is present, drop the decorative grid + watermark
   and the placeholder caption so the image reads cleanly. */
.photo.has-img::before,
.photo.has-img::after { display: none; }
.photo.has-img .photo__label { display: none; }

/* ---- Split tiles (At Sea / On Land) real images ------------------ */
.split-tile__bg.has-img { background: none; }
.split-tile__bg .split-tile__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}

/* ---- Culture banner / wavemakers full-bleed images --------------- */
.culture-banner .photo__img,
.wavemakers__media .photo__img { z-index: 0; }

/* ---- ESG full-shot real image ----------------------------------- */
.esg-fullshot__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.esg-intro__media img,
.esg-intro__media .esg-intro__img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--sl-r-sm); }

/* ---- WP admin bar offset for the fixed header -------------------- */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ---- wp_nav_menu desktop parity --------------------------------- */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 30px; }
.site-nav li { margin: 0; }

/* ---- News / blog cards ------------------------------------------ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 8px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }
.news-card { display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--sl-canvas-line);
  border-radius: var(--sl-r-md); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--sl-shadow-md); }
.news-card__media { position: relative; aspect-ratio: 16/10; background: var(--sl-ink); overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card__body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.news-card__meta { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sl-fg-muted); font-weight: 700; margin: 0 0 12px; }
.news-card__title { color: var(--sl-ink); font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.18; margin: 0 0 12px; }
.news-card__excerpt { color: var(--sl-fg-muted); font-size: 15px; line-height: 1.55; margin: 0 0 20px; }
.news-card__more { margin-top: auto; color: var(--sl-red); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }

/* ---- Single post (article) -------------------------------------- */
.post-article { max-width: 760px; margin: 0 auto; }
.post-article__body { color: var(--sl-fg); font-size: 18px; line-height: 1.7; }
.post-article__body p { margin: 0 0 22px; }
.post-article__body h2 { font-size: 30px; font-weight: 800; letter-spacing: -.6px; margin: 40px 0 16px; color: var(--sl-ink); }
.post-article__body h3 { font-size: 23px; font-weight: 800; margin: 32px 0 12px; color: var(--sl-ink); }
.post-article__body img { max-width: 100%; height: auto; border-radius: var(--sl-r-sm); margin: 12px 0; }
.post-article__body ul, .post-article__body ol { margin: 0 0 22px; padding-left: 22px; }
.post-article__body a { color: var(--sl-red); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Editor-friendly safety ------------------------------------- */
.sl-rte > :first-child { margin-top: 0; }
.sl-rte > :last-child { margin-bottom: 0; }

/* =================================================================
   FREEFORM BLOCK ZONE (.sl-blocks)
   Output of the WordPress block editor: Sallaum ACF Blocks render
   their own full-width <section>s; core blocks (text, image, columns,
   buttons) are centered in the brand container and styled on-brand.
   ================================================================= */
.sl-blocks { width: 100%; }

/* Branded section blocks already manage their own width — leave them full. */
.sl-blocks > section,
.sl-blocks > .culture-banner,
.sl-blocks > .split-tiles { width: 100%; }

/* Center loose core blocks in the brand container. */
.sl-blocks > p,
.sl-blocks > h1, .sl-blocks > h2, .sl-blocks > h3,
.sl-blocks > h4, .sl-blocks > h5, .sl-blocks > h6,
.sl-blocks > ul, .sl-blocks > ol, .sl-blocks > blockquote,
.sl-blocks > figure,
.sl-blocks > .wp-block-image,
.sl-blocks > .wp-block-columns,
.sl-blocks > .wp-block-buttons,
.sl-blocks > .wp-block-group,
.sl-blocks > .wp-block-quote,
.sl-blocks > .wp-block-gallery,
.sl-blocks > .wp-block-embed,
.sl-blocks > .wp-block-list {
  max-width: var(--sl-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 32px;
  padding-right: 32px;
  margin-top: var(--sl-sp-2xl);
  margin-bottom: var(--sl-sp-2xl);
}
.sl-blocks > .alignfull { max-width: none; padding-left: 0; padding-right: 0; }

/* Give the freeform text zone breathing room top & bottom. */
.sl-blocks > :where(p, h1, h2, h3, ul, ol, figure, .wp-block-columns, .wp-block-buttons):first-child { margin-top: var(--sl-sp-5xl); }
.sl-blocks > :where(p, h1, h2, h3, ul, ol, figure, .wp-block-columns, .wp-block-buttons):last-child { margin-bottom: var(--sl-sp-5xl); }

/* On-brand core typography & controls inside the zone. */
.sl-blocks h2 { font-size: var(--sl-display-sm-size); font-weight: 800; letter-spacing: -.6px; text-transform: uppercase; color: var(--sl-ink); line-height: 1.08; }
.sl-blocks h3 { font-size: var(--sl-display-xs-size); font-weight: 800; letter-spacing: -.3px; color: var(--sl-ink); }
.sl-blocks p { font-size: var(--sl-body-md-size); line-height: var(--sl-body-md-lh); color: var(--sl-fg); }
.sl-blocks a:not(.sl-btn):not(.wp-block-button__link) { color: var(--sl-red); text-decoration: underline; text-underline-offset: 3px; }
.sl-blocks img { border-radius: var(--sl-r-sm); }
.sl-blocks .wp-block-button__link {
  background: var(--sl-red); color: #fff; border: 0; border-radius: var(--sl-r-pill);
  padding: 14px 32px; font-weight: 700; font-family: var(--sl-font); transition: background .18s ease;
}
.sl-blocks .wp-block-button__link:hover { background: var(--sl-red-deep); }
.sl-blocks .is-style-outline .wp-block-button__link { background: transparent; color: var(--sl-ink); border: 1.5px solid var(--sl-ink); }

/* Canvas-template pages: clear the fixed header when the page starts with
   a loose core block rather than a section block. */
.sl-blocks--full > :first-child:not(section):not(.culture-banner):not(.split-tiles) { margin-top: 110px; }

/* Centered CTA band block. */
.sl-cta-band { max-width: 720px; margin: 0 auto; text-align: center; }
.sl-cta-band .eyebrow { margin-bottom: 18px; }
.sl-cta-band__title { margin: 0 0 14px; }
.sl-cta-band__text { margin: 0 auto 28px; max-width: 52ch; }

/* Media & copy flip parity (copy first in DOM = grid handles order). */
.wavemakers { align-items: center; }

/* Media & copy: wider, more edge-attached container (smaller L/R margins). */
.sl-block--media-copy .container {
  max-width: none;
  padding-left: clamp(24px, 4vw, 72px);
  padding-right: clamp(24px, 4vw, 72px);
}
