/*
 * Legacy funeral directory — fh- prefix, BEM (block__element--modifier).
 * Sections: tokens, reset, layout, hero, search, carousel, cards, grids,
 * partner, states, results, tabs, detail, buttons, CTA, footer, responsive.
 * -----------------------------------------------------------------------------
 *
 * Site overrides: este ficheiro é carregado depois de style.min.css em
 * themes/legacy/base.html.twig (asset assets/legacy/styles/fh-root.css).
 * Qualquer CSS para layout fh-* / funeral directory deve ir aqui, para
 * sobrescrever o tema e o core — evitar editar main.css / bundles só por causa disto.
 */

 @import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=DM+Serif+Text:ital@0;1&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

 .fh-root {
    /* Colors */
    --background: #fbf7ef;
    --foreground: #514d45;
    --heading: #293548;
    --primary: #2d3e50;
    --primary-foreground: #ffffff;
    --secondary: #d4b896;
    --secondary-foreground: #2d3e50;
    --accent: #dcb05e;
    --accent-hover: #c9a04e;
    --accent-glow: rgba(220, 176, 94, 0.45);
    --alert: #a65d5d;
    --alert-hover: #8f4e4e;
    --alert-glow: rgba(166, 93, 93, 0.4);
    --muted: #fbf7ef;
    --muted-foreground: #6b6862;
    --border: #e5e5e5;
    --white: #ffffff;

    /* Fonts */
    --font-sans: "DM Sans", sans-serif;
    --font-serif: "DM Serif Text", serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Layout */
    --container: 1280px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 80px;
    font-family: var(--font-sans);
    color: var(--foreground);
    background: var(--background);
    line-height: 1.6;
}

/* Standalone pages: body > .fh-root — remove default body margin (scoped rules do not apply to body). */
body:has(> .fh-root) {
    margin: 0;
}

@keyframes fh-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fh-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================================================
   BASE / RESET
   ====================================================== */

.fh-root .custom-content {
    padding: 0;
}

.fh-root h1, .fh-root h2, .fh-root h3 {
    font-family: var(--font-serif);
    color: var(--heading);
    line-height: 1.2;
    font-weight: 400;
}

.fh-root img {
    display: block;
    max-width: 100%;
}

.fh-root button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.fh-root a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.fh-root a:hover {
    opacity: 0.8;
}


/* ======================================================
   LAYOUT
   ====================================================== */

.fh-root .fh-container {
    max-width: var(--container);
    margin: auto;
    padding: 0 24px;
}

.fh-root .fh-section {
    padding: var(--space-2xl) 0;
}

.fh-root .fh-section--muted {
    background: var(--muted);
}

.fh-root .fh-section--white {
    background: white;
}

.fh-root .fh-section--white + .fh-section--white,
.fh-root .fh-section--muted + .fh-section--muted {
    padding-top: 0;
}

.fh-root .fh-section__header {
    text-align: center;
    margin-bottom: 48px;
}

.fh-root .fh-section__header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fh-root .fh-section__header p {
    color: var(--muted-foreground);
    max-width: 640px;
    margin: auto;
    font-size: 1.125rem;
}

/* Browse-by-state: collapsible section (native <details>) */
.fh-root .fh-browse-states {
    margin: 0;
}

.fh-root .fh-browse-states__summary {
    list-style: none;
    cursor: pointer;
    text-align: center;
    margin: 0 0 0;
}

.fh-root .fh-browse-states__summary::-webkit-details-marker {
    display: none;
}

.fh-root .fh-browse-states h3.fh-browse-states__title.heading.h-3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    font-size: 3rem;
    margin: 0 0 1rem;
    color: var(--heading);
    line-height: 1.15;
}

.fh-root .fh-browse-states__chevron {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    color: var(--heading);
    transition: transform 0.25s ease;
}

.fh-root .fh-browse-states:not([open]) .fh-browse-states__chevron {
    transform: rotate(180deg);
}

.fh-root .fh-browse-states__lead {
    color: var(--muted-foreground);
    max-width: 640px;
    margin: auto;
    font-size: 1.125rem;
    padding-left: 2rem;
}

.fh-root .fh-browse-states__panel {
    padding-top: 8px;
}

.fh-root .fh-browse-states[open] .fh-browse-states__summary {
    margin-bottom: 0;
}

.fh-root .fh-align-center {
    text-align: center;
    margin-top: var(--space-lg);
}


/* ======================================================
HERO
====================================================== */

.fh-root .fh-hero {
    position: relative;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.fh-root .fh-hero__bg {
    position: absolute;
    inset: 0;
}

.fh-root .fh-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fh-root .fh-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.fh-root .fh-hero__content {
    position: relative;
    max-width: 54rem;
    padding: 0 24px;
}

.fh-root .fh-hero h1 {
    margin-bottom: 14px;
    color: #fff;
    font-size: 3.5rem;
    letter-spacing: -0.02rem;
    animation: fh-fadeIn 1s ease-in;
}

.fh-root .fh-hero p {
    opacity: 0.9;
    margin-bottom: 32px;
    font-size: 1.15rem;
    animation: fh-fadeIn 1s ease-in 0.2s;
    animation-fill-mode: both;
}

.fh-root .fh-hero + .fh-section {
    padding-top: 9rem;
}

.fh-root .fh-hero--results {
    height: 230px;
}

.fh-root .fh-hero--results h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.fh-root .fh-hero--results .fh-hero__overlay {
    background: var(--primary);
}

/* ======================================================
SEARCH
====================================================== */

.fh-root .fh-search-panel {
    background: #e9c86f;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: block;
    position: relative;
    max-width: 100%;
    width: 38rem;
    padding: 2rem 2rem 1rem;
    margin: 0 auto;
    margin-bottom: -10rem;
    animation: fh-slideUp 1s ease-in 0.4s;
    animation-fill-mode: both;
}

.fh-root .fh-search-form {
    display: flex;
    border-radius: var(--radius-sm);
}

.fh-root .fh-search-form #searchLocationDiv {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.fh-root .fh-search__input {
    padding: 0 1rem;
    border: none;
    width: 100%;
    font-size: 1rem;
    outline: none;
    height: 56px;
    border: 1px solid #dcb05e;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.fh-root .fh-search-form .tt-menu {
    border: 1px solid var(--border);
    background-color: #fff;
    border-radius: 5px;
    opacity: 1;
    left: 0;
    right: 0;
    width: auto;
    top: 0;
}

.fh-root .fh-search-form .tt-menu .tt-suggestion {
    padding: .5rem 1rem;
    color: var(--secondary-foreground);
    text-align: left;
    font-size: .875rem;
}

.fh-root .fh-search-form .tt-menu .tt-suggestion:hover {
    cursor: pointer;
    background: var(--background);
    color: var(--primary);
}

.fh-root .fh-search-form .tt-menu .tt-suggestion .fa {
    font-size: .65rem;
    opacity: .5;
    margin-right: .25rem;
}

.fh-root .fh-search__submit {
    background: var(--foreground);
    color: #fff;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.fh-root .fh-search__locate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    margin-top: 1rem;
    color: var(--foreground);
    opacity: 0.9;
    font-weight: 500;
    cursor: pointer;
}


/* ======================================================
CAROUSEL
====================================================== */

.fh-root .fh-carousel {
    position: relative;
    overflow: hidden;
    margin: -1.5rem 0;
}

.fh-root .fh-carousel__track {
    display: flex;
    align-items: stretch;
    gap: 18px;
    transition: transform 0.4s ease;
    padding: 1.5rem 0;
}

.fh-root .fh-carousel__item {
    display: flex;
    width: 260px;
    flex-shrink: 0;
    max-width: 100%;
}

.fh-root .fh-carousel__nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fh-root .fh-carousel__prev {
    left: -18px;
}

.fh-root .fh-carousel__next {
    right: -18px;
}


/* ======================================================
FUNERAL CARD
====================================================== */

.fh-root .fh-listing-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
}

