/*
 Theme Name:   Beaver Builder Child
 Theme URI:    https://church.debug.victas.uca.org.au
 Description:  Child theme for Beaver Builder Theme
 Author:       Victas Web Team
 Author URI:   https://church.debug.victas.uca.org.au
 Template:     bb-theme
 Version:      1.0
*/
/* =========================================================
   UCA VICTAS – ACCESSIBLE BASE STYLES
   WCAG 2.1 AA – Beaver Builder Friendly
========================================================= */

/* =========================
   Default global styles (Accessible)
========================= */

/* Links: not color-only + keyboard focus */
a {
  color: #E42127;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover,
a:focus {
  color: #353535;
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
  background-color: rgba(0, 95, 204, 0.10);
}

/* Text spacing */
p { margin: 0 0 15px 0; }

/* Headings: keep your fonts but don’t crush readability */
h1 {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
}
h4 {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Lists: keep spacing, but don’t remove semantics */
ol li, ul li { margin-bottom: 15px; }

/* Avoid removing bullets globally (screen reader + semantics safe) */
.uca-page-content ul {
  color: #000000;
  font-size: 16px;
  line-height: 1.5em;
  margin-bottom: 30px !important;
  padding-left: 1.5rem; /* ensures bullets align */
}

/* Remove the risky global selector ".uca-page-content ul, li"
   (it affects ALL li site-wide). Target list items properly instead. */
.uca-page-content ul li {
  margin: 0 0 0.75em 0;
}

/* If you still want custom bullets visually, do it ONLY when you
   also keep list-style on OR apply to a special class (not globally). */

/* =====================================
   TABLES – ACCESSIBLE (WCAG 2.1 AA)
===================================== */

table {
  width: 100%;
  max-width: 100%;
  margin: 1rem auto;
  border-collapse: collapse;
  border: 1px solid #e0e0e0;
  border-bottom: 3px solid #E42127;
  background-color: #ffffff;
}

/* Caption: REQUIRED for screen readers */
table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #000000;
}

/* Header cells */
table th {
  background-color: #E42127;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  text-align: left;
  border: 1px solid #ddd;
  padding: 12px 16px;
}

/* Data cells */
table td {
  color: #000000;
  border: 1px solid #ddd;
  padding: 12px 16px;
  vertical-align: top;
}

/* Zebra striping – visual aid (not meaning) */
table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Hover + keyboard focus parity */
table tbody tr:hover,
table tbody tr:focus-within {
  background-color: #f4f4f4;
}

/* Ensure links inside tables are clear */
table a {
  color: #000000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
table a:hover,
table a:focus {
  color: #E42127;
}
table a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Remove legacy last-column hack safely */
table th.last {
  border-right: 1px solid #ddd;
}

/* =====================================
   BLOCKQUOTE – ACCESSIBLE (WCAG 2.1 AA)
===================================== */

.fl-page-content blockquote {
  background-color: #f9f9f9;
  border-left: 5px solid #E42127;
  margin: 1.5em 0;
  padding: 1.25rem 1.5rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  line-height: 1.4;
  color: #000000;
  position: relative;
}

/* Decorative quote – visually helpful, screen-reader safe */
.fl-page-content blockquote::before {
  content: "“";
  font-size: 4rem;
  color: #ccc;
  position: absolute;
  top: 0.25rem;
  left: 0.5rem;
  line-height: 1;
  aria-hidden: true;
}

/* Remove closing quote to avoid duplication */
.fl-page-content blockquote::after {
  content: none;
}

/* Paragraphs inside blockquote */
.fl-page-content blockquote p {
  margin: 0;
  display: block;
  text-transform: none; /* REMOVE forced uppercase */
}

/* Cite / attribution */
.fl-page-content blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-style: normal;
  color: #353535;
}

/* =====================================
   HEADER SEARCH – ACCESSIBLE
===================================== */

.site-header .search-form {
  position: relative;
}

/* Search input */
.site-header .search-field {
  background-color: transparent;
  background-image: url(images/search-icon.png);
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 24px 24px;
  border: 2px solid transparent;
  cursor: pointer;
  height: 40px;
  padding-left: 40px;
  width: 40px;
  transition: width 300ms ease, background-color 300ms ease;
}

/* Keyboard + focus support */
.site-header .search-field:focus,
.site-header .search-field:focus-visible {
  width: 230px;
  background-color: #ffffff;
  border-color: #005fcc;
  cursor: text;
  outline: none;
}

/* Placeholder contrast */
.site-header .search-field::placeholder {
  color: #555;
}

/* Hide submit button visually, not from screen readers */
.search-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* =====================================
   FULL SCREEN SEARCH – ACCESSIBLE
===================================== */

#full-screen-search {
  position: fixed;
  inset: 0;
  background-color: #000000;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

/* Open state */
#full-screen-search.open {
  opacity: 1;
  visibility: visible;
}

