/* ===================================================
   GROUP.CSS — Group Vlog Page Styles
   =================================================== */

/* ─── Group Hero ─────────────────────────────────── */
.group-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
  background: var(--gradient-hero);
}

.group-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.group-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
}

.group-hero-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--gold);
  top: -100px;
  right: -50px;
}

.group-hero-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--pink);
  bottom: -80px;
  left: -60px;
}

.group-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 2rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .group-hero-content {
    padding: 2.5rem 1.25rem;
    gap: 1.5rem;
  }
  .group-hero-title {
    font-size: clamp(2rem, 7vw, 3rem);
  }
  .group-hero-desc {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .group-hero-content {
    padding: 2rem 1rem;
  }
  .group-breadcrumb {
    font-size: 0.72rem;
  }
  .group-meta-row {
    gap: 0.4rem;
  }
}

.group-hero-main {
  flex: 1 1 460px;
  max-width: 660px;
  min-width: 0;
}

/* ─── Group Photo (showcase header) ─────────────── */
.group-hero-photo {
  flex: 0 0 auto;
  display: none;
  animation: groupPhotoIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.group-photo-frame {
  position: relative;
  width: 320px;
  max-width: 78vw;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 10px 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transform: rotate(2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.group-photo-frame:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 26px 60px rgba(201, 168, 76, 0.2);
}

.group-photo-frame img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 10px;
}

.group-photo-media {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.group-photo-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  border-radius: 10px;
}

.group-hero-photo:hover .group-photo-hint,
.group-photo-media:focus-visible .group-photo-hint {
  opacity: 1;
}

.group-photo-caption {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  padding: 0.65rem 0.5rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .group-hero-photo {
    width: 100%;
  }

  .group-photo-frame {
    margin: 0 auto;
    width: 280px;
  }

  .group-photo-frame img {
    height: 200px;
  }
}

.group-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.group-breadcrumb a {
  color: var(--gold);
  transition: var(--transition);
}

.group-breadcrumb a:hover {
  color: var(--gold-light);
}

.group-breadcrumb .sep {
  opacity: 0.4;
}

.group-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.group-hero-title .group-code {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.group-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.group-meta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ─── Content Layout ─────────────────────────────── */
.group-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
  box-sizing: border-box;
}

.group-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

/* ─── Project Description ────────────────────────── */
.project-description-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.project-description-section h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.6rem;
  background: var(--gradient-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.description-content {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.85;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.description-content p+p {
  margin-top: 1rem;
}

.description-content h1,
.description-content h2,
.description-content h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.description-content h1 {
  font-size: 1.5rem;
}

.description-content h2 {
  font-size: 1.25rem;
}

.description-content h3 {
  font-size: 1.05rem;
}

.description-content ul,
.description-content ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
  list-style: disc;
}

.description-content ol {
  list-style: decimal;
}

.description-content li {
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.description-content strong {
  color: var(--text-primary);
}

.description-content a {
  color: var(--gold);
  text-decoration: underline;
}

.description-content blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.no-content-placeholder {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.no-content-placeholder .icon {
  font-size: 2.5rem;
  opacity: 0.4;
}

.no-content-placeholder p {
  font-size: 0.9rem;
}

/* ─── Photo Gallery ──────────────────────────────── */
.photo-gallery-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.photo-gallery-section h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.6rem;
  background: var(--gradient-pink);
  border-radius: 2px;
  flex-shrink: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--bg-secondary);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(214, 51, 132, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  font-size: 1.5rem;
  color: white;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
  left: 1.5rem;
}

.lightbox-nav.next {
  right: 1.5rem;
}

/* ─── Video Section ──────────────────────────────── */
.video-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.video-section h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.6rem;
  background: var(--gradient-maroon);
  border-radius: 2px;
  flex-shrink: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.12);
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: 1rem 1.25rem;
}

.video-title {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── Sidebar ────────────────────────────────────── */
.group-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}

.sidebar-card-title {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.sidebar-stat:last-child {
  border-bottom: none;
}

.sidebar-stat .label {
  color: var(--text-muted);
}

.sidebar-stat .value {
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-group-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-group-link {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-group-link:hover {
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold);
}

.sidebar-group-link.current {
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold);
  font-weight: 700;
}

/* ─── Loading State ──────────────────────────────── */
.content-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── Responsive Group Page ──────────────────────── */
@media (max-width: 1024px) {
  .group-content {
    grid-template-columns: minmax(0, 1fr);
    padding: 2rem 1.5rem 4rem;
  }

  .group-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .group-content {
    padding: 1.5rem 1.25rem 3.5rem;
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .group-sidebar {
    grid-template-columns: 1fr;
  }

  .group-category-filter-wrap {
    padding: 0.9rem 1rem;
  }

  .group-tab-switcher {
    width: 100%;
    justify-content: stretch;
  }

  .group-tab-btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .group-content {
    padding: 1.25rem 1rem 3rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .group-tab-switcher {
    border-radius: 10px;
  }
}

/* ─── Category Filter Tabs ─────────────────────────── */
.group-category-filter-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.15rem 1.4rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.category-tabs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.category-tabs-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-tabs-icon {
  font-size: 1.1rem;
}

.category-tabs-label {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.category-tabs-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-secondary);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.group-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.group-category-tab {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
  flex-shrink: 0;
}

.group-category-tab:hover {
  color: var(--text-primary);
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.35);
  transform: translateY(-2px);
}

.group-category-tab.active {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.22), rgba(214, 51, 132, 0.16));
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 4px 18px rgba(201, 168, 76, 0.25);
  transform: translateY(-1px);
}

.group-category-tab .tab-icon {
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.group-category-tab:hover .tab-icon {
  transform: scale(1.18);
}

.group-category-tab .tab-count-pill {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
  font-weight: 700;
  min-width: 1.25rem;
  text-align: center;
}

[data-theme="dark"] .group-category-tab .tab-count-pill {
  background: rgba(255, 255, 255, 0.12);
}

.group-category-tab.active .tab-count-pill {
  background: var(--gold);
  color: #000;
  font-weight: 800;
}

/* Category Empty State */
.category-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.category-empty-icon {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 12px rgba(201, 168, 76, 0.25));
}

.category-empty-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.category-empty-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 0 1.25rem;
  line-height: 1.6;
}

