/*
Theme Name: CDT Diocese of Tonga
Theme URI: https://www.catholicdiocese.to
Author: Catholic Diocese of Tonga
Author URI: https://www.catholicdiocese.to
Description: Official theme for the Catholic Diocese of Tonga (Toutaimana Diocesan Centre, Nuku'alofa).
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cdt-diocese
Tags: church, catholic, diocese, tonga, pacific
*/

/* ── VARIABLES ── */
:root {
  --navy: #1a2c5b;
  --gold: #b8892a;
  --gold-light: #d4a84b;
  --cream: #faf7f2;
  --white: #ffffff;
  --gray: #6b7280;
  --light-gray: #f3f4f6;
  --text: #1f2937;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

img { max-width: 100%; height: auto; }
a { color: var(--gold); }

/* ── HEADER / NAV ── */
#site-header {
  background: var(--navy);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
}
.logo-block { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.logo-icon {
  width: 56px; height: 56px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: white; flex-shrink: 0;
}
.logo-text { color: var(--white); }
.logo-text .site-title { font-size: 1.05rem; font-weight: bold; letter-spacing: .02em; display: block; }
.logo-text .site-tagline { font-size: .78rem; color: var(--gold-light); display: block; }

/* WordPress nav menu */
#primary-navigation { display: flex; align-items: center; }
#primary-navigation ul { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; }
#primary-navigation ul li a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: .82rem;
  padding: .5rem .85rem;
  border-radius: 4px;
  transition: background .2s, color .2s;
  letter-spacing: .03em;
  text-transform: uppercase;
  display: block;
}
#primary-navigation ul li a:hover,
#primary-navigation ul li.current-menu-item > a,
#primary-navigation ul li.current_page_item > a {
  background: var(--gold);
  color: var(--white);
}
#primary-navigation ul ul { display: none; }

