/**
 * Member Social Features – profile layout, quick-nav, cards
 * Modern, responsive two-column design with customizable themes.
 */

/* ── Custom properties ────────────────────────────────────────────── */
.comm-member-profile {
    --primary-color:    #c1440e;
    --secondary-color:  #333333;
    --background-color: #ffffff;
    --text-color:       #000000;
    --border-radius:    8px;
    --card-shadow:      0 2px 8px rgba(0, 0, 0, 0.08);
    --card-border:      #e8e0db;
    /* ── Two-column grid ── */
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    position: relative;
    line-height: 1.5;
}

.comm-member-profile > .profile-section {
    animation: profileSectionIn 0.42s ease both;
}

.comm-member-profile > .profile-section:nth-child(2) { animation-delay: 0.02s; }
.comm-member-profile > .profile-section:nth-child(3) { animation-delay: 0.05s; }
.comm-member-profile > .profile-section:nth-child(4) { animation-delay: 0.08s; }
.comm-member-profile > .profile-section:nth-child(5) { animation-delay: 0.11s; }
.comm-member-profile > .profile-section:nth-child(6) { animation-delay: 0.14s; }

body.single-comm_member,
body.post-type-archive-comm_member {
    background: linear-gradient(180deg, #f8f4db 0%, #f5f1d1 100%);
}

body.single-comm_member .cpage2-article {
    --cpage2-accent: #c1440e;
    --cpage2-accent-dark: #9f360b;
    --cpage2-hero-from: #efe9c6;
    --cpage2-hero-mid: #f7f1d4;
    --cpage2-hero-to: #fbf8e6;
    --cpage2-surface: #ffffff;
    --cpage2-surface-2: #fbf7e8;
    --cpage2-border: #eadfca;
    --cpage2-text: #3b2c20;
    --cpage2-text-muted: #856d5f;
}

body.single-comm_member .cpage2-hero {
    min-height: min(320px, 42vh);
    background: linear-gradient(180deg, rgba(239, 233, 198, 0.75) 0%, rgba(251, 248, 230, 0.95) 100%);
    border-bottom: 1px solid rgba(193, 68, 14, 0.08);
}

body.single-comm_member .cpage2-hero-bg {
    filter: none;
    transform: none;
    opacity: 0.2;
}

body.single-comm_member .cpage2-hero-scrim {
    background: linear-gradient(180deg, rgba(248, 244, 219, 0.3) 0%, rgba(248, 244, 219, 0.94) 86%);
}

body.single-comm_member .cpage2-hero-body {
    padding: 34px 24px 28px;
}

body.single-comm_member .cpage2-title {
    color: var(--cpage2-accent);
    text-shadow: none;
    letter-spacing: -0.02em;
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
}

body.single-comm_member .cpage2-entry-nav {
    position: relative;
    top: auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom-color: rgba(193, 68, 14, 0.12);
}

body.single-comm_member .cpage2-entry-nav__inner {
    max-width: 1120px;
}

body.single-comm_member .cpage2-entry-nav__item,
body.single-comm_member .cpage2-entry-nav__all {
    min-width: 0;
}

body.single-comm_member .cpage2-entry-nav__arrow {
    width: 28px;
    justify-content: center;
}

body.single-comm_member .cpage2-entry-nav__arrow svg {
    width: 22px;
    height: 22px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.96);
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(72, 50, 18, 0.08);
    border: 1px solid rgba(193, 68, 14, 0.1);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.profile-card:hover {
    box-shadow: 0 14px 34px rgba(72, 50, 18, 0.14);
    transform: translateY(-2px);
}

.profile-section-title {
    color: var(--primary-color);
    margin: 0 0 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(193, 68, 14, 0.22);
    font-size: clamp(1.3rem, 2vw, 2rem);
    line-height: 1.2;
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
    letter-spacing: -0.01em;
}

.profile-header {
    display: grid;
    gap: 22px;
}

.profile-cover {
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #eee2c7, #f7f2df);
}

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

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

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 14px 34px rgba(193, 68, 14, 0.18);
}

.profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.profile-photo-edit {
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 6px 14px;
}

.profile-avatar--placeholder,
.friend-card__avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), #dd6b20);
    font-weight: 700;
}

