:root {
  --bg: #f4f6f8;
  --text: #111;
  --card: #ffffff;
  --accent: #0a58ca;
}

[data-theme="dark"] {
  --bg: #0e1117;
  --text: #f1f1f1;
  --card: #1c1f26;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
}

/* HEADER */
header {
  text-align: center;
  padding: 25px;
}

.logo {
  width: 90px;
}

/* NAV */
nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px;
}

nav a {
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
}

/* SECTIONS */
.section {
  display: none;
  padding: 40px 20px;
  max-width: 1100px;
  margin: auto;
}

.section.active {
  display: block;
}

/* GRID SYSTEM */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* CARD BASE */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

/* EXECUTIVE / OFFICE BEARERS */
.card img {
  width: 100%;
  height: 260px;
  object-fit: cover;   /* GOOD for faces */
  border-radius: 10px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 6px 0 2px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

/* NOTICE BOX */
.notice {
  background: var(--card);
  padding: 15px;
  border-left: 5px solid var(--accent);
  margin-bottom: 15px;
}

/* GALLERY — IMPORTANT FIX */
#gallery .grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

#gallery .gallery-img {
  width: 100%;
  height: 220px;
  object-fit: contain;     /* ✅ SHOW FULL IMAGE */
  background: #000;
  border-radius: 10px;
  padding: 6px;
}

/* VIDEO */
.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  margin: 25px 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* TOGGLE BUTTON */
.toggle {
  position: fixed;
  top: 15px;
  right: 15px;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  opacity: 0.7;
}

/* President video layout */
.video-wrapper {
  position: relative;
  max-width: 800px;
  margin: 20px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe {
  width: 100%;
  height: 450px;
  border: none;
}

.video-caption {
  text-align: center;
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .video-wrapper iframe {
    height: 220px;
  }
}

/* First 3 gallery images: original cropped style (centered like before) */
#gallery .card:nth-child(2) img,
#gallery .card:nth-child(3) img,
#gallery .card:nth-child(4) img {
  height: 260px !important;
  object-fit: cover;
  object-position: center center;  /* CENTERED like original site */
}

/* Rest of gallery images: full size no cropping */
#gallery .card:not(:nth-child(-n+4)) img {
  height: auto !important;
  max-height: 400px;
  object-fit: contain;
  object-position: center center;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  #gallery .card:nth-child(2) img,
  #gallery .card:nth-child(3) img,
  #gallery .card:nth-child(4) img {
    height: 220px !important;
  }
  
  #gallery .card:not(:nth-child(-n+4)) img {
    max-height: 250px;
  }
  
  /* Consistent gallery card heights */
  #gallery .card {
    min-height: 380px;
  }
}

/* =============================
EXECUTIVE MOBILE FIX
============================= */
@media (max-width: 600px) {
  /* Force 2-column layout for executive */
  #executive .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
  }
  
  /* Slightly smaller images for balance */
  #executive .card img {
    height: 180px !important;
  }
  
  /* Tighter text spacing */
  #executive .card h3 {
    font-size: 0.95rem;
  }
  
  #executive .card p {
    font-size: 0.8rem;
  }
}