.fh-root .fh-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.fh-root .fh-listing-card a {
    display: block;
}

/* SERP: media pode ser <a> ou <div> quando !hasDetail */
.fh-root .fh-listing-card__media-link {
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.fh-root .fh-listing-card__media-link--static {
    cursor: default;
}

/* Wrapper (Utility.image) ou <img class="fh-listing-card__image"> no carousel */
.fh-root .fh-listing-card__image {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
    background: var(--muted, #f5f5f5);
}

.fh-root .fh-listing-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

 .fh-root .fh-listing-card__image.unclaimed img {
    filter: grayscale(1);
}

.fh-root .fh-listing-card:hover .fh-listing-card__image img {
    transform: scale(1.05);
}

/* img com classe direta (ex.: carousel) */
.fh-root img.fh-listing-card__image {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fh-root .fh-listing-card:hover img.fh-listing-card__image {
    transform: scale(1.05);
}

/* Slick dentro do card (várias fotos) */
.fh-root .fh-listing-card .fh-listing-card__slick,
.fh-root .fh-listing-card .fh-listing-card__slick .fh-listing-card__image {
    height: 200px;
}

.fh-root .fh-listing-card .fh-listing-card__slick .slick-dots {
    bottom: 8px;
}

.fh-root .fh-listing-card .fh-listing-card__slick .slick-prev,
.fh-root .fh-listing-card .fh-listing-card__slick .slick-next {
    z-index: 2;
}

.fh-root .fh-listing-card__body {
    padding: 1.5rem;
}

.fh-root .fh-listing-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fh-root .fh-listing-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.fh-root .fh-listing-card a:hover h3 {
    color: var(--accent);
}

.fh-root .fh-listing-card__location {
    font-size: 13px;
    color: var(--muted-foreground);
    text-transform: capitalize;
    margin: 0;
}

/* Featured carousel: all cards share the height of the tallest slide; text clamps */
.fh-root .fh-carousel__item .fh-listing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.fh-root .fh-carousel__item .fh-listing-card > a {
    flex-shrink: 0;
}

.fh-root .fh-carousel__item .fh-listing-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fh-root .fh-carousel__item .fh-listing-card__header {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
}

.fh-root .fh-carousel__item .fh-listing-card__header > div {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.fh-root .fh-carousel__item .fh-listing-card h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    line-height: 1.35;
    word-break: break-word;
}

.fh-root .fh-carousel__item .fh-listing-card__location {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;
    word-break: break-word;
}


/* ======================================================
BADGE
====================================================== */

.fh-root .fh-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-card);
    color: white;
    z-index: 1;
}

.fh-root .fh-badge__mark {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: url(https://staging-legacy.s3.amazonaws.com/custom/domain_1/content_files/legacy-logo-16102025.png?1774278255) no-repeat 0 0;
    background-size: cover;
}


/* ======================================================
ARTICLES / SERVICES
====================================================== */

.fh-root .fh-article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.fh-root .fh-article-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
}

.fh-root .fh-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.fh-root .fh-article-card a {
    display: block;
}

.fh-root .fh-article-card__image {
    height: 160px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.3s;
}

.fh-root .fh-article-card:hover .fh-article-card__image {
    transform: scale(1.05);
}

.fh-root .fh-article-card__body {
    padding: 1.5rem;
}

.fh-root .fh-article-card__category {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 600;
}

.fh-root .fh-article-card h3 {
    margin: 0.5rem 0;
    font-size: 1.35rem;
    transition: color 0.2s;
}

.fh-root .fh-article-card a:hover h3 {
    color: var(--accent);
}

.fh-root .fh-article-card p {
    font-size: 14px;
    color: var(--muted-foreground);
    margin: 0;
}


/* ======================================================
FEATURES GRID
====================================================== */

.fh-root .fh-value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.fh-root .fh-value-grid__item {
    text-align: center;
    padding: 0;
}

.fh-root .fh-value-grid__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(180deg, #dcb05e 0%, #ebbd66 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.fh-root .fh-value-grid__icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.fh-root .fh-value-grid__item h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.fh-root .fh-value-grid__item p {
    color: var(--foreground);
    margin: 0;
    font-size: .875rem;
}


/* ======================================================
PARTNER PROGRAM
====================================================== */

.fh-root .fh-partner-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.fh-root .fh-partner-layout__copy h2 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.fh-root .fh-partner-layout__copy p {
    color: var(--muted-foreground);
    margin-bottom: 24px;
    font-size: 1.125rem;
}

.fh-root .fh-benefit-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fh-root .fh-benefit-list__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fh-root .fh-benefit-list__item p {
    margin: 0;
    font-size: 1rem;
}

.fh-root .fh-icon-check {
    width: 18px;
    stroke: var(--accent);
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}

.fh-root .fh-partner-layout__image {
    border-radius: var(--radius-lg);
    width: 100%;
}

.fh-root .fh-partner-layout__media {
    position: relative;
}

.fh-root .fh-partner-layout__brand {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.fh-root .fh-partner-layout__brand img {
    height: 24px;
}


/* ======================================================
STATES
====================================================== */

.fh-root .fh-state-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 34px;
}

.fh-root .fh-state-grid__btn {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: left;
    transition: 0.2s;
}

.fh-root .fh-state-grid__btn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.fh-root .fh-state-grid__btn h3 {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--heading);
}


/* ======================================================
LINKS
====================================================== */

.fh-root .fh-link-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    color: var(--primary);
    font-weight: 500;
    transition: gap 0.2s;
}

.fh-root .fh-link-more:hover {
    gap: 10px;
}

/* ======================================================
RESULTS
====================================================== */

.fh-root .fh-results-grid {
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
    display: grid;
}

.fh-root .fh-results-grid__item {
    min-width: 0;
}

.fh-root .fh-rating-chip {
    display: inline-block;
    color: var(--primary);
    background: rgba(43, 55, 74, 0.1);
    font-size: 0.65rem;
    margin: 1rem 0 0;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-weight: 500;
}


.fh-root .fh-results-toolbar {
    display: flex;
    gap: 0.25rem;
    background: white;
    border-radius: 0.375rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
    margin: 0;
}
.fh-root .fh-results-toolbar .fh-view-toggle {
    background: var(--border);
    color: var(--primary);
    border: none;
    opacity: 1;
    padding: 0;
    height: 36px;
    width: 36px;
}
.fh-root .fh-results-toolbar .fh-view-toggle--active {
    background: var(--primary);
    color: white;
}

.fh-root .fh-results-bar {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fh-root .fh-results-bar__title {
    font-size: .875rem;
}

/* SERP com resultados (results-type2): grelha + mapa + paginação */
.fh-root .fh-results-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    min-width: 0;
}

.fh-root .fh-results-body__grid {
    width: 100%;
    min-width: 0;
}

.fh-root .fh-results-body__map {
    width: 100%;
    min-width: 0;
    border-radius: var(--radius-md, 0.5rem);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: var(--shadow-soft, 0 4px 24px rgba(45, 62, 80, 0.06));
}

/* Paginação: tema só estiliza .results-body .results-content.
   display sem !important — senão jQuery .hide()/.show() em ::js/summary/results.html.twig não esconde no modo mapa. */
.fh-root .fh-results-body__pagination.results-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

.fh-root .fh-results-body__pagination .item-pagination {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm, 0.375rem);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary) !important;
    background: rgba(45, 62, 80, 0.08) !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fh-root .fh-results-body__pagination .item-pagination:first-child {
    margin-left: 0 !important;
}

.fh-root .fh-results-body__pagination .item-pagination:hover:not(.is-disabled):not(.is-selected) {
    background: rgba(45, 62, 80, 0.14) !important;
    color: var(--heading) !important;
}

.fh-root .fh-results-body__pagination .item-pagination.is-selected {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-color: var(--primary) !important;
}

.fh-root .fh-results-body__pagination .item-pagination.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