/* Trap visual focus */
#full-screen-search:focus-within {
  outline: none;
}

/* Close button */
#full-screen-search button.close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
}

/* Focus state for close button */
#full-screen-search button.close:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 4px;
}

/* Search form container */
#full-screen-search form {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Search input wrapper */
#full-screen-search form div {
  width: 90%;
  max-width: 600px;
}

/* Search input */
#full-screen-search input[type="search"] {
  width: 100%;
  height: auto;
  padding: 1.25rem 2rem;
  font-size: 2rem;
  border-radius: 999px;
  border: 3px solid transparent;
  background-color: #eeeeee;
  color: #000000;
}

/* Placeholder contrast */
#full-screen-search input[type="search"]::placeholder {
  color: #444;
}

/* Focus state */
#full-screen-search input[type="search"]:focus-visible {
  border-color: #005fcc;
  outline: none;
}

/* Hide submit button accessibly */
#full-screen-search input[type="submit"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .site-header .search-field,
  #full-screen-search {
    transition: none;
  }
}

/* =====================================
   CHURCH / FIND A CHURCH – ACCESSIBLE
===================================== */

.church-details,
.church-card,
.church-listing {
  color: #000000;
  line-height: 1.6;
}

/* Church card */
.church-card {
  border: 1px solid #ddd;
  padding: 1.25rem;
  background: #ffffff;
  margin-bottom: 1.5rem;
}

/* Hover + keyboard parity */
.church-card:hover,
.church-card:focus-within {
  background-color: #f9f9f9;
}

/* Church name */
.church-card h3,
.church-details h1 {
  margin-top: 0;
  line-height: 1.3;
}

/* Church name link */
.church-card h3 a {
  color: #E42127;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.church-card h3 a:hover,
.church-card h3 a:focus-visible {
  color: #353535;
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

/* Meta information */
.church-meta,
.church-address,
.church-services,
.church-contact {
  margin-bottom: 0.75rem;
}

/* Icon + text rows */
.church-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Icons are decorative */
.church-meta-row i {
  color: #666;
  aria-hidden: true;
}

/* Service times list */
.church-services ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.church-services li {
  margin-bottom: 0.5rem;
}

/* Church action buttons */
.church-actions a,
.church-actions button {
  display: inline-block;
  background: #E42127;
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 20px;
  margin-right: 0.5rem;
  text-decoration: none;
  font-size: 16px;
}

/* Hover + focus */
.church-actions a:hover,
.church-actions a:focus-visible,
.church-actions button:hover,
.church-actions button:focus-visible {
  background: #000000;
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

/* Embedded map wrapper */
.church-map {
  margin-top: 1.5rem;
}

/* Accessible fallback text */
.church-map + .map-fallback {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

/* Search / filter inputs */
.church-filter input,
.church-filter select {
  font-size: 16px;
  padding: 8px 10px;
  border: 2px solid #ccc;
}

/* Focus */
.church-filter input:focus-visible,
.church-filter select:focus-visible {
  border-color: #005fcc;
  outline: none;
}
.church-no-results {
  background: #fbeaea;
  border-left: 5px solid #d63638;
  padding: 1rem;
  margin-top: 1.5rem;
}