.profile-avatar--placeholder {
    font-size: 48px;
}

.profile-header__content {
    min-width: 0;
}

.profile-name {
    margin: 0 0 8px;
    color: var(--primary-color);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
    letter-spacing: -0.02em;
}

.profile-meta-summary {
    margin: 0 0 18px;
    color: #7b685d;
    font-size: 0.98rem;
}

.profile-contact-list {
    display: grid;
    gap: 8px;
    color: #4f4239;
}

.profile-contact-list p {
    margin: 0;
}

.profile-contact-list a {
    color: var(--primary-color);
}

.profile-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

.profile-action-row .button {
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
    transition: transform 0.16s ease;
}

.profile-action-row .button:hover {
    transform: translateY(-1px);
}

.profile-bio {
    padding-top: 22px;
    border-top: 1px solid rgba(193, 68, 14, 0.12);
    color: #4b4038;
    line-height: 1.7;
}

.profile-showcase-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.profile-member-badges {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(193, 68, 14, 0.12);
}

.profile-member-badges__title {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--primary-color);
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
}

.profile-member-badges__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-member-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(193, 68, 14, 0.2);
    background: rgba(255, 249, 240, 0.95);
    color: #5b432d;
    font-size: 0.86rem;
    line-height: 1;
}

.profile-member-badge__icon {
    font-size: 1rem;
    line-height: 1;
}

.profile-member-badge__label {
    font-weight: 600;
}

.profile-showcase-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(12, 47, 60, 0.14);
    background: #fff;
    color: #264052;
    font-size: 0.82rem;
    font-weight: 600;
}

.profile-stack-list {
    display: grid;
    gap: 15px;
}

.profile-stack-list--compact {
    gap: 10px;
}

.profile-stack-item {
    padding: 15px 16px;
    border-radius: 10px;
    background: #faf8f2;
}

.profile-stack-item h4,
.profile-stack-item p {
    margin: 0;
}

.profile-stack-item p {
    color: #6f6259;
}

.profile-stack-item--accent {
    border-left: 4px solid var(--primary-color);
}

.profile-stack-item--plain {
    border: 1px solid #ece1d1;
}

.profile-stack-item--boxed {
    border: 1px solid #ece1d1;
    background: #fffdf8;
}

.profile-update-date {
    margin: 0;
    color: #7b685d;
    font-size: 0.88rem;
}

.profile-update-content {
    margin: 10px 0 0;
    color: #433831;
}

.businesses-grid,
.community-posts-grid,
.media-gallery-grid {
    display: grid;
    gap: 16px;
}

.businesses-grid,
.community-posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.media-gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.business-card,
.profile-feed-card,
.media-gallery-card {
    border: 1px solid #eadfca;
    border-radius: 12px;
    overflow: hidden;
    background: #fffdfa;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.business-card:hover,
.profile-feed-card:hover,
.media-gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.business-card__image,
.profile-feed-card__image,
.media-gallery-card__image,
.media-gallery-card__video {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.business-card__body,
.profile-feed-card__body {
    padding: 16px;
}

.business-card__title,
.profile-feed-card__title {
    margin: 0 0 10px;
    font-size: 1.02rem;
    line-height: 1.35;
}

.business-card__title a,
.profile-feed-card__title a {
    color: #2f2925;
    text-decoration: none;
}

.business-card__title a:hover,
.profile-feed-card__title a:hover {
    color: var(--primary-color);
}

.business-card__description,
.profile-feed-card__excerpt,
.business-card__meta,
.profile-feed-card__meta {
    margin: 0;
    color: #6e6158;
}

.profile-feed-card__meta,
.business-card__meta {
    font-size: 0.83rem;
}

.profile-feed-card__excerpt,
.business-card__description {
    margin-top: 10px;
    line-height: 1.6;
}

.media-gallery-card__audio {
    padding: 12px;
}

.media-gallery-card__audio p {
    margin: 0 0 10px;
    color: #50443c;
    font-size: 0.85rem;
}

.media-gallery-card__audio audio {
    width: 100%;
}

body.comm-member-gallery-lightbox-open {
    overflow: hidden;
}

.comm-member-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    padding: 20px;
}

.comm-member-gallery-lightbox.is-open {
    display: flex;
}

.comm-member-gallery-lightbox__img {
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

.comm-member-gallery-lightbox__close {
    position: absolute;
    top: 18px;
    right: 24px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
}

.comm-member-gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    padding: 10px 14px;
}

.comm-member-gallery-lightbox__prev {
    left: 18px;
}

.comm-member-gallery-lightbox__next {
    right: 18px;
}

.comm-member-gallery-lightbox__nav:hover,
.comm-member-gallery-lightbox__close:hover {
    opacity: 0.9;
}

.friend-request-panel {
    background: #fff4db;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.friend-request-panel h3 {
    margin: 0 0 12px;
    color: #856404;
}

.friend-request-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

.friend-request-item + .friend-request-item {
    margin-top: 10px;
}

.friend-request-item__photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-request-item__body {
    flex: 1;
}

.friend-card__avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 24px;
    margin: 0 auto 8px;
}

