/*
 * Mandale Editorial Luxury - article style
 * Loaded ONLY on posts tagged "editorial-luxury" (see mandale-editorial-style.php).
 * Every rule is scoped to body.mandale-editorial so nothing leaks into the rest of the site.
 */

body.mandale-editorial {
    --mandale-black: #0D0D0D;
    --mandale-gold: #BB9A6C;
    --mandale-ivory: #F5F2EB;
    --mandale-green: #006039;
    --mandale-ink: #2b2924;
    --mandale-faint: #8a8578;
    overflow-x: clip;
}

/* Article canvas: ivory. The site footer is outside <main> and stays untouched. */
body.mandale-editorial main.wp-block-group {
    background: var(--mandale-ivory);
}

/* ------------------------------------------------------------------ */
/* Title (rendered by the theme; the pattern never duplicates the H1)  */
/* ------------------------------------------------------------------ */
body.mandale-editorial h1.wp-block-post-title {
    font-family: 'Italiana', serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.12;
    letter-spacing: 0.04em;
    text-align: center;
    color: var(--mandale-black);
    margin-left: auto;
    margin-right: auto;
    max-width: 22ch;
}

/* Credit line: the theme already renders DATE • AUTHOR right under the
   title. We style that row instead of duplicating it in the pattern. */
body.mandale-editorial h1.wp-block-post-title + .wp-block-group {
    justify-content: center;
}
body.mandale-editorial .wp-block-post-date,
body.mandale-editorial .wp-block-post-date a,
body.mandale-editorial .wp-block-post-author-name,
body.mandale-editorial .wp-block-post-author-name a {
    font-family: 'Jost', sans-serif;
    font-weight: 300 !important;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--mandale-faint);
    text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Body copy                                                           */
/* ------------------------------------------------------------------ */
body.mandale-editorial .wp-block-post-content p {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--mandale-ink);
}

body.mandale-editorial .wp-block-post-content h2 {
    font-family: 'Italiana', serif;
    font-weight: 400;
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-align: center;
    color: var(--mandale-black);
    margin-top: 4.5rem;
    margin-bottom: 1.5rem;
}

/* Standfirst: one or two lines, larger, weight 300 */
body.mandale-editorial .mandale-standfirst {
    font-size: 1.35rem !important;
    line-height: 1.6 !important;
    text-align: center;
    max-width: 46ch;
    margin-left: auto !important;
    margin-right: auto !important;
    color: var(--mandale-ink);
}

/* Entry paragraph */
body.mandale-editorial .mandale-lede {
    font-size: 1.08rem !important;
    max-width: 62ch;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Detail line inside each section: address / key fact */
body.mandale-editorial .mandale-detail {
    font-style: italic;
    font-size: 0.85rem !important;
    letter-spacing: 0.02em;
    color: var(--mandale-faint);
}

/* ------------------------------------------------------------------ */
/* Breakouts. The theme nests post content in an 800px column, so wide */
/* and full blocks need a viewport breakout, scoped to this style.     */
/* ------------------------------------------------------------------ */
body.mandale-editorial .wp-block-post-content > .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
body.mandale-editorial .wp-block-post-content > .alignwide,
body.mandale-editorial .wp-block-post-content > .mandale-caption {
    width: min(1200px, 92vw);
    max-width: none;
    margin-left: calc(50% - min(600px, 46vw));
    margin-right: calc(50% - min(600px, 46vw));
}

/* ------------------------------------------------------------------ */
/* Hero cover                                                          */
/* ------------------------------------------------------------------ */
body.mandale-editorial .mandale-hero {
    min-height: 80vh;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}
body.mandale-editorial .mandale-hero .wp-block-cover__background {
    opacity: 0.15 !important;
    background-color: var(--mandale-black) !important;
}

/* ------------------------------------------------------------------ */
/* Editorial section: media & text                                     */
/* ------------------------------------------------------------------ */
body.mandale-editorial .wp-block-media-text.mandale-section {
    column-gap: clamp(1.5rem, 4vw, 4rem);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    background: transparent;
}
/* The theme paints a solid background behind media-text columns; keep the ivory canvas clean. */
body.mandale-editorial .wp-block-media-text.mandale-section .wp-block-media-text__content {
    background: transparent;
}
body.mandale-editorial .mandale-section .wp-block-media-text__media img {
    width: 100%;
    height: auto;
    display: block;
}
body.mandale-editorial .mandale-section .wp-block-media-text__content {
    padding: 0 5%;
}

/* Captions: small, italic, faint */
body.mandale-editorial .wp-block-post-content figcaption {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: 0.78rem;
    color: var(--mandale-faint);
    margin-top: 0.6rem;
}
body.mandale-editorial .mandale-caption {
    margin-top: 0.75rem;
    margin-bottom: 3rem;
}
body.mandale-editorial .mandale-caption.caption-left { text-align: left; }
body.mandale-editorial .mandale-caption.caption-right { text-align: right; }

/* Optional full-width landscape image inside a section */
body.mandale-editorial .mandale-wide-image {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}
body.mandale-editorial .mandale-wide-image img {
    width: 100%;
    height: auto;
}
body.mandale-editorial .mandale-wide-image figcaption {
    text-align: center;
}

/* ------------------------------------------------------------------ */
/* KPI table: thin gold top border, Jost, no default black header      */
/* ------------------------------------------------------------------ */
body.mandale-editorial .wp-block-table {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}
body.mandale-editorial .wp-block-table table {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: 0.92rem;
    border-collapse: collapse;
    width: 100%;
    border-top: 2px solid var(--mandale-gold);
}
body.mandale-editorial .wp-block-table th {
    background: transparent;
    color: var(--mandale-black);
    font-weight: 500;
    text-align: left;
    letter-spacing: 0.03em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--mandale-gold);
}
body.mandale-editorial .wp-block-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(187, 154, 108, 0.25);
    vertical-align: top;
    color: var(--mandale-ink);
}

/* ------------------------------------------------------------------ */
/* FAQ: H3 questions inherit heading treatment but sit closer together */
/* ------------------------------------------------------------------ */
body.mandale-editorial .wp-block-post-content h3 {
    font-family: 'Italiana', serif;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--mandale-black);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Close                                                               */
/* ------------------------------------------------------------------ */
body.mandale-editorial .mandale-sep {
    border: none;
    border-top: 1px solid var(--mandale-gold);
    opacity: 0.6;
    max-width: 120px;
    margin: 4rem auto 2rem;
}
body.mandale-editorial .mandale-continue {
    text-align: center;
    font-size: 0.9rem !important;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
body.mandale-editorial .mandale-continue a {
    color: var(--mandale-green);
    text-decoration: none;
    border-bottom: 1px solid var(--mandale-gold);
}

/* ------------------------------------------------------------------ */
/* Reveal on scroll (classes are added by JS; no-JS users see all)     */
/* ------------------------------------------------------------------ */
body.mandale-editorial .mnd-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
body.mandale-editorial .mnd-reveal.mnd-in {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    body.mandale-editorial .mnd-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Mobile */
@media (max-width: 781px) {
    body.mandale-editorial .mandale-hero { min-height: 65vh; }
    body.mandale-editorial .mandale-section .wp-block-media-text__content {
        padding: 1.5rem 0 0;
    }
    body.mandale-editorial .mandale-caption.caption-left,
    body.mandale-editorial .mandale-caption.caption-right {
        text-align: center;
    }
}