.category-empty-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Clickable Category Badge inside Post Cards */
.post-card-cat-badge {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.post-card-cat-badge:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
  box-shadow: 0 2px 10px rgba(201, 168, 76, 0.25);
}

/* ─── Post Cards (group page preview) ─────────────── */
.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* 3-photo strip at top of card */
.post-card-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  height: 180px;
  overflow: hidden;
}

.post-card-photo {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
}

.post-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.post-card:hover .post-card-photo img {
  transform: scale(1.05);
}

/* "+N more" overlay on last photo */
.post-card-photo.has-more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card text body */
.post-card-body {
  padding: 1.4rem 1.6rem 1.6rem;
}

.post-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.6rem;
  line-height: 1.3;
}

.post-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.post-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--gold);
  color: #1a1200;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.post-card-btn:hover {
  background: var(--gold-dark, #b8922a);
  transform: translateX(3px);
}

/* Single-photo layout: show full width */
.post-card-photos:has(.post-card-photo:only-child) {
  grid-template-columns: 1fr;
}

/* Two-photo layout */
.post-card-photos:has(.post-card-photo:nth-child(2):last-child) {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 480px) {
  .post-card-photos {
    height: 140px;
  }

  .post-card-body {
    padding: 1rem 1.2rem 1.2rem;
  }
}

/* ═══════════════════════════════════════════════════
   WORDPRESS-STYLE INLINE MEDIA RENDERING (POST & GROUP)
   ═══════════════════════════════════════════════════ */

/* Always hide editor controls on public view */
.post-full-description .wp-media-toolbar,
.description-content .wp-media-toolbar {
  display: none !important;
}

/* Inline Images */
.post-full-description .wp-block-image,
.description-content .wp-block-image {
  margin: 2rem 0;
  max-width: 100%;
  clear: both;
}