.post-actions__media-input {
    flex: 1;
    padding: 8px;
}

.profile-empty-state {
    color: #7a6c63;
    font-style: italic;
}


/* ── Quick nav bar (full-width row) ─────────────────────────────── */
.member-profile-quick-nav {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    position: sticky;
    top: var(--comm-sticky-offset, 0px);
    z-index: 20;
}

.member-profile-quick-nav a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    text-decoration: none;
    color: #7f2d10;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    background: #fff8f3;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.member-profile-quick-nav a:hover,
.member-profile-quick-nav a:focus {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    outline: none;
    transform: translateY(-1px);
}

/* ── Column wrappers ────────────────────────────────────────────── */
.profile-main-col {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.profile-sidebar-col {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* Legacy per-section grid-column assignments kept for shortcode/widget usage */
.profile-header,
.friends-section,
.social-links-section,
.positions-section,
.neighborhoods-section,
.media-gallery-section {
    grid-column: 2;
}

.member-posts-section,
.updates-section,
.community-posts-section,
.businesses-section {
    grid-column: 1;
}

/* ── Shared section card ────────────────────────────────────────── */
.profile-section {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 22px 24px;
}

.profile-empty-note {
    color: #888;
    font-style: italic;
    margin: 0;
}

/* ── Profile header card ────────────────────────────────────────── */
.profile-avatar-row {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.profile-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
}

.profile-name {
    text-align: center;
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-stats {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin: 0 0 6px;
}

.profile-likes-display {
    text-align: center;
    color: #555;
    font-size: 13px;
    margin: 0 0 14px;
}

.profile-likes-count {
    font-weight: 700;
    color: var(--primary-color);
}

/* ── Action buttons ─────────────────────────────────────────────── */
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: opacity 0.18s, box-shadow 0.18s;
    line-height: 1.2;
}

.profile-btn:hover {
    opacity: 0.88;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

.profile-btn--primary {
    background: var(--primary-color);
    color: #fff;
}

.profile-btn--secondary {
    background: #f3f4f6;
    color: #333;
    border-color: #d1d5db;
}

.profile-btn--like {
    background: #f3f4f6;
    color: #555;
    border-color: #d1d5db;
}

.profile-btn--like.is-liked {
    background: #fef2f2;
    color: #c1440e;
    border-color: #fca5a5;
}

.profile-btn--accept {
    background: #16a34a;
    color: #fff;
}

.profile-btn--reject {
    background: #dc2626;
    color: #fff;
}

/* ── Contact items ──────────────────────────────────────────────── */
.profile-contact-item {
    font-size: 13px;
    margin: 4px 0;
}

.profile-contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.profile-contact-item a:hover {
    text-decoration: underline;
}

/* ── Bio ────────────────────────────────────────────────────────── */
.profile-bio {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--card-border);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Community posts grid ───────────────────────────────────────── */
.community-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.community-post-card {
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.community-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.community-post-card__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.community-post-card__body {
    padding: 12px;
}

.community-post-card__meta {
    margin: 0 0 4px;
    color: #888;
    font-size: 11px;
}

.community-post-card__title {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.3;
}

.community-post-card__title a {
    color: #333;
    text-decoration: none;
}

.community-post-card__title a:hover {
    color: var(--primary-color);
}

.community-post-card__excerpt {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* ── Update items ───────────────────────────────────────────────── */
.profile-update-item {
    padding: 12px;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background: #fafafa;
}

.profile-update-date {
    margin: 0 0 6px;
    color: #888;
    font-size: 12px;
}

/* ── Businesses grid ────────────────────────────────────────────── */
.businesses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.business-card {
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.business-card__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.business-card__body {
    padding: 14px;
}

.business-card__body h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.business-card__body h3 a {
    color: #333;
    text-decoration: none;
}

.business-card__body h3 a:hover {
    color: var(--primary-color);
}

.business-card__body p {
    margin: 4px 0;
    font-size: 13px;
    color: #555;
}

/* ── Position items ─────────────────────────────────────────────── */
.profile-position-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-left: 4px solid var(--primary-color);
    background: #f9f9f9;
    border-radius: 0 6px 6px 0;
}

.profile-position-title {
    color: var(--primary-color);
    font-size: 14px;
}

.profile-position-org {
    color: #666;
    font-size: 13px;
}

/* ── Neighborhood items ─────────────────────────────────────────── */
.profile-neighborhood-item {
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* ── Friend request list ────────────────────────────────────────── */
.profile-friend-requests {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 14px;
}

.profile-friend-requests h4 {
    margin: 0 0 10px;
    color: #92400e;
    font-size: 13px;
}

.friend-request-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 13px;
}

.friend-request-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.friend-request-item__name {
    flex: 1;
}

/* ── Media gallery grid ─────────────────────────────────────────── */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.media-gallery-item {
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
    min-height: 100px;
}

.media-gallery-item img,
.media-gallery-item video {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.media-gallery-item__audio {
    padding: 8px;
    font-size: 12px;
    color: #555;
}

.media-gallery-item__audio p {
    margin: 0 0 6px;
}

.media-gallery-item__audio audio {
    width: 100%;
}

.comm-member-profile[data-theme-colors] {
    background-color: var(--background-color);
    color: var(--text-color);
}

.comm-member-profile.has-background-image {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ── Friends grid ───────────────────────────────────────────────── */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.friend-card {
    text-align: center;
    padding: 8px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.friend-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.friend-card img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
    border: 2px solid var(--primary-color);
}

.friend-card__initials {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin: 0 auto 6px;
}

.friend-name {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-name:hover {
    color: var(--primary-color);
}

/* ── Social icons ───────────────────────────────────────────────── */
.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.social-icon:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.social-icon.facebook  { background: #1877f2; }
.social-icon.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-icon.twitter   { background: #1da1f2; }
.social-icon.linkedin  { background: #0077b5; }
.social-icon.tiktok    { background: #000; }
.social-icon.youtube   { background: #ff0000; }
.social-icon.github    { background: #333; }
.social-icon.website   { background: #4CAF50; }

/* ── Post form ──────────────────────────────────────────────────── */
.post-form {
    margin-bottom: 20px;
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
}

.post-form textarea {
    width: 100%;
    min-height: 90px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.post-form .post-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.post-form .button {
    padding: 9px 18px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.18s;
}

.post-form .button:hover {
    opacity: 0.88;
}

/* ── Post list ──────────────────────────────────────────────────── */
.member-posts-list {
    display: grid;
    gap: 16px;
}

.member-post {
    padding: 16px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    background: #fafafa;
}

.member-post .post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e8;
}

.member-post .post-date {
    color: #888;
    font-size: 12px;
}

.member-post .post-delete {
    color: #dc2626;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
}

.member-post .post-report {
    color: var(--primary-color);
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
}

.member-post .post-delete:hover {
    text-decoration: underline;
}

.member-post .post-report:hover {
    text-decoration: underline;
}

.member-post .post-content {
    line-height: 1.6;
    font-size: 14px;
}

.member-post .post-media {
    margin-top: 12px;
}

.member-post .post-media img {
    max-width: 100%;
    border-radius: 4px;
}

.comm-community-wall {
    margin-top: 8px;
}

/* Ensure wall controls inherit readable org branding tokens on org/business pages. */
.cpage2-article .comm-community-wall .post-form {
    --primary-color: var(--cpage2-accent, #0e8a6a);
    --wall-text: var(--cpage2-text, #1f2937);
    --wall-muted: var(--cpage2-text-muted, #5b6470);
    --wall-surface: var(--cpage2-surface, #ffffff);
    --wall-surface-2: var(--cpage2-surface-2, #f5f7fb);
    --wall-border: var(--cpage2-border, #d8dee8);

    background: var(--wall-surface-2);
    border-color: var(--wall-border);
    color: var(--wall-text);
}

.cpage2-article .comm-community-wall .post-form .button {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #ffffff;
}

.cpage2-article .comm-community-wall .post-form .button:hover,
.cpage2-article .comm-community-wall .post-form .button:focus {
    opacity: 0.95;
    filter: brightness(0.95);
}

.cpage2-article .comm-community-wall .post-form .comm-wall-add-media {
    background: var(--wall-surface);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.cpage2-article .comm-community-wall .post-form .comm-wall-add-media:hover,
.cpage2-article .comm-community-wall .post-form .comm-wall-add-media:focus {
    background: color-mix(in srgb, var(--primary-color) 8%, var(--wall-surface));
    color: var(--primary-color);
    opacity: 1;
}

.cpage2-article .comm-community-wall .comm-wall-media-hint {
    color: var(--wall-muted);
    font-size: 12px;
}

.cpage2-article .comm-community-wall .post-form textarea {
    background: var(--wall-surface);
    color: var(--wall-text);
    border-color: var(--wall-border);
}

.comm-wall-posts .comm-wall-post {
    background: #fff;
}

.comm-wall-composer .post-actions {
    flex-wrap: wrap;
}

.comm-wall-reaction-pill.is-mine {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.comm-wall-comment {
    border-radius: 8px;
}

.comm-wall-comment-form textarea {
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    resize: vertical;
}

/* Card-style wall layout with media support and theme-safe specificity. */
.comm-community-wall .member-posts-list.comm-wall-posts {
    display: grid;
    gap: 18px;
}

.comm-community-wall .member-post.comm-wall-post {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(250, 248, 243, 0.92) 100%);
    border: 1px solid var(--wall-border, var(--card-border));
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(20, 28, 38, 0.07);
    padding: 14px 14px 12px;
}

.comm-community-wall .member-post.comm-wall-post .post-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--wall-border, #d8dee8) 75%, #ffffff);
}

.comm-community-wall .member-post.comm-wall-post .post-date {
    color: var(--wall-muted, #5b6470);
    font-size: 12px;
    font-weight: 600;
}

.comm-community-wall .member-post.comm-wall-post .post-delete,
.comm-community-wall .member-post.comm-wall-post .post-report {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.comm-community-wall .member-post.comm-wall-post .post-report.is-reported {
    color: #0f766e;
    font-weight: 600;
    pointer-events: none;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-post-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comm-community-wall .member-post.comm-wall-post.comm-wall-post--with-media .comm-wall-post-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-post-main {
    min-width: 0;
}

.comm-community-wall .member-post.comm-wall-post.comm-wall-post--with-media .post-media {
    order: -1;
}

.comm-community-wall .member-post.comm-wall-post .post-content {
    display: block !important;
    width: 100%;
    height: auto !important;
    min-height: 0;
    text-align: left !important;
    align-items: initial !important;
    justify-content: initial !important;
    font-size: 15px;
    color: var(--wall-text, #1f2937);
    line-height: 1.6;
    margin: 0;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-reactions {
    margin-top: 8px !important;
    gap: 6px !important;
    align-items: center;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-react {
    width: 42px;
    min-width: 42px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--primary-color, #c1440e) 25%, #e6ecf2);
    background: color-mix(in srgb, var(--primary-color, #c1440e) 95%, #ffffff);
    color: #ffffff;
    line-height: 1 !important;
    font-size: 15px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-react:hover,
.comm-community-wall .member-post.comm-wall-post .comm-wall-react:focus {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 4px 10px rgba(20, 28, 38, 0.14);
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-react .emoji {
    width: 16px;
    height: 16px;
    margin: 0;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-reaction-pill {
    line-height: 1 !important;
    font-size: 11px !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    background: #ffffff;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-reaction-pill .emoji {
    width: 14px;
    height: 14px;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-comments {
    margin-top: 10px !important;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-post-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--wall-border, #d8dee8) 72%, #ffffff);
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-comment {
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--wall-border, #d8dee8) 78%, #ffffff);
    box-shadow: 0 2px 10px rgba(20, 28, 38, 0.04);
    background: color-mix(in srgb, #ffffff 88%, var(--wall-surface-2, #f5f7fb));
    padding: 10px !important;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-comment strong {
    font-size: 0.98rem;
}

.comm-community-wall .member-post.comm-wall-post .post-content > *:first-child {
    margin-top: 0;
}

.comm-community-wall .member-post.comm-wall-post .post-content > *:last-child {
    margin-bottom: 0;
}

.comm-community-wall .member-post.comm-wall-post .post-media.comm-wall-post-media-gallery {
    position: relative;
    margin-top: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--wall-border, #d8dee8) 80%, #ffffff);
    background: #f4f7fb;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-post-media-track {
    display: flex;
    width: 100%;
    transition: transform 0.28s ease;
    will-change: transform;
}

.comm-community-wall .member-post.comm-wall-post .post-media-item {
    flex: 0 0 100%;
    margin: 0;
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff4fa;
}

.comm-community-wall .member-post.comm-wall-post .post-media-item a {
    display: block;
    width: 100%;
}

.comm-community-wall .member-post.comm-wall-post .post-media-item img,
.comm-community-wall .member-post.comm-wall-post .post-media-item video {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: min(62vh, 560px);
    min-height: 280px;
    object-fit: contain;
    border-radius: 0;
    background: #f8fafc;
}

.comm-community-wall .member-post.comm-wall-post .post-media-item video {
    object-fit: contain;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    border: 0;
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 23, 35, 0.62);
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-media-prev {
    left: 10px;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-media-next {
    right: 10px;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-media-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-media-dot {
    width: 8px;
    height: 8px;
    border: 0;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.56);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    cursor: pointer;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-media-dot.is-active {
    background: #ffffff;
}

.comm-community-wall .member-post.comm-wall-post .comm-wall-post-media-gallery.is-single .comm-wall-media-nav,
.comm-community-wall .member-post.comm-wall-post .comm-wall-post-media-gallery.is-single .comm-wall-media-pagination {
    display: none;
}

@media (max-width: 900px) {
    .comm-community-wall .member-post.comm-wall-post .comm-wall-react {
        width: 38px;
        min-width: 38px;
        height: 32px;
        min-height: 32px;
    }

    .comm-community-wall .member-post.comm-wall-post .post-media-item img,
    .comm-community-wall .member-post.comm-wall-post .post-media-item video {
        min-height: 210px;
        max-height: 64vh;
    }

    .comm-community-wall .member-post.comm-wall-post .comm-wall-media-nav {
        width: 34px;
        height: 34px;
        font-size: 19px;
    }
}

/* ── Theme customizer ───────────────────────────────────────────── */
.theme-customizer {
    background: #fff;
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.theme-customizer .color-picker-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.theme-customizer .color-picker-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.theme-customizer .color-picker-item label {
    font-weight: 600;
    font-size: 13px;
}

.theme-customizer .color-picker-item input[type="color"] {
    width: 100%;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.theme-customizer .theme-presets {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.theme-customizer .theme-preset {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.theme-customizer .theme-preset:hover {
    border-color: var(--primary-color);
    background: #f9f9f9;
}

.theme-customizer .theme-preset.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

/* ── Privacy settings ───────────────────────────────────────────── */
.privacy-settings {
    background: #fff;
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.privacy-settings .privacy-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.privacy-settings .privacy-option:last-child {
    border-bottom: none;
}

.privacy-settings .privacy-option label {
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.privacy-settings .toggle-switch {
    position: relative;
    width: 52px;
    height: 26px;
}

.privacy-settings .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.privacy-settings .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.privacy-settings .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.privacy-settings input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.privacy-settings input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* ── Immersive single-member redesign (public profile page only) ─────────── */
body.comm-single-member-page .cpage2-article.comm-member-immersive {
    min-height: 100vh;
    background:
        radial-gradient(120% 80% at 8% 0%, color-mix(in srgb, var(--cpage2-accent) 22%, transparent) 0%, transparent 58%),
        radial-gradient(90% 90% at 95% 12%, color-mix(in srgb, var(--cpage2-accent-dark) 24%, transparent) 0%, transparent 62%),
        linear-gradient(180deg, color-mix(in srgb, var(--cpage2-surface-2) 86%, #ffffff 14%) 0%, var(--cpage2-surface) 100%);
}

body.comm-single-member-page .comm-member-hero-shell {
    position: relative;
    min-height: clamp(420px, 70vh, 760px);
}

body.comm-single-member-page .comm-member-hero-shell .cpage2-hero-bg {
    opacity: 0.5;
    filter: saturate(1.14) contrast(1.06);
    transform: scale(1.06);
    transform-origin: center;
}

body.comm-single-member-page .comm-member-hero-shell .cpage2-hero-scrim {
    background: linear-gradient(
        120deg,
        color-mix(in srgb, var(--cpage2-accent-dark) 80%, #05070f 20%) 0%,
        color-mix(in srgb, var(--cpage2-accent) 62%, #07101f 38%) 48%,
        color-mix(in srgb, var(--cpage2-accent-dark) 84%, #020409 16%) 100%
    );
    opacity: 0.84;
}

body.comm-single-member-page .comm-member-hero-shell .cpage2-hero-body {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: clamp(70px, 14vh, 140px) clamp(20px, 3.8vw, 52px) clamp(28px, 7vh, 68px);
}

body.comm-single-member-page .comm-member-hero-shell .cpage2-title {
    max-width: 20ch;
    color: #ffffff;
    text-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
    letter-spacing: -0.02em;
}

body.comm-single-member-page .comm-member-hero-chips {
    gap: 10px;
    margin-bottom: 18px;
}

body.comm-single-member-page .comm-member-hero-subtitle {
    margin: 14px 0 24px;
    max-width: 72ch;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1rem, 1.3vw, 1.18rem);
    line-height: 1.6;
}

body.comm-single-member-page .comm-member-hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    max-width: 820px;
}

body.comm-single-member-page .comm-member-hero-card {
    border-radius: 16px;
    border: 1px solid var(--member-card-border, rgba(255, 255, 255, 0.4));
    background: var(--member-card-frost, rgba(255, 255, 255, 0.7));
    padding: 14px 16px;
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 34px rgba(7, 12, 24, 0.25);
}

body.comm-single-member-page .comm-member-hero-card__kicker {
    display: block;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: color-mix(in srgb, var(--cpage2-accent-dark) 74%, #0a1020 26%);
    margin-bottom: 7px;
}

body.comm-single-member-page .comm-member-hero-card__value {
    display: block;
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    line-height: 1;
    color: color-mix(in srgb, var(--cpage2-heading) 72%, #071226 28%);
}

body.comm-single-member-page .cpage2-entry-nav {
    top: 0;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--cpage2-border) 74%, transparent);
}

body.comm-single-member-page .cpage2-entry-nav__inner {
    max-width: 1280px;
    padding-left: clamp(14px, 2vw, 20px);
    padding-right: clamp(14px, 2vw, 20px);
}

body.comm-single-member-page .comm-member-profile {
    max-width: 1280px;
    gap: clamp(18px, 2vw, 28px);
    padding: clamp(18px, 3vw, 30px) clamp(14px, 2.6vw, 24px) 70px;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
}

body.comm-single-member-page .comm-member-profile .profile-section {
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--cpage2-border) 74%, #ffffff 26%);
    background: color-mix(in srgb, var(--cpage2-surface) 93%, #ffffff 7%);
    box-shadow: 0 12px 34px rgba(8, 15, 33, 0.09);
}

body.comm-single-member-page .comm-member-profile .profile-section-title {
    color: var(--cpage2-heading);
    border-bottom-color: color-mix(in srgb, var(--cpage2-accent) 34%, transparent);
}

body.comm-single-member-page .comm-member-profile .profile-card {
    position: relative;
    overflow: hidden;
}

body.comm-single-member-page .comm-member-profile .profile-card::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -140px;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--cpage2-accent) 18%, transparent) 0%, transparent 72%);
    pointer-events: none;
}

body.comm-single-member-page .comm-member-profile .profile-feed-card,
body.comm-single-member-page .comm-member-profile .business-card,
body.comm-single-member-page .comm-member-profile .friend-card,
body.comm-single-member-page .comm-member-profile .media-gallery-card {
    border-radius: 14px;
    border-color: color-mix(in srgb, var(--cpage2-border) 70%, #ffffff 30%);
    background: color-mix(in srgb, var(--cpage2-surface) 95%, #ffffff 5%);
}

body.comm-single-member-page .comm-member-profile .profile-btn--primary {
    background: linear-gradient(135deg, var(--cpage2-accent), var(--cpage2-accent-dark));
    border-color: transparent;
}

body.comm-single-member-page .comm-member-profile .profile-btn--secondary {
    background: color-mix(in srgb, var(--cpage2-surface-2) 86%, #ffffff 14%);
    color: var(--cpage2-heading);
    border-color: color-mix(in srgb, var(--cpage2-border) 76%, transparent);
}

body.comm-single-member-page .comm-member-profile .member-profile-quick-nav {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--cpage2-border) 76%, transparent);
    box-shadow: 0 12px 30px rgba(11, 22, 42, 0.09);
}

body.comm-single-member-page .comm-member-profile .member-profile-quick-nav a {
    border-radius: 999px;
    border-color: color-mix(in srgb, var(--cpage2-border) 76%, transparent);
    color: var(--cpage2-heading);
    background: color-mix(in srgb, var(--cpage2-surface-2) 92%, #ffffff 8%);
}

body.comm-single-member-page .comm-member-profile .member-profile-quick-nav a:hover,
body.comm-single-member-page .comm-member-profile .member-profile-quick-nav a:focus {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cpage2-accent), var(--cpage2-accent-dark));
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    body.comm-single-member-page .comm-member-hero-shell {
        min-height: 60vh;
    }

    body.comm-single-member-page .comm-member-hero-shell .cpage2-hero-body {
        padding-top: clamp(60px, 10vh, 90px);
    }

    body.comm-single-member-page .comm-member-hero-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.comm-single-member-page .comm-member-profile {
        grid-template-columns: 1fr;
        padding-bottom: 44px;
    }

    body.comm-single-member-page .comm-member-profile .profile-sidebar-col {
        order: -1;
    }

    .comm-member-profile {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 16px;
    }

    /* Both column wrappers become full-width */
    .profile-main-col,
    .profile-sidebar-col {
        grid-column: 1;
    }

    /* Sidebar comes first on mobile so avatar is at the top */
    .profile-sidebar-col {
        order: -1;
    }

    /* Legacy per-section overrides */
    .profile-header,
    .friends-section,
    .social-links-section,
    .positions-section,
    .neighborhoods-section,
    .media-gallery-section,
    .member-posts-section,
    .updates-section,
    .community-posts-section,
    .businesses-section {
        grid-column: 1;
    }

    .friends-grid {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        gap: 8px;
    }

    .social-icons {
        justify-content: center;
    }

    .theme-customizer .color-picker-group {
        grid-template-columns: 1fr;
    }

    .community-posts-grid {
        grid-template-columns: 1fr;
    }
}


@media (prefers-reduced-motion: reduce) {
    body.comm-single-member-page .comm-member-hero-shell .cpage2-hero-bg {
        transform: none !important;
    }

    .comm-member-profile > .profile-section,
    .profile-card,
    .business-card,
    .profile-feed-card,
    .media-gallery-card,
    .profile-action-row .button,
    .member-profile-quick-nav a {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

@keyframes profileSectionIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Loading states ─────────────────────────────────────────────── */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: comm-spin 1s linear infinite;
}

@keyframes comm-spin {
    to { transform: rotate(360deg); }
}

/* ── Status messages ────────────────────────────────────────────── */
.comm-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    animation: comm-slide-in 0.3s ease-out;
    font-size: 14px;
}

.comm-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.comm-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@keyframes comm-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}


