/* ========================================
   CSS Variables
======================================== */
:root {
  --bg: #0b1220;
  --surface: rgba(255, 255, 255, 0.06);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #7dd3fc;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --side-image-width: clamp(150px, 15vw, 350px);
}

/* ========================================
   Reset & Base
======================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========================================
   Layout
======================================== */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   Side Images (decorative)
   Positioned relative to the main content container (1000px max-width)
======================================== */
.side-image {
  position: fixed;
  top: 0;
  bottom: 0;
  /* Width = space between viewport edge and container edge */
  /* Container is 1000px centered, so each side gets (100vw - 1000px) / 2 */
  width: calc((100vw - 1000px) / 2);
  min-width: 100px; /* Never smaller than this */
  max-width: 400px; /* Never larger than this */
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.side-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.side-image--left {
  left: 0;
}

.side-image--left img {
  /* Show bell tower (left/center of image), fade toward viewport edge */
  object-position: center;
  mask-image: linear-gradient(to left, black 0%, black 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, black 0%, black 30%, transparent 100%);
}

.side-image--right {
  right: 0;
}

.side-image--right img {
  /* Show altar (slightly left of center), fade toward viewport edge */
  object-position: 55% center;
  mask-image: linear-gradient(to right, black 0%, black 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 0%, black 30%, transparent 100%);
}

/* Hide when container fills viewport (no room for images) */
@media (max-width: 1100px) {
  .side-image {
    display: none;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("/assets/img2.png");
    background-size: cover;
    background-position: 40%;
    opacity: 0.1;
    filter: grayscale(20%) ;
    pointer-events: none;
    z-index: 0;
  }
}

/* ========================================
   Header
======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 18, 32, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.header__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.header__title:hover {
  text-decoration: none;
}

.header__nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

/* ========================================
   Main Content
======================================== */
.main {
  position: relative;
  z-index: 1;
  padding: 40px 0;
}

.subtitle {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
}

.week-label {
  margin: 0 0 24px;
  color: var(--muted);
}

/* ========================================
   Cards Grid
======================================== */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* 4-column layout for contact page */
.cards--4col {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .cards--4col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .cards--4col {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card__title {
  margin: 0;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.card__body {
  padding: 16px;
}

/* ========================================
   Table Styling
======================================== */
.table-wrap {
  width: 100%;
}

.masses-mobile {
  display: none;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.table .cell-center {
  text-align: center;
}

.table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tr:last-child td {
  border-bottom: none;
}

.table td[rowspan] {
  vertical-align: middle;
}

@media (max-width: 520px) {
  .table-wrap {
    display: none;
  }

  .masses-mobile {
    display: grid;
    gap: 12px;
  }

  .masses-day-block {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    overflow: hidden;
  }

  .masses-day-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.16);
  }

  .masses-day {
    font-weight: 700;
  }

  .masses-extra {
    color: var(--muted);
    font-size: 0.9em;
  }

  .masses-entry {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  }

  .masses-day-block .masses-entry:last-child {
    border-bottom: 0;
  }

  .masses-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  .masses-time {
    font-weight: 700;
    min-width: 52px;
  }

  .masses-loc {
    text-align: right;
    color: rgba(255, 255, 255, 0.86);
  }

  .masses-note {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.92em;
  }
}

/* ========================================
   Prose (announcements list)
======================================== */
.prose ul {
  margin: 0;
  padding-left: 20px;
}

.prose li {
  margin: 8px 0;
}

/* ========================================
   Contact Grid (inside single card)
======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 600px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

.contact-item h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-item p {
  margin: 0;
}

.contact-item code {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* ========================================
   Utilities
======================================== */
.muted {
  color: var(--muted);
}

/* ========================================
   Footer
======================================== */
.footer {
  position: relative;
  z-index: 1;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
