/* ==========================================================================
   hodhod — article shape «الصورة أولاً — بحجمها الطبيعي»
   (PostStyleEnum::HODHOD_V2 — resources/views/livewire/main/hod-hod/single-post-v2.blade.php)

   Loaded ONLY by that template, and every selector below is scoped under `.hh2`
   (the class on the article page's own <section>). Nothing here can reach the V1
   article page, which keeps its .article-featured-img crop untouched.

   Same fonts, same tokens, same components as the rest of the theme — the
   variables come from css/global.css (--color-primary #211D75, --color-accent
   #FFB824, the --space-* / --radius-* / --font-* scales). A different layout,
   not a different brand.
   ========================================================================== */

.hh2 .hh2-header {
    margin-bottom: var(--space-md);
}

/* --------------------------------------------------------------------------
   The plate — the picture and the words that belong to the picture.

   One column by default. It becomes two only when there is really something to
   put in the second one (the template adds .hh2-plate--split); with no caption
   and no standfirst the picture just takes the whole column, so the layout can
   never draw an empty box beside it.
   -------------------------------------------------------------------------- */
.hh2 .hh2-plate {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
    margin: 0 0 var(--space-lg);
}

.hh2 .hh2-plate--split {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    align-items: start;
}

/* The main column is already 9/12 of the container; below ~1200px there is no
   room for a second column inside it, so the context stacks under the picture
   rather than squeezing it. */
@media (max-width: 1199.98px) {
    .hh2 .hh2-plate--split {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --------------------------------------------------------------------------
   The picture.

   THIS is the whole point of the shape: the width follows the column, the
   height follows the file. No aspect-ratio, no object-fit, no max-height, no
   scrim, nothing laid over it. hodhod's infographics and caricatures ARE the
   article — a fixed crop makes them unreadable, which is why V1's
   `.article-featured-img img { height: 500px; object-fit: cover }` is not
   reused here.

   The file's intrinsic size is not known server-side (the files table stores no
   width/height), so no width/height attributes are emitted and the box grows
   when the image decodes. The frame below reserves the visual space with a
   surface colour so the reflow lands on something, rather than on white.
   -------------------------------------------------------------------------- */
.hh2 .hh2-shot {
    min-width: 0;
}

.hh2 .hh2-shot__img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: zoom-in;
}

/* The affordance sits UNDER the picture, never on it. */
.hh2 .hh2-shot__bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

/* Same chip the theme uses for tags (#EBEBFA on #C4C2F0), so the control reads
   as part of hodhod and not as a bolted-on viewer button. */
.hh2 .hh2-zoom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-family: inherit;
    font-size: var(--font-xs);
    line-height: 1.6;
    color: var(--color-primary);
    background: #EBEBFA;
    border: 1px solid #C4C2F0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.hh2 .hh2-zoom:hover,
.hh2 .hh2-zoom:focus-visible {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.hh2 .hh2-zoom i {
    font-size: 13px;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   The context beside the picture: the picture's own description, then the
   standfirst. Each line is printed only when it exists, so this block is never
   a heading over nothing.
   -------------------------------------------------------------------------- */
.hh2 .hh2-context {
    min-width: 0;
    margin: 0;
    padding: var(--space-sm);
    background: var(--color-accent-light-bg);
    border-radius: var(--radius-md);
    border-inline-start: 3px solid var(--color-accent);
}

.hh2 .hh2-context__cap {
    margin: 0;
    font-size: var(--font-sm);
    font-weight: 700;
    line-height: 1.7;
    color: var(--text-primary);
}

.hh2 .hh2-context__lead {
    margin: 0;
    font-size: var(--font-sm);
    line-height: 1.9;
    color: var(--text-secondary);
}

/* Only when both are present is there a seam to draw. */
.hh2 .hh2-context__cap + .hh2-context__lead {
    margin-top: var(--space-xs);
    padding-top: var(--space-xs);
    border-top: 1px dashed rgba(33, 29, 117, 0.18);
}

/* Stacked (narrow screens, or no split at all) the block reads as a caption
   under the picture rather than as a side panel. */
@media (max-width: 1199.98px) {
    .hh2 .hh2-plate--split .hh2-context {
        margin-top: calc(var(--space-xs) * -1);
    }
}

@media (max-width: 575.98px) {
    .hh2 .hh2-context {
        padding: var(--space-xs) var(--space-sm);
    }

    .hh2 .hh2-zoom {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   The prose below. It keeps every V1 rule (.article-body, .tags, .article-tags
   are theme-wide); the only thing this shape adds is the breathing room the
   plate used to get from .article-featured-img's own margin.
   -------------------------------------------------------------------------- */
.hh2 .hh2-content > .article-body {
    margin-bottom: var(--space-md);
}
