/* =========================
   ST. RITA PARISH - MAIN UI
   Catholic / modern / restrained
   ========================= */

* {
  box-sizing: border-box;
}

:root {
  --brand: #7a1f2b;            /* cardinal red */
  --brand-deep: #3d1020;       /* deep wine */
  --brand-soft: #962838;       /* lighter accent red */
  --navy: #0f1a2b;             /* midnight blue */
  --navy-soft: #1b2b44;        /* softer navy */
  --gold: #c5a46d;             /* liturgical gold */
  --gold-soft: #eadcc3;
  --ivory: #faf7f2;
  --bg: #f5f1ea;
  --bg-soft: #fcfaf7;
  --card-bg: rgba(255, 255, 255, 0.94);
  --text: #1d1b1a;
  --muted: #6d655f;
  --border: rgba(122, 31, 43, 0.10);
  --shadow: 0 16px 38px rgba(15, 26, 43, 0.08);
  --shadow-soft: 0 8px 22px rgba(15, 26, 43, 0.05);
  --radius: 18px;
  --radius-sm: 12px;
  --gap: 16px;
  --max-width: 1120px;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top right, rgba(197, 164, 109, 0.05), transparent 25%),
    linear-gradient(to bottom, #f8f4ee, var(--bg));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-soft);
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(122, 31, 43, 0.18);
  outline-offset: 3px;
}

/* =========================
   HEADER / NAV
   ========================= */

.site-header {
  background:
    linear-gradient(135deg, rgba(15, 26, 43, 0.96), rgba(61, 16, 32, 0.96));
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.header-left {
  display: flex;
  align-items: center;
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ccc;
  margin-right: 10px;
}

.brand h1 {
  font-size: 20px;
  margin: 0;
}


.site-header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.25px;
  color: #fff;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-header nav a {
  position: relative;
  color: #f7efef;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.96rem;
}

.site-header nav a:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.site-header nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.site-header nav a:hover::after,
.site-header nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.10);
}

/* =========================
   LAYOUT
   ========================= */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 30px auto;
  padding: 0 18px;
}

section {
  margin-bottom: 28px;
}

h1, h2, h3, h4 {
  line-height: 1.25;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.75rem;
  color: var(--navy);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--brand-deep);
}

h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--navy);
}

p {
  margin: 0 0 12px;
}

.meta,
.small,
.muted {
  color: var(--muted);
}

.meta {
  font-size: 0.94rem;
}

/* =========================
   HERO
   ========================= */

.hero {
  border-radius: 24px;
  padding: 64px 32px;
  background:
    radial-gradient(circle at top right, rgba(197, 164, 109, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(15, 26, 43, 0.97), rgba(122, 31, 43, 0.92));
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.04) 45%, transparent 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.hero h2 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.hero-text {
  font-size: 1.04rem;
  color: rgba(255, 255, 255, 0.94);
  max-width: 650px;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================
   SECTIONS / CARDS
   ========================= */

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 6px;
}

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

.card,
.preview-card,
.quick-card,
.admin-card {
  background: var(--card-bg);
  border: 1px solid rgba(197, 164, 109, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card:hover,
.preview-card:hover,
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(15, 26, 43, 0.10);
  border-color: rgba(197, 164, 109, 0.34);
}

.card + .card {
  margin-top: 16px;
}

.card-list,
.quick-info-grid,
.schedule-grid,
.contact-grid,
.admin-sections {
  display: grid;
  gap: 18px;
}

.quick-info-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.schedule-grid,
.card-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.quick-card h3 {
  margin-bottom: 8px;
}

.clean-list,
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.clean-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.list li {
  background: var(--bg-soft);
  margin: 8px 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* =========================
   BUTTONS
   ========================= */

.btn,
button {
  font: inherit;
}

.btn,
.admin-btn,
.contact-form button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 18px rgba(122, 31, 43, 0.20);
}

.btn:hover,
.admin-btn:hover,
.contact-form button:hover,
button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.10);
}

.directions-btn {
  display: inline-block;
  margin-top: 12px;
  background: var(--navy-soft);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: 0.3s ease;
}

.directions-btn:hover {
  background: var(--navy);
  color: #fff;
}

/* =========================
   FORMS
   ========================= */

form input,
form textarea,
form select,
.contact-form input,
.contact-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 12px;
  border: 1px solid #d8d2cb;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

form input:focus,
form textarea:focus,
form select:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: rgba(122, 31, 43, 0.35);
  box-shadow: 0 0 0 4px rgba(122, 31, 43, 0.07);
}

