/* Fonts similar to site */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&family=Poppins:wght@600;700;800&display=swap');

:root {
  --brand:#b40024;
  --ink:#222;
  --muted:#666;
  --gold:#ffc857;
  --container:1140px;
}

* { box-sizing:border-box }
html,body { margin:0; padding:0 }
body {
  font-family:Roboto,Arial,Helvetica,sans-serif;
  color:var(--ink);
  background:#fff;
}
.wrap { max-width:var(--container); margin:0 auto; padding:0 16px }
a { color:var(--brand); text-decoration:none }
img { max-width:100%; display:block }

/* --------------------------------
   HEADER
--------------------------------- */
header {
  position:sticky; top:0; z-index:50;
  background:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
}
.topbar {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 0;
}
.brand { display:flex; align-items:center; gap:12px }
.brand img { width:64px; height:64px; border-radius:50% }
.brand .title {
  font-family:Poppins,system-ui,sans-serif;
  font-weight:800;
  color:var(--brand);
  font-size:20px;
}
nav { display:flex; align-items:center; gap:16px; flex-wrap:wrap }
nav a { color:#333; font-weight:600 }
nav a:hover { color:var(--brand) }
.btn-donate {
  background:var(--brand); color:#fff !important;
  padding:10px 16px; border-radius:999px; border:0;
  display:inline-flex; align-items:center; gap:8px;
  font-weight:700;
  box-shadow:0 8px 18px rgba(180,0,36,.25);
}

/* Mobile nav (hamburger) */
.menu-toggle {
  display:none;
  font-size:26px;
  background:none;
  border:0;
  cursor:pointer;
  color:var(--brand);
}
@media (max-width:768px) {
  nav { display:none; flex-direction:column; gap:12px; padding:10px 0 }
  nav.open { display:flex; background:#fff; position:absolute; top:100%; left:0; right:0; z-index:99; }
  .menu-toggle { display:block }
}

/* --------------------------------
   HERO
--------------------------------- */
.hero {
  position:relative;
  height:90vh;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#000;
}
.hero::before {
  content:"";
  position:absolute; inset:0;
  background:url('../images/hero.jpg') top center/cover no-repeat;
  filter:brightness(.68);
}
.hero .content {
  position:relative;
  text-align:center;
  color:#fff;
  transform:translateY(-22vh) !important;
}
.divider {
  text-transform:uppercase;
  letter-spacing:.15em;
  color:#fff; font-weight:700;
  border-top:1px solid rgba(255,255,255,.5);
  border-bottom:1px solid rgba(255,255,255,.5);
  display:inline-block;
  padding:6px 16px;
  margin-bottom:10px;
}
.hero h1 {
  font-family:Poppins,sans-serif;
  font-size:46px; line-height:1;
  margin:6px 0;
}
.hero h1 .sub { font-size:.6em; display:block; opacity:.95 }

/* Responsive hero text */
@media (max-width:1024px) {
  .hero .content { transform:translateY(-15vh) !important }
}
@media (max-width:768px) {
  .hero { height:70vh }
  .hero .content { transform:translateY(8vh) !important }
  .hero h1 { font-size:28px }
}
@media (max-width:480px) {
  .hero .content { transform:translateY(-3vh) !important }
  .hero h1 { font-size:24px }
}

/* --------------------------------
   NEXT EVENT
--------------------------------- */
.next-event-box {
  display:grid;
  gap:12px;
  text-align:center;
  margin-bottom:30px;
}

/* Scrolling text */
.next-event-ticker {
  overflow:hidden;
}
.next-event-text {
  display:inline-block;
  font-size:18px;
  font-weight:700;
  color:var(--brand);
  white-space:nowrap;
  animation:scrollText 12s linear infinite;
}
@keyframes scrollText {
  0%   { transform:translateX(100%) }
  100% { transform:translateX(-100%) }
}

/* Photos grid (auto adjusts for 1, 2, 3+ images) */
.next-event-photos {
  display:grid;
  gap:12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items:start;
}
.next-event-photo-link { display:block }
.next-event-photo {
  width:100%;
  height:100%;
  max-height:520px;           /* keeps tall images reasonable on desktop */
  object-fit:contain;         /* show full image without crop */
  background:#fff;
  border:1px solid #eee;
  border-radius:12px;
  box-shadow:0 6px 18px rgba(0,0,0,.12);
}

/* Smaller photos on phones */
@media (max-width:768px){
  .next-event-photos { grid-template-columns: 1fr }
  .next-event-photo { max-height:380px }
}

/* --------------------------------
   LAYOUT / SECTIONS
--------------------------------- */
.section { padding:36px 0 }
.grid { display:grid; grid-template-columns:repeat(12,1fr); gap:20px }
.span-6 { grid-column:span 12 }
.span-4 { grid-column:span 12 }
.span-12{ grid-column:span 12 }
@media (min-width:900px){
  .span-6{ grid-column:span 6 }
  .span-4{ grid-column:span 4 }
}
.card {
  padding:18px;
  border:1px solid #f0d2d8;
  border-radius:14px;
  background:#fff;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
}
h2.section-title { font-size:22px; color:var(--brand); margin:0 0 12px }

/* Religious Services card */
.card.religious {
  background:var(--brand);
  color:#fff;
  border:2px solid var(--brand);
}
.card.religious h2,
.card.religious p { color:#fff }
.card.religious .icon-circle {
  background:rgba(255,255,255,.18);
  color:#fff;
}

/* About / religion */
.icon-box{display:flex;gap:16px;align-items:flex-start}
.icon-circle{
  width:52px; height:52px; border-radius:50%;
  background:#ffe3ea; color:#7d0c22;
  display:grid; place-items:center;
  font-size:22px; flex:0 0 auto;
}

/* Vision tile */
.tile{
  display:flex; gap:14px; align-items:flex-start;
  padding:18px; border:1px solid #f0d2d8;
  border-radius:14px;
}
.tile .arrow{
  width:36px; height:36px; border-radius:50%;
  display:grid; place-items:center;
  background:#ffe3ea; color:#7d0c22;
}

/* Contact + form */
.split{display:grid;grid-template-columns:1fr;gap:20px}
@media (min-width:900px){ .split{grid-template-columns:1fr 1fr} }
.form{padding:18px;border:1px solid #eee;border-radius:14px;background:#fff}
.form label{display:block;font-weight:600;margin:8px 0 4px}
.form input,.form textarea{width:100%;padding:10px 12px;border:1px solid #ddd;border-radius:10px;font-family:inherit}
.form button{margin-top:8px}

/* Video */
.video{
  position:relative;
  padding-top:56.25%;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 8px 20px rgba(0,0,0,.1);
}
.video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* Gallery */
.gallery{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.gallery a{display:block;background:#f6f6f6;border-radius:10px;overflow:hidden}
.gallery img{width:100%;height:100%;object-fit:cover;display:block}
@media (max-width:1024px){ .gallery{grid-template-columns:repeat(2,1fr)} }

/* --------------------------------
   FOOTER
--------------------------------- */
footer{margin-top:24px}
.footer-top{background:#faf5f6;border-top:1px solid #f0d2d8;padding:18px 0}
.footer-mid{
  background:linear-gradient(180deg,#fff7f8,#fff);
  border-top:1px solid #f0d2d8; border-bottom:1px solid #f0d2d8;
  padding:26px 0;
}
.footer-mid h3{margin:0 0 8px;color:var(--brand)}
.quick-links ul{list-style:none;margin:0;padding:0}
.quick-links li{margin:6px 0}
.quick-links a{color:#333;font-weight:600}
.quick-links a:hover{color:var(--brand)}
.quick-contact .row{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width:900px){ .quick-contact .row{grid-template-columns:repeat(2,1fr)} }
.qc-item{
  display:flex; gap:12px; align-items:flex-start;
  border:1px solid #f0d2d8; border-radius:12px;
  padding:12px; background:#fff;
}
.qc-badge{
  width:36px; height:36px; border-radius:50%;
  display:grid; place-items:center;
  background:#ffe3ea; color:#7d0c22; font-weight:800;
}
.footer-bottom{
  padding:14px 0; display:flex;
  align-items:center; justify-content:space-between;
  gap:10px; color:#666; font-size:14px;
}
.social a{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:50%;
  background:#3b5998; color:#fff; margin-right:8px;
}
.social a.yt{background:#ff0000}
.credit a{color:#666}
/* =========================
   EVENT CALENDAR STYLES
   ========================= */
.cal-legend{
  display:flex; align-items:center; gap:14px;
  margin:10px 0 8px; font-size:14px; color:#444;
  flex-wrap:wrap;
}
.cal-legend .dot{
  width:12px; height:12px; border-radius:50%; display:inline-block; margin-right:6px;
  vertical-align:middle;
}
.cal-legend .available{ background:#c8f0c9; border:1px solid #9bd29e }
.cal-legend .booked{ background:#f9d1cd; border:1px solid #e4a19a }
.cal-legend .past{ background:#e9e9e9; border:1px solid #cfcfcf }

#eventCalendar{ margin-top:8px }

/* Month header */
.cal-month{ margin-top:24px }
.cal-month h3{
  text-align:center; color:var(--brand);
  margin:0 0 8px; font-weight:800;
}

/* Grid */
.cal-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:4px;
  margin-bottom:20px;
}

/* Days of week */
.cal-dow{
  font-weight:700; text-align:center; padding:6px 0;
  background:#f3f3f3; border-radius:6px; color:#555;
}

/* Day cells */
.cal-day{
  text-align:center; padding:12px 0;
  border-radius:8px; cursor:pointer;
  transition:background .15s, transform .08s;
  user-select:none;
}
.cal-day .num{ font-weight:700 }

/* States */
.cal-day.available{ background:#e8f9e9; color:#2e7d32 }
.cal-day.available:hover{ background:#d7f2d8 }
.cal-day.booked{ background:#fdecea; color:#b40024 }
.cal-day.booked:hover{ background:#f8d9d6 }
.cal-day.past{ background:#f5f5f5; color:#888; cursor:not-allowed }
.cal-day.empty{ background:transparent; cursor:default }

/* Modal */
.cal-modal{
  position:fixed; inset:0; display:none;
  background:rgba(0,0,0,.6); z-index:999;
  align-items:center; justify-content:center;
}
.cal-modal.show{ display:flex }
.cal-modal__dialog{
  width:min(420px, 92vw); background:#fff; border-radius:12px;
  box-shadow:0 20px 50px rgba(0,0,0,.25);
  padding:16px 16px 12px;
}
.cal-modal .close-line{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin-bottom:8px;
}
.cal-modal h3{ margin:0; color:var(--brand) }
.cal-modal button{ border:0; background:#eee; width:34px; height:34px; border-radius:8px; font-size:20px; cursor:pointer }
.cal-modal button:hover{ background:#e3e3e3 }
#calModalBody{ max-height:50vh; overflow:auto }
.cal-detail-item{ padding:10px 12px; border:1px solid #f0d2d8; border-radius:10px; margin-bottom:8px }
.cal-detail-item .title{ font-weight:700; margin-bottom:4px }
.cal-detail-item .meta{ font-size:14px; color:#555 }
.cal-error{
  padding:10px 12px; border:1px solid #f0d2d8; border-radius:10px; background:#fff7f8; color:#b40024; margin:10px 0;
}

/* Small screens */
@media (max-width:480px){
  .cal-day{ padding:10px 0 }
  .cal-dow{ font-size:12px; padding:5px 0 }
}
.cal-month { margin: 1rem 0 .5rem; }
.cal-month h3 { margin: 0; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-size: .85rem; font-weight: 600; text-align: center; padding: 6px 0; color:#444; }
.cal-day { border:1px solid #eee; border-radius:8px; min-height:64px; padding:6px; background:#fff; cursor:pointer; text-align:left; }
.cal-day .num { font-weight:600; }
.cal-day.available { outline:2px solid #e8f5e9; }
.cal-day.booked { background:#fff3e0; }
.cal-day.past { color:#999; background:#fafafa; }
.cal-day.empty { visibility:hidden; }
#calModal { position:fixed; inset:0; display:none; background:rgba(0,0,0,.4); }
#calModal.show { display:block; }
#calModal > div { max-width:520px; margin:10vh auto; background:#fff; border-radius:12px; padding:16px; }
.cal-detail-item { border-bottom:1px solid #eee; padding:10px 0; }
.cal-detail-item:last-child { border-bottom:0; }

<style>
/* === Calendar visibility + compact layout overrides === */

/* 1) Make the whole calendar narrower and centered */
.calendar { max-width: 860px; margin: 0 auto; }

/* 2) Slightly smaller cells for a tidier look */
.cal-hd, .cal-blank, .cal-day { 
  padding: 6px; 
  min-height: 44px;           /* was 56px */
  font-size: 0.95rem; 
}

/* 3) Higher-contrast state colors + left stripe for instant recognition */
.cal-day.booked    { 
  background: #fde8ee;        /* soft red */
  border-left: 4px solid #b40024;
}
.cal-day.pending   { 
  background: #fef3c7;        /* soft yellow */
  border-left: 4px solid #eab308;
}
.cal-day.available { 
  background: #e6f4ea;        /* soft green */
  border-left: 4px solid #0e9f6e;
}
.cal-day.past {
  background: #f5f6f7;
  color: #6b7280;
}

/* 4) Improve focus/hover visibility */
.cal-day:hover { 
  filter: none; 
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.08);
}
.cal-day:focus {
  outline: 2px solid #b40024;
  outline-offset: 2px;
}

/* 5) Dark mode tuning for stronger separation */
@media (prefers-color-scheme: dark) {
  .cal-hd { background:#151515; color:#d1d5db; border-color:#262626; }
  .cal-blank, .cal-day { border-color:#262626; }
  .cal-day.booked    { background:#3a0b16; border-left-color:#ff6b8a; }
  .cal-day.pending   { background:#3a2a0b; border-left-color:#ffd166; }
  .cal-day.available { background:#0f2b1f; border-left-color:#6ee7b7; }
  .cal-day.past      { background:#0e0e0e; color:#9ca3af; }
}

/* 6) High-contrast users get even bolder cues */
@media (prefers-contrast: more) {
  .cal-day.booked    { box-shadow: inset 0 0 0 2px #b40024; }
  .cal-day.pending   { box-shadow: inset 0 0 0 2px #eab308; }
  .cal-day.available { box-shadow: inset 0 0 0 2px #0e9f6e; }
}

/* 7) Tighten small screens a bit more */
@media (max-width: 640px) {
  .cal-hd, .cal-blank, .cal-day { 
    padding: 5px; 
    min-height: 38px; 
    font-size: 0.9rem;
  }
}
</style>

