html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  color: #1a1a1a;
  background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('Pics/Background_PING_bw.jpg') center/cover no-repeat fixed;
  background-color: #f5f7fa;
  font-size: 1rem;
  line-height: 1.6;
}

/* Headings: use a consistent dark purple */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #4B0082;
}

header {
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 4px solid #4B0082;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

header.hide {
  transform: translateY(-100%);
  opacity: 0;
}

header img {
  max-width: 160px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
  flex-shrink: 0;
}

.header-logo {
  max-width: 160px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-left: auto;
}

nav a {
  padding: 0.6rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  color: #4B0082;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  position: relative;
  background: transparent;
  border-color: 2px solid #4B0082;
  min-height: 44px;
  display: flex;
  align-items: center;
}

nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #4B0082 0%, #4B008266 100%);
  border-radius: 25px;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

nav a:hover::before {
  opacity: 1;
}

nav a:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #4B008266;
}

nav a:active {
  transform: translateY(0);
}

main {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  line-height: 1.6;
}

.section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.section h1 {
  color: #4B0082;
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
}

.section h2 {
  color: #4B0082;
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  border-left: 4px solid #4B0082;
  padding-left: 1rem;
}

.section p {
  margin: 0.75rem 0;
  color: #333;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
}

footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-top: 2rem;
  border-top: 4px solid #4B0082;
}

/* Footer logo */
.footer-logo-wrap {
  margin-bottom: 0.5rem;
}

.footer-logo {
  max-width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 0.5rem;
}

/* Events Grid Layout */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.event-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Small thumbnail above the event date */
.event-thumb {
  display: block;
  max-height: 72px;
  width: auto;
  max-width: 100%;
  margin: 0 0 0.5rem 0;
  border-radius: 8px;
  object-fit: cover;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(11, 46, 91, 0.15);
  border-color: #0b2e5b;
}

/* Collapse past events: show only the first 6 when collapsed */
#past-events.collapsed .event-card:nth-child(n+7) {
  display: none;
}

.see-more-wrap {
  text-align: center;
  margin-top: 0.75rem;
}

.see-more-btn {
  background: transparent;
  border: 1px solid #4B0082;
  color: #4B0082;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}

.see-more-btn:hover {
  background: #4B0082;
  color: #fff;
}

.event-date {
  font-weight: 700;
  font-size: 1rem;
  color: #0b2e5b;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0b2e5b;
}

.event-content p {
  margin: 0.5rem 0;
  font-size: clamp(0.95rem, 2vw, 1rem);
  line-height: 1.5;
  color: #333;
}

.event-content strong {
  color: #0b2e5b;
  font-weight: 600;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  body {
    font-size: 1rem;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  header {
    padding: 0.5rem 0.75rem;
    flex-direction: column;
    align-items: center;
  }

  header img {
    margin-bottom: 0.5rem;
  }

  nav {
    width: 100%;
    justify-content: center;
  }

  nav a {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    min-height: 44px;
  }

  .section {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 8px;
  }

  .section h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
  }

  .section p {
    font-size: 1rem;
    margin: 0.5rem 0;
  }

  .event-date {
    font-size: 1rem;
  }

  .event-content p {
    font-size: 1rem;
  }

  main {
    margin: 0.75rem auto;
    padding: 0 0.75rem;
  }

  footer {
    font-size: 0.95rem;
    padding: 1.25rem 0.75rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}