section.top-space-margin {
  margin-top: 30px !important;
}

.profile-cover {
  height: 160px;
  background: linear-gradient(135deg, #1a6b5c 0%, #2d9e83 50%, #72ccca 100%);
  border-radius: 12px 12px 0 0;
  position: relative;
}

.profile-avatar-wrap {
  position: absolute;
  bottom: -40px;
  left: 30px;
}

.profile-avatar-wrap img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.verified-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
}

.profile-header-body {
  padding: 52px 30px 24px 30px;
  border: 1px solid #e8e8e8;
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: #fff;
}

.profile-handle {
  color: #aaa;
  font-size: 13px;
  font-weight: 500;
}

.profile-identity {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.profile-org-name {
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* single-line clamp */
}

.profile-handle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.profile-cta {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .profile-org-name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* allow up to 2 lines on small screens */
    -webkit-box-orient: vertical;
  }
}

.stat-block {
  flex: 1;
  text-align: center;
  padding: 0 18px;
  border-right: 1px solid #eee;
}

.stat-block:last-child {
  border-right: none;
}

.stat-block .stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.stat-block .stat-label {
  font-size: 12px;
  color: #aaa;
}

.profile-tabs .nav-link {
  font-weight: 600;
  font-size: 14px;
  color: #888;
  border: none;
  padding: 12px 20px;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  display: block;
}

.profile-tabs .nav-link.active {
  color: #1a6b5c;
  border-bottom-color: #1a6b5c;
  background: none;
}

.profile-tabs {
  border-bottom: 1px solid #eee;
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  display: flex;
}

.profile-tabs .nav-item {
  flex: 1;
  text-align: center;
}

/* Post card */
.post-card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
  background: #fff;
  transition: box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

.post-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post-card__org {
  font-size: 14px;
  font-weight: 700;
  color: #222;
}

.post-card__handle {
  font-size: 12px;
  color: #aaa;
}

.post-card__date {
  font-size: 12px;
  color: #bbb;
}

.post-card__body {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin: 14px 0 12px;
}

.post-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
}

.post-card__actions {
  display: flex;
  gap: 22px;
  color: #aaa;
  font-size: 13px;
  font-weight: 500;
}

.post-card__actions span {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.post-card__actions span:hover {
  color: #1a6b5c;
}

.post-card__actions .bookmark {
  margin-left: auto;
}

/* Sidebar similar RLO row */
.similar-rlo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.similar-rlo-row:last-child {
  border-bottom: none;
}

.similar-rlo-row img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.similar-rlo-row .rlo-name {
  font-size: 13px;
  font-weight: 700;
  color: #222;
}

.similar-rlo-row .rlo-sector {
  font-size: 11px;
  color: #aaa;
}

.follow-btn {
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #1a6b5c;
  color: #1a6b5c;
  background: none;
  border-radius: 20px;
  padding: 3px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.follow-btn:hover {
  background: #1a6b5c;
  color: #fff;
}

/* Sidebar post cards */
.sidebar-post-card {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0;
}

.sidebar-post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-post-org {
  font-size: 12px;
  font-weight: 700;
  color: #222;
  display: inline;
}

.sidebar-post-date {
  font-size: 11px;
  color: #bbb;
  margin-left: 6px;
}

.sidebar-post-body {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  margin: 6px 0 10px;
}

.sidebar-post-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
}

.sidebar-post-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar::-webkit-scrollbar {
  width: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.media-grid__item {
  aspect-ratio: 1 / 1;
}

.media-grid__image,
.media-grid__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 1199px) {
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .media-grid {
    grid-template-columns: 1fr;
  }
}

.media-popup {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.media-popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 24px;
  line-height: 1;
  color: #aaa;
  text-decoration: none;
}

.media-popup__close:hover {
  color: #1a6b5c;
}

.media-popup__media {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.media-popup__media img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  display: block;
}

.media-popup__video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.media-popup__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-popup__video {
  width: 100%;
  max-height: 60vh;
  background: #000;
  display: block;
}

.media-popup__thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.media-popup-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.media-popup-thumb:hover {
  border-color: #1a6b5c;
}

.media-popup__desc {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 14px;
}

.media-popup__link {
  font-size: 13px;
  font-weight: 600;
  color: #1a6b5c;
  text-decoration: none;
}

.media-popup__link:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  aside.sidebar {
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
    top: auto !important;
  }
}

@media (max-width: 991px) {
  aside.sidebar {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
  }
}

#scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a6b5c;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.25s,
    transform 0.25s,
    visibility 0.25s;
  z-index: 999;
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scroll-to-top:hover {
  background: #15554a;
}

#scroll-to-top svg {
  width: 18px;
  height: 18px;
}

/* ── Org About Modal overrides ───────────────────────── */

#org-about-modal .media-popup__desc {
  font-size: 14px;
  line-height: 1.7;
  color: #3a3a3a;
}

/* Section titles with extending line */
#org-about-modal .modal-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a6b5c;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#org-about-modal .modal-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #eee;
}

/* Mission & Vision grid */
#org-about-modal .mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

#org-about-modal .mv-card {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 14px 16px;
  border-left: 3px solid #1a6b5c;
}

#org-about-modal .mv-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #1a6b5c;
  margin-bottom: 6px;
  text-transform: uppercase;
}

#org-about-modal .mv-text {
  font-size: 13px;
  line-height: 1.55;
  color: #444;
}

/* Contact grid */
#org-about-modal .contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#org-about-modal .contact-item {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 12px 14px;
}

#org-about-modal .contact-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1a6b5c;
  text-transform: uppercase;
  margin-bottom: 4px;
}

#org-about-modal .contact-value {
  font-size: 13px;
  color: #222;
  word-break: break-all;
}

#org-about-modal .contact-value a {
  color: #1a6b5c;
  text-decoration: none;
}

#org-about-modal .contact-value a:hover {
  text-decoration: underline;
}

/* Social links row */
#org-about-modal .social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#org-about-modal .social-row a,
#org-about-modal .social-row span {
  font-size: 13px;
  font-weight: 600;
  color: #1a6b5c;
  text-decoration: none;
  background: #f0faf7;
  border: 1px solid #c8e6dc;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#org-about-modal .social-row a:hover {
  background: #1a6b5c;
  color: #fff;
  border-color: #1a6b5c;
}

/* Modal banner strip at top */
#org-about-modal::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg, #1a6b5c, #2d9e83, #72ccca);
  border-radius: 12px 12px 0 0;
  margin: -24px -24px 20px -24px;
}

@media (max-width: 600px) {
  #org-about-modal .mv-grid,
  #org-about-modal .contact-grid {
    grid-template-columns: 1fr;
  }
}
