@font-face {
    font-family: "Canto BOLD";
    src: url("https://www.onoranzefunebribambara.it/wp-content/uploads/2025/07/CantoPen-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
}

.bambara-page {
    --bambara-navy: #0a213b;
    --bambara-gold: #b98f4d;
    --bambara-ink: #1b2740;
    --bambara-muted: #667085;
    --bambara-line: rgba(27, 39, 64, 0.14);
    --bambara-gold-line: rgba(185, 143, 77, 0.42);
    --bambara-page-bg: #fbfaf7;
    --bambara-soft: #f5f1ea;
    --bambara-success: #1d7d4a;
    --bambara-error: #9f3030;
    --bambara-radius: 8px;
    --bambara-shadow: 0 18px 44px rgba(6, 23, 42, 0.08);
    --bambara-image-ratio: 1595 / 1134;
    --bambara-heading-font: "Canto BOLD", Sans-serif;

    margin-top: 0;
    background: var(--bambara-page-bg);
    color: var(--bambara-ink);
    font-family: "Inter Tight", Inter, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
}

body.post-type-archive-necrologio,
body.single-necrologio {
    --bambara-scroll-header-height: 120px;
}

body.post-type-archive-necrologio #scroll-header,
body.post-type-archive-necrologio #scroll-header.scrolled,
body.single-necrologio #scroll-header,
body.single-necrologio #scroll-header.scrolled {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    transition: none !important;
    transform: none !important;
}

body.post-type-archive-necrologio .bambara-page,
body.single-necrologio .bambara-page {
    padding-top: var(--bambara-scroll-header-height);
}

.elementor-1235 .elementor-element.elementor-element-95e71ca {
    padding-top: 40px;
}

.bambara-page,
.bambara-page *,
.bambara-page *::before,
.bambara-page *::after {
    box-sizing: border-box;
}

.bambara-shell {
    width: min(1440px, calc(100% - 72px));
    margin-inline: auto;
}

.bambara-mobile-hero-link {
    display: none;
}

.bambara-archive-hero,
.bambara-single-hero {
    position: relative;
    display: grid;
    min-height: 430px;
    place-items: center;
    padding: 52px 0;
    background:
        linear-gradient(90deg, rgba(6, 23, 42, 0.64), rgba(10, 33, 59, 0.28) 48%, rgba(6, 23, 42, 0.58)),
        linear-gradient(180deg, rgba(6, 23, 42, 0.18), rgba(6, 23, 42, 0.44)),
        url("images/necrologi-hero-bg.png") center / cover no-repeat,
        var(--bambara-navy);
    color: #fff;
    text-align: center;
}

@media (max-width: 768px) {
    body.post-type-archive-necrologio #scroll-header,
    body.post-type-archive-necrologio #scroll-header.scrolled,
    body.single-necrologio #scroll-header,
    body.single-necrologio #scroll-header.scrolled {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        background-color: #ffffff !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08) !important;
        transform: none !important;
    }

    body.post-type-archive-necrologio .bambara-page,
    body.single-necrologio .bambara-page {
        padding-top: 0;
        padding-bottom: var(--bambara-scroll-header-height);
    }

    .bambara-archive-hero,
    .bambara-single-hero {
        z-index: auto;
    }

    .bambara-mobile-hero-link {
        position: absolute;
        top: 18px;
        left: 18px;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: #fff;
        font-family: "Inter Tight", Inter, Arial, sans-serif;
        font-size: 14px;
        font-weight: 400;
        line-height: 1;
        text-decoration: none;
    }

    .bambara-mobile-hero-link span {
        font-size: 18px;
        line-height: 1;
    }
}

.bambara-archive-hero h1,
.bambara-single-hero h1,
.bambara-section-title h2,
.bambara-section-heading h2,
.bambara-condolence-carousel__header h2,
.bambara-flower h2 {
    margin: 0;
    color: inherit;
    font-family: var(--bambara-heading-font);
    font-weight: 600;
}

.bambara-archive-hero h1,
.bambara-single-hero h1 {
    font-size: clamp(3rem, 5.6vw, 5.15rem);
}

.bambara-archive-hero p,
.bambara-single-hero p {
    max-width: 680px;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.08rem, 1.65vw, 1.35rem);
    line-height: 1.4;
}

.bambara-single-hero__meta {
    max-width: 680px;
    margin: 14px auto 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: clamp(1rem, 1.35vw, 1.12rem) !important;
    font-weight: 300;
    line-height: 1.4;
}

