/* ============================================================
   gallery.css — Community in Motion Gallery Page
   Barutem Communities · Follows style.css brand tokens
   ============================================================ */

/* ── Layout Shell ────────────────────────────────────────── */
.gallery-page {
  background: var(--color-bg);
}

.gallery-layout {
  display: flex;
  width: min(calc(100% - 0px), var(--container));
  margin-inline: auto;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.gallery-sidebar {
  display: none; /* hidden on mobile */
  flex-direction: column;
  width: 256px;
  flex-shrink: 0;
  padding: 1.5rem 1rem;
  gap: .5rem;
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  overflow-y: auto;
  background: #f7f4e9;
  border-right: 1px solid rgba(25, 32, 86, .08);
}

@media (min-width: 1024px) {
  .gallery-sidebar {
    display: flex;
  }
}

.sidebar-heading {
  padding: 0 .5rem;
  margin-bottom: 1rem;
}

.sidebar-heading h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 .2rem;
}

.sidebar-heading p {
  font-size: .75rem;
  color: var(--color-muted);
  margin: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-muted);
  font-family: var(--font-heading);
  font-size: .82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-link:hover {
  background: var(--color-surface-3);
  color: var(--color-primary);
  transform: translateX(3px);
}

.sidebar-link.active {
  background: var(--color-primary);
  color: #fff;
  transform: translateX(3px);
}

.sidebar-link .material-symbols-outlined {
  font-size: 1.2rem;
}

.sidebar-cta {
  padding-top: 1rem;
  border-top: 1px solid rgba(25, 32, 86, .1);
  margin-top: auto;
}

/* ── Main Content ─────────────────────────────────────────── */
.gallery-main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 1.25rem 5rem;
}

@media (min-width: 768px) {
  .gallery-main {
    padding: 1.5rem 2rem 6rem;
  }
}

/* ── Section Shared ───────────────────────────────────────── */
.gallery-section {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.gallery-section-soft {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  margin-inline: -1.25rem;
}

@media (min-width: 768px) {
  .gallery-section-soft {
    margin-inline: -2rem;
    padding: 3rem 2rem;
  }
}

.gallery-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.gallery-section-title {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0;
}

.gallery-section-subtitle {
  color: var(--color-muted);
  font-size: .9rem;
  margin: .35rem 0 0;
  max-width: 440px;
}

.gallery-carousel-controls {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}

/* ── Hero ─────────────────────────────────────────────────── */
.gallery-hero {
  margin-bottom: clamp(3rem, 6vw, 5rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.gallery-hero-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.gallery-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .82;
  transition: transform .7s ease;
}

.gallery-hero:hover .gallery-hero-media img {
  transform: scale(1.04);
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,0) 55%);
  display: flex;
  align-items: flex-end;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.gallery-hero-content {
  max-width: 600px;
}

.gallery-badge {
  display: inline-block;
  padding: .3rem 1rem;
  background: var(--color-primary);
  color: var(--color-primary-2);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.gallery-hero-content h1 {
  font-family: var(--font-heading);
  color: #fff;
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.04em;
  margin: 0 0 .75rem;
}

.gallery-hero-content p {
  color: rgba(255,255,255,.78);
  font-size: clamp(.88rem, 1.8vw, 1.05rem);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.gallery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.gallery-btn-play {
  background: #fff;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 700;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 0;
  gap: .4rem;
  transition: background .18s ease, transform .18s ease;
}

.gallery-btn-play:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
}

.gallery-btn-list {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(14px);
  color: #fff;
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 700;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.25);
  gap: .4rem;
  transition: background .18s ease;
}

.gallery-btn-list:hover {
  background: rgba(255,255,255,.25);
}

/* ── Trending Grid (horizontal carousel) ─────────────────── */
.trending-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: .25rem;
}

.trending-grid::-webkit-scrollbar { display: none; }

.trending-grid .video-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

@media (min-width: 540px) {
  .trending-grid .video-card {
    flex-basis: 280px;
  }
}

@media (min-width: 900px) {
  .trending-grid .video-card {
    flex: 0 0 minmax(260px, calc(25% - 1.125rem));
  }
}

/* ── Video Card (Trending) ────────────────────────────────── */
.video-card {
  cursor: pointer;
  scroll-snap-align: start;
}

.video-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-3);
  margin-bottom: .75rem;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.video-card:hover .video-card-thumb img {
  transform: scale(1.06);
}

.video-card-hover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s ease, background .22s ease;
}

.video-card:hover .video-card-hover {
  opacity: 1;
  background: rgba(0,0,0,.04);
}

.video-card-hover .material-symbols-outlined {
  font-size: 2.75rem;
  color: #fff;
}