.post-full-description .wp-block-image.align-center,
.description-content .wp-block-image.align-center {
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.post-full-description .wp-block-image.align-full,
.description-content .wp-block-image.align-full {
  width: 100%;
  display: block;
}

.post-full-description .wp-block-image.align-left,
.description-content .wp-block-image.align-left {
  float: left;
  margin: 0.5rem 2rem 1.25rem 0;
  max-width: 48%;
  display: table;
}

.post-full-description .wp-block-image.align-right,
.description-content .wp-block-image.align-right {
  float: right;
  margin: 0.5rem 0 1.25rem 2rem;
  max-width: 48%;
  display: table;
}

.post-full-description .wp-block-image img,
.description-content .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-full-description .wp-block-image img:hover,
.description-content .wp-block-image img:hover {
  transform: scale(1.015);
  box-shadow: 0 12px 36px rgba(201, 168, 76, 0.2);
}

/* Inline YouTube Videos */
.post-full-description .wp-block-video,
.description-content .wp-block-video {
  margin: 2.25rem 0;
  clear: both;
}

.post-full-description .wp-block-video.align-center,
.description-content .wp-block-video.align-center {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.post-full-description .wp-block-video.align-full,
.description-content .wp-block-video.align-full {
  width: 100%;
}

.post-full-description .wp-video-wrapper,
.description-content .wp-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.post-full-description .wp-video-wrapper iframe,
.description-content .wp-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Inline PDF Documents */
.post-full-description .wp-block-pdf,
.description-content .wp-block-pdf {
  margin: 2.25rem 0;
  clear: both;
}

.post-full-description .wp-block-pdf.align-center,
.description-content .wp-block-pdf.align-center {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.post-full-description .wp-block-pdf.align-full,
.description-content .wp-block-pdf.align-full {
  width: 100%;
}

.post-full-description .wp-pdf-wrapper,
.description-content .wp-pdf-wrapper {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.post-full-description .wp-pdf-wrapper iframe,
.description-content .wp-pdf-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.post-full-description .wp-pdf-bar,
.description-content .wp-pdf-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  font-size: 0.85rem;
}

.post-full-description .wp-pdf-icon,
.description-content .wp-pdf-icon {
  font-size: 1.1rem;
}

.post-full-description .wp-pdf-name,
.description-content .wp-pdf-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-weight: 600;
}

.post-full-description .wp-pdf-open,
.description-content .wp-pdf-open {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.post-full-description .wp-pdf-open:hover,
.description-content .wp-pdf-open:hover {
  text-decoration: underline;
}

/* Captions */
.post-full-description figcaption,
.description-content figcaption {
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-top: 0.6rem;
  line-height: 1.4;
}

/* Clearfix for post description to contain floats */
.post-full-description::after,
.description-content::after {
  content: "";
  display: table;
  clear: both;
}


@media (max-width: 640px) {

  .post-full-description .wp-block-image.align-left,
  .post-full-description .wp-block-image.align-right,
  .description-content .wp-block-image.align-left,
  .description-content .wp-block-image.align-right {
    float: none;
    max-width: 100%;
    margin: 1.5rem auto;
  }

  .post-full-description .wp-pdf-wrapper,
  .description-content .wp-pdf-wrapper {
    height: 380px;
  }
}

/* ═══════════════════════════════════════════════════
   GROUP PROFILE SECTION (COMPACT & MODERN)
   ═══════════════════════════════════════════════════ */

.group-profile-section {
  background: linear-gradient(180deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%);
  padding: 2rem 1.5rem 1.75rem;
  position: relative;
  overflow: hidden;
}

.group-profile-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(214,51,132,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.group-profile-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 0 0.5rem;
}

/* ─── Profile Header ─────────────────────────────── */
.profile-header-wrap {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulseAura 2s infinite ease-in-out;
}

@keyframes pulseAura {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.profile-main-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.profile-main-title .highlight-accent {
  background: linear-gradient(135deg, var(--gold), #f59e0b, var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-main-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ─── Teacher Showcase ───────────────────────────── */
.teacher-showcase-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.teacher-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.08) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(214, 51, 132, 0.06) 100%);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 20px;
  padding: 1.35rem 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(201, 168, 76, 0.15) inset;
  width: 100%;
  max-width: 650px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.teacher-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(201, 168, 76, 0.22), 0 0 0 1px rgba(201, 168, 76, 0.3) inset;
  border-color: rgba(201, 168, 76, 0.55);
}

.teacher-card-glow {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(201, 168, 76, 0.12), transparent 70%);
  pointer-events: none;
}

.teacher-card-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a1200;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
  border: 3px solid rgba(201, 168, 76, 0.6);
  position: relative;
  overflow: visible;
}

.teacher-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.teacher-status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  border: 2.5px solid var(--bg-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.teacher-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.teacher-badge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.teacher-card-badge {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(201, 168, 76, 0.16);
  border: 1px solid rgba(201, 168, 76, 0.4);
  color: var(--gold);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.teacher-dept-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.teacher-card-name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.teacher-card-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.teacher-card-quote {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
  margin-top: 0.2rem;
  opacity: 0.85;
}

/* ─── Roster Divider Bridge ───────────────────────── */
.roster-divider-wrap {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 1.25rem 0 1.75rem;
}

.roster-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.35), transparent);
}

