/*
 * Provider homepage (/providers/{slug}). Layout only for this page: every
 * selector is scoped to `.bl.ph` on <main>. Colours, type scale, cards, facts,
 * chips and read-more come from business-listing.css and its --bl-* tokens
 * (CoverTheme supplies cover-derived values inline). No global selectors.
 */

.bl.ph {
    --ph-gutter: 32px;
    --ph-glass: rgba(255, 255, 255, 0.62);
    --ph-glass-line: rgba(255, 255, 255, 0.7);
    --ph-shadow: 0 18px 44px rgba(23, 34, 27, 0.10);

    overflow-x: clip;
    padding-bottom: 0;
    font-family: Ubuntu, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.bl.ph *,
.bl.ph *::before,
.bl.ph *::after {
    box-sizing: border-box;
}

.bl.ph .ph-wrap {
    width: min(var(--bl-width), calc(100% - var(--ph-gutter)));
    margin: 0 auto;
}

.bl.ph a {
    color: inherit;
}

.bl.ph .ph-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 22px;
    color: var(--bl-muted);
    font-size: 13px;
}

.bl.ph .ph-crumbs a {
    text-decoration: none;
}

.bl.ph .ph-crumbs a:hover {
    color: var(--bl-accent);
    text-decoration: underline;
}

/* ---------- Hero ---------- */

.bl.ph .ph-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
    padding: clamp(28px, 4vw, 52px) 0 clamp(36px, 5vw, 64px);
}

.bl.ph .ph-hero.is-text-only {
    grid-template-columns: minmax(0, 760px);
}

.bl.ph .ph-hero-copy {
    min-width: 0;
}

.bl.ph .ph-hero h1 {
    margin: 0;
    color: var(--bl-ink);
    font-family: "Nunito", Ubuntu, system-ui, sans-serif;
    font-size: clamp(36px, 5.2vw, 64px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.bl.ph .ph-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 16px 0 0;
    color: var(--bl-ink-soft);
    font-size: 16px;
    font-weight: 600;
}

.bl.ph .ph-location .bl-icon {
    color: var(--bl-accent);
}

.bl.ph .ph-descriptor {
    max-width: 58ch;
    margin: 18px 0 0;
    color: var(--bl-ink-soft);
    font-size: clamp(17px, 1.6vw, 19px);
    line-height: 1.6;
}

.bl.ph .ph-status {
    margin: 14px 0 0;
    color: var(--bl-ink-soft);
    font-size: 15px;
}

/* Actions: one filled primary, quiet secondary pills, icon-only share. */
.bl.ph .ph-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
}

.bl.ph .ph-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 20px;
    border: 1.5px solid var(--bl-hairline);
    border-radius: 999px;
    background: var(--ph-glass);
    color: var(--bl-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bl.ph .ph-btn:hover {
    border-color: var(--bl-ink);
    background: #FFFFFF;
}

.bl.ph .ph-btn.is-primary {
    border-color: var(--bl-cta);
    background: var(--bl-cta);
    color: #FFFFFF;
}

.bl.ph .ph-btn.is-primary:hover {
    border-color: var(--bl-cta-hover);
    background: var(--bl-cta-hover);
}

.bl.ph .ph-btn.is-icon {
    width: 48px;
    padding: 0;
}

.bl.ph .ph-btn img {
    width: 18px;
    height: 18px;
}

.bl.ph .ph-btn.is-copied {
    border-color: var(--bl-accent);
    color: var(--bl-accent);
}

.bl.ph .ph-owner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 700;
}

.bl.ph .ph-owner a {
    color: var(--bl-accent);
    text-underline-offset: 3px;
}

/* Visual: tilted cover, clean logo stamp and globe on the corner. */
.bl.ph .ph-visual {
    position: relative;
    min-width: 0;
    min-height: 440px;
}

.bl.ph .ph-visual.is-globe-only {
    display: grid;
    place-items: center;
    min-height: 340px;
}

.bl.ph .ph-photo {
    position: absolute;
    inset: 36px 8px 8px 8px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--bl-wash);
    box-shadow: var(--ph-shadow);
    transform: rotate(2deg);
}

.bl.ph .ph-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bl.ph .ph-photo img.is-contained {
    object-fit: contain;
    padding: 48px 24px 24px;
}