.fh-root .fh-results-body__pagination .item-pagination.is-previous,
.fh-root .fh-results-body__pagination .item-pagination.is-next {
    padding: 0 0.75rem;
}

/* Empty SERP (results-type2): sem resultados */
.fh-root .fh-results-empty {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 0 3rem;
    text-align: center;
}

.fh-root .fh-results-empty__title {
    font-family: var(--font-serif, "DM Serif Text", Georgia, serif);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 400;
    color: var(--heading);
    line-height: 1.25;
    margin: 0 0 1.25rem;
}

.fh-root .fh-results-empty__divider {
    width: 4rem;
    height: 3px;
    margin: 0 auto 2rem;
    border: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.fh-root .fh-results-empty__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: left;
}

@media (min-width: 768px) {
    .fh-root .fh-results-empty__layout {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;
    }
}

.fh-root .fh-results-empty__subtitle {
    font-family: var(--font-sans, "DM Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 1rem;
}

.fh-root .fh-results-empty__list {
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
    color: var(--foreground);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.fh-root .fh-results-empty__list li + li {
    margin-top: 0.35rem;
}

.fh-root .fh-results-empty__hint {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted-foreground);
}

.fh-root .fh-results-empty__link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fh-root .fh-results-empty__link:hover {
    color: var(--heading);
}

.fh-root .fh-results-empty__form {
    margin: 0;
    width: 100%;
}

/* Uma linha: campo + botão (parent do input = #searchLocationDiv → form para has-itens do typeahead) */
.fh-root .fh-results-empty__form.content-form {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0 !important;
    max-width: 100%;
    border-radius: var(--radius-sm, 0.375rem);
    overflow: visible;
    box-shadow: var(--shadow-soft, 0 4px 24px rgba(45, 62, 80, 0.08));
    border: 1px solid var(--border);
    background: var(--white);
    justify-content: flex-start !important;
}

.fh-root .fh-results-empty__form.content-form > .input-group {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: stretch;
}

.fh-root .fh-results-empty__form.content-form .input-group-icon:empty {
    display: none;
}

.fh-root .fh-results-empty__input {
    flex: 1;
    min-width: 0;
    height: 52px;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 1rem;
    font-size: 1rem;
    color: var(--foreground);
    background: transparent;
    box-shadow: none !important;
}

.fh-root .fh-results-empty__input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.85;
}

.fh-root .fh-results-empty__input:focus {
    outline: none;
}

.fh-root .fh-results-empty__submit-wrap {
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: none;
    display: flex;
    align-self: stretch;
}

.fh-root .fh-results-empty__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 100%;
    min-height: 52px;
    padding: 0 1.25rem;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: var(--white);
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.fh-root .fh-results-empty__submit:hover {
    background: var(--heading);
}

.fh-root .fh-results-empty__submit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.fh-root .fh-results-empty__search.is-loading {
    opacity: 0.65;
    pointer-events: none;
    position: relative;
}


/* ======================================================
TABS
====================================================== */

/* Detail: mobile-first single column; two columns from 1024px (matches legacy funeralhomes main-grid) */
.fh-root .fh-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 1024px) {
    .fh-root .fh-detail-layout {
        grid-template-columns: 1fr 350px;
    }
}

.fh-root .fh-detail-layout__main {
    min-width: 0;
    padding-bottom: 2rem;
}

.fh-root .fh-tabs {
    margin: 0 0 2rem;
    border-bottom: 1px solid var(--border);
}

.fh-root .fh-tabs__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

@media (min-width: 768px) {
    .fh-root .fh-tabs__list {
        gap: 3rem;
    }
}

.fh-root .fh-tabs__list li {
    margin: 0;
}

.fh-root .fh-tabs__tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px;
}

.fh-root .fh-tabs__tab:hover {
    /* color: var(--primary); */
}

.fh-root .fh-tabs__tab--active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.fh-root .fh-tabs__tab svg {
    width: 20px;
    height: 20px;
}

.fh-root .fh-tabs__tab .fh-tabs__label--mobile {
    display: none;
}

.fh-root .fh-tabs__panel {
    display: none;
}

.fh-root .fh-tabs__panel--active {
    display: block;
    animation: fh-fadeIn 0.3s ease-in;
}

.fh-root .fh-detail-layout__aside {
    position: static;
    align-self: start;
}

@media (min-width: 1024px) {
    .fh-root .fh-detail-layout__aside {
        position: sticky;
        top: 100px;
    }
}

/* Contacto / morada / mapa: só na aba Details (o aside está fora dos .tab-content) */
.fh-root .fh-detail-layout__aside .listing-info.fh-panel {
    display: none !important;
}

.fh-root[data-active-tab="details"] .fh-detail-layout__aside .listing-info.fh-panel {
    display: block !important;
}

.fh-root .fh-tabs__panel .fh-panel + .fh-panel {
    margin-top: 4rem;
}

.fh-root .fh-ads {
    padding: 0;
    margin: 1.5rem 0;
}

/* ======================================================
DETAIL PAGE SPECIFIC STYLES
====================================================== */

/* Hero Section - Detail Page */
.fh-root .fh-hero--detail {
    margin: 0;
    height: 260px;
    background: var(--primary);
    justify-content: flex-start;
}

.fh-root .fh-hero--detail .fh-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.fh-root .fh-hero--detail .fh-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Solid primary hid the cover image; carousel header uses .fh-hero__overlay--gradient on the info column instead */
.fh-root .fh-hero.fh-hero--detail:not(.fh-hero--detail-carousel) .fh-hero__overlay {
    z-index: 1;
    background: var(--primary);
    opacity: 0.58;
}

/* Detail hero — carousel layout (replaces full-bleed cover + primary overlay) */
.fh-root .fh-hero--detail.fh-hero--detail-carousel {
    height: auto;
    min-height: 0;
    display: block;
    padding: 0;
    margin: 0;
    text-align: left;
    background: linear-gradient(160deg, #1a2630 0%, var(--primary) 45%, #3d5166 100%);
}

.fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__bg {
    display: none;
}

.fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__layout {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 360px);
    gap: 1.25rem;
    align-items: stretch;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

/* Sem capa / galeria / vídeo: só coluna de texto (sem .fh-hero__media) */
.fh-root .fh-hero--detail.fh-hero--detail-carousel--no-media .fh-hero__layout {
    grid-template-columns: 1fr;
}

.fh-root .fh-hero--detail.fh-hero--detail-carousel--no-media .fh-hero__info {
    padding-right: 0;
}

.fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__info {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0.5rem 0.75rem 0.5rem 0;
}

/* Gradient + texture placeholder instead of bg-primary on overlay */
.fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__overlay--gradient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 42%),
        linear-gradient(145deg, rgba(212, 184, 150, 0.14) 0%, transparent 50%),
        repeating-linear-gradient(
            -36deg,
            transparent,
            transparent 9px,
            rgba(255, 255, 255, 0.035) 9px,
            rgba(255, 255, 255, 0.035) 10px
        );
}

/* Unclaimed: gradiente do header em cinza (em vez de azul / --primary) */
.fh-root.fh-listing--unclaimed .fh-hero--detail.fh-hero--detail-carousel {
    background: linear-gradient(160deg, #2c2c2e 0%, #4a4a4f 45%, #5e5e64 100%);
}

.fh-root.fh-listing--unclaimed .fh-hero--detail.fh-hero--detail-carousel .fh-hero__overlay--gradient {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        repeating-linear-gradient(
            -36deg,
            transparent,
            transparent 9px,
            rgba(255, 255, 255, 0.03) 9px,
            rgba(255, 255, 255, 0.03) 10px
        );
}

.fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-container.fh-hero__layout {
    width: 100%;
    max-width: var(--container);
}

.fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__content > div {
    justify-content: flex-start;
}

.fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__content {
    position: relative;
    z-index: 1;
}

.fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__media {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 0;
    padding: 0.35rem 0;
}

.fh-root .fh-hero-carousel {
    position: relative;
    flex: none;
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
}

.fh-root .fh-hero-carousel__viewport {
    flex: none;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    border-radius: var(--radius-md);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.28);
    background: #0f1419;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
    touch-action: pan-y pinch-zoom;
    -webkit-tap-highlight-color: transparent;
}