.roster-divider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.roster-divider-badge .badge-icon {
  font-size: 1rem;
}

.roster-divider-badge .badge-text {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.roster-divider-badge .badge-count {
  font-size: 0.72rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: #1a1200;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

/* ─── Roster Toolbar (Search & Filter) ────────────── */
.roster-toolbar {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.roster-search-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.95rem;
  width: 320px;
  max-width: 100%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.roster-search-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

.roster-search-box .search-icon {
  font-size: 0.95rem;
  opacity: 0.7;
}

.roster-search-box input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-primary);
  width: 100%;
}

.roster-search-box input::placeholder {
  color: var(--text-muted);
}

.roster-search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 0.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}

.roster-search-clear-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.roster-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.3rem;
  flex-wrap: wrap;
}

.roster-filter-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.roster-filter-btn:hover {
  color: var(--text-primary);
  background: rgba(201, 168, 76, 0.08);
}

.roster-filter-btn.active {
  background: linear-gradient(135deg, var(--gold), #e8c96b);
  color: #1a1200;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(201, 168, 76, 0.3);
}

/* ─── Student Flowchart / Roster Grid ─────────────── */
.student-flowchart {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.6rem;
  width: 100%;
  max-width: 1100px;
  padding: 0.25rem 0 1.5rem;
  position: relative;
}

/* ─── Compact Student Card (Chip Style) ──────────── */
.student-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease;
  cursor: pointer;
  min-width: 0;
}

.student-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  border-color: rgba(201, 168, 76, 0.4);
}

/* Role Specific Card Borders & Glows */
.student-card.role-lead {
  border-color: rgba(201, 168, 76, 0.3);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.05) 0%, var(--bg-card) 100%);
}
.student-card.role-lead:hover {
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.18);
}

.student-card.role-present {
  border-color: rgba(214, 51, 132, 0.25);
  background: linear-gradient(135deg, rgba(214, 51, 132, 0.04) 0%, var(--bg-card) 100%);
}
.student-card.role-present:hover {
  border-color: var(--pink);
  box-shadow: 0 6px 18px rgba(214, 51, 132, 0.18);
}

.student-card.role-creative {
  border-color: rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, var(--bg-card) 100%);
}
.student-card.role-creative:hover {
  border-color: #3b82f6;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.18);
}

/* Mouse spotlight glow */
.student-card::before {
  content: '';
  position: absolute;
  top: var(--card-mouse-y, -100px);
  left: var(--card-mouse-x, -100px);
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.student-card:hover::before {
  opacity: 1;
}

/* Compact chip layout: avatar + body side by side (flex row on parent) */

.student-avatar-wrap {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.student-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.student-avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.student-avatar-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  pointer-events: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.student-card:hover .student-avatar-ring {
  transform: scale(1.1);
  border-color: var(--gold);
}

.student-card-idx {
  display: none; /* hide index in compact chip view */
}

/* Card Body: Name + Role (horizontal chip) */
.student-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.student-card-name {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 600;
  width: fit-content;
  max-width: 100%;
  line-height: 1.4;
}

.student-role-pill .role-icon {
  font-size: 0.6rem;
  flex-shrink: 0;
}

.student-role-pill .role-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Role Pills: Unified Neutral Style ─────────── */
.student-role-pill.role-lead,
.student-role-pill.role-present,
.student-role-pill.role-creative,
.student-role-pill.role-member {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
}

[data-theme="light"] .student-role-pill.role-lead,
[data-theme="light"] .student-role-pill.role-present,
[data-theme="light"] .student-role-pill.role-creative,
[data-theme="light"] .student-role-pill.role-member {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-muted);
}

/* ─── Student Card Hover Tooltip (Full Name) ─────── */
.student-card {
  --tooltip-opacity: 0;
}

.student-card::after {
  content: attr(data-fullname);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-card:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hide tooltip when name fits fully (JS sets data-truncated) */
.student-card:not([data-truncated="true"])::after {
  display: none;
}

/* ─── Student Detail Modal ───────────────────────── */
.student-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.student-modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.student-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  transform: scale(0.93) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.student-modal-backdrop.active .student-modal {
  transform: scale(1) translateY(0);
}

/* Top accent bar */
.student-modal-accent {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), #f59e0b, var(--pink));
}

.student-modal-body {
  padding: 1.75rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

/* Large avatar */
.student-modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.student-modal-avatar img,
.student-modal-avatar .modal-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.student-modal-avatar .modal-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.student-modal-avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.5);
  pointer-events: none;
}