.bl.ph .ph-world {
    position: absolute;
    top: -34px;
    right: clamp(-46px, calc((var(--bl-width) - 100vw) / 2 + 4px), -12px);
    z-index: 3;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.bl.ph .ph-visual.is-globe-only .ph-world {
    position: relative;
    top: auto;
    right: -14px;
    width: 280px;
    height: 280px;
}

.bl.ph .ph-world.is-dragging {
    cursor: grabbing;
}

.bl.ph .ph-world::before {
    content: "";
    position: absolute;
    left: 14%;
    right: 6%;
    bottom: -6%;
    height: 22%;
    border-radius: 50%;
    background: rgba(4, 15, 19, 0.24);
    filter: blur(16px);
    pointer-events: none;
}

.bl.ph .ph-world canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Logo zoom: the button never scales, only its surface (stable hit area). */
.bl.ph .ph-logo {
    appearance: none;
    position: absolute;
    left: -14px;
    bottom: 22px;
    z-index: 4;
    width: 96px;
    height: 96px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: zoom-in;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Without a photo the stamp overlaps the globe's lower left edge. */
.bl.ph .ph-visual.is-globe-only .ph-logo:not(.is-feature) {
    left: calc(50% - 170px);
    bottom: calc(50% - 150px);
}

.bl.ph .ph-logo.is-feature {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(220px, 60%);
    height: auto;
    aspect-ratio: 1;
}

.bl.ph .ph-logo-surface {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    pointer-events: none;
    transform-origin: bottom left;
    transition: transform 0.38s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.bl.ph .ph-logo.is-feature .ph-logo-surface {
    transform-origin: center;
}

.bl.ph .ph-logo-surface img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    filter: drop-shadow(0 5px 12px rgba(23, 34, 27, 0.14));
}

.bl.ph .ph-logo.is-zoomed .ph-logo-surface {
    transform: scale(1.45);
}

.bl.ph .ph-logo.is-zoomed {
    cursor: zoom-out;
}

@media (hover: hover) and (pointer: fine) {
    .bl.ph .ph-logo:not([data-logo-touch]):hover .ph-logo-surface {
        transform: scale(1.45);
    }
}

/* ---------- Section navigation ---------- */
.bl.ph {
    --ph-header-offset: var(--tradel-public-header-height, 73px);
}
@media (max-width: 1024px) {
    .bl.ph { --ph-header-offset: var(--site-header-mobile-height, 118px); }
}
.bl.ph .ph-nav {
    position: sticky;
    top: calc(var(--ph-header-offset) + 8px);
    z-index: 20;
    margin: 0 auto;
    transition: top .2s ease;
}
body:has(> .main-header.is-scroll-hidden) .bl.ph .ph-nav {
    top: 8px;
}
@media (prefers-reduced-motion: reduce) {
    .bl.ph .ph-nav { transition: none; }
}

.bl.ph .ph-nav ul {
    display: flex;
    gap: 4px;
    width: max-content;
    max-width: 100%;
    margin: 0;
    padding: 5px;
    overflow-x: auto;
    list-style: none;
    border: 1px solid var(--ph-glass-line);
    border-radius: 999px;
    background: var(--ph-glass);
    box-shadow: 0 8px 24px rgba(23, 34, 27, 0.08);
    scrollbar-width: none;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.bl.ph .ph-nav ul::-webkit-scrollbar {
    display: none;
}

.bl.ph .ph-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--bl-ink-soft);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.bl.ph .ph-nav a:hover {
    background: var(--bl-accent-soft);
    color: var(--bl-accent);
}

/* ---------- Facts ---------- */

.bl.ph .ph-facts {
    margin-top: 28px;
    padding: 26px 0;
    border-top: 1px solid var(--bl-hairline);
    border-bottom: 1px solid var(--bl-hairline);
}

.bl.ph .ph-facts .bl-param-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.bl.ph .ph-facts dd a {
    color: var(--bl-accent);
    text-decoration: none;
    overflow-wrap: break-word;
}

.bl.ph .ph-facts dd a:hover {
    text-decoration: underline;
}

/* ---------- Sections ---------- */

.bl.ph .ph-section {
    padding: clamp(48px, 6vw, 80px) 0 0;
    scroll-margin-top: calc(var(--ph-header-offset) + 68px);
}

.bl.ph .ph-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 26px;
}

.bl.ph .ph-h2 {
    margin: 0;
    color: var(--bl-ink);
    font-family: "Nunito", Ubuntu, system-ui, sans-serif;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.12;
}

.bl.ph .ph-h2::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 12px;
    border-radius: 50%;
    background: var(--bl-accent);
    vertical-align: middle;
}

