.comm-info-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
}

/* ══════════════════════════════════════════════════════════
   Community Hub Panel
   ══════════════════════════════════════════════════════════ */
.comm-hub {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 86, 143, 0.10);
    border: 1px solid #e2eaf3;
    overflow: hidden;
    margin-bottom: 28px;
}

/* ── Gallery strip at the top of the card ── */
.comm-hub-gallery {
    display: grid;
    gap: 3px;
    width: 100%;
    overflow: hidden;
}

/* 1 image */
.comm-hub-gallery--1 { grid-template-columns: 1fr; }
.comm-hub-gallery--1 .comm-media-item { height: 340px; }

/* 2 images */
.comm-hub-gallery--2 { grid-template-columns: 1fr 1fr; }
.comm-hub-gallery--2 .comm-media-item { height: 260px; }

/* 3 images — hero left, two stacked right */
.comm-hub-gallery--3 {
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: 165px 165px;
}
.comm-hub-gallery--3 .comm-media-item--1 {
    grid-row: 1 / 3;
}

/* shared media item */
.comm-media-item {
    position: relative;
    overflow: hidden;
    background: #c8d8e8;
    cursor: pointer;
}

/* shimmer placeholder — visible while image is loading */
.comm-media-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #d0dce8 0%,
        #e8eff7 40%,
        #d0dce8 80%
    );
    background-size: 200% 100%;
    animation: commShimmer 1.4s ease-in-out infinite;
    z-index: 0;
}

@keyframes commShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* image starts invisible, fades in once loaded */
.comm-hub-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.45s ease;
    position: relative;
    z-index: 1;
}
.comm-hub-img--loaded {
    opacity: 1;
}

/* stop shimmer once image is loaded */
.comm-media-item:has(.comm-hub-img--loaded)::before {
    animation: none;
    background: transparent;
}

.comm-media-item:hover .comm-hub-img { transform: scale(1.06); }

.comm-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,86,143,0.55) 0%, rgba(0,30,60,0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.comm-media-overlay i {
    color: #fff;
    font-size: 28px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.6);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.comm-media-item:hover .comm-media-overlay { opacity: 1; }

/* ── No-image decorative banner ── */
.comm-hub-banner {
    position: relative;
    height: 140px;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.comm-hub-banner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, #00568F 0%, #0077c2 50%, #00a3d9 100%);
}
/* subtle dot-grid pattern overlay */
.comm-hub-banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
    background-size: 22px 22px;
}
.comm-hub-banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 32px;
}
.comm-hub-banner-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}
.comm-hub-banner-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.comm-hub-banner-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 3px 10px;
}

/* ── Body row below the gallery ── */
.comm-hub-body {
    display: flex;
    align-items: stretch;
    min-height: 190px;
}

/* Description column */
.comm-hub-desc {
    flex: 1;
    padding: 26px 28px;
    min-width: 0; /* prevent overflow */
}

/* "About this Community" heading — highlighted style */
.comm-hub-desc .comm-hub-section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00568F;
    background: linear-gradient(90deg, #e8f3fb 0%, #f0f7ff 100%);
    border-left: 3px solid #00568F;
    padding: 7px 14px 7px 12px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 18px;
    margin-left: -28px; /* bleed to card edge */
}
.comm-hub-desc .comm-hub-label-dot { display: none; } /* dot not needed with border accent */

.comm-short-desc { color: #444; font-size: 15px; line-height: 1.75; }
.comm-short-desc p { margin-bottom: 8px; }
.comm-short-desc ul { list-style: disc !important; list-style-position: inside !important; }
.comm-short-desc ol { list-style: decimal !important; list-style-position: inside !important; }

/* Vertical divider */
.comm-hub-divider {
    width: 1px;
    background: #e2eaf3;
    flex-shrink: 0;
    align-self: stretch;
    margin: 16px 0;
}

/* Actions column (share + join) */
.comm-hub-actions {
    flex: 0 0 290px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #f4f9ff 0%, #eaf3fb 100%);
}

/* Section label — used in both desc and actions */
.comm-hub-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00568F;
    margin-bottom: 14px;
}
.comm-hub-label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00568F;
    flex-shrink: 0;
}

