/* ================================================================
   EVENTS PAGE — SHARED CHROME CSS
   Tokens, navbar, events-nav, skeleton, footer.
   Identical design system as about.css and services.css.
   ================================================================ */

/* ── 0. TOKENS ───────────────────────────────────────────────── */
:root {
  --ink:         #111111;
  --ink-soft:    #444444;
  --ink-muted:   #777777;
  --surface:     #ffffff;
  --surface-off: #f7f7f7;
  --surface-mid: #ececec;
  --border:      rgba(0,0,0,0.08);

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;

  --shadow-sm:   0 2px 8px  rgba(0,0,0,0.06);
  --shadow-md:   0 8px 24px rgba(0,0,0,0.09);

  --card-pad:    2.25rem;
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 1. RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--surface);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── 2. NAVBAR ───────────────────────────────────────────────── */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
}

.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-container { display: flex; align-items: center; gap: 10px; }
.church-logo { height: 40px; width: auto; object-fit: contain; }
.logo-text { font-size: 1.4rem; font-weight: 600; color: var(--ink); font-family: 'Poppins', sans-serif; }

.nav-links { list-style: none; display: flex; gap: 1.5rem; transition: all 0.3s ease; }

.nav-links li a {
  position: relative; text-decoration: none; color: #333;
  font-weight: 500; padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: color 0.3s ease; display: inline-block;
  font-family: 'Poppins', sans-serif;
}

.nav-links li a::after {
  content: ""; position: absolute;
  left: 50%; bottom: 0; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--ink);
  transition: width 0.3s ease;
}

.nav-links li a:hover { color: var(--ink); }
.nav-links li a:hover::after { width: 100%; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.burger .line { width: 25px; height: 3px; background: #333; border-radius: 3px; transition: all 0.4s ease; }
.burger.active .line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.active .line:nth-child(2) { opacity: 0; }
.burger.active .line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
  .burger { display: flex; }
  .nav-links {
    flex-direction: column; position: absolute;
    top: 70px; right: 2rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 1rem 0; width: 220px;
    box-shadow: var(--shadow-md); opacity: 0; transform: translateY(-20px);
    pointer-events: none; transition: all 0.3s ease;
  }
  .nav-links.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links li { width: 100%; }
  .nav-links li a { padding: 1rem 1.5rem; width: 100%; display: block; }
}

/* ── 3. EVENTS SUB-NAV ───────────────────────────────────────── */
/* Same pattern as .about-nav in about.css */
.events-nav {
  background: var(--surface-off);
  box-shadow: 0 1px 0 var(--border);
  position: sticky;
  top: 61px;
  z-index: 900;
}

.events-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  white-space: nowrap;
  gap: 0;
  padding: 0 1rem;
  min-width: max-content;
  margin: 0 auto;
}

.events-nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 1rem 1.5rem;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.25s ease;
  font-family: 'Poppins', sans-serif;
}

.events-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease-out);
}

.events-nav a:hover { color: var(--ink); }
.events-nav a:hover::after { transform: scaleX(1); }
.events-nav a.active { color: var(--ink); font-weight: 600; }
.events-nav a.active::after { transform: scaleX(1); }

@media (max-width: 480px) {
  .events-nav a { font-size: 0.82rem; padding: 0.85rem 1.1rem; }
}

/* ── 4. SKELETON LOADER ──────────────────────────────────────── */
#events-wrapper { position: relative; min-height: 60vh; }

/* Skeleton outer — always flex for layout, visibility controlled by JS inline style */
#loading-buffer {
  width: 100%; max-width: 1100px; margin: 0 auto;
  display: flex;          /* JS sets display:none to hide */
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  opacity: 1;
  transition: opacity 0.25s ease;
}

/* Content div — hidden until JS reveals it */
#events-content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#events-content.visible { opacity: 1; }

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
  width: 100%;
}

/* Skeleton shapes */
.skeleton-hero        { height: 220px; border-radius: var(--radius-lg); }
.skeleton-title       { height: 28px;  width: 45%; }
.skeleton-line        { height: 18px;  width: 75%; }
.skeleton-line.short  { width: 40%; }
.event-card-skeleton  { height: 130px; border-radius: var(--radius-md); }

/* ── 5. FOOTER ───────────────────────────────────────────────── */
footer {
  background: var(--surface); color: #333;
  padding: 4rem 2rem 2rem; border-top: 1px solid var(--border);
  font-family: 'Poppins', sans-serif;
}

.footer-content {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 2rem; max-width: 1200px; margin: auto;
}

.footer-section { flex: 1; min-width: 240px; padding-top: 1rem; border-top: 2px solid #ccc; }
.footer-section h3 { font-size: 1.15rem; margin-bottom: 1rem; font-weight: 600; color: var(--ink); }
.footer-section p,
.footer-section li { font-size: 0.95rem; color: #333; margin: 0.5rem 0; }
.footer-section a { color: #333; text-decoration: none; transition: color 0.3s ease; }
.footer-section a:hover { color: #0056b3; text-decoration: underline; }
.footer-section ul { list-style: none; }

.social-icons { display: flex; gap: 1rem; margin-top: 1rem; }
.social-icon { font-size: 1.4rem; color: #333; transition: color 0.3s ease, transform 0.3s ease; }
.social-icon:hover { color: #007bff; transform: translateY(-3px); }

.footer-bottom { margin-top: 2rem; text-align: center; color: var(--ink-muted); font-size: 0.9rem; }
.footer-bottom .divider { height: 1px; background: var(--border); margin-bottom: 1rem; }

@media (max-width: 768px) {
  .footer-content { flex-direction: column; align-items: center; text-align: center; }
  .social-icons { justify-content: center; }
}

/* ── 6. ACCESSIBILITY ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .navbar, footer, .events-nav { display: none !important; }
}