/* Navegadores sem aspect-ratio: mesma caixa ~360×203 em todos os breakpoints */
@supports not (aspect-ratio: 16 / 9) {
    .fh-root .fh-hero-carousel__viewport {
        height: 0;
        padding-bottom: 56.25%;
    }

    .fh-root .fh-hero-carousel__viewport > .fh-hero-carousel__track {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
    }
}

.fh-root .fh-hero-carousel__track {
    display: flex;
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.fh-root .fh-hero-carousel__slide {
    position: relative;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1f24;
}

.fh-root .fh-hero-carousel__slide--image .fh-hero-carousel__img-link {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.fh-root .fh-hero-carousel__slide--image img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    vertical-align: middle;
}

.fh-root .fh-hero-carousel__label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-root .fh-hero-carousel__placeholder {
    width: 100%;
    min-height: 0;
    height: 100%;
    background:
        linear-gradient(135deg, #d4c5a9 0%, #b8a585 45%, #9a8a72 100%);
    position: relative;
}

.fh-root .fh-hero-carousel__placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 9px 9px;
    pointer-events: none;
}

.fh-root .fh-hero-carousel__slide:nth-child(2) .fh-hero-carousel__placeholder {
    background: linear-gradient(150deg, #c0a878 0%, #9a8860 50%, #7a6c50 100%);
}

.fh-root .fh-hero-carousel__slide:nth-child(3) .fh-hero-carousel__placeholder {
    background: linear-gradient(120deg, #baa680 0%, #8e7e64 55%, #6e6048 100%);
}

.fh-root .fh-hero-carousel__video {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0d10;
}

.fh-root .fh-hero-carousel__video iframe.listing-video-embed,
.fh-root .fh-hero-carousel__video iframe {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
    max-height: 100%;
    border: 0;
}

.fh-root .fh-hero-carousel__video img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.fh-root .fh-hero-carousel__video--has-lightbox {
    position: relative;
}

.fh-root .fh-hero-carousel__video-lightbox {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: var(--white);
    background: rgba(0, 0, 0, 0.22);
    transition: background 0.2s ease;
}

.fh-root .fh-hero-carousel__video-lightbox:hover {
    background: rgba(0, 0, 0, 0.4);
}

.fh-root .fh-hero-carousel__video-expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.fh-root .fh-hero-carousel__video-lightbox:hover .fh-hero-carousel__video-expand-icon {
    background: rgba(0, 0, 0, 0.72);
}

.fh-root .fh-hero-carousel__count {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    padding: 4px 12px;
    border-radius: 14px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.fh-root .fh-hero-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* Acima do viewport (irmão seguinte no DOM cobria as setas — só “seguinte” parecia funcionar) */
    z-index: 6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.15s ease;
    backdrop-filter: blur(4px);
}

.fh-root .fh-hero-carousel__arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.fh-root .fh-hero-carousel__arrow--prev {
    left: 8px;
}

.fh-root .fh-hero-carousel__arrow--next {
    right: 8px;
}

.fh-root .fh-hero-carousel__video-desc {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    max-width: 100%;
}

.fh-root .fh-hero-carousel__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 0 4px;
    position: relative;
    z-index: 2;
}

.fh-root .fh-hero-carousel__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease, border-radius 0.2s ease;
}

.fh-root .fh-hero-carousel__dot.is-active {
    background: var(--accent);
    width: 22px;
    border-radius: 4px;
}

.fh-root .fh-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 991px) {
    .fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__layout {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
        padding-left: max(var(--space-md), env(safe-area-inset-left, 0px));
        padding-right: max(var(--space-md), env(safe-area-inset-right, 0px));
    }

    .fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__info {
        padding: 0.25rem 0 0.75rem;
    }

    .fh-root .fh-hero--detail.fh-hero--detail-carousel .fh-hero__media {
        order: -1;
        min-height: 0;
    }

    /* Mesmas dimensões do desktop: caixa 16:9 até 360px — sem clamp(vw) */

    .fh-root .fh-hero-carousel__arrow {
        width: 40px;
        height: 40px;
        font-size: 1.35rem;
    }

    .fh-root .fh-hero-carousel__arrow--prev {
        left: max(6px, env(safe-area-inset-left, 0px));
    }

    .fh-root .fh-hero-carousel__arrow--next {
        right: max(6px, env(safe-area-inset-right, 0px));
    }

    .fh-root .fh-hero-carousel__dots {
        flex-wrap: wrap;
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
    }
}

@media (max-width: 480px) {
    .fh-root .fh-hero-carousel__count {
        top: max(8px, env(safe-area-inset-top, 0px));
        right: max(8px, env(safe-area-inset-right, 0px));
        font-size: 0.625rem;
        padding: 3px 8px;
    }
}

.fh-root .fh-hero--detail .fh-container {
    position: relative;
    z-index: 2;
    width: var(--container);
    max-width: 100%;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fh-root .fh-hero.fh-hero--detail .fh-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: fit-content;
    align-items: flex-start;
    padding: 0;
}

.fh-root .fh-hero.fh-hero--detail .fh-hero__content > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.fh-root .fh-hero.fh-hero--detail h1 {
    margin: 0;
    font-size: 2.5rem;
    line-height: 1;
}

.fh-root .fh-hero.fh-hero--detail .fh-hero__content .fh-btn-group {
    margin: 0;
}

.fh-root .fh-hero--detail .fh-btn-group .fh-btn__text--mobile {
    display: none;
}

.fh-root .fh-hero.fh-hero--detail .fh-hero__content .fh-btn--outline { 
    color: var(--white);   
    border-color: var(--white);
}

.fh-root .fh-hero.fh-hero--detail .fh-hero__content .fh-btn--follow {
    background: var(--primary);
}

/* Trusted Partner badge on listing detail hero (cards use .fh-badge absolute; hero is centered flow) */
.fh-root .fh-hero--detail .fh-badge--detail-hero {
    position: relative;
    top: auto;
    left: auto;
    align-self: flex-start;
    padding: .25rem .5rem;
    font-size: .75rem;
    gap: .5rem;
    margin-bottom: 0;
}

/* Star ratings (hero + reviews) */
.fh-root .fh-hero--detail .fh-stars,
.fh-root .fh-review .fh-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.fh-root .fh-hero--detail .fh-stars__icon,
.fh-root .fh-review .fh-stars__icon {
    display: inline-flex;
    align-items: center;
}

.fh-root .fh-hero--detail .fh-stars__icon svg,
.fh-root .fh-review .fh-stars__icon svg {
    width: 16px;
    height: 16px;
}

/* Listing detail: video (snippet or URL → embed) */
.fh-root .fh-listing-video__embed {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-top: 0.75rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--border);
}

.fh-root .fh-listing-video__embed iframe.listing-video-embed,
.fh-root .fh-listing-video__embed iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 200px;
    border: 0;
}

.fh-root .fh-listing-video__desc {
    margin: 1rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--muted-foreground);
}

/* Gallery (match legacy .gallery-grid: auto-fit, 16:9) */
.fh-root .fh-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 0;
}

.fh-root .fh-gallery__item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-sm);
    aspect-ratio: 16 / 9;
    text-decoration: none;
    color: inherit;
    outline-offset: 2px;
}

.fh-root .fh-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fh-root .fh-gallery__item:hover img {
    transform: scale(1.05);
}