.bambara-single-hero__meta:first-child {
    margin-top: 0 !important;
}

.bambara-divider {
    display: block;
    width: 150px;
    height: 1px;
    margin: 18px auto 0;
    background: linear-gradient(90deg, transparent, var(--bambara-gold), transparent);
}

.bambara-section-title {
    margin-bottom: clamp(24px, 3vw, 38px);
    text-align: center;
}

.bambara-section-title h2 {
    color: var(--bambara-ink);
    font-size: clamp(2.35rem, 3.8vw, 3.55rem);
}

.bambara-archive-section {
    padding: 40px 0 clamp(48px, 6vw, 82px);
}

.bambara-empty-state {
    margin: 0;
    padding: 32px;
    border: 1px solid var(--bambara-line);
    border-radius: var(--bambara-radius);
    background: #fff;
    text-align: center;
}

.bambara-obituary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.bambara-obituary-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 246px;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--bambara-line);
    border-radius: var(--bambara-radius);
    background: #fff;
    box-shadow: 0 8px 28px rgba(6, 23, 42, 0.04);
    transition: box-shadow 220ms ease, transform 220ms ease;
}

.bambara-obituary-card__image {
    position: relative;
    display: grid;
    min-height: 0;
    aspect-ratio: var(--bambara-image-ratio);
    place-items: center;
    overflow: hidden;
    border-radius: 0;
    background: linear-gradient(135deg, var(--bambara-soft), #fff);
    color: var(--bambara-gold);
    text-decoration: none;
}

.bambara-obituary-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease, filter 220ms ease;
}

.bambara-obituary-card__image::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 33, 59, 0), rgba(10, 33, 59, 0)),
        rgba(185, 143, 77, 0);
    content: "";
    transition: background 220ms ease;
}

.bambara-obituary-card__image::before {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--bambara-navy);
    content: "→";
    font-size: 1.35rem;
    line-height: 1;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 220ms ease, transform 220ms ease;
}

.bambara-obituary-card:hover {
    box-shadow: 0 16px 36px rgba(6, 23, 42, 0.11);
    transform: translateY(-2px);
}

.bambara-obituary-card:hover .bambara-obituary-card__image img,
.bambara-obituary-card__image:hover img,
.bambara-obituary-card__image:focus img,
.bambara-obituary-card__image:active img {
    filter: saturate(1.14) contrast(0.9) brightness(0.78);
    transform: scale(1.05);
}

.bambara-obituary-card:hover .bambara-obituary-card__image::after,
.bambara-obituary-card__image:hover::after,
.bambara-obituary-card__image:focus::after,
.bambara-obituary-card__image:active::after {
    background:
        linear-gradient(180deg, rgba(185, 143, 77, 0.18), rgba(10, 33, 59, 0.46)),
        rgba(10, 33, 59, 0.24);
}

.bambara-obituary-card:hover .bambara-obituary-card__image::before,
.bambara-obituary-card__image:hover::before,
.bambara-obituary-card__image:focus::before,
.bambara-obituary-card__image:active::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.bambara-obituary-card__body {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
    padding: 18px;
}

.bambara-obituary-card h3 {
    margin: 0;
    color: var(--bambara-ink);
    font-family: var(--bambara-heading-font);
    font-size: clamp(1.35rem, 1.45vw, 1.75rem);
    font-weight: 500;
    line-height: 1.1;
}

.bambara-obituary-card h3 a {
    color: inherit;
    text-decoration: none;
}

.bambara-obituary-card__type {
    margin: 0;
    color: var(--bambara-muted);
    font-size: 0.98rem;
    font-weight: 300;
    letter-spacing: 0;
}

.bambara-obituary-card__meta,
.bambara-obituary-card__date,
.bambara-single-header__location {
    margin: 0;
    color: var(--bambara-muted);
    font-size: 0.98rem;
    font-weight: 300;
}

.bambara-obituary-card__date {
    font-size: 0.98rem;
    line-height: 1.35;
}

.bambara-obituary-card__actions,
.bambara-single-actions,
.bambara-flower__actions {
    display: grid;
    gap: 9px;
    margin-top: 8px;
}

.bambara-button,
.bambara-condolence-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.68rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.bambara-page .bambara-button--primary,
.bambara-page .bambara-condolence-form button.bambara-button {
    border-color: var(--bambara-navy) !important;
    background: var(--bambara-navy) !important;
    color: #fff !important;
}

