/*
  Church of Christ Campus Ministry UCC - Base Styles
  Mobile-first, accessible, and performance-minded.
*/

:root {
  --bg: #ffffff;
  --fg: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  /* Primary brand colors derived from the logo */
  --primary: #1f2a75; /* deep royal/navy blue */
  --primary-600: #2d3ea5; /* hover/active */
  --primary-50: #eef1ff; /* subtle tint */
  /* Accent (gold) from the logo */
  --accent: #ffd700;
  --accent-600: #e6c200;
  --accent-50: #fff9db;
  /* Secondary accent (crown/brown tones) */
  --brown: #7b4b2a;
  --brown-50: #f7efe9;
  /* Helper for alpha-based usage of primary */
  --primary-rgb: 31 42 117; /* r g b */
  --surface: #f8fafc; /* slate-50 */
  --border: #e2e8f0; /* slate-200 */
  --ring: rgba(31, 42, 117, 0.35);
  --radius: 12px;
  font-family: 'Roboto';
  --container: 1120px;
}

/* Removed drawer-close button styles - using hamburger transformation instead */

/* Typography */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  /* Offset for fixed header */
  padding-top: 64px;
}

@media (max-width: 640px) {
  body { padding-top: 56px; }
}

/* Use border-box so padding/borders don't expand set widths (lint fix) */
*, *::before, *::after { box-sizing: border-box; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .75rem; }
h3 { font-size: clamp(1.125rem, 2vw, 1.25rem); margin: 0 0 .5rem; }

p { margin: 0 0 1rem; color: var(--muted); }

/* Utility */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 1rem;
}

.section { padding: 3rem 0; }
.section.alt { background: var(--surface); }
.section-title { margin-bottom: 1.25rem; }
.muted { color: var(--muted); }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { position: static; width: auto; height: auto; padding: .5rem; background: var(--primary-50); }

/* Header & Nav */
.site-header { 
  position: fixed; 
  top: 0; 
  left: 0;
  width: 100%;
  z-index: 1000; 
  background: rgba(255,255,255,0.95); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  border-bottom: 1px solid var(--border); 
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; font-weight: 700; }
.brand img { height: 36px; width: auto; }
.brand-text { white-space: nowrap; }

.nav-toggle { background: transparent; border: 0; display: grid; gap: 4px; padding: .5rem; border-radius: 8px; position: relative; z-index: 120; width: 40px; height: 40px; place-items: center; }
.nav-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.nav-toggle .bar { width: 24px; height: 2px; background: var(--fg); display: block; transition: transform .2s ease, opacity .2s ease; transform-origin: center; border-radius: 2px; }

.site-nav { position: fixed; inset: 0 0 0 auto; top: 0; right: 0; height: 100vh; width: min(80vw, 320px); background: #fff; border-left: 1px solid var(--border); box-shadow: -20px 0 40px rgba(2,6,23,.18); transform: translateX(100%); transition: transform .25s ease; padding: 72px 1rem 1rem; display: block; z-index: 999; }
.site-nav.open { transform: translateX(0); }
.site-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .25rem; }
.site-nav a { color: var(--fg); text-decoration: none; padding: .75rem .75rem; border-radius: 8px; }
.site-nav a:hover { background: var(--surface); }

/* Drawer backdrop */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.45); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 80; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
/* Turn hamburger into an X when drawer is open */
body.drawer-open .nav-toggle .bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.drawer-open .nav-toggle .bar:nth-child(2) { opacity: 0; }
body.drawer-open .nav-toggle .bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Mobile-specific sticky header enhancements */
@media (max-width: 799px) {
  .site-header {
    /* Ensure header stays above mobile content */
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  /* Prevent content from jumping when drawer opens */
  body.drawer-open .site-header {
    position: fixed;
    width: 100%;
    top: 0;
  }
  
  /* Add padding to body when drawer is open to account for fixed header */
  body.drawer-open {
    overflow: hidden;
  }
}

@media (min-width: 800px) {
  .site-nav { position: static; height: auto; width: auto; transform: none; box-shadow: none; padding: 0; border-left: 0; background: transparent; z-index: auto; }
  .nav-toggle { display: none; }
  .site-nav ul { flex-direction: row; align-items: center; gap: .25rem; }
  
  /* Enhanced sticky header for desktop */
  .site-header:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }
}

/* Buttons */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: .625rem 1rem;
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  color: inherit;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

button { font: inherit; }