.bl.ph .ph-lede {
    max-width: 62ch;
    margin: 8px 0 0;
    color: var(--bl-ink-soft);
    font-size: 15.5px;
    line-height: 1.6;
}

/* Offers */
.bl.ph .ph-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}

.bl.ph .ph-filters .bl-chip-btn {
    min-height: 40px;
    padding: 7px 14px;
    font-size: 13.5px;
}

.bl.ph .ph-filters .bl-chip-btn span {
    margin-left: 4px;
    opacity: 0.7;
}

.bl.ph .ph-offers .bl-area-list {
    gap: 32px 22px;
}

.bl.ph .ph-offers .bl-area-title {
    font-size: 17px;
}

.bl.ph .ph-card-map {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    color: var(--bl-ink-soft);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.bl.ph .ph-card-map .bl-icon {
    width: 14px;
    height: 14px;
}

.bl.ph .bl-area-card[hidden] {
    display: none;
}

.bl.ph .ph-more {
    margin-top: 28px;
    text-align: center;
}

.bl.ph .ph-pending .bl-area-card-link {
    opacity: 0.82;
}

.bl.ph .ph-pending-state {
    color: #735D34;
    font-size: 13px;
    font-weight: 700;
}

/* About */
.bl.ph .ph-about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: clamp(28px, 5vw, 72px);
    align-items: start;
}

.bl.ph .ph-about > :only-child {
    grid-column: 1 / -1;
}