.fh-root .fh-photo-gallery__lead {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.fh-root .fh-gallery--detail {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .fh-root .fh-gallery--detail {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

/* Resource Links (match legacy .resource-link) */
.fh-root .fh-resource-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-top: 0.75rem;
    text-decoration: none;
    color: var(--primary);
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: background 0.2s ease;
}

.fh-root .fh-resource-link:hover {
    transform: none;
    opacity: 1; /* override .fh-root a:hover */
}

.fh-root .fh-resource-link svg {
    flex-shrink: 0;
    margin-left: 1rem;
}

.fh-root .fh-resource-link strong {
    display: block;
    color: var(--heading);
    margin-bottom: 0.25rem;
}

.fh-root .fh-resource-link p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Rating Distribution (legacy .rating-distribution + score tile) */
.fh-root .fh-rating-breakdown {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    overflow: hidden;
}

.fh-root .fh-rating-breakdown::after {
    content: "";
    display: table;
    clear: both;
}

.fh-root .fh-rating-breakdown__score {
    float: left;
    padding: 12px;
    margin: 0 2rem 1rem 0;
    width: 112px;
    text-align: center;
    background: #f2f3f4;
    border-radius: 15px;
}

.fh-root .fh-rating-breakdown__value {
    font-family: var(--font-sans);
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    line-height: 1;
}

.fh-root .fh-rating-breakdown h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    margin: 0 0 1rem;
}

.fh-root .fh-rating-breakdown__row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    max-width: calc(100% - 145px);
    margin-left: auto;
}

.fh-root .fh-rating-breakdown__row:last-child {
    margin-bottom: 0;
}

.fh-root .fh-rating-breakdown__row > span:first-child {
    min-width: 52px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--foreground);
}

/* Bars: BEM + legacy class names used in detail.html */
.fh-root .fh-rating-breakdown__bar,
.fh-root .fh-rating-breakdown .bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.fh-root .fh-rating-breakdown__fill,
.fh-root .fh-rating-breakdown .fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.fh-root .fh-rating-breakdown__row > span:last-child {
    min-width: 88px;
    text-align: right;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Reviews */
.fh-root .fh-review {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 1rem;
    background: var(--white);
}

.fh-root .fh-review__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.fh-root .fh-review__author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fh-root .fh-review__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.fh-root .fh-review__author strong {
    display: block;
    color: var(--heading);
    margin-bottom: 0.25rem;
}

.fh-root .fh-review__date {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}

.fh-root .fh-review p {
    margin: 0;
    line-height: 1.6;
    color: var(--foreground);
}

/* Google reviews card (listing detail) — avatar + name/stacked stars + date top-right + body */
.fh-root .fh-review--google {
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.fh-root .fh-review--google .fh-review__google-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.fh-root .fh-review--google .fh-review__avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: #c9a961;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.fh-root .fh-review--google .fh-review__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fh-root .fh-review--google .fh-review__avatar-initials {
    line-height: 1;
}

.fh-root .fh-review--google .fh-review__google-main {
    flex: 1;
    min-width: 0;
}

.fh-root .fh-review--google .fh-review__google-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1rem;
}

.fh-root .fh-review--google .fh-review__google-author-block {
    flex: 1 1 auto;
    min-width: 0;
}

.fh-root .fh-review--google .fh-review__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--heading);
}

.fh-root .fh-review--google .fh-review__title a {
    color: inherit;
    text-decoration: none;
}

.fh-root .fh-review--google .fh-review__title a:hover {
    text-decoration: underline;
}

.fh-root .fh-review--google .fh-review__google-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.8125rem;
}

.fh-root .fh-review--google .fh-review__google-stars .fa-star {
    color: #dcb05e;
}

.fh-root .fh-review--google .fh-review__google-stars .fa-star-o {
    color: #dddddd;
}

.fh-root .fh-review--google .fh-review__date--google {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    white-space: nowrap;
    padding-top: 0.125rem;
}

.fh-root .fh-review--google .fh-review__body--google {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

@media (max-width: 480px) {
    .fh-root .fh-review--google .fh-review__date--google {
        width: 100%;
        text-align: right;
        margin-left: 0;
        padding-top: 0;
    }
}

/* Reviews heading row (legacy: flex h2 + CTA) */
.fh-root .fh-panel#fh-reviews > h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

/* Write a Review */
.fh-root .fh-panel#fh-reviews .fh-review__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    float: none;
    flex-shrink: 0;
}

.fh-root .fh-panel#fh-reviews .fh-review__cta svg {
    width: 16px;
    height: 16px;
}

.fh-root .fh-service-checklist__no {
    display: inline-flex;
    align-items: center;
}

.fh-root .fh-event-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fh-root .fh-event-card__meta > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.fh-root .fh-event-card__meta svg {
    flex-shrink: 0;
    color: var(--primary);
}

.fh-root .fh-upcoming-services-mock__note {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    margin: 0 0 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--muted);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
}

.fh-root .fh-upcoming-services-mock .fh-event-card [aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Obituary + upcoming service — same card chrome */
.fh-root .fh-obituary,
.fh-root .fh-event-card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
    background: var(--white);
}

.fh-root .fh-obituary__header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.fh-root .fh-obituary__photo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.fh-root .fh-obituary__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fh-root .fh-obituary__header h3,
.fh-root .fh-event-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--heading);
    margin-bottom: 0.5rem;
}

.fh-root .fh-obituary__header p,
.fh-root .fh-event-card > p {
    margin: 0;
    line-height: 1.6;
    color: var(--foreground);
    font-size: .875rem;
}

.fh-root .fh-obituary__actions,
.fh-root .fh-event-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.fh-root .fh-obituary__publishers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.fh-root .fh-obituary__publisher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fh-root .fh-obituary__publisher-logo,
.fh-root .fh-obituary__publisher .img-author {
    flex-shrink: 0;
    align-self: center;
    width: auto;
    max-width: 5.5rem;
    height: 2rem;
    object-fit: contain;
    object-position: left center;
}

.fh-root .fh-obituary__publisher-text {
    margin: 0;
    line-height: 1.55;
    flex: 1;
    min-width: 0;
    font-size: .75rem;
    position: relative;
    top: 2px;
}

.fh-root .fh-obituary__publisher-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.fh-root .fh-obituary__publisher-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 1;
}

/* Follow obituaries (listing / detail tab) */
.fh-root .fh-follow-obituary {
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--primary-foreground);
    text-align: center;
}

.fh-root .fh-follow-obituary__inner {
    max-width: 36rem;
    margin: 0 auto;
}

.fh-root .fh-follow-obituary__alerts:not(:empty) {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.875rem;
    text-align: left;
}

.fh-root .fh-follow-obituary__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: var(--primary-foreground);
}

.fh-root .fh-follow-obituary__icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.fh-root .fh-follow-obituary__title {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--primary-foreground);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.fh-root .fh-follow-obituary__subtitle {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
}

.fh-root .fh-follow-obituary__form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: stretch;
    max-width: 32rem;
    margin: 0 auto;
}

.fh-root .fh-follow-obituary__input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.5rem 0.875rem;
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--heading);
    background: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
}

.fh-root .fh-follow-obituary__input::placeholder {
    color: var(--muted-foreground);
}

.fh-root .fh-follow-obituary__input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.fh-root .fh-follow-obituary__submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.fh-root .fh-follow-obituary__submit:not(:disabled):hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

.fh-root .fh-follow-obituary__legal {
    margin: 1rem 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.fh-root .fh-follow-obituary__link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 1;
}

.fh-root .fh-follow-obituary__link:hover {
    color: #e8c97a;
    opacity: 1;
}