.btn:focus-visible,
button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.btn:disabled,
button:disabled,
.btn[aria-disabled="true"] {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary */
.btn-primary,
button.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover,
button.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }

/* Secondary (outline with primary color) */
.btn-secondary,
button.btn-secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover,
button.btn-secondary:hover { background: var(--primary-50); }

/* Ghost (neutral outline) */
.btn-ghost,
button.btn-ghost { background: transparent; border-color: var(--border); color: var(--fg); }
.btn-ghost:hover,
button.btn-ghost:hover { background: var(--surface); }

/* Link style button */
.btn-link,
button.btn-link { color: var(--primary); text-decoration: none; border-color: transparent; background: transparent; padding: 0; border-radius: 0; }
.btn-link:hover,
button.btn-link:hover { text-decoration: underline; }

/* Sizes */
.btn-small, .btn-sm { padding: .4rem .75rem; font-size: .9rem; }
.btn-lg { padding: .85rem 1.25rem; font-size: 1.05rem; }

/* Block (full width) */
.btn-block { display: inline-flex; width: 100%; }

/* Hero */
.hero { padding: 2.5rem 0; background: linear-gradient(180deg, var(--primary-50), transparent 60%); }
.hero-inner { display: grid; gap: 1.5rem; align-items: center; }
.hero .actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.photo-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: 0 10px 25px rgba(0,0,0,.05); }
.photo-frame img { width: 100%; height: auto; display: block; }

@media (min-width: 880px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; }
}

/* Cards & Grid */
.grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.03); }
.card h3 { margin-top: 0; }

/* CTA */
.cta { background: var(--primary-50); }
.cta-inner { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 840px) { .cta-inner { grid-template-columns: 1.3fr .7fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: linear-gradient(180deg, #fff, var(--surface)); }
.footer-inner { display: grid; gap: 2rem; padding: 2.5rem 0; align-items: start; }
.footer-brand .brand { font-size: 1.05rem; }
.footer-brand .brand img { height: 40px; }
.footer-brand p { margin-top: .5rem; max-width: 42ch; }

.footer-links .footer-nav { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-links a { color: var(--fg); text-decoration: none; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }

.newsletter { display: flex; gap: .5rem; margin-top: .5rem; }
.newsletter input { flex: 1; min-width: 0; }

.social { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; gap: .75rem; }
.social a { color: var(--muted); text-decoration: none; border: 1px solid var(--border); padding: .375rem .625rem; border-radius: 999px; }
.social a:hover { color: var(--primary); border-color: var(--primary-600); background: var(--primary-50); }

.footer-bottom { padding: 1rem 0 2.25rem; border-top: 1px dashed var(--border); text-align: center; }

@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1.25fr 1fr 1.25fr; }
}

/* Footer responsiveness */
@media (max-width: 899px) {
  .footer-inner { text-align: center; }
  .footer-brand, .footer-links, .footer-newsletter { display: grid; justify-items: center; }
  .footer-links .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; }
  .newsletter { flex-wrap: wrap; }
  .newsletter input { flex: 1 1 100%; }
  .newsletter button { width: 100%; }
}

/* Back to top */
#back-to-top.back-to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 110; background: var(--primary); color: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px; display: grid; place-items: center; box-shadow: 0 10px 25px rgba(2,6,23,.2); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, background-color .15s ease; }
#back-to-top.back-to-top:hover { background: var(--primary-600); }
#back-to-top.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top .chev { font-size: 16px; line-height: 1; }
@media (prefers-reduced-motion: reduce) {
  #back-to-top.back-to-top { transition: none; }
}

/* Forms */
input, select, textarea {
  font: inherit; color: inherit; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ring); outline-offset: 2px; }
label { font-weight: 600; display: inline-block; margin-bottom: .35rem; }

/* Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Contact page */
.contact-layout { display: grid; gap: 1.5rem; }
@media (min-width: 960px) {
  .contact-layout { grid-template-columns: 1.3fr .9fr; align-items: stretch; }
  .contact-card { padding: 1.25rem; }
}