.bl.ph .ph-about-copy {
    max-width: 68ch;
    margin: 0;
    color: var(--bl-ink);
    font-size: 17px;
    line-height: 1.75;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.bl.ph .ph-aside {
    padding: 22px 24px;
    border: 1px solid var(--ph-glass-line);
    border-radius: var(--bl-radius);
    background: var(--ph-glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.bl.ph .ph-aside h3 {
    margin: 0 0 12px;
    color: var(--bl-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bl.ph .ph-aside ul {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bl.ph .ph-aside li a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    color: var(--bl-ink);
    font-weight: 700;
    text-decoration: none;
}

.bl.ph .ph-aside li a:hover {
    color: var(--bl-accent);
}

.bl.ph .ph-aside li span {
    color: var(--bl-muted);
    font-weight: 600;
}

/* Good to know: compact reviewed points, each with the offers it applies to. */
.bl.ph .ph-fit {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bl.ph .ph-fit-item {
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid var(--ph-glass-line);
    border-radius: var(--bl-radius);
    background: var(--ph-glass);
}

.bl.ph .ph-fit-item h3 {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: var(--bl-ink);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.35;
}

.bl.ph .ph-fit-item h3 .bl-icon {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    color: var(--bl-accent);
}

.bl.ph .ph-fit-item p {
    margin: 6px 0 0 26px;
    color: var(--bl-ink-soft);
    font-size: 14px;
    line-height: 1.5;
}

.bl.ph .ph-fit-offers {
    display: grid;
    gap: 6px;
    margin: 10px 0 0 26px;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
}

.bl.ph .ph-fit-offers a {
    color: var(--bl-accent);
    font-weight: 700;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.bl.ph .ph-fit-offers span {
    display: block;
    color: var(--bl-ink-soft);
    line-height: 1.45;
}

/* Conditional points keep their condition visible, never shortened. */
.bl.ph .ph-fit-offers .is-conditional span {
    font-style: italic;
}

/* Gallery: one large photo and a calm grid, existing lazy images only. */
.bl.ph .ph-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: clamp(120px, 14vw, 190px);
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bl.ph .ph-gallery li {
    overflow: hidden;
    border-radius: 16px;
    background: var(--bl-wash);
}

.bl.ph .ph-gallery li:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.bl.ph .ph-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Location */
.bl.ph .ph-where {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}

.bl.ph .ph-where > :only-child {
    grid-column: 1 / -1;
}

.bl.ph .ph-where h3 {
    margin: 0 0 8px;
    color: var(--bl-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bl.ph .ph-base {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.bl.ph .ph-base .bl-icon {
    width: 22px;
    height: 22px;
    color: var(--bl-accent);
}

.bl.ph .ph-area-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bl.ph .ph-area-list li {
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--bl-accent-soft);
    color: var(--bl-ink);
    font-size: 14px;
    font-weight: 650;
}

.bl.ph .ph-where-block + .ph-where-block {
    margin-top: 26px;
}

.bl.ph .ph-where .bl-provider-places {
    margin: 0;
}

/* Contact */
.bl.ph .ph-contact {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    padding: clamp(28px, 4vw, 44px);
    border: 1px solid var(--ph-glass-line);
    border-radius: 28px;
    background:
        radial-gradient(80% 120% at 0% 0%, var(--bl-wash) 0%, transparent 70%),
        var(--ph-glass);
    box-shadow: var(--ph-shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.bl.ph .ph-contact > :only-child {
    grid-column: 1 / -1;
}

.bl.ph .ph-contact .ph-actions {
    margin-top: 20px;
}

.bl.ph .ph-share h3 {
    margin: 0;
    color: var(--bl-ink);
    font-size: 17px;
    font-weight: 800;
}

.bl.ph .ph-share p {
    margin: 6px 0 0;
    color: var(--bl-ink-soft);
    font-size: 14.5px;
    line-height: 1.5;
}

.bl.ph .ph-share .ph-actions {
    margin-top: 14px;
}

.bl.ph .ph-share .ph-btn {
    min-height: 42px;
    padding: 9px 15px;
    font-size: 14px;
}

/* Ownership entry: functional, deliberately quiet at the end of the page. */
.bl.ph .ph-ownership {
    margin-top: clamp(40px, 5vw, 64px);
    padding: 18px 0 40px;
    border-top: 1px solid var(--bl-hairline);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .bl.ph .ph-hero,
    .bl.ph .ph-about,
    .bl.ph .ph-where,
    .bl.ph .ph-contact {
        grid-template-columns: minmax(0, 1fr);
    }

    .bl.ph .ph-visual {
        min-height: 380px;
    }

    .bl.ph .ph-world {
        top: -26px;
        right: -14px;
        width: 168px;
        height: 168px;
    }

    .bl.ph .ph-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .bl.ph {
        --ph-gutter: 32px;
    }

    .bl.ph .ph-hero {
        gap: 28px;
        padding-top: 20px;
    }

    .bl.ph .ph-visual {
        min-height: 300px;
    }

    .bl.ph .ph-photo {
        inset: 30px 5px 5px 5px;
        border-radius: 22px;
        transform: rotate(1.5deg);
    }

    .bl.ph .ph-world {
        top: -18px;
        right: -10px;
        width: 128px;
        height: 128px;
    }

    .bl.ph .ph-visual.is-globe-only .ph-world {
        right: -8px;
        width: 220px;
        height: 220px;
    }

    .bl.ph .ph-visual.is-globe-only .ph-logo:not(.is-feature) {
        left: calc(50% - 134px);
        bottom: calc(50% - 118px);
    }

    .bl.ph .ph-logo {
        left: 10px;
        bottom: 12px;
        width: 72px;
        height: 72px;
    }

    /* Keep the enlarged standalone logo within the viewport. */
    .bl.ph .ph-logo.is-feature {
        width: min(200px, calc((100vw - 32px) / 1.45));
    }

    .bl.ph .ph-actions .ph-btn:not(.is-icon) {
        flex: 1 1 auto;
    }

    /* The section navigation sits right below the hero on phones; keep one
       primary action and share on a single row. */
    .bl.ph .ph-hero .ph-btn.is-jump {
        display: none;
    }

    .bl.ph .ph-nav a {
        min-height: 34px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .bl.ph .ph-facts .bl-param-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .bl.ph .ph-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 132px;
        gap: 8px;
    }

    .bl.ph .ph-contact {
        padding: 22px 18px;
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bl.ph .ph-logo-surface,
    .bl.ph .ph-btn {
        transition: none;
    }
}
