body {
    margin: 0;
}

.public-space-profile {
    position: relative;
    display: block;
    min-height: 100vh;
    padding: 24px 16px 40px;
    color: #172026;
    background:
        radial-gradient(circle at 8% 12%, rgba(15, 118, 110, 0.17), transparent 30%),
        radial-gradient(circle at 95% 8%, rgba(245, 158, 11, 0.2), transparent 34%),
        linear-gradient(140deg, #f8f9ff, #eef4ff, #dbe9ff);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto 20px;
}

.profile-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-branding-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-logo-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #ffffff;
    border: 1px solid rgba(199, 196, 215, 0.65);
    box-shadow: 0 8px 22px rgba(11, 17, 32, 0.08);
}

.profile-logo,
.profile-logo-fallback {
    width: 100%;
    height: 100%;
}

.profile-logo {
    object-fit: cover;
}

.profile-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-header h1 {
    margin: 0;
    font-size: clamp(1.4rem, 2vw, 2rem);
    line-height: 1.15;
}

.profile-organization-headline {
    margin: 0;
    color: #4f6f64;
    font-size: 0.95rem;
    line-height: 1.35;
}

.profile-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 22px;
    backdrop-filter: blur(6px);
    background: color-mix(in srgb, #fff 92%, transparent);
    border: 1px solid color-mix(in srgb, #c7c4d7 36%, transparent);
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(11, 17, 32, 0.08);
}

.profile-about-summary {
    max-width: 700px;
    margin: 0;
    color: #464554;
    font-size: 1.125rem;
    line-height: 1.5;
}

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

.profile-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 16px;
}

.profile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.profile-book-now-link,
.profile-sticky-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f7a70, #0f766e);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.24);
}

.profile-section {
    margin: 0 0 16px;
    padding: 18px 0 0;
    border-top: 1px solid rgba(199, 196, 215, 0.55);
}

.profile-hero + .profile-section {
    border-top: 0;
}

.profile-section-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.profile-section-text {
    margin: 0;
    max-width: 760px;
    color: #354640;
    line-height: 1.55;
    white-space: pre-wrap;
}

.profile-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.profile-professionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.profile-professional-card {
    display: flex;
    gap: 14px;
    align-items: stretch;
    border: 1px solid rgba(199, 196, 215, 0.55);
    border-radius: 16px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.profile-professional-media {
    flex: 0 0 104px;
    width: 104px;
    min-width: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-professional-avatar {
    width: 104px;
    height: 104px;
    border-radius: 14px;
    object-fit: cover;
    background: #eef3f1;
    border: 1px solid rgba(199, 196, 215, 0.45);
}

.profile-professional-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #4648d4;
    background:
        linear-gradient(180deg, rgba(70, 72, 212, 0.08), rgba(70, 72, 212, 0.04)),
        #f3f4ff;
}

.profile-professional-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-professional-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.profile-professional-bio {
    margin: 0;
    color: #354640;
    line-height: 1.45;
    white-space: pre-wrap;
}

.profile-professional-footer {
    margin-top: auto;
    padding-top: 6px;
}

.profile-professional-link {
    color: #4648d4;
    text-decoration: none;
    font-weight: 700;
}

.profile-professional-link:hover {
    text-decoration: underline;
}

.profile-service-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(199, 196, 215, 0.55);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.profile-service-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eef3f1;
    border-bottom: 1px solid rgba(199, 196, 215, 0.35);
}

.profile-service-image.is-placeholder {
    object-fit: contain;
    padding: 18px;
}

.profile-service-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    flex: 1 1 auto;
}

.profile-service-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.profile-service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #4f6f64;
    font-size: 0.875rem;
    font-weight: 600;
}

.profile-service-description {
    margin: 0;
    color: #354640;
    line-height: 1.45;
}

.profile-service-footer {
    margin-top: auto;
    padding: 0 16px 16px;
}

.profile-service-footer-separator {
    height: 1px;
    margin: 0 0 10px;
    background: rgba(199, 196, 215, 0.6);
}

