* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 2rem;
  background: #f4f6f8;
  color: #333;
}

.header h1, .header h2 {
  text-align: center;
  margin: 0 0 0.5rem 0;
  color: #1a252f;
}

.header h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #7f8c8d;
  margin-bottom: 2rem;
}

.hor-line {
  border: none;
  border-top: solid;
  margin: 1.5rem 0;
}

/* --- Page Tabs --- */
.tab-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.0rem;
}

.tab-btn {
  padding: 0.6rem 1.5rem;
  border: 1px solid #cbd5e1;
  background-color: white;
  color: #475569;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: #2c3e50;
  color: #2c3e50;
}

.tab-btn.active {
  background-color: #2c3e50;
  color: white;
  border-color: #2c3e50;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.25);
}

.tab-page {
  display: none;
}

.tab-page.active {
  display: block;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.about-content h2 {
  color: #2c3e50;
}

/* --- Contact Us Section --- */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-content h2 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.contact-subtitle {
  color: #64748b;
  margin: 0 0 2rem 0;
}

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

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: white;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, #2c3e50, #4a6a8a);
  margin-bottom: 0.5rem;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0369a1;
}

.contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
}

/* --- Members Section --- */
.members-container {
  max-width: 1100px;
  margin: 2.5rem auto 0;
}

.members-heading {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 2rem;
}

.member-category {
  margin-bottom: 2.5rem;
}

.category-heading {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  display: block;
  width: fit-content;
  margin: 0 auto 1.5rem;
}

.category-heading.male {
  background: #e0f2fe;
  color: #0369a1;
}

.category-heading.female {
  background: #fce7f3;
  color: #be185d;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.member-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.member-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  overflow: hidden;
}

.member-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  background: linear-gradient(135deg, #2c3e50, #4a6a8a);
}

.member-name {
  display: flex;
  flex-direction: column;
  margin: 0 0 0.25rem 0;
}

.first-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #64748b;
}

.last-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2c3e50;
}

.member-titles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.member-title {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.member-address, .member-phone {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: #64748b;
}

/* --- Category Filter Buttons --- */
.filter-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid #cbd5e1;
  background-color: white;
  color: #475569;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #2c3e50;
  color: #2c3e50;
}

.filter-btn.active {
  background-color: #2c3e50;
  color: white;
  border-color: #2c3e50;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.25);
}

/* --- Timeline Layout & Thread Line --- */
.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem; /* Creates space for line on the left */
}

/* The vertical connecting thread line */
.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 3px;
  background: #cbd5e1;
  border-radius: 2px;
}

/* Dynamic Activity Cards */
.card {
  position: relative;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Node Circle on the Thread */
.card::before {
  content: '';
  position: absolute;
  top: 24px;
  left: -2.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2c3e50;
  border: 3px solid #f4f6f8;
  box-shadow: 0 0 0 2px #cbd5e1;
  z-index: 2;
}

/* Header & Date Badge Layout */
.card-header-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Visual Calendar Badge */
.date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  min-width: 65px;
  height: 65px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.date-badge .month {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #e74c3c;
  letter-spacing: 0.5px;
}

.date-badge .day {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.1;
}

.date-badge .year {
  font-size: 0.65rem;
  color: #64748b;
}

.card-title-group {
  flex: 1;
}

.card-title-group h2 {
  margin: 0 0 0.35rem 0;
  font-size: 1.3rem;
  color: #2c3e50;
  text-align: left;
}

.category-tag {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.card-title-group p {
  margin: 0;
  line-height: 1.5;
  color: #4a5568;
}

/* Image Grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.image-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.image-grid img:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.page-btn {
  padding: 0.5rem 0.9rem;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #2c3e50;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background-color: #2c3e50;
  color: #ffffff;
  border-color: #2c3e50;
}

.page-btn.active {
  background-color: #2c3e50;
  color: #ffffff;
  border-color: #2c3e50;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Lightbox Modal Overlay */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 85%;
  max-height: 85vh;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  user-select: none;
  touch-action: none;
}

.lightbox-content.zoomed { cursor: grab; }
.lightbox-content.grabbing { cursor: grabbing !important; transition: none !important; }

.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-btn:hover { background: rgba(255, 255, 255, 0.35); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }
.close-btn { top: 20px; right: 20px; font-size: 1.5rem; width: 40px; height: 40px; }

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
  body { padding: 1rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline::before { left: 4px; }
  .card::before { left: -1.85rem; }
  .card-header-wrapper { flex-direction: column; }
  .image-grid { grid-template-columns: 1fr; }
  .image-grid img { height: 220px; }
  .tab-btn { flex: 1 1 auto; padding: 0.6rem 1rem; font-size: 0.9rem; }
  .about-content { padding: 1.25rem; }
  .member-grid { grid-template-columns: repeat(2, 1fr); }
}