.bambara-page .bambara-button--primary:hover,
.bambara-page .bambara-condolence-form button.bambara-button:hover {
    border-color: var(--bambara-gold) !important;
    background: var(--bambara-gold) !important;
    color: #fff !important;
}

.bambara-page .bambara-button--secondary {
    border-color: rgba(10, 33, 59, 0.28) !important;
    background: #fff !important;
    color: var(--bambara-navy) !important;
}

.bambara-page .bambara-button--secondary:hover {
    border-color: var(--bambara-gold) !important;
    color: var(--bambara-gold) !important;
}

.bambara-single-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(24px, 3vw, 38px);
    align-items: start;
    width: min(1120px, calc(100% - 72px));
    padding: clamp(40px, 5vw, 72px) 0 clamp(54px, 6vw, 88px);
}

.bambara-single-main-column {
    display: grid;
    gap: clamp(24px, 3vw, 38px);
    min-width: 0;
}

.bambara-single .bambara-obituary-text,
.bambara-single .bambara-condolence-carousel,
.bambara-single .bambara-condolences,
.bambara-single .bambara-flower,
.bambara-single .bambara-single-actions-panel {
    border: 1px solid var(--bambara-gold-line);
    border-radius: var(--bambara-radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--bambara-shadow);
}

.bambara-single .bambara-obituary-text {
    width: 100%;
    margin: 0;
    padding: clamp(22px, 3vw, 34px);
    text-align: left;
}

.bambara-obituary-text > *:first-child {
    margin-top: 0;
}

.bambara-obituary-text > *:last-child {
    margin-bottom: 0;
}

.bambara-single-actions-panel {
    display: grid;
    gap: 10px;
    padding: clamp(14px, 2vw, 22px);
}

.bambara-manifest-card {
    padding: 0;
}

.bambara-manifest-card__image,
.bambara-manifest-card__placeholder {
    display: grid;
    width: 100%;
    aspect-ratio: var(--bambara-image-ratio);
    place-items: center;
    border-radius: 5px;
    object-fit: cover;
}

.bambara-manifest-card__placeholder {
    background: var(--bambara-soft);
    color: var(--bambara-gold);
    font-size: 1.4rem;
}

.bambara-manifest-gallery {
    display: grid;
    gap: 0;
}

.bambara-manifest-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.bambara-manifest-gallery__grid a {
    display: block;
    aspect-ratio: var(--bambara-image-ratio);
    overflow: hidden;
    border-radius: 5px;
    background: var(--bambara-soft);
}

.bambara-manifest-gallery__grid img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bambara-single-actions-panel .bambara-single-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.bambara-share {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.bambara-single-actions-panel .bambara-share {
    padding-top: 12px;
    border-top: 1px solid var(--bambara-line);
}

.bambara-share span {
    width: auto;
    align-self: center;
    color: var(--bambara-muted);
    font-size: 0.9rem;
    text-align: center;
}

.bambara-share a {
    flex: 0 0 auto;
    padding: 0.42rem 0.62rem;
    border: 1px solid var(--bambara-line);
    border-radius: 5px;
    background: #fff;
    color: var(--bambara-ink);
    font-size: 0.86rem;
    text-decoration: none;
}

.bambara-condolences,
.bambara-condolence-carousel,
.bambara-flower {
    padding: clamp(24px, 3vw, 40px);
}

.bambara-condolences {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(28px, 4vw, 35px);
    align-items: start;
}

.bambara-condolence-form {
    display: grid;
    gap: 16px;
    margin-top: 0;
}

.bambara-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.bambara-field {
    margin: 0;
}

.bambara-field--wide {
    grid-column: auto;
}

.bambara-field label,
.bambara-condolence-form label:not(.bambara-check) {
    display: block;
    margin-bottom: 6px;
    color: var(--bambara-ink);
    font-size: 0.94rem;
    font-weight: 600;
}

.bambara-field label span,
.bambara-check strong {
    color: var(--bambara-error);
}

.bambara-condolence-form input[type="text"],
.bambara-condolence-form input[type="email"],
.bambara-condolence-form input[type="tel"],
.bambara-condolence-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.76rem 0.9rem;
    border: 1px solid var(--bambara-line);
    border-radius: 5px;
    background: #fff;
    color: var(--bambara-ink);
    font: inherit;
}

.bambara-condolence-form textarea {
    resize: vertical;
}

.bambara-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    color: var(--bambara-muted);
    font-size: 0.92rem;
}