/* Inline image CTA (obituaries tab, above sympathy flowers) */
.fh-root .fh-inline-cta {
    margin-top: 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.fh-root .fh-inline-cta__link {
    display: block;
    line-height: 0;
    text-decoration: none;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.fh-root .fh-inline-cta__link:hover {
    opacity: 0.92;
}

.fh-root .fh-inline-cta__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.fh-root .fh-inline-cta__img,
.fh-root .fh-inline-cta .img-responsive {
    display: block;
    width: 100%;
    height: auto;
}

/* Sympathy flowers grid (obituaries tab) */
.fh-root .fh-sympathy-flowers {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.fh-root .fh-sympathy-flowers__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.fh-root .fh-sympathy-flowers__title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--heading);
    margin: 0;
    line-height: 1.3;
}

.fh-root .fh-sympathy-flowers__view-all {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
}

.fh-root .fh-sympathy-flowers__cta {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.fh-root .fh-sympathy-flowers__cta:hover {
    color: #c9a04e;
    opacity: 1;
}

.fh-root .fh-sympathy-flowers__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fh-root .fh-sympathy-flowers__card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    width: 100%;
    margin: 0;
}

.fh-root .fh-sympathy-flowers__card:hover {
    border-color: rgba(45, 62, 80, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.fh-root .fh-sympathy-flowers__media {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--muted);
    height: auto !important;
    width: 100% !important;
}

.fh-root .fh-sympathy-flowers__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.fh-root .fh-sympathy-flowers__card:hover .fh-sympathy-flowers__media img {
    transform: scale(1.04);
}

.fh-root .fh-sympathy-flowers__content {
    padding: 1rem 1rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    text-align: left;
    width: 100% !important;
}

.fh-root .fh-sympathy-flowers__name {
    font-family: var(--font-sans);
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    line-height: 1.35;
    color: var(--heading) !important;
}

.fh-root .fh-sympathy-flowers__name:hover {
    color: var(--primary);
}

.fh-root .fh-sympathy-flowers__price {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-top: auto;
}

@media (max-width: 900px) {
    .fh-root .fh-sympathy-flowers__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fh-root .fh-sympathy-flowers__grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Items */
.fh-root .fh-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: .5rem 0;
}

.fh-root .fh-contact-row:last-child {
    border-bottom: none;
}

.fh-root .fh-contact-row__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.fh-root .fh-contact-row strong {
    display: block;
    color: var(--heading);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.fh-root .fh-contact-row p {
    margin: 0;
    color: var(--foreground);
    font-size: 0.875rem;
}

.fh-root .fh-contact-row a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fh-root .fh-contact-row a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.fh-root .fh-detail-layout__aside .fh-panel iframe {
    width: 100%;
    height: 250px;
    border: none;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
}

/* ======================================================
BUTTONS
====================================================== */

.fh-root .fh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.fh-root .fh-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.fh-root .fh-btn:hover {
    transform: translateY(-1px);
}

.fh-root .fh-btn--primary {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.fh-root .fh-btn--primary svg {
    fill: white;
}

.fh-root .fh-btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    opacity: 1;
    color: white;
}

.fh-root .fh-btn--primary:active {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 2px 8px var(--accent-glow);
    transform: translateY(0);
}

.fh-root .fh-btn--primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.fh-root .fh-btn--secondary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.fh-root .fh-btn--secondary:hover {
    background: #1f2e3f;
    border-color: #1f2e3f;
    opacity: 1;
}

.fh-root .fh-btn--outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--border);
}

.fh-root .fh-btn--outline:hover {
    border-color: var(--primary);
    background: rgba(45, 62, 80, 0.05);
    opacity: 1;
}

.fh-root .fh-btn--alert {
    background: var(--alert);
    color: var(--white);
    border-color: var(--alert);
}

.fh-root .fh-btn--alert:hover {
    background: var(--alert-hover);
    border-color: var(--alert-hover);
    box-shadow: 0 4px 16px var(--alert-glow);
    transform: translateY(-1px);
    opacity: 1;
}

.fh-root .fh-btn--alert:active {
    background: var(--alert-hover);
    border-color: var(--alert-hover);
    box-shadow: 0 2px 8px var(--alert-glow);
    transform: translateY(0);
}

.fh-root .fh-btn--alert:focus-visible {
    outline: 2px solid var(--alert);
    outline-offset: 3px;
}

.fh-root .fh-btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* ======================================================
CARD (Detail Page)
====================================================== */

.fh-root .fh-detail-layout__aside .fh-panel {
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    overflow: hidden;
    padding: 1.5rem;
}

.fh-root .fh-detail-layout__aside .fh-panel--plan {
    padding: 0;
    text-align: center;
}

.fh-root .fh-panel--plan > div {
    padding: 1.5rem;
}

.fh-root .fh-panel--plan .fh-btn {
    width: 100%;
    text-align: center;
    color: white;
    margin: 1rem 0 0;
}

/* Vertical rhythm between detail sections (legacy inline margins) */
@media (min-width: 1200px) {
    .fh-root .fh-tabs__panel > div > .fh-panel + .fh-panel {
        margin-top: 4rem;
    }
}

.fh-root .fh-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.fh-root .fh-panel > h3,
.fh-root .fh-tabs__panel > h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.fh-root .fh-panel > p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 1rem;
}

.fh-root p.lead {
    font-size: 1rem;
}

.fh-root .fh-panel > p a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
}

.fh-root .fh-detail-layout__aside .fh-panel .fh-btn {
    margin-top: 1rem;
}

.fh-root .fh-reviews-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.fh-root .fh-panel--plan p {
    margin: 0;
    font-size: .875rem;
}

/* ======================================================
CTA GROUP
====================================================== */

.fh-root .fh-btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Hero CTA buttons â€“ white text variant */
.fh-root .fh-hero--detail .fh-btn-group .fh-btn--primary {
    background: var(--accent);
    color: white;
}

.fh-root .fh-hero--detail .fh-btn-group .fh-btn--secondary {
    background: white;
    color: var(--primary);
    border-color: rgba(255, 255, 255, 0.4);
}

.fh-root .fh-hero--detail .fh-btn-group .fh-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--white);
}

/* ======================================================
HERO RATING BOX (Detail Page Override)
====================================================== */

.fh-root .fh-hero--detail .fh-rating-chip {
    background: none;
    color: var(--white);
    margin: 0;
    font-size: .875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
}

.fh-root .fh-hero--detail .fh-rating-chip small {
    opacity: 0.8;
}

.fh-root .fh-hero--detail .fh-rating-chip--partner {
    background: var(--primary);
}

/* ======================================================
DETAIL SERVICES GRID (#fh-services-offered uses .fh-article-grid in HTML)
====================================================== */

.fh-root #fh-services-offered .fh-article-grid,
.fh-root #fh-services-offered .fh-service-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0 0;
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--primary);
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.fh-root #fh-services-offered .fh-service-checklist__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.fh-root #fh-services-offered .fh-service-checklist__item--unavailable {
    opacity: 0.7;
}

.fh-root #fh-services-offered .fh-service-checklist__item--unavailable span:not(.fh-service-checklist__no) {
    text-decoration: line-through;
}

.fh-root #fh-services-offered .fh-icon-check {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

/* CTA Banner */
.fh-root .fh-cta-banner {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
}

.fh-root .fh-cta-banner h2 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.fh-root .fh-cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.fh-root .fh-cta-banner .fh-btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fh-root .fh-cta-banner .fh-btn-group .fh-btn {
    font-size: 1rem;
    padding: 1rem 2rem;
}

.fh-root .fh-cta-banner .fh-btn-group .fh-btn--outline {
    color: white;
}

.fh-root .fh-cta-banner .fh-btn-group .fh-btn--outline:hover {
border-color: white;
    opacity: .85;
}

/* Mobile CTA */
.fh-root .fh-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1rem;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.fh-root .fh-mobile-bar .fh-btn {
    flex: 1;
    max-width: none;
}

/* ======================================================
   FOOTER (Legacy site links — type 5)
   ====================================================== */

