/*
Theme Name: Reformed Baptist Church of Malabon
Theme URI: https://rebapmalabon.com/
Author: RBCM
Author URI: https://rebapmalabon.com/
Description: Custom WordPress theme for the Reformed Baptist Church of Malabon, built to replicate the church's Sermons, Hymns, and Pamphlets library along with its site-wide header, footer, contact and social information. Migrated from a Next.js site to WordPress.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rebap
*/

/* -------------------------------------------------
   0. Variables & Reset
------------------------------------------------- */
:root{
  --rbcm-navy: #16233c;
  --rbcm-navy-light: #1f3358;
  --rbcm-cream: #faf7f0;
  --rbcm-gold: #b08d4f;
  --rbcm-gold-dark: #8f6f39;
  --rbcm-text: #2a2a2a;
  --rbcm-muted: #6b6b6b;
  --rbcm-border: #e6e0d4;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1120px;
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--rbcm-text);
  background: var(--rbcm-cream);
  line-height: 1.65;
  font-size: 17px;
}

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

h1,h2,h3,h4,h5,h6{
  font-family: var(--font-heading);
  color: var(--rbcm-navy);
  line-height: 1.25;
  margin: 0 0 .5em;
}

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.screen-reader-text{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip: rect(1px,1px,1px,1px); white-space:nowrap;
}

