/* ===================================================
   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;
}

.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) 340px;
  gap: 2.5rem;
  align-items: start;
  box-sizing: border-box;
}

.group-main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  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);
  }

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

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

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

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

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

/* ─── 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;
}

/* 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;
  }
}

/* ═══════════════════════════════════════════════════
   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: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ─── Teacher Card (Sleek & Proportional) ────────── */
.teacher-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  background: linear-gradient(135deg,
    rgba(201,168,76,0.12) 0%,
    rgba(201,168,76,0.04) 50%,
    rgba(214,51,132,0.06) 100%);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 16px;
  padding: 0.85rem 1.4rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 6px 24px rgba(0,0,0,0.14),
    0 0 0 1px rgba(201,168,76,0.08) inset;
  width: 100%;
  max-width: 480px;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.teacher-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 30px rgba(201,168,76,0.18),
    0 0 0 1px rgba(201,168,76,0.12) inset;
}

.teacher-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a1200;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(201,168,76,0.25);
  border: 2px solid rgba(201,168,76,0.45);
  overflow: hidden;
}

.teacher-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-card-info {
  flex: 1;
  min-width: 0;
}

.teacher-card-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.15rem;
  opacity: 0.9;
}

.teacher-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-card-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-card-badge {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  align-self: center;
}

/* ─── Flowchart Connector Line ────────────────────── */
.flowchart-connector-line {
  width: 2px;
  height: 14px;
  background: linear-gradient(to bottom, rgba(201,168,76,0.5), rgba(201,168,76,0.15));
  position: relative;
  flex-shrink: 0;
  margin: 0.2rem 0;
}

.flowchart-connector-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(201,168,76,0.6);
}

/* ─── Student Flowchart Grid (Compact & Modern) ──── */
.student-flowchart {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 1200px;
  padding: 0.4rem 0 0;
  position: relative;
}

.student-flowchart::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.25), transparent);
}

/* ─── Compact Student Card (Micro-Card) ──────────── */
.student-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-card, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  cursor: default;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease,
              background 0.2s ease;
  position: relative;
  overflow: hidden;
  min-height: 42px;
}

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

.student-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.student-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

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

.student-card-role {
  font-size: 0.62rem;
  color: var(--gold);
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-card-num {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.45;
  flex-shrink: 0;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* Empty profile state */
.group-profile-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.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 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: 1024px) {
  .student-flowchart {
    grid-template-columns: repeat(4, 1fr);
  }

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

@media (max-width: 768px) {
  .student-flowchart {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .teacher-card {
    flex-direction: column;
    text-align: 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(2, 1fr);
  }

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

  .group-tab-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
  }
}