.profile-service-select-button {
    display: inline-flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(199, 196, 215, 0.8);
    border-radius: 8px;
    background: #f8f9ff;
    color: #3f4fbf;
    font-weight: 700;
    justify-content: space-between;
    cursor: pointer;
}

.profile-service-select-button::after {
    content: "○";
    margin-left: 14px;
    color: #6a6d7f;
    font-size: 0.95rem;
}

.profile-service-select-button.is-selected {
    background: rgba(70, 72, 212, 0.1);
    border-color: rgba(70, 72, 212, 0.35);
    color: #2f39a8;
}

.profile-service-select-button.is-selected::after {
    content: "✓";
    color: #2f39a8;
}

.profile-service-select-button:hover {
    border-color: rgba(70, 72, 212, 0.35);
    background: rgba(70, 72, 212, 0.08);
}

.profile-service-select-button:focus-visible,
.profile-services-book-button:focus-visible {
    outline: 2px solid rgba(70, 72, 212, 0.35);
    outline-offset: 2px;
}

.profile-services-actions {
    margin-top: 16px;
}

.profile-services-book-button {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #4648d4;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.profile-services-book-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.profile-services-book-button:not(:disabled):hover {
    background: #3738b3;
}

.profile-contact-list {
    display: grid;
    gap: 8px;
    max-width: 760px;
}

.profile-contact-item {
    display: grid;
    gap: 4px;
    color: #354640;
}

.profile-contact-label {
    color: #4f6f64;
    font-weight: 700;
}

.profile-contact-value {
    display: inline-block;
    color: #172026;
    text-decoration: none;
    max-width: 100%;
}

.profile-contact-link:hover {
    color: #4648d4;
    text-decoration: underline;
}

.profile-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid rgba(199, 196, 215, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: #495057;
    text-decoration: none;
    line-height: 1;
    font-size: 0.875rem;
    font-weight: 600;
}

.profile-social-link small {
    color: #4f6f64;
    font-weight: 500;
}

.profile-social-link:hover {
    color: #343a40;
    border-color: rgba(70, 72, 212, 0.22);
    background: rgba(70, 72, 212, 0.06);
}

.profile-social-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    min-height: 34px;
}

.profile-social-links-grid .profile-social-link {
    opacity: 0.9;
}

.profile-social-links-grid .profile-social-link:hover {
    opacity: 1;
}

.profile-social-links-grid .profile-social-link i {
    font-size: 1rem;
    color: #6a6d7f;
    flex: 0 0 auto;
}

.profile-social-link-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    object-fit: contain;
    opacity: 0.72;
}

.profile-social-link-text {
    white-space: nowrap;
    color: inherit;
}

.profile-footer {
    max-width: 960px;
    margin: 28px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(199, 196, 215, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 0.8rem;
    text-align: center;
}

.profile-footer > a:last-child {
    white-space: nowrap;
}

.profile-footer a {
    color: #4f6f64;
    text-decoration: none;
}

.profile-footer a:hover {
    color: #4648d4;
    text-decoration: underline;
}

.profile-sticky-cta {
    display: none;
}

@media (max-width: 640px) {
    .public-space-profile {
        padding: 18px 14px 128px;
    }

    .profile-header {
        flex-direction: column;
        margin-bottom: 16px;
    }

    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-hero-actions {
        justify-content: flex-start;
    }

    .profile-social-links {
        gap: 10px;
    }

    .profile-content {
        padding: 18px;
        border-radius: 20px;
    }

    .profile-professional-card {
        flex-direction: column;
    }

    .profile-professional-media {
        width: 100%;
        min-width: 0;
    }

    .profile-professional-avatar {
        width: 100%;
        height: 180px;
    }

    .profile-services-grid {
        grid-template-columns: 1fr;
    }

    .profile-service-image {
        height: 160px;
    }

    .profile-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-sticky-cta {
        display: inline-flex;
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: 14px;
        z-index: 20;
    }

    .profile-content {
        padding-bottom: 88px;
    }
}
