/* Organisation profile (murm_node single). Shares the directory's visual language:
   white cards, #e4e7ec borders, 14px radii, accent pills, soft media backgrounds. */

/* The theme's own page title + author/date byline are meaningless for a synced organisation
   node — the profile renders its own name inside the hero, anchored to the identity block.
   Hide the theme's so the name isn't duplicated or left floating above the banner. */
.single-murm_node .et_post_meta_wrapper .post-meta,
.single-murm_node .entry-title {
    display: none;
}

/* These profiles carry no sidebar content, so the theme's reserved right-sidebar column just
   leaves the page hugging the left with dead space beside it. Reclaim it: full-width content
   area with the (centred, max-width) profile sitting in balanced margins. */
.single-murm_node #left-area {
    width: 100%;
    padding-right: 0;
}

.single-murm_node #sidebar {
    display: none;
}

/* Divi draws a 1px vertical divider between content and sidebar via `.container:before`,
   pinned at the sidebar boundary (~79% across). With the sidebar hidden and the content
   reclaimed to full width, that line just floats across the page and the content renders
   straight over it. Remove it on node pages. */
.single-murm_node #main-content .container:before {
    display: none !important;
}

.murmfed-profile {
    --murmfed-accent: #2b7a78;
    /* One consistent gutter for every block (logo, name, text, cards) so they share a single
       left/right alignment line; the banner alone breaks out of it to sit full-bleed. */
    --murmfed-gutter: 1.75rem;
    max-width: 880px;
    margin: 1.75rem auto 2.5rem;
    padding-inline: var(--murmfed-gutter);
    color: #344054;
    font-size: 1rem;
    line-height: 1.6;
}

.murmfed-profile * {
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .murmfed-profile {
        --murmfed-gutter: 1.15rem;
    }
}

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

.murmfed-profile__hero {
    margin-bottom: 1.5rem;
}

.murmfed-profile__banner {
    position: relative;
    /* Full-bleed: break out of the profile gutter so the cover spans the whole card width, with
       the logo overlapping it inset by the gutter — a deliberate margin of banner, not a sliver. */
    margin-inline: calc(-1 * var(--murmfed-gutter));
    aspect-ratio: 3 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #f5f7f5;
}

.murmfed-profile__banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* No banner: a compact horizontal logo + name lockup. */
.murmfed-profile__head {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.murmfed-profile__head:not(.has-banner) .murmfed-profile__head-info {
    flex: 1 1 auto;
}

/* With a banner: the logo overlaps the cover bottom-left, then the name + meta + CTA stack
   directly beneath it (the LinkedIn / X pattern) — no dead space floating beside the logo.
   The head is its own stacking layer so the logo paints above the position:relative banner. */
.murmfed-profile__head.has-banner {
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    /* No extra padding: the head inherits the profile gutter, so the logo, name and everything
       below share one alignment line, and a deliberate gutter-width strip of banner shows to the
       logo's left — the standard overlapping-logo lockup, not a flush edge or a thin sliver. */
    padding: 0;
}

.murmfed-profile__head.has-banner .murmfed-profile__logo {
    margin-top: -2.75rem;
}

.murmfed-profile__logo {
    flex: none;
    width: 104px;
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.1);
    overflow: hidden;
}

.murmfed-profile__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.7rem;
}

.murmfed-profile__logo-fallback {
    font-size: 2.7rem;
    font-weight: 700;
    color: var(--murmfed-accent);
    opacity: 0.7;
}

.murmfed-profile__head-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Org name lives in the hero, anchored to the logo. Compound selector beats theme `.entry-content h1`. */
.murmfed-profile .murmfed-profile__name {
    margin: 0;
    padding: 0;
    font-size: 1.7rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #101828;
}

.murmfed-profile__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.5rem;
    color: #667085;
    font-size: 0.92rem;
}

.murmfed-profile__sep {
    color: #d0d5dd;
}

.murmfed-profile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.murmfed-profile__badge {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--murmfed-accent);
    background: color-mix(in srgb, var(--murmfed-accent), #fff 86%);
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
}

/* Badges overlaid on the banner: top-right, with a readable frosted backdrop over the photo. */
.murmfed-profile__badges--overlay {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    justify-content: flex-end;
    max-width: 70%;
}

.murmfed-profile__badges--overlay .murmfed-profile__badge {
    color: #101828;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.25);
    backdrop-filter: blur(2px);
}

.murmfed-profile__loc {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    color: #667085;
}

.murmfed-profile__icon {
    flex: none;
    color: var(--murmfed-accent);
}

/* Small country flag standing in for the location pin: rounded, with a hairline ring so pale
   flags (white fields, e.g. England's cross) still read as a defined shape on the white page. */
.murmfed-profile__flag {
    flex: none;
    width: 21px;
    height: 15px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.1);
}

.murmfed-profile__cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.2rem;
    padding: 0.6rem 1.15rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--murmfed-accent);
    border-radius: 10px;
    text-decoration: none;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.murmfed-profile__cta:hover {
    color: #fff;
    filter: brightness(1.06);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--murmfed-accent), transparent 70%);
}