.contact-card { border: 1px solid var(--border); border-left: 3px solid var(--primary-600); border-radius: var(--radius); background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.06); padding: 1rem; display: flex; flex-direction: column; }
.contact-card h2 { margin-top: 0; color: var(--fg); font-weight: 800; letter-spacing: -.02em; margin-bottom: .5rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--border); }
.contact-card .stack { display: grid; gap: .75rem; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.contact-list a { color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.contact-list a:hover { color: var(--primary); text-decoration: underline; }

/* Contact enhancements */
.icon { display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.icon svg { width: 22px; height: 22px; display: block; }
.contact-actions { display: flex; gap: .5rem; margin-top: .75rem; margin-bottom: .25rem; flex-wrap: wrap; }
.contact-actions .btn { border-radius: 999px; }
.contact-list li { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: .6rem; padding: .125rem 0; }

/* Make long lines (like email/phone) behave nicely */
.contact-text { overflow-wrap: anywhere; word-break: break-word; }
.contact-text a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--border); }
.contact-text a:hover { color: var(--primary); border-bottom-color: var(--primary-600); }

/* Full-width inputs inside contact form */
.contact-card form input,
.contact-card form textarea,
.contact-card form select { width: 100%; }

/* Badge (for tagline) */
.badge { display: inline-block; padding: .25rem .6rem; border-radius: 999px; background: var(--primary-50); color: var(--primary); border: 1px solid var(--primary-600); font-weight: 600; font-size: .85rem; }

.map-frame { position: relative; width: 100%; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }
.map-frame::before { content: ""; display: block; padding-top: 56.25%; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Home: Blog Teasers --- */
.blog-teasers { align-items: stretch; }
.home-blog-meta { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: .4rem; margin-bottom: .4rem; }
.home-blog-meta svg { vertical-align: middle; }
.home-blog-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .5rem; }
.home-blog-footer .author { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }

/* Skeletons */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton .sk-title,
.skeleton .sk-text,
.skeleton .sk-link {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 800px 100%;
  animation: shimmer 1.2s infinite linear;
}
.skeleton .sk-title { height: 20px; width: 70%; margin-bottom: .75rem; }
.skeleton .sk-text { width: 100%; margin-bottom: .5rem; }
.skeleton .sk-text-sm { width: 80%; }
.skeleton .sk-link { width: 90px; height: 12px; margin-top: .5rem; }

/* --- Sermons: Video Grid & Modal --- */
.video-card { padding: 0; overflow: hidden; }
.video-card .video-title { margin: .75rem 1rem .25rem; }
.video-card .video-date { margin: 0 1rem 1rem; }
.video-card .video-thumb { border: 0; background: transparent; padding: 0; display: block; width: 100%; cursor: pointer; position: relative; }
.video-card .thumb-frame { position: relative; display: block; width: 100%; background: #f1f5f9; }
.video-card .thumb-frame::before { content: ""; display: block; padding-top: 56.25%; }
.video-card .thumb-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.video-card .play-badge { position: absolute; bottom: 10px; right: 10px; background: rgb(var(--primary-rgb) / .92); color: #fff; border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; font-weight: 700; box-shadow: 0 6px 16px rgba(2,6,23,.22); }
.video-card .video-thumb:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }

.status { margin: .5rem 0 1rem; color: var(--muted); }
.status.error { color: #b91c1c; }
.status.empty { color: var(--muted); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.6); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 120; }
.modal-backdrop.show { display: flex; }
.modal { background: #000; border-radius: 12px; width: min(960px, 96vw); box-shadow: 0 20px 50px rgba(2,6,23,.35); position: relative; }
.modal .modal-close { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; font-size: 22px; line-height: 1; cursor: pointer; }
.modal .modal-close:hover { background: rgba(255,255,255,.2); }
.modal .video-frame { position: relative; width: 100%; }
.modal .video-frame::before { content: ""; display: block; padding-top: 56.25%; }
.modal .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Pagination */
.sermon-pagination .pages,
.pagination .pages { display: flex; gap: .25rem; }
.sermon-pagination .page-btn,
.pagination .page-btn { min-width: 36px; height: 36px; padding: 0 .5rem; }
.sermon-pagination .page-btn.active,
.pagination .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sermon-pagination .page-btn:not(.active):hover,
.pagination .page-btn:not(.active):hover { background: var(--primary-50); }

/* Sermons: search bar spacing and width */
.sermon-search { margin: 0 0 2rem; }
.sermon-search input[type="search"] { width: 100%; max-width: 760px; display: block; }
@media (min-width: 900px) {
  .sermon-search { margin-bottom: 2.25rem; }
  .sermon-search input[type="search"] { max-width: 960px; }
}

/* --- Events: List Styles --- */
.events-list { margin-top: 1.5rem; }
.events-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.events-items .month-header {
  list-style: none;
  position: sticky;
  top: 8px;
  z-index: 10;
  padding: .35rem .75rem;
  margin: .25rem 0;
  font-weight: 800;
  color: #0f172a; /* slate-900 */
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary-600);
  border-radius: 999px;
  width: fit-content;
}
.event {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: .9rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.03);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
  position: relative;
  cursor: pointer;
}
.event:hover { box-shadow: 0 10px 24px rgba(2,6,23,.08); border-color: #dbe3ef; transform: translateY(-1px); }

/* Date badge */
.event-datebox {
  align-self: start;
  width: 64px; height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  padding: 0; text-align: center;
}
.event-datebox .mon { font-size: .75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; }
.event-datebox .day { font-size: 1.25rem; font-weight: 800; line-height: 1; color: var(--fg); }

/* Body */
.event-body { display: grid; gap: .4rem; align-content: start; }
.event-head { display: flex; align-items: center; gap: .5rem; justify-content: space-between; flex-wrap: wrap; }
.event-title { margin: 0; font-size: 1.125rem; letter-spacing: -.01em; }

/* Meta row */
.event-meta { display: flex; gap: .75rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.event-meta .meta-item { display: inline-flex; align-items: center; gap: .35rem; }
.event-meta .time::before,
.event-meta .location::before {
  content: "";
  display: inline-block;
  width: 16px; height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}
/* Clock icon (stroke uses currentColor) */
.event-meta .time::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 3'/></svg>");
}
/* Location pin icon */
.event-meta .location::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 6-9 13-9 13S3 16 3 10a9 9 0 1 1 18 0Z'/><circle cx='12' cy='10' r='3'/></svg>");
}

/* Description */
.event-desc { margin: .25rem 0 0; color: var(--muted); }

/* Actions */
.event-actions { margin-top: .4rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.events-list .btn.btn-small { background: var(--primary); color: #fff; border-color: var(--primary); }
.events-list .btn.btn-small:hover { background: var(--primary-600); border-color: var(--primary-600); }
.events-list .btn.btn-ghost { border-color: var(--border); }

/* .ics download button */
.events-list .event-ics {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .35rem .6rem;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
}
.events-list .event-ics::before {
  content: "";
  display: inline-block;
  width: 16px; height: 16px;
  background-repeat: no-repeat; background-size: 16px 16px; background-position: center;
  /* Calendar-file icon */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/><path d='M9 14h6v6H9z'/></svg>");
}
.events-list .event-ics:hover { background: var(--primary-50); border-color: var(--primary-600); color: var(--fg); }
.events-list .event-ics:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Right chevron / add-to-calendar affordance */
.event-chev {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.event-chev::before {
  content: "";
  display: block;
  width: 20px; height: 20px;
  background-size: 20px 20px; background-position: center; background-repeat: no-repeat;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18l6-6-6-6'/></svg>");
}
.event:hover .event-chev { background: var(--primary-50); color: var(--primary); }
.event-chev:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Badges override */
.badge { display: inline-flex; align-items: center; gap: .35rem; }
.badge-online { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.badge-inperson { background: #f0fdf4; color: #047857; border: 1px solid #bbf7d0; }

@media (min-width: 700px) {
  .event { grid-template-columns: 72px 1fr; padding: 1rem 1.25rem; gap: 1rem; }
  .event-datebox { width: 72px; height: 72px; }
  .event-datebox .day { font-size: 1.35rem; }
  .event-title { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .event { grid-template-columns: 56px 1fr; }
  .event-datebox { width: 56px; height: 56px; border-radius: 10px; }
}

.status { margin: .5rem 0 1rem; color: var(--muted); }

/* --- Ministry Pages Styles --- */
.hero-desc { font-size: 1.125rem; line-height: 1.6; color: var(--muted); margin-bottom: 1.5rem; }

/* Ministry Grid */
.ministry-grid { 
  display: grid; 
  gap: 1.5rem; 
  margin-top: 2rem;
}
@media (min-width: 768px) { 
  .ministry-grid { grid-template-columns: repeat(2, 1fr); } 
}
@media (min-width: 1200px) { 
  .ministry-grid { grid-template-columns: repeat(4, 1fr); } 
}

.ministry-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.03);
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ministry-card:hover {
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  border-color: var(--primary-600);
  transform: translateY(-2px);
}

.ministry-icon {
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.ministry-card h3 {
  margin-bottom: .75rem;
  color: var(--fg);
}

.ministry-card p {
  flex-grow: 1;
  margin-bottom: 1rem;
  font-size: .95rem;
}

.ministry-features {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.ministry-features .feature {
  background: var(--primary-50);
  color: var(--primary);
  padding: .375rem .75rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid rgba(13, 148, 136, 0.2);
}

/* Biblical Foundation Section */
.biblical-foundation {
  text-align: center;
}

.scripture-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .scripture-grid { grid-template-columns: repeat(2, 1fr); }
}

.scripture-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
}

.scripture-card h4 {
  margin-bottom: .75rem;
  color: var(--primary);
  font-weight: 700;
}

.scripture-card blockquote {
  font-style: italic;
  margin: 0 0 .75rem;
  color: var(--fg);
  line-height: 1.6;
  font-size: 1.05rem;
}

.scripture-card cite {
  font-weight: 600;
  color: var(--primary);
  font-style: normal;
}

/* Individual Ministry Page Styles */
.ministry-hero {
  background: linear-gradient(135deg, var(--primary-50) 0%, rgba(240, 253, 250, 0.3) 100%);
  padding: 3rem 0;
}

.ministry-hero-content {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .ministry-hero-content { grid-template-columns: 2fr 1fr; }
}

.ministry-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: .25rem;
}

.stat-label {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .85rem;
}

/* Program Cards */
.programs-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .programs-grid { grid-template-columns: repeat(2, 1fr); }
}

.program-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.03);
  transition: all .2s ease;
}

.program-card:hover {
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  transform: translateY(-2px);
}

.program-header {
  background: var(--primary-50);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.program-header h3 {
  margin: 0;
  color: var(--primary);
}

.program-body {
  padding: 1.5rem;
}

.program-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-size: .9rem;
}

.meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* Leadership Grid */
.leadership-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .leadership-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .leadership-grid { grid-template-columns: repeat(3, 1fr); }
}

.leader-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.03);
}

