/* ─────────────────────────────
   NOSTRIA-STORIA.CSS — Lo Castro "Our Story" page
   wp-content/themes/twentytwentyfive-child/styles/nostra-storia.css

   Ports the Next.js frontend's NostraStoriaPage.tsx (styled-components)
   into plain CSS on the [lc_nostra_storia] shortcode's markup, using the
   same --lc-* design tokens as the rest of the WooCommerce side.
   ───────────────────────────── */

:root {
  --lc-border-strong: rgba(74, 47, 27, 0.32);
  --lc-track-wide: 0.14em;
  --lc-track-default: 0.06em;
}

.lc-storia {
  font-family: var(--lc-font-serif);
  color: var(--lc-text);
}

/* ── Hero ── */
.lc-storia-hero {
  padding: 34px 20px;
  text-align: center;
  border-bottom: 1px solid var(--lc-border-subtle);
}

.lc-storia-hero-title {
  margin: 12px 0 0;
  font-family: var(--lc-font-display);
  font-size: 14px;
  letter-spacing: var(--lc-track-wide);
  text-transform: uppercase;
  font-weight: 600;
}

.lc-storia-hero-desc {
  margin: 14px auto 0;
  max-width: 74ch;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.7;
}

/* ── Content wrap ── */
.lc-storia-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 20px 70px;
}

/* WordPress's block-theme "constrained" layout (applied by the Post
   Content block itself, independent of which page template is used —
   "Page No Title" only removes the Featured Image/Title blocks, it
   doesn't remove this) caps width and adds side padding around
   whatever's inside it. Since this file only ever loads on the Nostra
   Storia page (is_page('nostra-storia') in functions.php), it's safe to
   fully neutralize it here — same fix as wishlist.css. */
.entry-content.is-layout-constrained {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* WordPress's global block-spacing style also injects max-width and
   margin-block-start on every direct child of .is-layout-constrained
   (all via low-specificity :where() selectors, easily overridden
   here) — neutralize both, or the first section gets squeezed width
   and an unwanted gap under the header. */
.entry-content.is-layout-constrained > * {
  max-width: none !important;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

/* ── Fold grid: outer frame carries border-top + border-left only,
   matching the Grid pattern used elsewhere (account.css) ── */
.lc-storia-grid {
  border-top: 1px solid var(--lc-border-strong);
  border-left: 1px solid var(--lc-border-strong);
}

.lc-storia-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 980px) {
  .lc-storia-row {
    grid-template-columns: 1fr;
  }
}

.lc-storia-panel {
  border-right: 1px solid var(--lc-border-strong);
  border-bottom: 1px solid var(--lc-border-strong);
  padding: 48px 34px 54px;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .lc-storia-panel {
    padding: 28px 18px 32px;
  }
}

.lc-storia-kicker {
  margin: 0;
  font-family: var(--lc-font-display);
  font-size: 10px;
  letter-spacing: var(--lc-track-wide);
  text-transform: uppercase;
  opacity: 0.7;
}

.lc-storia-h2 {
  margin: 12px 0 0;
  font-family: var(--lc-font-display);
  font-size: 16px;
  letter-spacing: var(--lc-track-default);
  text-transform: uppercase;
  font-weight: 600;
}

.lc-storia-p {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.75;
  max-width: 70ch;
}

.lc-storia-p em {
  font-style: normal;
  opacity: 1;
}

/* ── Media panel with caption overlay ── */
.lc-storia-media {
  border-right: 1px solid var(--lc-border-strong);
  border-bottom: 1px solid var(--lc-border-strong);
  background: var(--lc-surface);
  position: relative;
  min-height: 520px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Shown in place of a photo that hasn't been uploaded yet — see
   locastro_storia_placeholder() in inc/nostra-storia-shortcode.php.
   Fills the same space a real photo would, so nothing shifts once
   images are added. */
.lc-storia-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: repeating-linear-gradient(
    45deg,
    var(--lc-border, #e6ddd0),
    var(--lc-border, #e6ddd0) 1px,
    transparent 1px,
    transparent 14px
  ), var(--lc-surface);
}

.lc-storia-media-placeholder span {
  font-family: var(--lc-font-serif, serif);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--lc-text-muted, #8a7f6d);
}

@media (max-width: 980px) {
  .lc-storia-media {
    min-height: 380px;
  }
}

.lc-storia-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lc-storia-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(74, 47, 27, 0.55);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 560px) {
  .lc-storia-caption {
    flex-direction: column;
    align-items: flex-start;
  }
}

.lc-storia-caption-left {
  display: grid;
  gap: 4px;
}

.lc-storia-caption-k {
  font-family: var(--lc-font-display);
  font-size: 10px;
  letter-spacing: var(--lc-track-wide);
  text-transform: uppercase;
  opacity: 0.9;
}

.lc-storia-caption-v {
  font-size: 12px;
  letter-spacing: var(--lc-track-default);
  opacity: 0.85;
}

.lc-storia-ghostlink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  padding: 10px 12px;
  font-family: var(--lc-font-display);
  font-size: 12px;
  letter-spacing: var(--lc-track-default);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.lc-storia-ghostlink:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.45);
}

.lc-storia-ghostlink svg {
  width: 16px;
  height: 16px;
}

/* Dark-on-light variant, used outside the image caption overlay
   (Fold 3's "Inizia il percorso" sits on the page background, not a
   photo, so it needs the brand's own text color instead of white). */
.lc-storia-ghostlink-dark {
  border-color: var(--lc-border);
  color: var(--lc-text);
}

.lc-storia-ghostlink-dark:hover {
  border-color: var(--lc-border-strong);
}

/* ── Fold 3: full-width bordered box ── */
.lc-storia-fullfold {
  border-right: 1px solid var(--lc-border-strong);
  border-bottom: 1px solid var(--lc-border-strong);
  padding: 54px 34px 62px;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .lc-storia-fullfold {
    padding: 34px 18px 42px;
  }
}

.lc-storia-wide {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 980px) {
  .lc-storia-wide {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.lc-storia-quote {
  margin: 16px 0 0;
  border: 1px solid var(--lc-border);
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.85;
  font-style: normal;
}

.lc-storia-minigrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 560px) {
  .lc-storia-minigrid {
    grid-template-columns: 1fr;
  }
}

.lc-storia-minimedia {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--lc-border);
  background: var(--lc-surface);
  overflow: hidden;
}

.lc-storia-minimedia img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lc-storia-fullfold .lc-storia-ghostlink-dark {
  margin-top: 16px;
}