/* ============================================================
   St Mary's Knanaya Catholic Forane Church — main.css
   Mobile-first, no external dependencies
   ============================================================ */

/* ---------- Reset & Variables ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #1a2c5b;
  --gold:   #b8860b;
  --gold-lt:#d4a017;
  --cream:  #faf7f2;
  --white:  #ffffff;
  --gray:   #6b7280;
  --gray-lt:#f3f4f6;
  --text:   #1f2937;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,0.10);
  --font:   Georgia, 'Times New Roman', serif;
  --sans:   system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

h1,h2,h3,h4 {
  font-family: var(--font);
  color: var(--navy);
  line-height: 1.2;
}

/* ---------- Utility ---------- */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 3rem 0; }
.section-alt { background: var(--cream); }
.section-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.divider {
  width: 60px; height: 3px;
  background: var(--gold);
  margin: 0.75rem auto 2rem;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-primary  { background: var(--gold); color: var(--white); }
.btn-outline  { border: 2px solid var(--white); color: var(--white); }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.nav-brand {
  display: flex; align-items: center;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  text-decoration: none;
}
.nav-brand .brand-name  { font-size: 0.95rem; font-weight: bold; }
.nav-brand:hover { text-decoration: none; }

.nav-toggle {
  background: none; border: none; cursor: pointer;
  padding: 0.25rem; display: flex; flex-direction: column; gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  display: none;
  flex-direction: column;
  background: var(--navy);
  padding: 0.5rem 1.25rem 1rem;
}
.nav-menu.open { display: flex; }

.nav-menu a {
  color: var(--white);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.nav-menu a:last-child { border-bottom: none; }
.nav-menu a:hover, .nav-menu a.active { color: var(--gold-lt); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
              url('../images/church_althara.jpg') center/cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 4rem 1.25rem;
}
.hero-cross {
  font-size: 2.5rem; color: var(--gold-lt); margin-bottom: 0.75rem;
}
.hero h1 {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.hero p  {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 1.75rem;
}
.hero-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ---------- Quick-info bar ---------- */
.quick-info {
  background: var(--gold);
  color: var(--white);
  padding: 0.85rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}
.quick-info a { color: var(--white); text-decoration: underline; }

/* ---------- Welcome ---------- */
.welcome-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}
.welcome-text h2 { margin-bottom: 0.75rem; }
.welcome-text p  { color: var(--gray); max-width: 560px; margin: 0 auto 1rem; }

/* ---------- Mass times (home preview) ---------- */
.mass-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.mass-card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.mass-card .day  { font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.mass-card .time { color: var(--gold); font-size: 1.1rem; font-weight: 600; margin: 0.25rem 0; }
.mass-card .note { font-size: 0.78rem; color: var(--gray); }

/* ---------- Events ---------- */
.events-grid {
  display: grid;
  gap: 1.25rem;
}
.event-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.event-date {
  min-width: 52px; text-align: center;
  background: var(--navy); color: var(--white);
  border-radius: var(--radius);
  padding: 0.4rem;
}
.event-date .month { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; }
.event-date .day   { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.event-info h3     { font-size: 1rem; margin-bottom: 0.2rem; }
.event-info p      { font-size: 0.85rem; color: var(--gray); }

/* ---------- New Here CTA ---------- */
.cta-band {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 3rem 1.25rem;
}
.cta-band h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-band p  { color: rgba(255,255,255,0.75); max-width: 500px; margin: 0 auto 1.5rem; }

/* ---------- About page ---------- */
.staff-grid {
  display: grid;
  gap: 1.5rem;
}
.staff-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
}
.staff-card img {
  width: 100%; height: auto;
}
.staff-card-body { padding: 1rem; }
.staff-card h3   { font-size: 0.95rem; margin-bottom: 0.15rem; }
.staff-card .role{ color: var(--gold); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
.staff-card p    { color: var(--gray); font-size: 0.85rem; }

.prose { max-width: 700px; margin: 0 auto; }
.prose p { color: var(--gray); margin-bottom: 1rem; line-height: 1.8; }
.prose h3 { color: var(--navy); margin: 1.5rem 0 0.5rem; }

.values-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.value-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
}
.value-item h4 { color: var(--navy); margin-bottom: 0.4rem; }
.value-item p  { color: var(--gray); font-size: 0.9rem; }

/* ---------- Services / Mass times page ---------- */
.mass-table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.95rem;
}
th {
  background: var(--navy); color: var(--white);
  padding: 0.75rem 1rem; text-align: left;
}
td { padding: 0.7rem 1rem; border-bottom: 1px solid #e5e7eb; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--gray-lt); }
.badge {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--gold); color: var(--white);
  vertical-align: middle; margin-left: 0.4rem;
}

.info-cards {
  display: grid; gap: 1rem; margin-top: 2rem;
}
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.info-card h3 { color: var(--navy); margin-bottom: 0.5rem; font-size: 1rem; }
.info-card p  { color: var(--gray); font-size: 0.9rem; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid; gap: 2rem;
}
.contact-details { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; gap: 0.75rem; align-items: flex-start;
}
.contact-icon {
  font-size: 1.25rem; min-width: 2rem; text-align: center; color: var(--gold);
}
.contact-item h4 { font-size: 0.85rem; color: var(--gray); margin-bottom: 0.1rem; }
.contact-item p, .contact-item a { font-size: 0.95rem; color: var(--text); }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-embed iframe { display: block; width: 100%; height: 280px; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; gap: 2rem;
}
.footer-brand { color: var(--white); font-family: var(--font); font-size: 1rem; margin-bottom: 0.5rem; }
.footer-col h4 { color: var(--gold-lt); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.footer-col p, .footer-col a { font-size: 0.85rem; color: rgba(255,255,255,0.7); line-height: 1.8; }
.footer-col a:hover { color: var(--gold-lt); }
.footer-bottom {
  max-width: 1100px; margin: 1.5rem auto 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
  font-size: 0.78rem;
  text-align: center;
  color: rgba(255,255,255,0.45);
}

/* ---------- Page banner ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #2d4a8a 100%);
  color: var(--white);
  padding: 2.5rem 1.25rem;
  text-align: center;
}
.page-banner h1 { color: var(--white); font-size: 1.75rem; }
.page-banner p  { color: rgba(255,255,255,0.7); margin-top: 0.4rem; font-size: 0.95rem; }
.breadcrumb     { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-bottom: 0.5rem; }
.breadcrumb a   { color: rgba(255,255,255,0.6); }

/* ============================================================
   TABLET  ≥ 640px
   ============================================================ */
@media (min-width: 640px) {
  .hero h1          { font-size: 2.25rem; }
  .mass-cards       { grid-template-columns: repeat(3, 1fr); }
  .events-grid      { grid-template-columns: 1fr 1fr; }
  .staff-grid       { grid-template-columns: 1fr 1fr; }
  .values-grid      { grid-template-columns: 1fr 1fr; }
  .info-cards       { grid-template-columns: 1fr 1fr; }
  .footer-inner     { grid-template-columns: 2fr 1fr 1fr; }
  #mass-times > .container > div { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   DESKTOP  ≥ 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .nav-toggle       { display: none; }
  .nav-brand, .nav-brand .brand-name { font-size: 1.25rem; }
  .nav-menu {
    display: flex !important;
    flex-direction: row;
    background: transparent;
    padding: 0; gap: 0.25rem;
  }
  .nav-menu a {
    border-bottom: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
  }
  .nav-menu a:hover, .nav-menu a.active {
    background: rgba(255,255,255,0.12);
  }
  .hero             { padding: 6rem 1.25rem; }
  .hero h1          { font-size: 2.75rem; }
  .hero p           { font-size: 1.1rem; }
  .mass-cards       { grid-template-columns: repeat(5, 1fr); }
  .welcome-grid     { flex-direction: row; text-align: left; gap: 3rem; }
  .welcome-grid .welcome-text p { margin: 0 0 1rem; }
  .staff-grid       { grid-template-columns: repeat(3, 1fr); }
  .values-grid      { grid-template-columns: repeat(3, 1fr); }
  .info-cards       { grid-template-columns: repeat(3, 1fr); }
  .contact-grid     { grid-template-columns: 1fr 1.4fr; }
  .map-embed iframe { height: 360px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .hero-btns, .cta-band { display: none; }
  body { color: #000; font-size: 11pt; }
  h1,h2,h3 { color: #000; }
  a { color: #000; text-decoration: underline; }
}