.fh-root .fh-footer[data-footer-type="5"] {
    background: var(--primary);
    color: var(--white);
    padding: var(--space-2xl) 0 0;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: clamp(2rem, 5vw, 60px);
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__logo {
    display: flex;
    align-items: center;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__logo-link {
    display: inline-flex;
    line-height: 0;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__logo img {
    height: 40px;
    width: auto;
    max-width: 100%;
    filter: invert(1) grayscale(1) brightness(3);
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__social {
    margin-top: var(--space-lg);
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__social .footer-social {
    display: flex;
    gap: 1rem;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__social-link {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__social-link:hover {
    opacity: 1;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__social-link svg {
    width: 100%;
    height: 100%;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.5rem, 3vw, 40px);
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__column h3 {
    color: var(--accent);
    font-size: 16px;
    margin-bottom: var(--space-md);
    font-family: var(--font-sans);
    font-weight: 600;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__column li {
    margin-bottom: 10px;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__column a {
    text-decoration: none;
    color: var(--white);
    font-size: 16px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__column a:hover {
    opacity: 1;
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__bottom {
    margin-top: var(--space-2xl);
    padding: var(--space-lg) 24px var(--space-xl);
    text-align: center;
    font-size: 13px;
    color: var(--white);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.fh-root .fh-footer[data-footer-type="5"] .fh-footer__copyright {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.75;
    color: var(--white);
    font-family: var(--font-sans);
}

/* ======================================================
   RESPONSIVE
   ====================================================== */

/* Tablet and below (1100px) */
@media (max-width: 1100px) {
    .fh-root .fh-container {
        padding: 0 20px;
    }

    .fh-root .fh-article-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .fh-root .fh-partner-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .fh-root .fh-partner-layout__copy h2 {
        font-size: 2.5rem;
    }

    .fh-root .fh-state-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .fh-root .fh-hero h1 {
        font-size: 3rem;
    }

    .fh-root .fh-section__header h2 {
        font-size: 2.5rem;
    }

    .fh-root .fh-browse-states h3.fh-browse-states__title.heading.h-3 {
        font-size: 2.5rem;
    }

    .fh-root .fh-value-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fh-root .fh-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .fh-root .fh-rating-breakdown__row {
        max-width: 100%;
    }

    .fh-root .fh-footer[data-footer-type="5"] .fh-footer__container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .fh-root .fh-footer[data-footer-type="5"] .fh-footer__nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .fh-root .fh-hero.fh-hero--detail .fh-hero__content {
        align-items: center;
        margin: 0 auto;
    }

    .fh-root .fh-hero.fh-hero--detail .fh-hero__content > div {
        margin: 0 auto;
    }
}

/* Mobile landscape and below (768px) */
@media (max-width: 768px) {
    .fh-root .fh-container {
        padding: 0 16px;
    }

    .fh-root .fh-section {
        padding: var(--space-xl) 0;
    }

    .fh-root .fh-hero + .fh-section {
        padding-top: 6rem;
    }

    .fh-root .fh-section__header {
        margin-bottom: 32px;
    }

    .fh-root .fh-section__header p {
        font-size: 1rem;
    }

    .fh-root .fh-browse-states__lead {
        font-size: 1rem;
    }

    .fh-root .fh-hero {
        height: 460px;
    }

    .fh-root .fh-hero--results {
        height: 230px;
    }

    .fh-root .fh-hero--results + .fh-section {
        padding-top: 9rem;
    }

    .fh-root .fh-hero p {
        font-size: 1rem;
    }

    .fh-root .fh-hero__content {
        padding: 0 16px;
        width:100%;
    }

    .fh-root .fh-search-panel {
        padding: 1.5rem;
    }

    .fh-root .fh-search__input {
        font-size: 0.9rem;
    }

    .fh-root .fh-carousel__item {
        min-width: 240px;
    }

    .fh-root .fh-article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fh-root .fh-value-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .fh-root .fh-value-grid__item {
        padding: 1rem;
    }

    .fh-root .fh-partner-layout__copy p {
        font-size: 1rem;
    }

    .fh-root .fh-state-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .fh-root .fh-state-grid__btn {
        padding: 12px;
    }

    .fh-root .fh-listing-card__body,
    .fh-root .fh-article-card__body {
        padding: 1.25rem;
    }

    .fh-root .fh-results-grid {
        grid-template-columns: 1fr;
    }

    .fh-root .fh-footer[data-footer-type="5"] .fh-footer__container {
        padding: 0 16px;
    }

    .fh-root .fh-footer[data-footer-type="5"] .fh-footer__nav {
        grid-template-columns: 1fr;
    }

    .fh-root .fh-footer[data-footer-type="5"] .fh-footer__bottom {
        padding-left: 16px;
        padding-right: 16px;
    }

    .fh-root #fh-services-offered .fh-article-grid,
    .fh-root #fh-services-offered .fh-service-checklist {
        grid-template-columns: repeat(2, 1fr);
    }

    .fh-root .fh-btn-group {
        flex-direction: column;
        width: 100%;
    }

    .fh-root .fh-btn-group .fh-btn {
        width: 100%;
    }

    /* Detail hero: keep three CTAs on one row on mobile */
    .fh-root .fh-hero--detail .fh-btn-group {
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        gap: 0.4rem;
        justify-content: center;
    }

    .fh-root .fh-hero--detail .fh-btn-group .fh-btn {
        width: auto;
        min-width: 0;
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
        gap: 0.3rem;
        white-space: nowrap;
    }

    .fh-root .fh-hero--detail .fh-btn-group .fh-btn svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .fh-root .fh-hero--detail .fh-btn-group .fh-btn__text--desktop {
        display: none;
    }

    .fh-root .fh-hero--detail .fh-btn-group .fh-btn__text--mobile {
        display: inline;
    }

    .fh-root .fh-hero h1 {
        font-size: 2.5rem;
    }

    .fh-root .fh-panel {
        padding: 1.25rem;
        margin: 0;
    }

    .fh-root .fh-gallery {
        grid-template-columns: 1fr;
    }

    .fh-root .fh-tabs__tab {
        padding: 0.75rem 0;
        font-size: 0.875rem;
    }

    .fh-root .fh-tabs__tab svg {
        width: 18px;
        height: 18px;
    }

    .fh-root .fh-tabs__tab .fh-tabs__label--desktop {
        display: none;
    }

    .fh-root .fh-tabs__tab .fh-tabs__label--mobile {
        display: inline;
    }

    .fh-root .fh-article-card,
    .fh-root .fh-event-card,
    .fh-root .fh-obituary,
    .fh-root .fh-review {
        padding: 1rem;
    }

    .fh-root .fh-event-card__actions,
    .fh-root .fh-obituary__actions {
        flex-direction: column;
    }

    .fh-root .fh-event-card__actions .fh-btn,
    .fh-root .fh-obituary__actions .fh-btn {
        width: 100%;
    }

    .fh-root .fh-rating-breakdown__value {
        font-size: 2rem;
    }

    .fh-root .fh-rating-breakdown__score {
        float: none;
        margin: 0 auto 1rem;
    }

    .fh-root .fh-review__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .fh-root .fh-review__date {
        align-self: flex-end;
    }

    .fh-root .fh-resource-link {
        flex-direction: column;
        align-items: flex-start;
    }

    .fh-root .fh-resource-link svg {
        margin-left: 0;
        margin-top: 0.5rem;
        align-self: flex-end;
    }

    .fh-root .fh-contact-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .fh-root .fh-detail-layout__aside .fh-panel iframe {
        height: 200px;
    }

    .fh-root .fh-obituary__header {
        flex-direction: column;
    }
}

/* Small mobile (480px) */
@media (max-width: 480px) {
    .fh-root .fh-container {
        padding: 0 12px;
    }

    .fh-root .fh-section {
        padding: var(--space-lg) 0;
    }

    .fh-root .fh-section__header {
        margin-bottom: 24px;
    }

    .fh-root .fh-section__header h2 {
        font-size: 1.75rem;
    }

    .fh-root .fh-browse-states h3.fh-browse-states__title.heading.h-3 {
        font-size: 1.75rem;
    }

    .fh-root .fh-hero {
        height: auto;
        padding: 120px 0 80px;
    }

    .fh-root .fh-hero h1 {
        font-size: 28px;
    }

    .fh-root .fh-hero p {
        font-size: 0.9rem;
    }

    .fh-root .fh-search-panel {
        padding: 1.25rem;
        margin-bottom: -6rem;
    }

    .fh-root .fh-search-form {
        flex-direction: column;
    }

    .fh-root .fh-search__input {
        width: 100%;
        height: 48px;
    }

    .fh-root .fh-search__submit {
        height: 46px;
        width: 100%;
    }

    .fh-root .fh-carousel__item {
        min-width: 200px;
    }

    .fh-root .fh-listing-card__image,
    .fh-root .fh-article-card__image {
        height: 140px;
    }

    .fh-root .fh-listing-card .fh-listing-card__slick,
    .fh-root .fh-listing-card .fh-listing-card__slick .fh-listing-card__image {
        height: 140px;
    }

    .fh-root img.fh-listing-card__image {
        height: 140px;
    }

    .fh-root .fh-listing-card__body,
    .fh-root .fh-article-card__body {
        padding: 1rem;
    }

    .fh-root .fh-listing-card h3,
    .fh-root .fh-article-card h3,
    .fh-root .fh-obituary__header h3,
    .fh-root .fh-event-card h3 {
        font-size: 1.15rem;
    }

    .fh-root .fh-value-grid__icon {
        width: 56px;
        height: 56px;
    }

    .fh-root .fh-value-grid__icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .fh-root .fh-value-grid__item h3 {
        font-size: 1.25rem;
    }

    .fh-root .fh-partner-layout__copy h2 {
        font-size: 1.75rem;
    }

    .fh-root .fh-state-grid {
        grid-template-columns: 1fr;
    }

    .fh-root .fh-state-grid__btn h3 {
        font-size: 14px;
    }

    /* Detail Page Responsive */
    .fh-root .fh-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .fh-root .service-meta {
        flex-direction: column;
    }

    .fh-root .fh-obituary__header {
        flex-direction: column;
    }

    .fh-root .fh-obituary__photo {
        width: 100%;
        height: 200px;
    }

    .fh-root .fh-rating-breakdown__row {
        flex-wrap: wrap;
    }

    .fh-root .fh-rating-breakdown__row > span:last-child {
        min-width: auto;
        width: 100%;
        text-align: left;
        margin-top: 0.25rem;
    }

    .fh-root .fh-cta-banner {
        padding: 2rem 0;
    }

    .fh-root .fh-cta-banner h2 {
        font-size: 1.5rem;
    }

    .fh-root .fh-cta-banner p {
        font-size: 1rem;
    }

    .fh-root .fh-mobile-bar {
        display: flex;
        gap: 0.75rem;
    }

    .fh-root .fh-cta-banner {
        display: none;
    }

    .fh-root #fh-services-offered .fh-article-grid,
    .fh-root #fh-services-offered .fh-service-checklist {
        grid-template-columns: 1fr;
    }
}

/* Results widget type 2: list/grid vs map (fora de .results-body — regras do tema não aplicam; !important garante sobreposição ao core) */
.fh-root .fh-section--muted .summary-list-map:not(.is-active) {
    display: none !important;
}

.fh-root .fh-section--muted .summary-list-map.is-active {
    display: block !important;
}

.fh-root .fh-section--muted .summary-list-map #map_canvas {
    width: 100% !important;
    height: 500px !important;
}

/* -----------------------------------------------------------------------------
 * Follow-loop modals (.details-default está fora de .fh-root — tokens espelhados)
 * ----------------------------------------------------------------------------- */
.details-default > .details-modal.modal-follow-loop-form .modal-default.message-modal .modal-info .modal-follow-loop-form-svg {
    background: 2d3e50;
    border-width: 1px;
    border-style: solid;
    border-color: #2d3e50;
    color: #white;
}

.details-default > .details-modal.modal-follow-loop-form .modal-default.message-modal .modal-info .modal-follow-loop-form-svg__icon {
    display: block;
    height: 24px;
    width: 24px;
}

.details-default > .details-modal.modal-follow-loop-form .modal-default.message-modal .modal-info .heading.h-4 {
    color: #293548;
}

.details-default > .details-modal.modal-follow-loop-form .modal-default.message-modal .modal-info .modal-follow-loop-form-paragraph {
    color: #6b6862;
}

.details-default > .details-modal.modal-follow-loop-form .modal-default.message-modal .modal-form .modal-follow-loop-form-input-email {
    border-color: #e5e5e5;
}

.details-default > .details-modal.modal-follow-loop-form .modal-default.message-modal .modal-form .form-actions.modal-follow-loop-form-footer .modal-follow-loop-form-submit-button {
    background: #dcb05e !important;
    border-color: #dcb05e !important;
    color: #fff !important;
}

.details-default > .details-modal.modal-follow-loop-form .modal-default.message-modal .modal-form .form-actions.modal-follow-loop-form-footer .modal-follow-loop-form-submit-button:hover {
    background: #c9a04e !important;
    border-color: #c9a04e !important;
}

.listing-wrapper .content-header .action-buttons .button.modal-follow-loop-form-open {
    background-color: #2d3e50;
    border-color: #2d3e50;
    color: #fff;
}

.listing-wrapper .content-header .action-buttons .button.modal-follow-loop-form-open:hover {
    background-color: #1f2e3f;
    border-color: #1f2e3f;
}

.details-default > .details-modal .modal-default.message-modal .modal-follow-loop-close {
    border-color: #e5e5e5;
    color: #6b6862;
    background: #fff;
}

.details-default > .details-modal .modal-default.message-modal .modal-follow-loop-close:hover {
    color: #2d3e50;
    border-color: #d4b896;
}

.details-default > .details-modal.modal-follow-loop-return .modal-info h3.modal-follow-loop-return-title {
    color: #293548;
}

.details-default > .details-modal.modal-follow-loop-return .modal-info span {
    color: #6b6862;
}

.details-default > .details-modal.modal-follow-loop-return .modal-follow-loop-return-tryagain {
    color: #2d3e50;
    border-color: #e5e5e5;
}

.details-default > .details-modal.modal-follow-loop-return .modal-follow-loop-return-tryagain svg path {
    fill: currentColor;
}

/* -----------------------------------------------------------------------------
 * Fancybox 3 (vídeo iframe no hero): main.css força .fancybox-content com
 * position:relative e transform:unset !important, o que impede o JS de centrar
 * o lightbox — o iframe aparecia no fluxo da página (fim / fora do ecrã).
 * ----------------------------------------------------------------------------- */
body.fancybox-active .fancybox-container .fancybox-slide--iframe .fancybox-content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(92vw, 960px) !important;
    max-width: 92vw !important;
    max-height: 85vh !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    justify-content: initial !important;
}

body.fancybox-active .fancybox-container .fancybox-slide--iframe .fancybox-content .fancybox-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* Sem aspect-ratio (navegadores antigos): altura proporcional ao viewport */
@supports not (aspect-ratio: 1) {
    body.fancybox-active .fancybox-container .fancybox-slide--iframe .fancybox-content {
        height: min(51.75vw, 85vh) !important;
    }
}

/* -----------------------------------------------------------------------------
 * Fancybox 3 — imagens: main.css força img a 712×432px !important e
 * .fancybox-content a 70vw×50vh + transform:unset; em ecrãs pequenos corta
 * ou desalinha. Lightbox fluido, centrado, limitado ao viewport.
 * ----------------------------------------------------------------------------- */
body.fancybox-active .fancybox-container .fancybox-slide--image .fancybox-content {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    max-width: 92vw !important;
    height: auto !important;
    max-height: 85vh !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.fancybox-active .fancybox-container .fancybox-slide--image .fancybox-content img.fancybox-image {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 85vh !important;
    object-fit: contain !important;
}

.fh-root.fh-listing--unclaimed .fh-hero-carousel__slide--image img {
    filter: grayscale(1);
}

.button.is-primary:hover {
    color: white;
}

.button.is-gold:hover {
    border-color: #b49561;
    color: white;
}

.fh-root .fh-search__locate a#locateMeUnderSearch {
    text-transform: capitalize;
}