form textarea,
.contact-form textarea,
.admin-form textarea {
  resize: vertical;
}

form label,
.admin-form label {
  display: block;
  margin-bottom: 6px;
  color: #4d423b;
  font-weight: 600;
  font-size: 0.95rem;
}

iframe {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
}

/* =========================
   DAILY READINGS
   ========================= */

#daily-readings-full .card h3 {
  color: var(--brand-deep);
}

#language-note .card {
  background: #fff8f2;
  border-color: rgba(184, 148, 91, 0.24);
}

button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: #fff;
}

button[aria-pressed="false"] {
  background: #efe7dc;
  color: var(--brand-deep);
  box-shadow: none;
  border: 1px solid rgba(122, 31, 43, 0.08);
}

button[aria-pressed="false"]:hover {
  background: #e6dacb;
}

/* =========================
   ABOUT / CONTENT PAGES
   ========================= */

.h1-about {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  color: var(--brand-deep);
}

hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 24px 0;
}

/* =========================
   CONTACT
   ========================= */

.contact-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

/* =========================
   ADMIN
   ========================= */

.admin-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 32px;
}

.admin-sections {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  width: 100%;
  margin-top: 24px;
}

.admin-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--brand-deep);
  text-align: center;
}

.admin-divider {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 18px 0 12px;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
    margin-top: auto;
  background: linear-gradient(135deg, var(--navy), var(--brand-deep));
  color: #f6f0ec;
  text-align: center;
  padding: 24px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer i,
.site-footer a {
  color: inherit;
}

.footer-link {
  position: relative;
  color: var(--gold-soft);
  text-decoration: underline;
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.footer-link:hover::after {
  transform: scaleX(1);
}

.privacy-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.privacy-modal-content {
  background: #fff;
  color: var(--text);
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  border-radius: 18px;
  position: relative;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.close-privacy {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  color: #333;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: none;
}

/* =========================
   UTILITIES / ANIMATIONS
   ========================= */

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 1.0s ease forwards;
}

.fade-up.delay-1 { animation-delay: 0.16s; }
.fade-up.delay-2 { animation-delay: 0.24s; }
.fade-up.delay-3 { animation-delay: 0.32s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   MOBILE
   ========================= */

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

@media (max-width: 768px) {
  .site-header {
    position: sticky;
    top: 0;
    align-items: center;
    padding-right: 60px;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1101;
  }

  .site-header nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(78vw, 320px);
    height: 100vh;
    background: linear-gradient(180deg, var(--brand-deep), var(--navy));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 80px 18px 24px;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.16);
    z-index: 1100;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    will-change: transform;
  }

  .site-header nav.open {
    transform: translateX(0);
  }

  .site-header nav a {
    width: 100%;
    color: #f7efef;
    padding: 12px 14px;
    border-radius: 10px;
  }

  .container {
    padding: 0 14px;
  }

  .container,
    main,
    section {
    max-width: 100%;
    }

  .hero {
    padding: 40px 22px;
    border-radius: 18px;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-info-grid,
  .schedule-grid,
  .card-list,
  .admin-sections {
    grid-template-columns: 1fr;
  }

  .card,
  .preview-card,
  .quick-card,
  .admin-card {
    padding: 16px;
  }
}

/* CHATBOT */
.chatbot-shell {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
}

.chatbot-toggle {
  border-radius: 999px;
  padding: 12px 16px;
}

.chatbot-panel {
  width: min(360px, calc(100vw - 32px));
  margin-top: 10px;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(122,31,43,0.12);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15,26,43,0.16);
  overflow: hidden;
}

.chatbot-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--navy), var(--brand-deep));
  color: #fff;
}

.chatbot-messages {
  max-height: 320px;
  overflow-y: auto;
  padding: 12px;
  background: #fcfaf7;
}

.chatbot-message {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.5;
}

.chatbot-message.bot {
  background: #f2ece4;
  color: var(--text);
}

.chatbot-message.user {
  background: #e8d7bc;
  color: #2a1b14;
}

.chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}

.chatbot-form input {
  flex: 1;
  margin-bottom: 0;
}

.chatbot-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.chatbot-quick button {
  background: #f4f4f4;
  border: none;
  color: #000;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
}

.chatbot-quick button:hover {
  background: #ddd;
  color: #000;
}

.typing {
  font-style: italic;
  opacity: 0.7;
}

.countdown {
  margin-top: 10px;
  font-weight: bold;
  color: #b22222; /* Catholic red vibe */
}

.event-started {
  color: green;
  font-weight: bold;
}

.event-ended {
  color: gray;
  font-weight: bold;
}