/* ── Share section ── */
.comm-hub-share {
    padding: 22px 22px 18px;
    border-bottom: 1px solid #dde8f0;
}
.comm-share-url-row {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #ccd8e8;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}
.comm-share-url-icon {
    color: #00568F;
    font-size: 13px;
    padding: 0 10px 0 13px;
    flex-shrink: 0;
}
.comm-share-url-text {
    flex: 1;
    font-size: 12px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 9px 8px 9px 0;
    font-family: 'Courier New', monospace;
}
.comm-share-copy-btn {
    background: #00568F;
    color: #fff;
    border: none;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}
.comm-share-copy-btn:hover { background: #004070; }

/* Social icons row */
.comm-social-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.comm-social-label {
    font-size: 11px;
    color: #777;
    white-space: nowrap;
}
.comm-social-btns { display: flex; gap: 7px; }
.comm-social-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.comm-social-btn:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); color: #fff; text-decoration: none; }
.comm-social-fb { background: #1877f2; }
.comm-social-tw { background: #1da1f2; }
.comm-social-li { background: #0077b5; }
.comm-social-em { background: #6b7280; }

/* ── Join section (guests only) ── */
.comm-hub-join {
    flex: 1;
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.comm-join-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00568F;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,86,143,0.15);
    margin-bottom: 10px;
}
.comm-join-heading {
    font-size: 14px;
    font-weight: 700;
    color: #1a2e42;
    margin-bottom: 4px;
}
.comm-join-sub {
    font-size: 12px;
    color: #667;
    line-height: 1.5;
    margin-bottom: 14px;
}
.comm-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #00568F;
    color: #fff;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}
.comm-join-btn:hover { background: #004070; color: #fff; text-decoration: none; transform: translateY(-2px); }

/* ── Responsive ── */
@media (max-width: 991px) {
    .comm-hub-actions { flex: 0 0 260px; }
}

@media (max-width: 767px) {
    .comm-hub-gallery--1 .comm-media-item { height: 240px; }
    .comm-hub-gallery--2 .comm-media-item { height: 180px; }
    .comm-hub-gallery--3 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 160px;
    }
    .comm-hub-gallery--3 .comm-media-item--1 {
        grid-row: 1;
        grid-column: 1 / 3;
        height: 200px;
    }

    .comm-hub-body {
        flex-direction: column;
    }
    .comm-hub-divider {
        width: auto;
        height: 1px;
        margin: 0 16px;
    }
    .comm-hub-actions {
        flex: none;
        border-top: 1px solid #dde8f0;
        background: #f7fafd;
    }
    .comm-share-url-row {
        flex-direction: row; /* keep it horizontal on mobile too */
    }
}

/* ══════════════════════════════════════════════════════════
   Lightbox modal
   ══════════════════════════════════════════════════════════ */
.comm-media-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 24px;
    animation: fadeInModal 0.25s ease;
}
.comm-media-modal.active { display: flex; }
@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
.comm-media-modal img {
    max-width: 88vw;
    max-height: 80vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 16px 60px rgba(0,0,0,0.7);
}
.comm-media-modal-close {
    position: absolute;
    top: 20px;
    right: 26px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.comm-media-modal-close:hover { background: rgba(255,255,255,0.25); }
.comm-media-modal-caption {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    margin-top: 16px;
    text-align: center;
    letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════════════════════
   Tabs
   ══════════════════════════════════════════════════════════ */
.comm-tabs { margin-top: 24px; }
.comm-tab-nav {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    gap: 4px;
}
.comm-tab-btn {
    padding: 10px 24px;
    background: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-size: 16px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.comm-tab-btn.active { border-color: #1E1E1E; color: #1E1E1E; font-weight: 600; background: #fff; }
.comm-tab-pane { display: none; }
.comm-tab-pane.active { display: block; }
.comm-tab-count { font-size: 13px; color: #777; margin-bottom: 14px; font-weight: 600; }
.comm-tab-empty { text-align: center; padding: 40px 20px; color: #777; font-size: 15px; }

/* ══════════════════════════════════════════════════════════
   Opportunity card overrides
   ══════════════════════════════════════════════════════════ */
.opportunity-card .opportunity-title { font-weight: 600; font-size: 1.05rem; color: #323232; margin-bottom: 4px; }
.opportunity-card .opportunity-title a { color: #323232; text-decoration: none; }
.opportunity-card .opportunity-title a:hover { color: #00568F; text-decoration: underline; }
.opportunity-card .organization-name a { color: #00568F; text-decoration: none; }
.opportunity-card .organization-name a:hover { text-decoration: underline; }
.opportunity-card .opportunity-description {
    font-size: 14px;
    color: #1E1E1E;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
.opportunity-card .posted-date { font-size: 12px; color: #888; }
.opportunity-card .detail-text { color: #1E1E1E; }

/* ══════════════════════════════════════════════════════════
   Organization card overrides
   ══════════════════════════════════════════════════════════ */
.comm-tab-pane .org-description-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comm-tab-pane .organizations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 991px) {
    .comm-tab-pane .organizations-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .comm-tab-pane .organizations-grid { grid-template-columns: 1fr; }
}
