/* ============================================================================
   Workspace advertisement cards: the ONE definition (Directive 40, OD6 and OD9).

   Used by the public New Construction and Dining and Entertainment pages (their non-featured branch) and by the
   design editor's step 4 preview, all through hoa/partials/placement_cards.html. Every rule is scoped to the
   workspace card classes (.nf-placements, .placement-cards--*, .placement-card*), which Coconut Creek's
   hand-built cards (.featured-restaurant-*, .featured-project-*) never use, so these rules cannot change them.
   The duplicates that used to live in construction.css and restaurants.css were removed.

   Layout is chosen from the placement's category (advertiser_billing.placement_cards):
     Dining            -> .placement-card--stacked:    image above the text; two-column grid on desktop.
     New Construction  -> .placement-card--horizontal: image left, text right; stacks on a phone.
   Each layout has a FIXED image shape (aspect-ratio), cover-cropped from the centre, so the text can never set the
   image's height and the preview crops the same image exactly as the public page does.
   ============================================================================ */

.nf-placements {
    margin-bottom: 24px;
}

/* ── The list ─────────────────────────────────────────────────────────────── */
.placement-cards--horizontal {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.placement-cards--stacked {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));   /* a single card takes the first column only */
    gap: 20px;
}

/* Same breakpoint as the Coconut Creek Dining grid: one column from tablet down. */
@media (max-width: 1024px) {
    .placement-cards--stacked {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ── The card ─────────────────────────────────────────────────────────────── */
.placement-card {
    background: #fff;
    overflow: hidden;
    min-width: 0;
}

.placement-card__media {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

/* The image fills a box whose shape is fixed by the layout; absolute positioning keeps the image's own size
   (and the text beside it) from ever changing that box. */
.placement-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    display: block;
}

.placement-card__body {
    min-width: 0;
}

.placement-card__headline,
.placement-card__subtitle,
.placement-card__text,
.placement-card__feature {
    overflow-wrap: anywhere;          /* a long word or address wraps instead of overflowing; never clipped */
}

.placement-card__headline {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark, #1a1a1a);
}

.placement-card__subtitle {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted, #666);
}

.placement-card__text {
    font-family: 'Inter', sans-serif;
    color: #374151;
    line-height: 1.6;
    white-space: pre-line;
}

.placement-card__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.placement-card__feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-body, #444);
    line-height: 1.3;
}

.placement-card__check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Outlined brand-orange, uppercase Inter, inverts on hover (the shipped CTA convention). Stays "Learn More". */
.placement-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px solid var(--brand-orange, #fa611e);
    border-radius: 5px;
    background: #fff;
    color: var(--brand-orange, #fa611e);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.placement-card__cta:hover {
    background: var(--brand-orange, #fa611e);
    color: #fff;
}

/* ── New Construction: horizontal (image left, 4:3) ───────────────────────── */
.placement-card--horizontal {
    display: flex;
    align-items: flex-start;          /* the image keeps its own shape; it is not stretched to the text */
    gap: 20px;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

.placement-card--horizontal .placement-card__media {
    flex: 0 0 40%;
    max-width: 40%;
    aspect-ratio: 4 / 3;
}

.placement-card--horizontal .placement-card__body {
    flex: 1;
    padding: 22px 26px;
}

.placement-card--horizontal .placement-card__headline {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 6px;
}

.placement-card--horizontal .placement-card__subtitle {
    font-size: 16px;
    margin: 0 0 12px;
}

.placement-card--horizontal .placement-card__text {
    font-size: 15px;
    margin: 0 0 18px;
}

.placement-card--horizontal .placement-card__features {
    gap: 10px;
    margin: 0 0 18px;
}

.placement-card--horizontal .placement-card__cta {
    padding: 11px 26px;
    font-size: 13px;
    letter-spacing: 0.6px;
}

@media (max-width: 640px) {
    .placement-card--horizontal {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .placement-card--horizontal .placement-card__media {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
}

/* ── Dining and Entertainment: stacked (image on top, 3:2), the Coconut Creek Dining look ────────────────── */
.placement-card--stacked {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light, #e8e8e8);
    border-radius: 6px;
}

.placement-card--stacked .placement-card__media {
    width: 100%;
    aspect-ratio: 3 / 2;
}

.placement-card--stacked .placement-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 16px 16px;
}

.placement-card--stacked .placement-card__headline {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 8px;
}

.placement-card--stacked .placement-card__subtitle {
    font-size: 15px;
    margin: 0 0 10px;
}

.placement-card--stacked .placement-card__text {
    font-size: 15px;
    margin: 0 0 16px;
}

.placement-card--stacked .placement-card__features {
    gap: 16px;
    margin: 0;
}

.placement-card--stacked .placement-card__cta {
    display: flex;
    width: 100%;
    margin-top: auto;                 /* buttons line up at the bottom of a grid row */
    padding: 21px 16px;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* At least 28px between the content and the button (as on the Coconut Creek Dining cards); the auto margin
   above the button then takes up any extra height in a grid row. */
.placement-card--stacked .placement-card__body > :has(+ .placement-card__cta) {
    margin-bottom: 28px;
}

/* ── The acquisition affordance under the cards (outside the grid) ────────── */
.nf-placements-advertise {
    margin: 12px 0 0;
    text-align: center;
    font-size: 0.9rem;
}

.nf-placements-advertise a {
    color: #b45309;
    text-decoration: underline;
    font-weight: 500;
}

.nf-placements-advertise a:hover {
    color: #92400e;
}