.btn{
  display:inline-block;
  padding: 12px 26px;
  border-radius: 4px;
  font-weight:600;
  letter-spacing:.02em;
  border:2px solid var(--rbcm-gold);
  background: var(--rbcm-gold);
  color:#fff;
  transition: all .2s ease;
}
.btn:hover{ background: transparent; color: var(--rbcm-gold-dark); text-decoration:none; }
.btn.btn-outline{ background: transparent; color:#fff; }
.btn.btn-outline:hover{ background:#fff; color: var(--rbcm-navy); }

/* -------------------------------------------------
   1. Site Header
------------------------------------------------- */
.site-header{
  background: var(--rbcm-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.site-header .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.site-branding{ display:flex; align-items:center; gap:12px; }
.site-branding img{ max-height:56px; width:auto; }
.site-branding .site-title{
  color:#fff; font-size:1.15rem; margin:0; font-family: var(--font-heading);
}
.site-branding .site-title a{ color:#fff; }
.site-branding .site-title a:hover{ color: var(--rbcm-gold); text-decoration:none; }

.main-navigation ul{
  list-style:none; display:flex; gap: 28px; margin:0; padding:0;
}
.main-navigation a{
  color:#eee2c6;
  font-weight:600;
  font-size:.95rem;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.main-navigation a:hover, .main-navigation .current-menu-item > a{
  color: var(--rbcm-gold);
  text-decoration:none;
}
.menu-toggle{
  display:none;
  background:none;
  border: 2px solid var(--rbcm-gold);
  color: #fff;
  padding: 8px 12px;
  border-radius:4px;
  cursor:pointer;
}

@media (max-width: 800px){
  .menu-toggle{ display:inline-block; }
  .main-navigation{
    display:none;
    width:100%;
    order:3;
  }
  .main-navigation.is-open{ display:block; }
  .main-navigation ul{ flex-direction:column; gap:0; padding-bottom:12px; }
  .main-navigation li{ border-top:1px solid rgba(255,255,255,.1); }
  .main-navigation a{ display:block; padding:12px 4px; }
  .site-header .container{ flex-wrap:wrap; }
}

/* -------------------------------------------------
   2. Hero (front page)
------------------------------------------------- */
.hero{
  background: linear-gradient(160deg, var(--rbcm-navy) 0%, var(--rbcm-navy-light) 100%);
  color:#f5f1e6;
  text-align:center;
  padding: 90px 24px 100px;
}
.hero img.hero-logo{ margin: 0 auto 24px; max-height:120px; }
.hero h1{
  color:#fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom:.35em;
}
.hero p.tagline{
  color: var(--rbcm-gold);
  font-size: 1.15rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom: 2em;
}
.hero .hero-actions{ display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }

/* -------------------------------------------------
   3. Sections / cards
------------------------------------------------- */
.section{ padding: 64px 0; }
.section-title{
  text-align:center;
  margin-bottom: 44px;
}
.section-title h2{ font-size:1.9rem; }
.section-title .divider{
  width:60px; height:3px; background: var(--rbcm-gold);
  margin: 12px auto 0;
}

.card-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 28px;
}
.quick-link-card{
  background:#fff;
  border:1px solid var(--rbcm-border);
  border-radius:8px;
  padding: 34px 26px;
  text-align:center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.quick-link-card:hover{ transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.08); text-decoration:none; }
.quick-link-card h3{ margin-bottom:.4em; }
.quick-link-card p{ color: var(--rbcm-muted); margin:0; }

/* Sermon / hymn / pamphlet item cards */
.item-card{
  background:#fff;
  border:1px solid var(--rbcm-border);
  border-radius:8px;
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: box-shadow .2s ease;
}
.item-card:hover{ box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.item-card .item-meta{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  color: var(--rbcm-gold-dark);
  font-weight:700;
  margin-bottom:6px;
  display:flex;
  gap:10px;
  align-items:center;
}
.item-card .item-meta .sep{ color: var(--rbcm-border); }
.item-card h3{ margin:0 0 6px; font-size:1.25rem; }
.item-card h3 a{ color: var(--rbcm-navy); }
.item-card .item-excerpt{ color: var(--rbcm-muted); margin: 6px 0 0; }
.item-card .item-link{ font-weight:600; font-size:.9rem; }

.year-heading{
  margin: 44px 0 18px;
  padding-bottom:8px;
  border-bottom: 2px solid var(--rbcm-gold);
  font-size:1.5rem;
}
.year-heading:first-of-type{ margin-top:0; }

/* Filter buttons (sermon categories) */
.filter-bar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  margin-bottom: 40px;
}
.filter-bar a{
  padding: 8px 20px;
  border-radius: 30px;
  border: 2px solid var(--rbcm-navy);
  color: var(--rbcm-navy);
  font-weight:600;
  font-size:.9rem;
}
.filter-bar a:hover{ text-decoration:none; background: var(--rbcm-navy); color:#fff; }
.filter-bar a.active{ background: var(--rbcm-navy); color:#fff; }

/* Hymn alphabetical list */
.hymn-list{
  columns: 3 260px;
  column-gap: 40px;
  list-style:none;
  margin:0; padding:0;
}
.hymn-list li{
  break-inside: avoid;
  margin-bottom: 10px;
  padding-left: 4px;
  border-left: 3px solid var(--rbcm-border);
}
.hymn-list li a{ display:block; padding: 4px 12px; color: var(--rbcm-text); font-weight:500; }
.hymn-list li a:hover{ color: var(--rbcm-gold-dark); border-left-color: var(--rbcm-gold); text-decoration:none; }

/* -------------------------------------------------
   4. Single content pages
------------------------------------------------- */
.page-header-bar{
  background: var(--rbcm-navy);
  color:#fff;
  padding: 46px 0 40px;
  text-align:center;
}
.page-header-bar h1{ color:#fff; margin-bottom:.2em; }
.page-header-bar .item-meta{ color: var(--rbcm-gold); justify-content:center; }

.content-wrap{
  max-width: 780px;
  margin: 0 auto;
  padding: 50px 24px 80px;
  background:#fff;
}
.single-sermon .content-wrap,
.single-hymn .content-wrap,
.single-pamphlet .content-wrap{
  background:#fff;
  border-radius: 8px;
  margin-top: -40px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.sermon-meta-box{
  display:flex; gap: 30px; flex-wrap:wrap;
  background: var(--rbcm-cream);
  border: 1px solid var(--rbcm-border);
  border-radius: 8px;
  padding: 18px 24px;
  margin-bottom: 32px;
}
.sermon-meta-box div strong{ display:block; color: var(--rbcm-navy); font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; margin-bottom:2px; }

.hymn-lyrics{
  font-family: var(--font-heading);
  font-size: 1.15rem;
  white-space: pre-line;
  color: var(--rbcm-text);
}

.back-link{ display:inline-block; margin-top: 36px; font-weight:600; }

.download-btn{
  display:inline-flex; align-items:center; gap:8px;
  margin-top: 20px;
}

.entry-content h2{ margin-top:1.4em; }
.entry-content blockquote{
  border-left: 4px solid var(--rbcm-gold);
  margin: 1.2em 0;
  padding: .4em 1.2em;
  color: var(--rbcm-muted);
  font-style: italic;
  background: var(--rbcm-cream);
}

/* -------------------------------------------------
   5. Pagination
------------------------------------------------- */
.rbcm-pagination{
  display:flex; gap:8px; justify-content:center; margin-top: 40px; flex-wrap:wrap;
}
.rbcm-pagination a, .rbcm-pagination span{
  padding: 8px 14px; border:1px solid var(--rbcm-border); border-radius:4px; color: var(--rbcm-navy);
}
.rbcm-pagination .current{ background: var(--rbcm-navy); color:#fff; border-color: var(--rbcm-navy); }
.rbcm-pagination a:hover{ background: var(--rbcm-cream); text-decoration:none; }

/* -------------------------------------------------
   6. Site Footer
------------------------------------------------- */
.site-footer{
  background: var(--rbcm-navy);
  color: #cfd6e4;
  padding: 60px 0 26px;
  margin-top: 60px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-grid h4{
  color:#fff;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-size:.85rem;
  margin-bottom: 16px;
  font-family: var(--font-body);
}
.footer-about img{ max-height:50px; margin-bottom:14px; }
.footer-about .church-name{ color:#fff; font-family: var(--font-heading); font-size:1.2rem; margin-bottom:6px; }
.footer-about .church-tagline{ color: var(--rbcm-gold); font-size:.9rem; letter-spacing:.03em; }
.footer-links ul{ list-style:none; margin:0; padding:0; }
.footer-links li{ margin-bottom:10px; }
.footer-links a{ color:#cfd6e4; }
.footer-links a:hover{ color: var(--rbcm-gold); text-decoration:none; }
.footer-contact p{ margin: 0 0 10px; font-size:.95rem; }
.footer-social{ display:flex; gap:14px; margin-top:14px; }
.footer-social a{
  width:38px; height:38px; border-radius:50%;
  border: 1px solid rgba(255,255,255,.25);
  display:flex; align-items:center; justify-content:center;
  color:#fff;
}
.footer-social a:hover{ background: var(--rbcm-gold); border-color: var(--rbcm-gold); text-decoration:none; }
.footer-bottom{
  text-align:center;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 22px;
  font-size:.85rem;
  color:#8d96ac;
}

@media (max-width: 780px){
  .footer-grid{ grid-template-columns: 1fr; }
  .hymn-list{ columns: 2 180px; }
}
@media (max-width: 480px){
  .hymn-list{ columns: 1; }
}

/* No results */
.no-results{ text-align:center; padding: 60px 20px; color: var(--rbcm-muted); }