.student-modal-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.student-modal-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  word-break: break-word;
}

.student-modal-role {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

[data-theme="light"] .student-modal-role {
  background: rgba(0, 0, 0, 0.04);
}

.student-modal-num {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.student-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 2;
}

.student-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

.roster-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 16px;
  margin: 1rem 0;
}

.roster-empty-state .empty-icon {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
}

.roster-empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.roster-empty-state p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* ─── Roster View All Toggle (hidden — all students always shown) ── */
.roster-view-all-wrap {
  display: none !important;
}

.roster-view-all-btn {
  display: none !important;
}

.view-all-icon {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

@media (max-width: 768px) {
  .group-profile-section {
    padding: 1.5rem 1rem 1.25rem;
  }

  .teacher-card {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem 1rem;
    gap: 1rem;
  }

  .teacher-badge-row {
    justify-content: center;
  }

  .roster-toolbar {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 1.25rem;
  }

  .roster-search-box {
    width: 100%;
  }

  .roster-filter-pills {
    justify-content: center;
    flex-wrap: wrap;
  }

  .student-flowchart {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
  }

  .roster-divider-wrap {
    margin: 1rem 0 1.25rem;
  }

  .profile-main-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }
}

.group-profile-empty .icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

/* ═══════════════════════════════════════════════════
   POSTS / GALLERY TAB SWITCHER
   ═══════════════════════════════════════════════════ */

.group-tab-switcher {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.35rem;
  width: fit-content;
  box-shadow: var(--shadow);
}

.group-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  white-space: nowrap;
}

.group-tab-btn span {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.group-tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(201,168,76,0.08);
}

.group-tab-btn.active {
  background: linear-gradient(135deg, rgba(201,168,76,0.2), rgba(214,51,132,0.14));
  color: var(--gold);
  box-shadow: 0 2px 12px rgba(201,168,76,0.2);
}

.group-tab-btn.active span {
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════
   GROUP GALLERY (PUBLIC PAGE)
   ═══════════════════════════════════════════════════ */

.group-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}

.gallery-photo-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  group: '';
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s ease;
}

.gallery-photo-card:hover {
  transform: scale(1.02) translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}

.gallery-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-photo-card:hover img {
  transform: scale(1.06);
}

.gallery-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.2) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-photo-card:hover .gallery-photo-overlay {
  opacity: 1;
}

.gallery-photo-caption {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.gallery-photo-date {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

.gallery-photo-expand {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.gallery-photo-card:hover .gallery-photo-expand {
  opacity: 1;
  transform: scale(1.05);
}

/* Gallery Video Card Extensions */
.gallery-video-card {
  position: relative;
}

.gallery-video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  padding-left: 3px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.gallery-video-card:hover .gallery-video-play-icon {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--pink, #d63384);
  border-color: #ffffff;
  box-shadow: 0 12px 32px rgba(214, 51, 132, 0.5);
}

.gallery-video-type-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 2;
}

/* Gallery Empty State */
.gallery-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

.gallery-empty-state .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.gallery-empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.gallery-empty-state p {
  font-size: 0.88rem;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Lightbox caption extension */
.lightbox-caption-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 3rem 1rem;
  pointer-events: none;
}

/* ─── Responsive: Profile + Gallery ─────────────── */
@media (max-width: 1200px) {
  .student-flowchart {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 1024px) {
  .student-flowchart {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.55rem;
  }

  .group-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .student-flowchart {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.45rem;
  }

  .teacher-card {
    flex-direction: column;
    text-align: center;
  }

  .teacher-badge-row {
    justify-content: center;
  }

  .teacher-card-badge {
    align-self: center;
  }

  .group-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .student-flowchart {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.4rem;
  }

  .group-gallery-grid {
    grid-template-columns: 1fr;
  }

  .group-tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .student-card {
    padding: 0.5rem 0.6rem;
    gap: 0.45rem;
  }

  .student-avatar-wrap {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .student-card-name {
    font-size: 0.7rem;
  }

  .student-role-pill {
    font-size: 0.55rem;
    padding: 0.08rem 0.32rem;
  }
}