:root {
    /* Reference edge used by the discovery panel and every public page. */
    --page-gutter: 20px;
    --page-content-max: 1600px;
    --page-content-wide-max: 1600px;
    --brand-navy: #113b65;
    --brand-blue: #176bb4;
}

/* Shared public-page frame. Individual pages may keep their own visual
   sections, but their reading width and institutional footer stay coherent. */
.public-container,
.page,
.wrap {
    max-width: var(--page-content-max);
}

.public-container--wide {
    max-width: var(--page-content-wide-max);
}

.public-main {
    min-width: 0;
}

.public-presentation-cover {
    position: relative;
    display: grid;
    min-height: 250px;
    overflow: hidden;
    place-items: center;
    color: #fff;
}

.terapix-seal {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(17, 59, 101, .92);
    color: #fff;
}

.public-presentation-cover .terapix-seal svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.public-presentation-cover--terapeutas {
    background: linear-gradient(145deg, #d9edf9, #7aabc9);
}

.public-presentation-cover--espacos {
    background: linear-gradient(145deg, #dff1eb, #7ab59f);
}

.public-presentation-cover--vivencias {
    background: linear-gradient(145deg, #e5e0f5, #8d7bb6);
}

.public-presentation-cover--agentes {
    background: linear-gradient(145deg, #fbe6c6, #c98a3d);
}

.public-presentation-cover img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.public-presentation-cover svg {
    width: 54px;
    height: 54px;
}

/* Shared sidebar card used by the four public profile types (therapist,
   space, experience, agent): photo, small avatar, type badge and bio. */
.profile-summary {
    overflow: hidden;
    border: 1px solid #dbe8f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(34, 77, 111, .045);
}

.profile-summary.card--terapeutas {
    border-top: 4px solid #3181c2;
}

.profile-summary.card--espacos {
    border-top: 4px solid #28977d;
}

.profile-summary.card--vivencias {
    border-top: 4px solid #8174c7;
}

.profile-summary.card--agentes {
    border-top: 4px solid #a86512;
}

.profile-summary-main {
    display: grid;
    gap: 13px;
    padding: 16px 16px 0;
}

.profile-summary-identity {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.profile-summary .avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
}

.profile-summary.card--terapeutas .avatar {
    background: linear-gradient(145deg, #1a6b9c, #163d63);
}

.profile-summary.card--espacos .avatar {
    background: linear-gradient(145deg, #3e8c77, #24546e);
}

.profile-summary.card--vivencias .avatar {
    background: linear-gradient(145deg, #7b5aa7, #2e5e89);
}

.profile-summary.card--agentes .avatar {
    background: linear-gradient(145deg, #c98a3d, #7a4d12);
}

.profile-summary h1 {
    margin: 0;
    color: #0d3e69;
    font-size: 16px;
    line-height: 1.25;
}

.profile-summary .role {
    margin: 4px 0 0;
    color: #56758c;
    font-size: 12px;
}

.profile-summary .sidebio {
    margin: 0;
    color: #5d788d;
    font-size: 13px;
    line-height: 1.5;
}

.profile-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.profile-summary-tag {
    padding: 7px 9px;
    border-radius: 9px;
    background: #eaf5ff;
    color: #176bb4;
    font-size: 11px;
    font-weight: 850;
}

.profile-summary-tag.service {
    background: #eff8f6;
    color: #167263;
}

.profile-summary-unavailable {
    margin: 9px 0 0;
    padding: 9px 11px;
    border-radius: 10px;
    background: #fdf0dd;
    color: #8a5209;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
}

.profile-summary-tag.modality-online {
    background: #e5f3ff;
    color: #0869ab;
}

.profile-summary-tag.modality-in_person {
    background: #e3f7ee;
    color: #16745f;
}

.profile-summary-tag.modality-hybrid {
    background: #f1edff;
    color: #6b54ae;
}

.profile-summary-price {
    padding: 14px 16px 0;
    color: #0d3e69;
    font-size: 16px;
    font-weight: 900;
}

.profile-summary-price small {
    font-size: 12px;
    font-weight: 700;
    color: #56758c;
}

.profile-summary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding: 16px;
}

.profile-summary-actions label,
.profile-summary-actions button,
.profile-summary-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 10px;
    border: 0;
    border-radius: 11px;
    background: #113b65;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    text-decoration: none;
}

.profile-summary-actions .secondary {
    border: 1px solid #8dbde4;
    background: #fff;
    color: #176bb4;
}

.profile-summary-footer {
    padding: 0 16px 16px;
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    height: 64px;
    padding: 0 var(--page-gutter);
    background: #fff;
    border-bottom: 1px solid #e7f0f7;
}

.public-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    color: var(--brand-navy);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 23px;
    font-weight: 850;
    letter-spacing: -0.7px;
    text-decoration: none;
}

.public-brand-mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
}

.public-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.public-header-content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-width: 0;
    margin-left: 28px;
}

.public-back {
    color: var(--brand-blue);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.public-footer {
    margin-top: auto;
    border-top: 1px solid #dce9f2;
    background: #fff;
    color: #5e788d;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.public-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(140px, .75fr);
    gap: 28px;
    width: calc(100% - (var(--page-gutter) * 2));
    max-width: var(--page-content-max);
    margin: 0 auto;
    padding: 32px 0 22px;
}

.public-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--brand-navy);
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -.5px;
}

.public-footer-brand img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.public-footer-copy {
    max-width: 360px;
    margin: 9px 0 0;
    font-size: 13px;
    line-height: 1.55;
}

.public-footer-title {
    display: block;
    margin-bottom: 9px;
    color: var(--brand-navy);
    font-size: 12px;
    font-weight: 850;
}

.public-footer-links {
    display: grid;
    gap: 8px;
}

.public-footer a {
    color: inherit;
    font-size: 13px;
    text-decoration: none;
}

.public-footer a:hover,
.public-footer a:focus-visible {
    color: var(--brand-blue);
    text-decoration: underline;
}

.public-footer-disclaimer {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 18px;
    border-top: 1px solid #edf3f7;
    color: #71889b;
    font-size: 12px;
    line-height: 1.55;
}

.public-footer-meta {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 10px;
    color: #71889b;
    font-size: 12px;
}

@media (max-width: 640px) {
    .public-header-content {
        margin-left: 14px;
    }

    .public-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 22px 16px;
        padding-top: 26px;
    }

    .public-footer-brand-wrap,
    .public-footer-meta {
        grid-column: 1 / -1;
    }
}

/* Session-aware account navigation, shared by the public pages. */
.public-header { position: relative; z-index: 1300; min-height: 64px; height: auto; }
.public-account { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; margin-left: auto; color: var(--brand-blue); font: 750 14px Inter, ui-sans-serif, system-ui, sans-serif; }
.public-account a { text-decoration: none; }
.public-account .public-account-panel { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 13px; border-radius: 11px; background: var(--brand-navy); color: #fff; }
.public-account-menu { position: relative; }
.public-account-menu summary { cursor: pointer; list-style: none; padding: 10px 0; white-space: nowrap; }
.public-account-menu summary::-webkit-details-marker { display: none; }
.public-account-menu nav { position: absolute; z-index: 1400; top: 100%; right: 0; width: min(280px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; padding: 10px; border: 1px solid #dbe8f2; border-radius: 14px; background: #fff; box-shadow: 0 12px 32px rgba(24,59,88,.16); }
.public-account-menu nav p { margin: 0 0 6px; padding: 9px; color: var(--brand-navy); overflow-wrap: anywhere; }
.public-account-menu nav a, .public-account-menu nav button { display: block; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--brand-blue); text-align: left; font: inherit; cursor: pointer; }
.public-account-menu nav a:hover, .public-account-menu nav button:hover { background: #eaf5ff; }
.public-account :focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 3px; }
@media (max-width: 640px) {
    .public-header { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
    .public-header-content { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
    .public-account { gap: 8px; font-size: 12px; }
    .public-account .public-account-panel { min-height: 36px; padding: 8px 10px; }
}
.discovery-header-actions { display: flex; align-items: center; justify-self: end; gap: 14px; }
.discovery-toolbar.is-scrolled .discovery-header-actions { grid-column: 3; grid-row: 1; }
@media (max-width: 1100px) { .public-header .top-links { display: none; } }
@media (max-width: 760px) {
    .discovery-toolbar.is-scrolled .discovery-header-actions { grid-column: 2; }
    .discovery-header-actions { gap: 8px; }
    .discovery-header-actions .public-back { display: none; }
}
@media (max-width: 1100px) {
    .discovery-type-row { grid-template-columns: 1fr auto; }
    .discovery-type-row .type-tabs { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 400px) {
    .discovery-branding .public-brand { font-size: 0; gap: 0; }
}

.public-notice-bell { position: relative; color: #153e75; }
.public-notice-bell summary { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; cursor: pointer; list-style: none; border-radius: 12px; }
.public-notice-bell summary::-webkit-details-marker { display: none; }
.public-notice-bell summary:hover { background: #edf6ff; }
.public-notice-bell [data-notice-count] { position: absolute; top: -2px; right: -4px; background: #2563eb; color: white; padding: 0 5px; border-radius: 20px; font-size: 11px; font-weight: bold; }
.public-notice-bell [hidden] { display: none; }
.public-notice-bell section { position: absolute; right: 0; top: 48px; z-index: 60; width: min(350px, calc(100vw - 32px)); max-height: 75vh; overflow-y: auto; background: white; border: 1px solid #dce5ef; border-radius: 16px; padding: 16px; box-shadow: 0 12px 32px #153e7526; }
.public-notice-bell h2 { font-size: 16px; margin: 0 0 10px; }
.public-notice-bell form { border-bottom: 1px solid #dce5ef; }
.public-notice-bell button { display: block; width: 100%; background: none; border: 0; text-align: left; cursor: pointer; padding: 12px 0; color: #153e75; }
.public-notice-bell button:hover { background: #edf6ff; }
.public-notice-bell strong, .public-notice-bell small { display: block; white-space: normal; }
.public-notice-bell small { margin-top: 5px; font-size: 12px; color: #526780; }
.public-notice-bell section > a { display: block; font-size: 13px; font-weight: bold; margin-top: 14px; white-space: normal; }

@media (max-width: 600px) { .public-notice-bell section { position: fixed; top: 84px; left: 16px; right: 16px; width: auto; } }
