/* 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 { background: var(--grey-bg); padding: 48px var(--gutter); text-align: center; }
.site-footer p { font-size: 30px; line-height: 1.4; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }

/* ---------- 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; }

/* ---------- 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; }
  .site-footer p { font-size: 22px; }
  .schedule img { max-width: 260px; margin: 0 auto; }
}

@media (max-width: 575px) {
  :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; }
}
