:root {
  --primary: #0f172a;
  --primary-soft: #1e293b;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --surface: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.10);
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
  --bottom-nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── TOP NAV (desktop) ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--primary);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-logo span {
  color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: 0.2px;
}
.nav-menu { display: flex; gap: 2px; }
.nav-menu a {
  color: rgba(255,255,255,0.65);
  text-decoration: none; font-size: 0.8rem;
  padding: 7px 11px; border-radius: 8px;
  transition: var(--transition); font-weight: 500;
}
.nav-menu a:hover, .nav-menu a.active { color: #fff; background: rgba(255,255,255,0.1); }
.nav-admin {
  background: var(--accent) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }

/* ── MOBILE DRAWER ── */
.nav-drawer {
  position: fixed; top: 0; right: -280px; width: 280px; height: 100vh;
  background: var(--primary); z-index: 200;
  display: flex; flex-direction: column;
  transition: right 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.2);
}
.nav-drawer.open { right: 0; }
.nav-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff; font-weight: 700; font-size: .95rem;
}
.nav-drawer-links { display: flex; flex-direction: column; padding: 10px 0; overflow-y: auto; flex: 1; }
.nav-drawer-links a {
  color: rgba(255,255,255,0.75); text-decoration: none;
  padding: 13px 22px; font-size: .9rem; font-weight: 500;
  transition: var(--transition); border-left: 3px solid transparent;
}
.nav-drawer-links a:hover { color: #fff; background: rgba(255,255,255,0.07); border-left-color: var(--accent); }
.nav-drawer-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 8px 0; }
.nav-drawer-admin {
  background: var(--accent) !important; color: var(--primary) !important;
  font-weight: 700 !important; margin: 10px 16px; border-radius: 10px !important;
  border-left: none !important; text-align: center;
}
.nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* ── BOTTOM NAV (mobile) ── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  height: var(--bottom-nav-h);
  padding: 0 4px env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.bottom-nav-inner {
  display: flex; height: 100%; align-items: center; justify-content: space-around;
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; flex: 1; height: 100%;
  text-decoration: none; color: var(--muted);
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.3px;
  transition: color var(--transition);
  border: none; background: none; cursor: pointer;
  padding: 0; outline: none;
  -webkit-tap-highlight-color: transparent;
}
.bnav-item .bnav-icon {
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
}
.bnav-item .bnav-icon svg { stroke: currentColor; }
.bnav-item.active { color: var(--primary); }
.bnav-item:active .bnav-icon { transform: scale(0.9); }

/* center raised button */
.bnav-center {
  flex: 1.6;
  color: var(--text) !important;
  font-weight: 700;
}
.bnav-center .bnav-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(15,23,42,0.3);
  margin-bottom: 2px;
  margin-top: -16px;
  border: 2.5px solid var(--surface);
  transition: transform var(--transition), box-shadow var(--transition);
}
.bnav-center:active .bnav-icon { transform: scale(0.92); }
.bnav-center .bnav-icon svg { stroke: #fff; }

@media (max-width: 640px) {
  .bottom-nav { display: block; }
  .hamburger { display: flex; }
  .nav-menu { display: none !important; }
  main { padding-bottom: var(--bottom-nav-h); }
}

/* ── MAIN ── */
main { padding-top: 60px; }

/* ── HERO SLIDER ── */
.slider-section { position: relative; overflow: hidden; background: var(--primary); }
.slider { position: relative; height: 300px; }
@media (min-width: 640px) { .slider { height: 480px; } }
.slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.7s ease;
  display: flex; align-items: flex-end;
}
.slide.active { opacity: 1; }
.slide-video, .slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.88) 0%, rgba(15,23,42,0.15) 55%, transparent 100%);
}
.slide-content { position: relative; z-index: 2; padding: 24px 20px; color: #fff; }
.slide-content h2 { font-size: 1.4rem; font-weight: 800; line-height: 1.2; margin-bottom: 5px; }
.slide-content p { font-size: 0.85rem; opacity: 0.8; }
.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.35); cursor: pointer; transition: var(--transition); }
.dot.active { background: var(--accent); width: 20px; border-radius: 3px; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); transition: var(--transition);
}
.slider-btn:hover { background: rgba(255,255,255,0.25); }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }

/* ── SECTIONS ── */
.section { padding: 28px 16px; }
@media (min-width: 640px) { .section { padding: 48px 24px; max-width: 900px; margin: 0 auto; } }
.section-alt { background: var(--surface); }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title {
  font-size: 1.1rem; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ''; display: block; width: 3px; height: 18px;
  background: var(--accent); border-radius: 2px;
}
.see-all { font-size: 0.78rem; color: var(--accent); font-weight: 600; text-decoration: none; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:active { transform: scale(0.985); }

/* ── ANNOUNCEMENTS ── */
.announcements-list { display: flex; flex-direction: column; gap: 10px; }
.announcement-card { padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.ann-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary); display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.ann-body h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 3px; }
.ann-body p { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.ann-preview {
  font-size: 0.8rem; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ann-date { font-size: 0.7rem; color: var(--accent); font-weight: 600; }

/* ── MASS TIMINGS ── */
.timings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 480px) { .timings-grid { grid-template-columns: repeat(3, 1fr); } }
.timing-card { padding: 16px 12px; text-align: center; }
.timing-day { font-size: 0.68rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.timing-time { font-size: 1.05rem; font-weight: 800; color: var(--primary); }
.timing-lang { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

/* ── PHOTOS ── */
.photos-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
  -webkit-overflow-scrolling: touch; cursor: grab;
}
.photos-scroll:active { cursor: grabbing; }
.photos-scroll::-webkit-scrollbar { display: none; }
.photo-item {
  flex-shrink: 0; width: 240px; height: 180px;
  border-radius: 14px; overflow: hidden;
  scroll-snap-align: start; cursor: pointer;
  border: 1px solid var(--border);
}
@media (min-width: 640px) { .photo-item { width: 300px; height: 220px; } }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.photo-item:hover img { transform: scale(1.06); }

/* ── DOWNLOADS ── */
.downloads-list { display: flex; flex-direction: column; gap: 8px; }
.download-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; text-decoration: none; color: var(--text);
  transition: var(--transition);
}
.download-item:hover { transform: translateX(3px); }
.dl-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); display: flex;
  align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.dl-info { flex: 1; }
.dl-info h4 { font-size: 0.88rem; font-weight: 700; }
.dl-info span { font-size: 0.72rem; color: var(--muted); }
.dl-arrow { color: var(--accent); font-size: 1rem; font-weight: 700; }

/* ── REQUESTS FORM ── */
.request-form { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select, .form-group textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 0.9rem; font-family: inherit;
  color: var(--text); background: var(--bg);
  transition: border-color var(--transition); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); background: #fff;
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ── BUTTONS ── */
.btn {
  padding: 13px 22px; border-radius: 12px; border: none;
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-soft); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15,23,42,0.25); }
.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { background: #d97706; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 0.78rem; border-radius: 8px; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.94); align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 85vh; border-radius: 12px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}


/* ── FOOTER ── */
footer {
  background: var(--primary); color: rgba(255,255,255,0.6);
  text-align: center; padding: 28px 20px;
  font-size: 0.8rem; line-height: 1.9;
}
@media (max-width: 640px) {
  footer { padding-bottom: calc(var(--bottom-nav-h) + 16px); }
}
footer strong { color: #fff; }
footer a { color: var(--accent); text-decoration: none; }

/* ── ANIMATIONS ── */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── CLERGY ── */
.cl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 16px; text-align: center;
  flex: 1; min-width: 160px; max-width: 240px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cl-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.cl-featured {
  border: 2px solid var(--accent);
  background: linear-gradient(160deg, #fffbeb, #fff);
  box-shadow: 0 6px 28px rgba(245,158,11,0.18);
  transform: translateY(-8px);
}
.cl-featured:hover { transform: translateY(-13px); }
.cl-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--primary); color: var(--accent); font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; border: 2px solid var(--border);
}
.cl-photo {
  width: 110px; height: 110px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
  margin: 0 auto 12px; display: block;
}
.cl-photo-lg { width: 140px; height: 140px; border-color: var(--accent); }
.cl-role { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 5px; }
.cl-name { font-size: .88rem; font-weight: 800; color: var(--text); line-height: 1.3; margin-bottom: 3px; }
.cl-sub  { font-size: .75rem; color: var(--muted); }
.cl-parish {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  box-shadow: var(--shadow); margin-bottom: 24px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cl-parish:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cl-dir {
  flex: 1; min-width: 220px; background: var(--surface);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cl-dir:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ── PATRON SAINT CHIP ── */
.patron-chip {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe; border-radius: var(--radius);
  display: flex; align-items: flex-start;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}
.patron-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ── ADMIN ── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: var(--primary); color: #fff;
  padding: 0; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; z-index: 50; transition: transform var(--transition);
}
.admin-sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-sidebar-header h2 { font-size: 1rem; font-weight: 800; }
.admin-sidebar-header p { font-size: 0.75rem; opacity: 0.5; margin-top: 2px; }
.admin-nav { padding: 10px 0; }
.admin-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; cursor: pointer;
  font-size: 0.85rem; font-weight: 500;
  color: rgba(255,255,255,0.65);
  transition: var(--transition); border: none; background: none; width: 100%; text-align: left;
}
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-nav-item .icon { font-size: 1rem; width: 20px; text-align: center; }
.admin-main { margin-left: 240px; flex: 1; padding: 28px; background: var(--bg); min-height: 100vh; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-topbar h1 { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th { background: var(--primary); color: #fff; padding: 11px 14px; text-align: left; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fafc; }
.admin-form-card { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px; border: 1px solid var(--border); }
.admin-form-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; color: var(--primary); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 16px; }
  .admin-grid { grid-template-columns: 1fr; }
}
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.mobile-menu-btn { display: none; background: var(--primary); border: none; color: #fff; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 1rem; }
@media (max-width: 640px) { .mobile-menu-btn { display: block; } }
