/* Funeral fund detail page. */

.funeral-fund {
    padding-bottom: clamp(2rem, 6vw, 4.5rem);
    --document-page-gutter: clamp(1rem, 4vw, 4rem);
    --document-media-width: min(980px, 100%);
    --document-media-height: min(84vh, 1400px);
    --document-media-height-mobile: min(78vh, 980px);
    --ff-download-text: var(--mint-cta-text);
    --ff-download-border: var(--mint-cta-border);
    --ff-download-bg: var(--mint-cta-bg);
    --ff-download-bg-hover: var(--mint-cta-bg-hover);
    --ff-download-shadow: var(--mint-cta-shadow);
    --ff-download-shadow-hover: var(--mint-cta-shadow-hover);
}

.funeral-fund__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    justify-items: center;
}

/* XL: Desktop two-column layout (1220px) */
@media (min-width: 1220px) {
    .funeral-fund__layout {
        grid-template-columns: 1fr 1fr;
        gap: clamp(2rem, 4vw, 4rem);
        align-items: start;
    }

    .funeral-fund__media,
    .funeral-fund__content {
        width: 100%;
        max-width: 100%;
    }
}

.funeral-fund__media {
    width: var(--document-media-width);
    max-width: 100%;
}

.funeral-fund__media-frame {
    width: 100%;
    height: var(--document-media-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.funeral-fund__media img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    background: transparent;
}

.funeral-fund__media-actions {
    margin-bottom: .75rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}

/* Ensure media content (frame or placeholder) starts at the same top edge as the sibling content column */
.funeral-fund__media > *:first-child {
    margin-top: 0;
}

.funeral-fund__media-actions .cta-button {
    padding: .7rem 1.2rem;
    font-size: 1rem;
    white-space: nowrap;
}

.funeral-fund__view {
    border: 1px solid rgba(148, 163, 184, .45);
    background: rgba(15, 23, 42, .7);
    color: #f8fafc;
    letter-spacing: .04em;
}

body[data-theme=light] .funeral-fund__view {
    background: rgba(248, 250, 252, .95);
    color: #0f172a;
}

.funeral-fund__view:hover,
.funeral-fund__view:focus-visible {
    transform: translateY(-2px);
}

.funeral-fund__download {
    border: 1px solid var(--ff-download-border);
    background: var(--ff-download-bg);
    color: var(--ff-download-text);
    box-shadow: var(--ff-download-shadow);
    letter-spacing: .04em;
}

.funeral-fund__download:hover,
.funeral-fund__download:focus-visible {
    transform: translateY(-2px);
    background: var(--ff-download-bg-hover);
    box-shadow: var(--ff-download-shadow-hover);
}

.funeral-fund__download:focus-visible {
    outline: 3px solid var(--mint-cta-focus);
    outline-offset: 3px;
}

.funeral-fund__placeholder {
    position: relative;
    width: var(--document-media-width);
    max-width: 100%;
    height: var(--document-media-height);
    border-radius: 20px;
    border: 1px dashed var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 600;
    overflow: hidden
}

.funeral-fund__placeholder::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: .7
}

.funeral-fund__content h2 {
    margin: 0 0 1rem;
}

.funeral-fund__content {
    width: var(--document-media-width);
    max-width: 100%;
}

.funeral-fund__description {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: clamp(1rem, 1.2vw + 0.75rem, 1.5rem);
    line-height: 1.65;
}

/* LG: Small laptop breakpoint (1024px) - consolidated from 900px */
@media (max-width: 1024px) {
    .funeral-fund__media-frame,
    .funeral-fund__placeholder {
        height: var(--document-media-height-mobile);
    }

    .funeral-fund__media-actions .cta-button {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        white-space: normal;
    }
}