.leader-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-50);
  border: 3px solid var(--primary-600);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.leader-name {
  margin-bottom: .25rem;
  font-weight: 700;
}

.leader-role {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: .75rem;
}

.leader-bio {
  font-size: .9rem;
  color: var(--muted);
}

/* Action Boxes */
.action-boxes {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .action-boxes { grid-template-columns: repeat(2, 1fr); }
}

.action-box {
  background: var(--primary);
  color: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
}

.action-box h3 {
  color: #fff;
  margin-bottom: .75rem;
}

.action-box p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.action-box .btn {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.action-box .btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-50);
}

/* Testimonials */
.testimonials {
  margin-top: 3rem;
}

.testimonial-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}

.testimonial {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.03);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--fg);
  line-height: 1.6;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary);
}

.testimonial-role {
  font-size: .9rem;
  color: var(--muted);
}

/* --- Modern Homepage Styles --- */

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.slider-container {
  position: relative;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.slide.active {
  opacity: 1;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
    rgb(var(--primary-rgb) / 0.8) 0%,
    rgb(var(--primary-rgb) / 0.6) 50%,
    rgb(var(--primary-rgb) / 0.4) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 600px;
  text-align: left;
}

.slide-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.slide h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: white;
}

.slide p {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.slide-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Slider Navigation */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 3;
}