.video-duration {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  background: rgba(20,20,20,.82);
  color: #fff;
  padding: .2rem .5rem;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: .7rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.video-card-info {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.video-tag {
  display: inline-block;
  padding: .2rem .55rem;
  background: rgba(23, 76, 55, .12);
  color: var(--color-blue);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  width: fit-content;
}

.video-card-info h3 {
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .18s ease;
}

.video-card:hover .video-card-info h3 {
  color: var(--color-primary);
}

.video-meta {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--color-muted);
  font-size: .75rem;
}

.video-meta .material-symbols-outlined {
  font-size: .95rem;
}

.video-meta.light {
  color: rgba(255,255,255,.7);
}

/* ── Documentaries ────────────────────────────────────────── */
.docs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

.doc-card {
  cursor: pointer;
}

.doc-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-3);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.doc-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.doc-card:hover .doc-card-thumb img {
  transform: scale(1.05);
}

.doc-card-hover {
  position: absolute;
  inset: 0;
  background: rgba(25, 32, 86, .1);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .22s ease;
}

.doc-card:hover .doc-card-hover {
  opacity: 1;
}

.doc-play-btn {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transform: scale(.88);
  transition: transform .22s ease;
}

.doc-card:hover .doc-play-btn {
  transform: scale(1);
}

.doc-play-btn .material-symbols-outlined {
  font-size: 2rem;
  color: var(--color-primary);
}

.doc-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 .35rem;
  letter-spacing: -.02em;
  transition: color .18s ease;
}

.doc-card:hover h3 {
  color: var(--color-primary);
}

.doc-card p {
  color: var(--color-muted);
  font-size: .9rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── District Tabs ────────────────────────────────────────── */
.district-tabs {
  display: flex;
  gap: .3rem;
  padding: .25rem;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(25, 32, 86, .1);
  box-shadow: var(--shadow);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex-shrink: 0;
}

.district-tabs::-webkit-scrollbar { display: none; }

.district-tab {
  padding: .45rem 1.1rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted);
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.district-tab:hover {
  background: var(--color-surface-3);
  color: var(--color-primary);
}

.district-tab.active {
  background: var(--color-primary);
  color: #fff;
}

/* ── Short Videos ─────────────────────────────────────────── */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .shorts-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.short-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #333;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.short-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.short-card:hover img {
  transform: scale(1.08);
}

.short-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

.short-overlay h3 {
  font-family: var(--font-heading);
  color: #fff;
  font-size: clamp(.8rem, 2vw, 1rem);
  font-weight: 700;
  margin: 0 0 .35rem;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.short-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 28px;
  height: 28px;
  background: var(--color-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  backdrop-filter: blur(6px);
}

.short-badge .material-symbols-outlined {
  font-size: .9rem;
}

/* ── Cultural Heritage ────────────────────────────────────── */
.culture-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

.culture-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid rgba(25, 32, 86, .08);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow .22s ease;
}

.culture-card:hover {
  box-shadow: var(--shadow-hover);
}

.culture-card-thumb {
  position: relative;
  overflow: hidden;
}

.culture-card-thumb img {
  width: 100%;
  height: 192px;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.culture-card:hover .culture-card-thumb img {
  transform: scale(1.05);
}

.culture-card-hover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.22);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .22s ease;
}

.culture-card:hover .culture-card-hover {
  opacity: 1;
}

.culture-card-hover .material-symbols-outlined {
  font-size: 2.5rem;
  color: #fff;
}

.culture-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.culture-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 .4rem;
  letter-spacing: -.01em;
}

.culture-card-body p {
  color: var(--color-muted);
  font-size: .85rem;
  line-height: 1.5;
  margin: 0;
}

/* ── CTA Section ──────────────────────────────────────────── */
.gallery-cta {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4rem);
}

.gallery-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .gallery-cta-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.gallery-cta-text h2 {
  font-family: var(--font-heading);
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0 0 .65rem;
}

.gallery-cta-text p {
  color: rgba(235, 179, 38, .8);
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  line-height: 1.55;
  margin: 0;
  max-width: 480px;
}

.gallery-cta-btn {
  background: #fff;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  padding: 1rem 2rem;
  border-radius: var(--radius-sm);
  border: 0;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: background .18s ease, transform .18s ease;
  flex-shrink: 0;
}

.gallery-cta-btn:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px) scale(1.02);
}

.gallery-cta-btn:active {
  transform: scale(.98);
}

.gallery-cta-glow {
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  background: var(--color-blue);
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  transition: opacity .5s ease;
}

.gallery-cta:hover .gallery-cta-glow {
  opacity: .55;
}

/* ── Reveal Animation ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive: mobile sidebar CTA ─────────────────────────*/
.gallery-mobile-submit {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .gallery-mobile-submit {
    display: none;
  }
}

/* ── icon-circle (reuse from main style) ─────────────────── */
.icon-circle.is-disabled,
.icon-circle:disabled {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}
/* Already defined in style.css, safe to extend: */
