/* ===== ACTIVITIES PAGE ===== */

.act-hero {
  position: relative;
  height: 100px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.act-hero-bg { display: none; }
.act-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0;
  text-align: center;
}
.act-hero h1 { font-size: 26px; font-weight: 600; color: #fff; margin: 0; }
.act-hero p { display: none; }

/* ===== FILTER BAR ===== */
.act-filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 60px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.act-filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.act-filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #f8f9fb;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-th);
  cursor: pointer;
  color: var(--gray);
  transition: all 0.15s;
  white-space: nowrap;
}
.act-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.act-filter-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ===== MAIN CONTENT ===== */
.act-main { padding: 40px 0 70px; }

/* Month group */
.act-month-group { margin-bottom: 44px; }
.act-month-heading {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

/* Photo grid */
.act-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.act-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background: var(--light-gray);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.act-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(26,58,107,0.18);
  z-index: 2;
}
.act-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.act-card:hover img { transform: scale(1.06); }

/* Placeholder for no image */
.act-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  gap: 8px;
}
.act-card-placeholder i { font-size: 44px; opacity: 0.7; }
.act-card-placeholder span { font-size: 14px; font-weight: 600; text-align: center; padding: 0 12px; }

/* Hover overlay */
.act-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.act-card:hover .act-card-overlay { opacity: 1; }
.act-card-overlay-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

/* Category badge on card */
.act-card-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}
.act-card:hover .act-card-cat { opacity: 1; }

/* Empty state */
.act-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray);
}
.act-empty i { font-size: 56px; color: var(--border); display: block; margin-bottom: 16px; }
.act-empty p { font-size: 18px; }

/* ===== LIGHTBOX ===== */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: lbFadeIn 0.2s ease;
}
.lb-overlay.open { display: flex; }

@keyframes lbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lb-box {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: lbSlideUp 0.25s ease;
  position: relative;
}
@keyframes lbSlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lb-img-wrap {
  position: relative;
  background: #111;
  max-height: 420px;
  overflow: hidden;
  flex-shrink: 0;
}
.lb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 420px;
  display: block;
}
.lb-img-placeholder {
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  font-size: 72px;
}

.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s;
}
.lb-close:hover { background: rgba(0,0,0,0.8); }

.lb-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
}
.lb-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.lb-cat {
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}
.lb-date {
  font-size: 14px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 5px;
}
.lb-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
  line-height: 1.3;
}
.lb-subtitle {
  font-size: 16px;
  color: var(--gray);
  margin-bottom: 16px;
}
.lb-content {
  font-size: 15px;
  color: var(--dark);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Nav arrows */
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 10000;
}
.lb-nav:hover { background: rgba(255,255,255,0.3); }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }

/* ===== COUNT BAR ===== */
.act-count-bar {
  font-size: 14px;
  color: var(--gray, #8892a4);
  margin-bottom: 16px;
  font-weight: 500;
}

/* ===== PAGINATION ===== */
.act-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.act-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid #e0e6f0;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Kanit', sans-serif;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}
.act-page-btn:hover:not(:disabled) { border-color: var(--primary, #1a3a6b); color: var(--primary, #1a3a6b); }
.act-page-btn.active { background: var(--primary, #1a3a6b); color: #fff; border-color: var(--primary, #1a3a6b); }
.act-page-btn:disabled { opacity: 0.35; cursor: default; }
.act-page-prev, .act-page-next { font-size: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .act-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .act-hero h1 { font-size: 24px; }
  .act-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .act-month-heading { font-size: 20px; }
  .lb-box { border-radius: 14px; }
  .lb-body { padding: 18px 18px 22px; }
  .lb-title { font-size: 18px; }
}