/* ── HERO ── */
.cdt-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2d4a8a 60%, #1a3a6b 100%);
  color: var(--white);
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}
.cdt-hero::before {
  content: '✝';
  position: absolute;
  font-size: 20rem;
  opacity: .04;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.cdt-hero h1 { font-size: 2.6rem; margin-bottom: .5rem; text-shadow: 0 2px 4px rgba(0,0,0,.3); }
.cdt-hero .hero-subtitle { font-size: 1.15rem; color: var(--gold-light); margin-bottom: 1.5rem; font-style: italic; }
.cdt-hero p { max-width: 640px; margin: 0 auto 2rem; opacity: .9; font-size: 1rem; }

/* page banner (non-home) */
.page-banner {
  background: linear-gradient(135deg, var(--navy), #2d4a8a);
  color: white;
  padding: 3.5rem 2rem;
  text-align: center;
}
.page-banner .banner-label {
  color: var(--gold-light);
  font-family: Arial, sans-serif;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .5rem;
  display: block;
}
.page-banner h1 { font-size: 2.2rem; }
.page-banner p { opacity: .8; max-width: 540px; margin: .75rem auto 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: .7rem 1.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: .9rem;
  font-weight: bold;
  letter-spacing: .04em;
  transition: background .2s;
  border: none; cursor: pointer;
}
.btn:hover { background: var(--gold-light); color: var(--white); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  margin-left: .75rem;
}
.btn-outline:hover { background: var(--gold); }

/* ── SECTIONS ── */
.cdt-section { padding: 4rem 2rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-size: 1.9rem;
  color: var(--navy);
  margin-bottom: .4rem;
  padding-bottom: .6rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px; height: 3px;
  background: var(--gold);
  margin-top: .5rem;
}
.section-intro { color: var(--gray); max-width: 680px; margin-bottom: 2.5rem; }

/* ── CARDS ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); transform: translateY(-2px); }
.card-icon { font-size: 2rem; margin-bottom: .75rem; }
.card h3 { color: var(--navy); margin-bottom: .5rem; font-size: 1.1rem; }
.card p { color: var(--gray); font-size: .92rem; }
.card-link { color: var(--gold); font-family: Arial, sans-serif; font-size: .85rem; text-decoration: none; display: inline-block; margin-top: .75rem; }

/* ── ALTERNATING BG ── */
.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy .section-title { color: var(--white); }
.bg-navy .section-title::after { background: var(--gold-light); }
.bg-navy .section-intro { color: rgba(255,255,255,.7); }
.bg-navy .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.bg-navy .card h3 { color: var(--gold-light); }
.bg-navy .card p { color: rgba(255,255,255,.7); }

/* ── STATS STRIP ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.stat-card { text-align: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 1.75rem; }
.stat-card .stat-number { font-size: 2.5rem; font-weight: bold; color: var(--gold-light); }
.stat-card .stat-label { color: rgba(255,255,255,.7); font-family: Arial, sans-serif; font-size: .85rem; margin-top: .25rem; }

/* ── BISHOP BLOCK ── */
.bishop-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}
.bishop-photo-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 4px solid var(--gold);
}
.bishop-photo-wrap img { width: 100%; display: block; }
.bishop-photo-placeholder {
  width: 100%; height: 340px;
  background: linear-gradient(135deg, var(--navy), #2d4a8a);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--gold-light); font-size: 5rem;
}
.bishop-photo-placeholder span { font-size: .85rem; color: rgba(255,255,255,.6); margin-top: .5rem; font-family: Arial, sans-serif; }
.bishop-motto {
  background: var(--cream); border-radius: 8px; padding: 1.25rem;
  margin-top: 1rem; border-left: 4px solid var(--gold);
}
.bishop-motto blockquote { font-style: italic; color: var(--navy); font-size: 1.05rem; margin-bottom: .25rem; }
.bishop-motto cite { color: var(--gray); font-size: .85rem; font-family: Arial, sans-serif; }
.bishop-details .cardinal-prefix { color: var(--gold); font-family: Arial, sans-serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .25rem; }
.bishop-details h2 { color: var(--navy); font-size: 1.8rem; margin-bottom: .25rem; }
.bishop-details .bishop-role { color: var(--gold); font-size: 1rem; font-family: Arial, sans-serif; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: .06em; }
.bishop-details p { margin-bottom: 1rem; color: var(--gray); }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.5rem 0; }
.fact { background: var(--cream); padding: .75rem 1rem; border-radius: 6px; border-left: 3px solid var(--gold); }
.fact .fact-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray); font-family: Arial, sans-serif; }
.fact .fact-value { font-size: .95rem; color: var(--navy); font-weight: bold; }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--gold), var(--navy));
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 2.5rem; padding-left: 1.5rem; }
.timeline-item::before {
  content: ''; position: absolute;
  left: -2.2rem; top: .4rem;
  width: 14px; height: 14px;
  background: var(--gold); border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-year { color: var(--gold); font-weight: bold; font-family: Arial, sans-serif; font-size: .85rem; letter-spacing: .08em; }
.timeline-item h3 { color: var(--navy); margin: .2rem 0 .4rem; }
.timeline-item p { color: var(--gray); font-size: .93rem; }

/* ── TABLE ── */
.cdt-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.cdt-table th {
  background: var(--navy); color: var(--white);
  padding: .75rem 1rem; text-align: left;
  font-family: Arial, sans-serif; font-size: .82rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.cdt-table td { padding: .7rem 1rem; border-bottom: 1px solid #e5e7eb; font-size: .93rem; }
.cdt-table tr:hover td { background: var(--cream); }
.cdt-table tr:last-child td { border-bottom: none; }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info h3 { color: var(--navy); margin-bottom: .75rem; font-size: 1rem; font-family: Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.contact-info p { color: var(--gray); margin-bottom: 1.5rem; }
.contact-note { background: var(--cream); padding: 1.25rem; border-radius: 8px; border-left: 4px solid var(--gold); color: var(--gray); font-size: .9rem; }
.map-placeholder {
  background: var(--light-gray); border-radius: 8px; height: 300px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-family: Arial, sans-serif; font-size: .9rem;
  border: 1px solid #e5e7eb; flex-direction: column; gap: .5rem;
}
.contact-form { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }
.contact-form input,
.contact-form textarea {
  padding: .75rem; border: 1px solid #d1d5db; border-radius: 6px;
  font-family: Arial, sans-serif; font-size: .9rem; width: 100%;
}
.contact-form textarea { resize: vertical; }

/* ── BANNER STRIP ── */
.banner-strip {
  background: var(--navy); color: var(--white);
  text-align: center; padding: 3rem 2rem;
}
.banner-strip h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.banner-strip p { color: var(--gold-light); margin-bottom: 1.5rem; }

/* ── TWO-COL ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.two-col p { color: var(--gray); margin-bottom: 1rem; }
.feature-box {
  background: linear-gradient(135deg, var(--navy), #2d4a8a);
  border-radius: 8px; padding: 2.5rem;
  text-align: center; color: white;
}
.feature-box .feature-icon { font-size: 4rem; margin-bottom: 1rem; }
.feature-box .feature-title { font-size: 1.1rem; font-weight: bold; margin-bottom: .5rem; }
.feature-box .feature-role { color: var(--gold-light); font-size: .85rem; font-family: Arial, sans-serif; margin-bottom: 1rem; }
.feature-box .feature-detail { font-size: .85rem; opacity: .8; }

/* ── QUOTE BOX ── */
.diocese-table { width: 100%; font-size: .9rem; color: var(--gray); }
.diocese-table td { padding: .3rem 0; }
.diocese-table td:first-child { font-weight: bold; color: var(--text); width: 45%; }

/* ── NOTICE ── */
.notice-box { background: var(--cream); padding: 1rem; border-radius: 6px; border-left: 4px solid var(--gold); font-family: Arial, sans-serif; font-size: .9rem; color: var(--gray); margin-bottom: 2rem; }

/* ── FOOTER ── */
#site-footer {
  background: #111827;
  color: rgba(255,255,255,.7);
  padding: 3rem 2rem 1.5rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem; padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
#site-footer h4 { color: var(--gold-light); margin-bottom: .75rem; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; font-family: Arial, sans-serif; }
#site-footer p { font-size: .85rem; line-height: 1.6; }
#site-footer a { color: rgba(255,255,255,.7); text-decoration: none; display: block; margin-bottom: .35rem; font-size: .85rem; transition: color .2s; }
#site-footer a:hover { color: var(--gold-light); }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav ul li a { display: block; }
.footer-copy {
  max-width: 1100px; margin: 1.25rem auto 0;
  font-size: .78rem; opacity: .5; text-align: center;
  font-family: Arial, sans-serif;
}

/* ── WORDPRESS DEFAULTS ── */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-caption { max-width: 100%; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .bishop-block { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  #primary-navigation { display: none; }
  .cdt-hero h1 { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