.murmfed-profile__cta .murmfed-profile__icon {
    color: currentColor;
}

/* Purpose: a small muted descriptor in the hero meta — deliberately not title-like. */
.murmfed-profile__purpose {
    margin: 0;
    color: #667085;
    font-size: 0.92rem;
}

/* --- About ---------------------------------------------------------------- */

.murmfed-profile__about {
    /* Cap the reading measure (~70 characters) so lines stay comfortable on wide screens,
       even though the structural sections below run the full content width. */
    max-width: 68ch;
    color: #475467;
    line-height: 1.7;
}

.murmfed-profile__about p {
    margin: 0 0 0.9rem;
}

.murmfed-profile__about p:last-child {
    margin-bottom: 0;
}

/* Mission: a labelled prose section (reuses the card-title eyebrow + the about reading measure)
   so it's clearly distinct from the lead description above it. */
.murmfed-profile__mission {
    margin: 1.5rem 0;
}

/* Gallery: a responsive grid of the profile's images, each linking out to the full size. */
.murmfed-profile__gallery-section {
    margin: 1.5rem 0;
}

.murmfed-profile__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
}

.murmfed-profile__gallery-item {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    background: #f5f7f5;
}

.murmfed-profile__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.murmfed-profile__gallery-item:hover img {
    transform: scale(1.05);
}

/* --- Pills ---------------------------------------------------------------- */

.murmfed-profile__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.25rem 0;
}

.murmfed-profile__pill {
    font-size: 0.78rem;
    color: #475467;
    background: #f2f4f7;
    border-radius: 999px;
    padding: 0.22rem 0.7rem;
    line-height: 1.5;
}

/* Permaculture domains: solid accent tint — these are the filterable focus areas. */
.murmfed-profile__pill.is-domain {
    color: var(--murmfed-accent);
    background: color-mix(in srgb, var(--murmfed-accent), #fff 88%);
}

/* Leadership work: outlined accent — same family as domains (it's structured activity), but
   visually distinct so it doesn't read as a filterable focus area, and apart from grey tags. */
.murmfed-profile__pill.is-leadership {
    color: var(--murmfed-accent);
    background: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--murmfed-accent), #fff 50%);
}

/* --- Stats ---------------------------------------------------------------- */

.murmfed-profile__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.25rem 0 0.5rem;
}

.murmfed-profile__stat {
    flex: 1 1 140px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.9rem 1.1rem;
    background: #f9fafb;
    border: 1px solid #eef0f3;
    border-radius: 12px;
}

.murmfed-profile__stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--murmfed-accent);
    line-height: 1.1;
}

.murmfed-profile__stat-label {
    font-size: 0.85rem;
    color: #667085;
}

/* --- Cards grid ----------------------------------------------------------- */

.murmfed-profile__grid {
    /* Single column: every card spans the full content width, so the cards keep pace with the
       banner, description and the rest as the page grows — no card snapping to a mismatched
       half-width at certain widths (which made "Get involved" / "Connect" look off). */
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-top: 1.5rem;
}

.murmfed-profile__card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    padding: 1.1rem 1.25rem 1.25rem;
}

.murmfed-profile__card--location {
    grid-column: 1 / -1;
}

.murmfed-profile__card-title {
    margin: 0 0 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--murmfed-accent);
}

/* Get involved: plain informational chips (the data has no URLs to link to). */
.murmfed-profile__ways {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.murmfed-profile__way {
    font-size: 0.85rem;
    color: #344054;
    background: #f2f4f7;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
}

/* Connect: a grid of square social/contact icon tiles. */
.murmfed-profile__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.murmfed-profile__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #475467;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.murmfed-profile__social:hover {
    color: var(--murmfed-accent);
    border-color: var(--murmfed-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.1);
}

.murmfed-profile__address {
    margin: 0 0 1rem;
    color: #475467;
}

.murmfed-profile__map {
    height: 260px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    z-index: 0;
}

/* --- Details (definition list) -------------------------------------------- */

.murmfed-profile__details {
    margin: 0;
    display: grid;
    gap: 0.9rem 1.5rem;
}

@media (min-width: 560px) {
    .murmfed-profile__details {
        grid-template-columns: minmax(150px, max-content) 1fr;
    }
}

.murmfed-profile__details dt {
    font-weight: 600;
    color: #101828;
    font-size: 0.9rem;
}

.murmfed-profile__details dd {
    margin: 0;
    color: #475467;
}

.murmfed-profile__details dd a {
    color: var(--murmfed-accent);
    word-break: break-word;
}

/* --- Mini-map marker ------------------------------------------------------ */

.murmfed-profile__pin {
    background: none;
    border: 0;
}

/* --- Person profiles ------------------------------------------------------ */

/* A person reads better with a round avatar that fills its frame (orgs keep the
   rounded-square logo with padding). */
.murmfed-profile--person .murmfed-profile__logo {
    border-radius: 50%;
}

.murmfed-profile--person .murmfed-profile__logo img {
    padding: 0;
    object-fit: cover;
}

/* The @handle in the hero meta line. */
.murmfed-profile__handle {
    color: #667085;
}
