/* Our Lady of the Rosary Catholic Parish - Stylesheet */
:root {
  --primary: #c89b3d; /* Warm golden bronze */
  --primary-light: #d7b96a;
  --accent: #8d5d1f; /* Deep bronze for contrast */
  --accent-light: #e6c66b;
  --bg: #f8f6f0; /* Soft cream */
  --bg-alt: #ffffff;
  --text: #2d3748;
  --text-light: #4a5568;
  --muted: #718096;
  --border: #e2e8f0;
  --success: #276749;
  --danger: #c53030;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  background:
    linear-gradient(rgba(10, 24, 37, 0.45), rgba(10, 24, 37, 0.45)),
    url('../images/bg4.JPG') center/cover no-repeat fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(15, 39, 68, 0.12);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', 'Times New Roman', serif;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.site-header {
  /* glass-brown translucent bar */
  background: rgba(68, 50, 36, 0.64);
  color: var(--accent);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(16, 18, 15, 0.12);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  backdrop-filter: blur(6px) saturate(1.05);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-top {
  background: rgba(0,0,0,0.2);
  padding: 0.4rem 0;
  font-size: 0.85rem;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.header-top a {
  color: rgba(255,255,255,0.9);
}

.header-top a:hover {
  color: var(--accent-light);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--accent);
  font-family: 'Playfair Display', 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.logo-mark {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  overflow: visible;
  border: none; /* no enclosure */
  background: transparent;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-mark img {
  width: 72px;
  height: 72px;
  object-fit: contain; /* ensure full logo visible */
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-logo-title {
  color: rgba(212,175,103,0.98); /* golden title */
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.nav-links a {
  color: rgba(250,240,225,0.95); /* off-white on brown glass */
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.06);
  color: rgba(212,175,103,0.98); /* gold highlight */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.nav-links .cta-btn {
  background: var(--accent);
  color: var(--primary) !important;
  font-weight: 600;
  margin-left: 0.5rem;
}

.nav-links .cta-btn:hover {
  background: var(--accent-light);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: white;
  overflow: hidden;
  background: #0f1f2d;
}

/* Contact page: make hero half-page with a background image */
.hero-contact {
  min-height: 50vh; /* half the viewport height */
  background-image: linear-gradient(rgba(8,18,27,0.45), rgba(8,18,27,0.45)), url('../images/contact.JPG');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-contact .container {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.hero-contact .hero-content h1,
.hero-contact h1 {
  color: white;
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin: 0;
  text-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.hero-slides,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slides {
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s ease, transform 8s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  z-index: 1;
  background: linear-gradient(90deg, rgba(7, 19, 28, 0.8) 0%, rgba(8, 18, 27, 0.62) 38%, rgba(8, 18, 27, 0.38) 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.hero-content {
  max-width: 700px;
}

.hero-content h1 {
  color: white;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 1.05;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(30px);
  text-shadow: 0 12px 30px rgba(0,0,0,0.25);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-content h1.animate {
  opacity: 1;
  transform: translateY(0);
}

.hero-content .subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  opacity: 0;
  transform: translateY(18px);
  margin-bottom: 1.75rem;
  max-width: 520px;
  transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}

.hero-content.is-visible .subtitle {
  opacity: 0.9;
  transform: translateY(0);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease 0.25s, transform 0.8s ease 0.25s;
}

.hero-content.is-visible .hero-actions {
  opacity: 1;
  transform: translateY(0);
}

.mass-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 24px 44px rgba(0,0,0,0.18);
}

.mass-card h3 {
  color: var(--accent-light);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mass-times-list {
  list-style: none;
}

.mass-times-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.95rem;
}

.mass-times-list li:last-child {
  border-bottom: none;
}

.mass-times-list .day {
  font-weight: 600;
}

/* Sections */
.section {
  padding: 4rem 0;
  background: rgba(255, 255, 255, 0.486);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.section-alt {
  background: rgba(73, 67, 54, 0.9);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

.section-header .ornament {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Newsletter / News Section */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.news-card {
  background: var(--bg-alt);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  position: relative;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.news-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.news-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .read-more {
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.empty-news {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  grid-column: 1 / -1;
}

/* Quick Links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.quick-link {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.quick-link:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.quick-link .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.quick-link h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.quick-link p {
  font-size: 0.875rem;
  color: var(--muted);
}

/* About / Content cards */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.content-grid img,
.content-grid .placeholder-img {
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.placeholder-img {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary);
}

/* Staff */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.staff-card {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.staff-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1rem;
  border: 3px solid var(--accent);
}

.staff-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.staff-card .role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.15);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* left info + right map */
  gap: 2rem;
  align-items: start;
}

.contact-info {
  background: var(--primary);
  color: white;
  border-radius: 12px;
  padding: 2rem;
}

.contact-info h3 {
  color: var(--accent-light);
  margin-bottom: 1.25rem;
}

.contact-info p {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.contact-info a {
  color: rgba(255,255,255,0.9);
}

.contact-info a:hover {
  color: var(--accent-light);
}

/* Map embed */
.map-container {
  display: flex;
  flex-direction: column;
}

.map-embed {
  width: 100%;
  min-height: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.06);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
  display: flex;
}

/* Enhanced contact form styles & animations */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}
.alert.hidden { display: none; }
.alert-success { background: rgba(40,167,69,0.1); color: #27593a; border: 1px solid rgba(39,89,58,0.08); }
.alert-error { background: rgba(220,53,69,0.06); color: #7a1f26; border: 1px solid rgba(122,31,38,0.06); }
.alert.fade-out { opacity: 0; transition: opacity 0.6s ease; }

.form-group label { display:block; margin-bottom:0.4rem; font-weight:700; color: rgba(73,67,54,0.9); }
.form-group input,
.form-group textarea,
.form-group select {
  width:100%; padding:0.75rem 1rem; border-radius:10px; border:1px solid var(--border); background: white; transition: box-shadow 200ms ease, transform 200ms ease;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; box-shadow: 0 6px 18px rgba(200,155,61,0.12); transform: translateY(-2px);
}
.form-group textarea { min-height:140px; resize:vertical; }

.btn-primary { background: var(--primary); color: white; padding:0.8rem 1.1rem; border-radius:10px; border:none; cursor:pointer; transition: transform 150ms ease, box-shadow 150ms ease; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-primary.loading { position: relative; opacity: 0.9; }
.btn-primary.loading::after { content: ''; position: absolute; right: 14px; top: 50%; width:14px; height:14px; margin-top:-7px; border-radius:50%; border:2px solid rgba(255,255,255,0.6); border-right-color: transparent; animation: spin 0.9s linear infinite; }

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

/* subtle slide-in for the form container */
.contact-grid > div:nth-child(2) { animation: slideIn 700ms cubic-bezier(.2,.9,.2,1); }
@keyframes slideIn { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }


/* Admin */
.admin-panel {
  max-width: 800px;
  margin: 0 auto;
}

.admin-login,
.admin-dashboard {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.news-admin-list {
  margin-top: 2rem;
}

.news-admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: white;
}

.news-admin-item h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.news-admin-item .meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #9b2c2c;
}

.btn-success {
  background: var(--success);
  color: white;
}

/* Footer (match header glass look) */
.site-footer {
  background: rgba(68, 50, 36, 0.62); /* glass brown */
  color: rgba(250,240,225,0.95);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  backdrop-filter: blur(6px) saturate(1.05);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  color: rgba(212,175,103,0.98); /* gold */
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  font-family: 'Playfair Display', 'Cinzel', serif;
}

.footer-brand p {
  font-size: 0.95rem;
  opacity: 0.95;
  max-width: 320px;
  color: rgba(250,240,225,0.9);
}

.footer-col h4 {
  color: rgba(250,240,225,0.95);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: rgba(250,240,225,0.95);
  font-size: 0.95rem;
}

.footer-col a:hover { color: rgba(212,175,103,0.98); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.social-links { display: flex; gap: 0.75rem; }

.social-links a {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(250,240,225,0.95);
  font-size: 1rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: rgba(212,175,103,0.95);
  color: #2b2b2b;
}

/* Modal for news detail */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.35rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body .date {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Light brown banner used for scripture/quotes */
.brown-banner {
  background-color: #efe3d0; /* soft warm beige/brown */
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(16,18,15,0.04);
}

.alert-success {
  background: #c6f6d5;
  color: #22543d;
  border: 1px solid #9ae6b4;
}

.alert-error {
  background: #fed7d7;
  color: #742a2a;
  border: 1px solid #feb2b2;
}

/* Responsive */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  
  .content-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .nav-links a {
    width: 100%;
    padding: 0.75rem 1rem;
  }
  
  .nav-links .cta-btn {
    margin-left: 0;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .header-top .container {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2.5rem 0;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile improvements: better performance and touch targets */
@media (max-width: 900px) {
  body {
    background-attachment: scroll; /* avoid fixed bg on mobile */
    background-position: center top;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .mass-card {
    margin-top: 1.25rem;
  }
}

@media (max-width: 768px) {
  .logo-mark {
    width: 56px;
    height: 56px;
  }

  .logo-mark img {
    width: 56px;
    height: 56px;
  }

  .btn {
    min-height: 44px; /* recommended touch target */
    padding: 0.75rem 1rem;
  }

  .site-footer {
    padding: 2rem 0 1rem;
  }
}

@media (max-width: 480px) {
  body { font-size: 15px; }

  .logo-mark {
    width: 48px;
    height: 48px;
  }

  .logo-mark img {
    width: 48px;
    height: 48px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
    text-align: center;
  }

  .hero .container {
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 1.25rem;
  }

  .mass-card {
    order: 2;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }
}

/* Priest Message Section */
.priest-message-section {
  position: relative;
  background: rgba(255, 255, 255, 0.699);
  background-image: url('../images/message.JPG');
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

.priest-message-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(248, 246, 240, 0.85);
  pointer-events: none;
  z-index: 0;
}

.priest-message-section .container {
  position: relative;
  z-index: 1;
}

.priest-image-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.priest-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

/* Sacrament list + animations */
.sacraments-list {
  display: grid;
  gap: 2.5rem;
}

.sacrament {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(250,250,250,0.92));
  padding: 0.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.6s cubic-bezier(.2,.9,.2,1), box-shadow 0.3s ease;
}

.sacrament:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.sacrament-media {
  min-height: 320px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  transition: transform 0.9s ease, opacity 0.9s ease;
  opacity: 0.85;
  transform: scale(1.06) translateY(8px);
}

.sacrament-body { padding: 1.25rem; }

.sacrament-body h3 { margin-bottom: 0.5rem; font-size: 1.6rem; }
.sacrament-body h4 { margin-top: 1rem; color: var(--accent); }

.sacrament.in-view .sacrament-media { transform: scale(1) translateY(0); opacity: 1; }
.sacrament.in-view .sacrament-body { transform: translateY(0); opacity: 1; }

.sacrament-body { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }

/* Alternate layout for even items */
.sacrament:nth-child(even) { grid-template-columns: 1fr 1fr; }
.sacrament:nth-child(even) .sacrament-media { order: 2; }

@media (max-width: 900px) {
  .sacrament { grid-template-columns: 1fr; }
  .sacrament-media { min-height: 220px; }
  .sacrament:nth-child(even) .sacrament-media { order: 0; }
}

/* small tweaks for hero content visibility on load */
.hero-content.is-visible h1,
.hero-content.is-visible .subtitle,
.hero-content.is-visible .hero-actions { opacity: 1; transform: translateY(0); }

