/* St. Mary's Church, Waddington & St. John the Baptist Church, Madrid
   ---------------------------------------------------------------
   Colours, type and proportions carried over from the previous
   Joomla/Nicepage site; layout is plain CSS grid and flexbox. */

:root {
  --blue:       #478ac9;
  --blue-dark:  #4c7397;
  --blue-pale:  #adcce9;
  --grey-btn:   #666666;
  --grey-btn-d: #4d4d4d;
  --ink:        #111111;
  --grey-bg:    #f2f2f2;
  --rule:       #454545;
  --wrap:       1140px;
  --gutter:     30px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.6 "Open Sans", Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: Roboto, Arial, Helvetica, sans-serif;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 48px 0; }
.center { text-align: center; }

/* ---------- masthead ------------------------------------------------ */

.masthead { padding: 34px var(--gutter) 0; }

.site-title {
  font-size: 30px;
  text-align: center;
  text-wrap: balance;
  max-width: var(--wrap);
  margin: 0 auto;
}

/* ---------- church cards ---------------------------------------------- */

.churches { display: grid; grid-template-columns: 1fr 1fr; }
.church-photo { min-height: 480px; background-size: cover; background-position: 50% 50%; }

.church-info { display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.church-info > div { padding: 30px 44px; text-align: center; }

.church-name { font-size: 36px; margin-bottom: 10px; }
.church-addr { font-size: 24px; line-height: 1.5; margin-bottom: 20px; }
.mass-head { font-size: 36px; margin-bottom: 6px; }
.mass-time { font-size: 24px; margin-bottom: 6px; }
.mass-detail { font-size: 18px; line-height: 1.5; color: var(--ink); }

/* ---------- info band --------------------------------------------------- */

.info-band { background: var(--blue-pale); padding: 48px 0; text-align: center; }
.info-band h2 { font-size: 36px; margin-bottom: 26px; text-wrap: balance; }
.info-band p { font-size: 16px; line-height: 1.8; text-align: justify; max-width: 78ch; margin: 0 auto 20px; }
.info-band p:last-of-type { margin-bottom: 0; }

/* ---------- actions row ---------------------------------------------------- */

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 44px var(--gutter);
}

.actions img { width: 64px; height: 64px; }

.btn {
  display: inline-block;
  background: var(--grey-btn);
  color: #fff;
  font-size: 20px;
  text-align: center;
  text-decoration: none;
  padding: 22px 40px;
  transition: background-color .2s;
}

.btn:hover, .btn:focus-visible { background: var(--grey-btn-d); color: #fff; }

/* ---------- footer ------------------------------------------------------------ */

.site-footer {
  --f-bg:     #263a4f;   /* deep navy from the site's blue family */
  --f-bar:    #1d2d3e;
  --f-text:   #dbe4ec;
  --f-muted:  #a9bccd;
  --f-accent: #adcce9;   /* the site's pale blue */
  background: var(--f-bg);
  color: var(--f-text);
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.2fr 1fr 0.85fr;
  gap: 40px 48px;
  padding-top: 56px;
  padding-bottom: 48px;
}

.site-footer p, .footer-list, .footer-links { font-size: 16px; line-height: 1.6; }

.site-footer .footer-name {
  font-family: Roboto, Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
.footer-tag { color: var(--f-muted); margin-top: 10px; max-width: 26em; }

.footer-head {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 18px;
  padding-bottom: 10px;
  position: relative;
}
.footer-head::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 36px; height: 3px;
  border-radius: 2px;
  background: var(--f-accent);
}

.footer-list, .footer-links { list-style: none; margin: 0; padding: 0; }
.footer-list li { display: flex; gap: 12px; align-items: flex-start; }
.footer-list li + li { margin-top: 14px; }
.footer-list strong { color: #fff; font-weight: 700; }
.ficon { flex: none; margin-top: 4px; color: var(--f-accent); }

.footer-links li + li { margin-top: 10px; }

.site-footer a { color: var(--f-text); text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:focus-visible { outline: 2px solid var(--f-accent); outline-offset: 3px; border-radius: 2px; }
.footer-links a[aria-current="page"] { color: #fff; font-weight: 700; }

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 10px 18px;
  border: 1px solid rgba(173, 204, 233, .45);
  border-radius: 999px;
  font-size: 15px;
}
.footer-social .ficon { margin-top: 0; }
.site-footer .footer-social:hover { background: rgba(173, 204, 233, .12); text-decoration: none; }

.footer-bar { background: var(--f-bar); }
.footer-bar p {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px var(--gutter);
  text-align: center;
  font-size: 14px;
  color: var(--f-muted);
}

/* ---------- ministry schedules page --------------------------------------------- */

.page-title { font-size: 48px; font-weight: 700; margin-bottom: 30px; }

.schedule { display: grid; grid-template-columns: 260px 1fr; gap: 44px; align-items: start; }
.schedule img { width: 100%; }

table.ministry {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

table.ministry th, table.ministry td {
  border: 1px solid var(--rule);
  padding: 12px;
}

table.ministry th { font-weight: 700; }

/* ---------- youth faith formation page ------------------------------------------ */

.ff-sub { font-size: 26px; font-weight: 400; margin: -12px 0 8px; }
.ff-parishes { font-size: 18px; color: #444; }

.ff-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0 48px;
}
.ff-card {
  background: var(--grey-bg);
  border-left: 5px solid var(--blue);
  border-radius: 6px;
  padding: 22px 26px;
  font-size: 18px;
}
.ff-card h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 10px;
}
.ff-time, .ff-name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.ff-card a { overflow-wrap: anywhere; }

.ff-register {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
  background: var(--blue-pale);
  border-radius: 8px;
  padding: 24px 28px;
  margin: -16px 0 48px;
}
.ff-register h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.ff-register p { font-size: 17px; max-width: 34em; }
.ff-register-btn { background: var(--blue-dark); white-space: nowrap; }
.ff-register-btn:hover, .ff-register-btn:focus-visible { background: #3b5b78; }

.ff-cal-title { font-size: 30px; font-weight: 700; margin-bottom: 20px; }

.ff-cal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.ff-month {
  border: 1px solid #d9dfe5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.ff-month h3 {
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 10px 16px;
}
.ff-month ul { list-style: none; margin: 0; padding: 14px 16px 6px; font-size: 20px; }
.ff-month li { margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ff-event {
  background: var(--blue-pale);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}
.ff-note {
  margin: 0 16px 14px;
  padding-top: 8px;
  border-top: 1px dashed #c9d3dc;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
}

/* ---------- narrow screens ------------------------------------------------------- */

@media (max-width: 900px) {
  .churches, .church-info, .schedule { grid-template-columns: 1fr; }
  .church-photo { min-height: 300px; }
  .church-info > div { padding: 26px var(--gutter); }

  .site-title { font-size: 24px; }
  .church-name, .mass-head { font-size: 28px; }
  .church-addr, .mass-time { font-size: 20px; }
  .info-band h2 { font-size: 26px; }
  .page-title { font-size: 32px; }
  .actions { gap: 24px; }
  .btn { padding: 18px 28px; font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .schedule img { max-width: 260px; margin: 0 auto; }
  .ff-cal { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
  .ff-info { grid-template-columns: 1fr; }
  .ff-cal { grid-template-columns: 1fr 1fr; gap: 14px; }
  .ff-sub { font-size: 21px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; padding-bottom: 36px; }
  :root { --gutter: 20px; }
  .site-title { font-size: 21px; }
  .page-title { font-size: 26px; }
  table.ministry { font-size: 14px; }
  table.ministry th, table.ministry td { padding: 8px 4px; }
}