.slider-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
  left: 2rem;
}

.slider-nav.next {
  right: 2rem;
}

/* Slider Indicators */
.slider-indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active,
.indicator:hover {
  background: white;
  border-color: white;
}

/* Stats Section */
.stats-section {
  background: var(--primary);
  color: white;
  padding: 3rem 0;
  margin-top: -1px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stats-section .stat-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: white;
}

.stats-section .stat-label {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Ministry Highlights */
.ministry-highlights {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .ministry-highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Sticky Header --- */
.site-header {
  position: fixed; /* Ensure always fixed */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* ensure it stays above content */
  background: var(--surface, #ffffff);
  /* Optional subtle border for separation */
  border-bottom: 1px solid rgba(0,0,0,0.06);
  /* Keep filters subtle to avoid excessive stacking side-effects on some browsers */
  backdrop-filter: saturate(150%) blur(2px);
}

/* Make the header mount sticky as well to support mobile Safari and dynamic injection */
[data-component="header"] {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Mobile-first header tweaks */
@media (max-width: 640px) {
  .header-inner {
    padding-left: .5rem;
    padding-right: .5rem;
    min-height: 56px;
  }
  .brand img { height: 28px; }
  .brand-text { 
    font-size: 0.9rem; /* Make text smaller but keep visible */
  }
  .site-nav { width: min(88vw, 360px); padding-top: 64px; }
}

/* Ensure drawer overlays header content cleanly on all sizes */
.site-nav { z-index: 1100; }
.drawer-backdrop { z-index: 1080; }
.nav-toggle { z-index: 1120; }

/* Smooth anchor scrolling that accounts for sticky header */
html { scroll-padding-top: 72px; }
@media (max-width: 640px) {
  html { scroll-padding-top: 60px; }
}

/* Non-sticky browser fallback */
@supports not ((position: sticky) or (position: -webkit-sticky)) {
  .site-header { position: fixed; top: 0; left: 0; right: 0; }
  body { padding-top: 72px; }
  @media (max-width: 640px) { body { padding-top: 60px; } }
}

@media (min-width: 1200px) {
  .ministry-highlights {
    grid-template-columns: repeat(4, 1fr);
  }
}

.highlight-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-600) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.highlight-card:hover::before {
  transform: scaleX(1);
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.1);
}

.highlight-icon {
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.highlight-card h3 {
  margin-bottom: 1rem;
  color: var(--fg);
}

.highlight-card p {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.highlight-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.highlight-link:hover {
  color: var(--primary-600);
  transform: translateX(5px);
}

/* Events Preview - Enhanced Design */
.events-preview {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .events-preview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .events-preview {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
  }
}

.event-card {
  background: white;
  border: none;
  border-radius: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgb(var(--primary-rgb) / 0.08);
  cursor: pointer;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-600) 100%);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.event-card:hover::before {
  transform: scaleX(1);
}

.event-card.featured {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: white;
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgb(var(--primary-rgb) / 0.25);
}

.event-card.featured .event-info h3,
.event-card.featured .event-info p,
.event-card.featured .event-meta {
  color: white;
}

.event-card.featured .event-meta span {
  color: rgba(255, 255, 255, 0.9);
}

.event-card.featured .event-date {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.event-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgb(var(--primary-rgb) / 0.15);
}

.event-card.featured:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 25px 50px rgb(var(--primary-rgb) / 0.3);
}

.event-card-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.event-date {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: white;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  min-width: 80px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgb(var(--primary-rgb) / 0.3);
  position: relative;
}

.event-date::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  pointer-events: none;
}

.event-date .day {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.event-date .date {
  display: block;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-info h3 {
  margin: 0 0 0.75rem;
  color: var(--fg);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.event-info p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.event-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
}

.event-card.featured .event-meta .meta-item {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.event-meta .meta-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.event-card.featured .event-meta .meta-icon {
  color: rgba(255, 255, 255, 0.9);
}

.event-card-footer {
  padding: 0 1.5rem 1.5rem;
  margin-top: auto;
}

.event-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.event-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.event-cta:hover::before {
  transform: translateX(100%);
}

.event-cta:hover {
  background: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgb(var(--primary-rgb) / 0.3);
}

.event-card.featured .event-cta {
  background: white;
  color: var(--primary);
}

.event-card.featured .event-cta:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

.event-cta-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.event-cta:hover .event-cta-icon {
  transform: translateX(2px);
}

/* Responsive Adjustments for Event Cards */
@media (max-width: 1023px) {
  .events-preview {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .event-card.featured {
    transform: none;
  }
  
  .event-card.featured:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 768px) {
  .event-card-header {
    padding: 1.25rem 1.25rem 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .event-date {
    align-self: flex-start;
    min-width: 70px;
  }
  
  .event-date .date {
    font-size: 1.5rem;
  }
  
  .event-info h3 {
    font-size: 1.125rem;
  }
  
  .event-meta {
    gap: 0.75rem;
  }
  
  .event-meta .meta-item {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .event-card-footer {
    padding: 0 1.25rem 1.25rem;
  }
  
  .event-cta {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
  }
}

.events-footer {
  text-align: center;
  margin-top: 2rem;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-footer {
  text-align: center;
  margin-top: 2rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.cta-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .cta-content {
    grid-template-columns: 1fr auto;
    text-align: left;
  }
}

.cta-text h2 {
  color: white;
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.cta-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 500px;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .cta-actions {
    justify-content: flex-end;
  }
}

.cta-actions .btn {
  min-width: 160px;
}

.cta-actions .btn-primary {
  background: white;
  color: var(--primary);
  border-color: white;
}

.cta-actions .btn-primary:hover {
  background: var(--primary-50);
  border-color: var(--primary-50);
}

.cta-actions .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.cta-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-slider {
    height: 70vh;
    min-height: 500px;
  }
  
  .slide-content {
    text-align: center;
  }
  
  .slider-nav {
    width: 40px;
    height: 40px;
  }
  
  .slider-nav.prev {
    left: 1rem;
  }
  
  .slider-nav.next {
    right: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stats-section .stat-number {
    font-size: 2rem;
  }
  
  .events-preview {
    grid-template-columns: 1fr;
  }
  
  .event-card {
    flex-direction: column;
    text-align: center;
  }
  
  .event-date {
    align-self: stretch;
  }
}

/* --- Events Page Specific Styles --- */

/* Event Categories */
.event-categories {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .event-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .event-categories {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(2, 6, 23, 0.08);
}

.category-icon {
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.category-card h3 {
  margin-bottom: 0.75rem;
  color: var(--fg);
}

.category-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Events Container */
.events-container {
  margin-top: 2rem;
}

/* Enhanced Events Status */
.events-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  text-align: center;
}

.events-status.error {
  border-color: #ef4444;
  background: #fef2f2;
}

.events-status.error .status-icon {
  color: #ef4444;
}

.status-icon {
  color: var(--primary);
  animation: spin 2s linear infinite;
}

.events-status.error .status-icon {
  animation: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.status-text {
  font-size: 1.1rem;
  color: var(--fg);
  font-weight: 500;
}

.events-status.error .status-text {
  color: #dc2626;
}

/* Event Info Grid */
.event-info-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .event-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .event-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.info-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
}

.info-icon {
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.info-card h3 {
  margin-bottom: 1rem;
  color: var(--fg);
}

.info-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.info-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.info-card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.info-card li:last-child {
  border-bottom: none;
}

.info-card li strong {
  color: var(--fg);
}

/* Enhanced Events List Styles */
.events-list {
  margin-top: 1rem;
}

.events-items {
  display: grid;
  gap: 1rem;
}

.events-items .event {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.events-items .event::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.events-items .event:hover::before {
  transform: scaleY(1);
}

.events-items .event:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.08);
  border-color: var(--primary-600);
}

.event-datebox {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  min-width: 80px;
  box-shadow: 0 4px 12px rgb(var(--primary-rgb) / 0.3);
}

.event-datebox .mon {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.event-datebox .day {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.event-body {
  flex: 1;
}

.event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.event-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}

.event-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}

.event-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.event-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.event-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.event-actions .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.event-ics {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.3s ease;
}

.event-ics:hover {
  background: var(--primary-50);
  border-color: var(--primary-600);
  color: var(--primary-600);
}

.event-chev {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0;
}

.events-items .event:hover .event-chev {
  opacity: 1;
}

.event-chev:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

/* Month Headers */
.events-items .month-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
  margin: 1.5rem 0 1rem;
  position: sticky;
  top: 80px;
  z-index: 10;
  box-shadow: 0 4px 12px rgb(var(--primary-rgb) / 0.2);
}

.events-items .month-header:first-child {
  margin-top: 0;
}

/* Badge Enhancements */
.badge-online {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: white;
  border: none;
}

.badge-inperson {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .events-items .event {
    padding: 1rem;
  }
  
  .event-datebox {
    min-width: 70px;
    padding: 0.75rem;
  }
  
  .event-datebox .day {
    font-size: 1.25rem;
  }
  
  .event-chev {
    position: static;
    opacity: 1;
    margin-left: auto;
  }
  
  .event-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }
}

/* --- Home Events Status --- */
.home-events-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgb(var(--primary-rgb) / 0.05);
  border: 1px solid rgb(var(--primary-rgb) / 0.1);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  text-align: center;
}

.home-events-status.error {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.1);
}

.home-events-status .status-icon {
  color: var(--primary);
  animation: spin 2s linear infinite;
}

.home-events-status.error .status-icon {
  color: #ef4444;
  animation: none;
}

.home-events-status .status-text {
  font-size: 1rem;
  color: var(--fg);
  font-weight: 500;
}

.home-events-status.error .status-text {
  color: #dc2626;
}

/* --- Legal Pages Styles --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.legal-notice {
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.legal-notice p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--primary-700);
}

.legal-notice p:first-child {
  font-weight: 600;
}

.legal-section {
  margin-bottom: 3rem;
}

.legal-section h2 {
  color: var(--primary);
  border-bottom: 2px solid var(--primary-100);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.legal-section h3 {
  color: var(--fg);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.legal-section ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.legal-section blockquote {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  font-style: italic;
}

.legal-section blockquote p {
  margin: 0;
  color: var(--muted);
}

.contact-info {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.contact-info p {
  margin-bottom: 1rem;
}

.contact-info p:last-child {
  margin-bottom: 0;
}

/* Footer Legal Links */
.footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.legal-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.legal-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.separator {
  color: var(--border);
}

/* Responsive Legal Pages */
@media (max-width: 768px) {
  .legal-content {
    padding: 0 1rem;
  }
  
  .legal-section h2 {
    font-size: 1.25rem;
  }
  
  .legal-section h3 {
    font-size: 1.1rem;
  }
  
  .footer-legal {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .legal-links {
    justify-content: center;
  }
}

/* --- Contact Form Styles --- */
.form-status {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid;
  transition: all 0.3s ease;
}

.form-status.loading {
  background: rgb(var(--primary-rgb) / 0.05);
  border-color: rgb(var(--primary-rgb) / 0.2);
  color: var(--primary);
}

.form-status.success {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.form-status.error {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.status-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-status.loading .status-icon svg {
  animation: spin 1s linear infinite;
}

.status-text {
  font-weight: 500;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Form Styles */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .form-status {
    padding: 0.875rem;
  }
  
  .status-content {
    gap: 0.5rem;
  }
  
  .status-icon {
    width: 18px;
    height: 18px;
  }
  
  .status-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* --- Newsletter Styles --- */
.newsletter-status {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.newsletter-status.loading {
  background: rgb(var(--primary-rgb) / 0.05);
  border-color: rgb(var(--primary-rgb) / 0.2);
  color: var(--primary);
}

.newsletter-status.success {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.newsletter-status.error {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.newsletter-status .status-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.newsletter-status .status-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-status.loading .status-icon svg {
  animation: spin 1s linear infinite;
}

.newsletter-status .status-text {
  font-weight: 500;
  line-height: 1.4;
}

.newsletter .btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.newsletter .btn-loading svg {
  animation: spin 1s linear infinite;
}

/* Responsive Newsletter Styles */
@media (max-width: 768px) {
  .newsletter-status {
    padding: 0.625rem;
    font-size: 0.8rem;
  }
  
  .newsletter-status .status-content {
    gap: 0.375rem;
  }
  
  .newsletter-status .status-icon svg {
    width: 14px;
    height: 14px;
  }
}

/* Modern Professional Footer Styles */
.modern-footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.modern-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  pointer-events: none;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 4rem 0 3rem;
  align-items: start; /* ensure columns align at the top and edges */
}

@media (min-width: 768px) {
  .footer-main {
    grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
    gap: 2.5rem;
  }
}

@media (max-width: 767px) {
  .footer-main {
    text-align: left;
  }
  
  .footer-section {
    align-items: flex-start;
  }
  
  .footer-title::after {
    left: 0;
    transform: none;
  }
}

/* Company Info Section */
.company-info {
  max-width: 100%;
}

.company-logo {
  margin-bottom: 1.5rem;
}

.company-name {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.company-tagline {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.company-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .social-links {
    justify-content: flex-start;
  }
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(31, 42, 117, 0.4);
}

/* Footer Sections */
.footer-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* align content to the left edge like other columns */
  gap: 0.5rem;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  color: white;
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}


.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
}

.footer-links li a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

/* Contact Section */
.contact-section {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 400px; /* Ensure minimum height */
  display: block !important; /* Force display */
  visibility: visible !important; /* Force visibility */
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  opacity: 1;
  visibility: visible;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  opacity: 1;
  visibility: visible;
  min-height: 50px;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-details {
  flex: 1;
  min-width: 0;
  opacity: 1;
  visibility: visible;
}

.contact-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  font-weight: 500;
  display: block;
  opacity: 1;
}

.contact-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  word-break: break-all;
  display: block;
  opacity: 1;
  line-height: 1.4;
}

.contact-link:hover {
  color: var(--accent);
}

.phone-number {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  opacity: 1;
}

.contact-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  display: block;
  opacity: 1;
  line-height: 1.4;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.copyright p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 0.875rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-legal {
    justify-content: flex-end;
  }
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--accent);
}