.bambara-check input {
    flex: 0 0 auto;
    margin-top: 4px;
}

.bambara-notice,
.bambara-condolences__notice {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 6px;
    font-weight: 600;
}

.bambara-notice--success,
.bambara-condolences__notice--success {
    border: 1px solid rgba(29, 125, 74, 0.35);
    background: rgba(29, 125, 74, 0.08);
    color: #175d39;
}

.bambara-notice--error,
.bambara-condolences__notice--error {
    border: 1px solid rgba(159, 48, 48, 0.35);
    background: rgba(159, 48, 48, 0.08);
    color: #7b2525;
}

.bambara-eyebrow {
    margin: 0 0 8px;
    color: var(--bambara-gold);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}

.bambara-section-heading h2,
.bambara-condolence-carousel__header h2,
.bambara-flower h2 {
    color: var(--bambara-ink);
    font-size: clamp(1.95rem, 3.4vw, 2.9rem);
}

.bambara-section-heading p:not(.bambara-eyebrow),
.bambara-flower p:not(.bambara-eyebrow) {
    margin: 12px 0 0;
    color: var(--bambara-muted);
}

.bambara-suggestions {
    display: grid;
    gap: 10px;
}

.bambara-suggestions p {
    margin: 0;
    font-weight: 700;
}

.bambara-suggestions__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body .bambara-page .bambara-condolence-form .bambara-suggestions__buttons button[type="button"] {
    min-height: 38px;
    padding: 0.52rem 0.72rem;
    border: 1px solid var(--bambara-line) !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: var(--bambara-ink) !important;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

body .bambara-page .bambara-condolence-form .bambara-suggestions__buttons button[type="button"]:hover,
body .bambara-page .bambara-condolence-form .bambara-suggestions__buttons button[type="button"].is-selected {
    border-color: var(--bambara-gold) !important;
    background: var(--bambara-soft) !important;
}

.bambara-condolence-carousel {
    display: grid;
    gap: 18px;
}

.bambara-condolence-carousel__header {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.bambara-condolence-carousel__controls {
    display: flex;
    gap: 8px;
}

.bambara-condolence-carousel__controls button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--bambara-navy) !important;
    border-radius: 5px;
    background: var(--bambara-navy) !important;
    color: #fff !important;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.bambara-condolence-carousel__controls button:hover,
.bambara-condolence-carousel__controls button:focus {
    border-color: var(--bambara-gold) !important;
    background: var(--bambara-gold) !important;
    color: #fff !important;
}

.bambara-condolence-carousel__track {
    display: grid;
    grid-auto-columns: minmax(320px, 32%);
    grid-auto-flow: column;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}

.bambara-condolence-card {
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--bambara-line);
    border-radius: var(--bambara-radius);
    background: #fffaf2;
    scroll-snap-align: start;
}

.bambara-condolence-card__message {
    margin: 0 0 14px;
    color: var(--bambara-ink);
}

.bambara-condolence-card__author {
    margin: 0;
    color: var(--bambara-gold);
    font-weight: 700;
}

.bambara-flower {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
}

@media (max-width: 1280px) {
    .bambara-shell {
        width: min(1240px, calc(100% - 48px));
    }
}

@media (max-width: 1120px) {
    .bambara-obituary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .bambara-page {
        margin-top: 0;
    }

    .bambara-shell {
        width: min(100% - 32px, 900px);
    }

    .bambara-single-layout {
        width: min(100% - 32px, 900px);
    }

    .bambara-obituary-grid,
    .bambara-condolences,
    .bambara-flower,
    .bambara-single-actions-panel .bambara-single-actions {
        grid-template-columns: 1fr;
    }

    .bambara-manifest-gallery__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .bambara-page {
        margin-top: 0;
    }

    .bambara-shell {
        width: min(100% - 22px, 640px);
    }

    .bambara-single-layout {
        width: min(100% - 22px, 640px);
    }

    .bambara-archive-hero,
    .bambara-single-hero {
        min-height: 320px;
        padding: 42px 0;
    }

    .bambara-obituary-card {
        min-height: 0;
    }

    .bambara-obituary-card h3 {
        font-size: 1.18rem;
    }

    .bambara-manifest-card {
        max-width: 360px;
        margin-inline: auto;
    }

    .bambara-button,
    .bambara-condolence-form button {
        width: 100%;
    }

    .bambara-condolence-carousel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .bambara-condolence-carousel__track {
        grid-auto-columns: minmax(250px, 88%);
    }

    .bambara-manifest-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
