/*
Theme Name: Apostolic Media
Theme URI: https://apostolicsee.info
Author: Apostolic Media Network
Author URI: https://apostolicsee.info
Description: A clean, fast custom theme for the Apostolic Media Network and Our Lady of Katunayake's Shrine. White / blue / light-blue / yellow / red palette, minimal chrome, and none of the default WordPress clutter.
Version: 1.1.0
Requires at least: 5.5
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apostolic-media
*/

/* ===========================================================================
   Palette
   ========================================================================= */
:root{
	--white:#ffffff;
	--blue:#1565c0;
	--blue-dark:#15407a;
	--blue-deep:#10325f;
	--light-blue:#e8f1fb;
	--bg:#f4f8fd;
	--yellow:#f5b800;
	--yellow-ink:#3a2c00;
	--yellow-soft:#fff6da;
	--red:#e03131;
	--red-soft:#fdecec;
	--red-ink:#9a2222;
	--ink:#1d2530;
	--text:#33485f;
	--muted:#6b86a8;
	--border:#e4eef8;
	--radius:14px;
	--radius-sm:9px;
	--wrap:1120px;
	--font-head:'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-body:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ===========================================================================
   Base
   ========================================================================= */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
	margin:0;
	background:var(--bg);
	color:var(--text);
	font-family:var(--font-body);
	font-size:16px;
	line-height:1.65;
	-webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; }
a{ color:var(--blue); text-decoration:none; }
a:hover{ text-decoration:underline; }
h1,h2,h3,h4{ font-family:var(--font-head); color:var(--blue-dark); line-height:1.2; margin:0 0 .5em; font-weight:600; }
h1{ font-size:clamp(28px,4vw,38px); font-weight:700; }
h2{ font-size:clamp(22px,3vw,28px); }
p{ margin:0 0 1em; }
.wrap{ max-width:var(--wrap); margin:0 auto; padding:0 22px; }
.skip-link{ position:absolute; left:-9999px; }
.skip-link:focus{ left:8px; top:8px; background:#fff; padding:8px 14px; border-radius:8px; z-index:1000; }

/* Buttons */
.btn{ display:inline-flex; align-items:center; gap:8px; border:none; border-radius:var(--radius-sm); padding:12px 24px; font-weight:600; font-size:14px; cursor:pointer; font-family:var(--font-head); }
.btn:hover{ text-decoration:none; opacity:.94; }
.btn-yellow{ background:var(--yellow); color:var(--yellow-ink); }
.btn-red{ background:var(--red); color:#fff; }
.btn-blue{ background:var(--blue); color:#fff; }
.btn-ghost{ background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.4); }
.btn-outline{ background:#fff; color:var(--blue); border:1px solid var(--border); }

/* ===========================================================================
   Top strip
   ========================================================================= */
.topbar{ background:var(--blue-dark); color:#cfe0f5; font-size:12.5px; }
.topbar .wrap{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:7px; padding-bottom:7px; flex-wrap:wrap; }
.topbar a{ color:#cfe0f5; }
.topbar a:hover{ color:#fff; text-decoration:none; }
.topbar .socials{ display:flex; gap:14px; }

/* ===========================================================================
   Header + nav
   ========================================================================= */
.site-header{ background:var(--white); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:50; }
.site-header .wrap{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:13px; padding-bottom:13px; }
.brand{ display:flex; align-items:center; gap:11px; text-decoration:none; }
.brand:hover{ text-decoration:none; }
.brand-mark{ width:42px; height:42px; border-radius:10px; background:linear-gradient(135deg,var(--blue),var(--blue-dark)); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:20px; flex:none; }
.brand-mark img{ width:42px; height:42px; border-radius:10px; object-fit:cover; }
.brand-text{ line-height:1.15; }
.brand-name{ font-family:var(--font-head); font-weight:700; color:var(--blue-dark); font-size:16px; }
.brand-tag{ font-size:11px; color:var(--muted); }

.nav{ display:flex; align-items:center; gap:24px; }
.nav-menu{ list-style:none; display:flex; align-items:center; gap:22px; margin:0; padding:0; }
.nav-menu a{ color:var(--text); font-weight:500; font-size:14.5px; }
.nav-menu a:hover,.nav-menu .current-menu-item > a{ color:var(--blue); text-decoration:none; }
.nav-cta{ display:inline-flex; align-items:center; gap:7px; }
.nav-cta .dot{ color:#e03131; }
.btn-yellow .dot{ color:#c0392b; }

.menu-toggle{ display:none; background:none; border:1px solid var(--border); border-radius:8px; padding:8px 10px; cursor:pointer; color:var(--blue-dark); }
.menu-toggle span{ display:block; width:20px; height:2px; background:currentColor; margin:4px 0; }

/* ===========================================================================
   Hero
   ========================================================================= */
.hero{ background:linear-gradient(135deg,var(--blue) 0%,var(--blue-dark) 100%); color:#fff; text-align:center; padding:64px 22px; }
.hero .eyebrow{ display:inline-block; background:rgba(255,255,255,.15); color:#ffe9a8; font-size:12px; font-weight:600; letter-spacing:.05em; padding:5px 14px; border-radius:20px; margin-bottom:16px; }
.hero h1{ color:#fff; margin:0 0 12px; }
.hero p{ max-width:50ch; margin:0 auto 26px; font-size:16px; opacity:.92; }
.hero-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* ===========================================================================
   Announcement
   ========================================================================= */
.announce{ background:var(--red-soft); border-left:4px solid var(--red); border-radius:8px; padding:12px 16px; margin:18px 0 0; display:flex; align-items:center; gap:10px; font-size:13.5px; color:var(--red-ink); }
.announce .mark{ color:var(--red); font-weight:700; }

/* ===========================================================================
   Sections + cards
   ========================================================================= */
.section{ padding:34px 0; }
.section-head{ text-align:center; margin-bottom:24px; }
.section-head p{ color:var(--muted); margin:0; }

.cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; }
.card{ background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:20px; }
.card:hover{ border-color:#cfe0f5; }
.card .ic{ width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:19px; margin-bottom:12px; }
.ic-blue{ background:var(--light-blue); color:var(--blue); }
.ic-yellow{ background:var(--yellow-soft); color:#c79100; }
.ic-red{ background:var(--red-soft); color:var(--red); }
.card h3{ font-size:16px; margin:0 0 4px; }
.card p{ font-size:13px; color:var(--muted); margin:0; line-height:1.55; }

/* Posts grid */
.posts{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:18px; }
.post-card{ background:#fff; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; }
.post-card .thumb{ aspect-ratio:16/9; background:var(--light-blue); overflow:hidden; }
.post-card .thumb img{ width:100%; height:100%; object-fit:cover; }
.post-card .body{ padding:16px; }
.post-card h3{ font-size:17px; margin:0 0 6px; }
.post-card .meta{ font-size:12px; color:var(--muted); }
.post-card .excerpt{ font-size:13.5px; color:var(--text); margin-top:8px; }

/* ===========================================================================
   Single / page content
   ========================================================================= */
.content-wrap{ background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:34px; margin:30px auto; max-width:820px; }
.page-title{ margin-bottom:18px; }
.entry .meta{ color:var(--muted); font-size:13px; margin-bottom:18px; }
.entry img{ border-radius:10px; }
.entry h2,.entry h3{ margin-top:1.4em; }
.entry blockquote{ border-left:4px solid var(--yellow); background:var(--yellow-soft); margin:1.2em 0; padding:12px 18px; border-radius:0 8px 8px 0; }
.entry a{ text-decoration:underline; }

/* ===========================================================================
   Search form
   ========================================================================= */
.search-form{ display:flex; gap:8px; }
.search-form input[type=search]{ flex:1; border:1px solid var(--border); border-radius:var(--radius-sm); padding:11px 14px; font-size:15px; outline:none; }
.search-form input[type=search]:focus{ border-color:var(--blue); }

/* ===========================================================================
   404
   ========================================================================= */
.error404-box{ text-align:center; padding:60px 22px; }
.error404-box .big{ font-family:var(--font-head); font-size:84px; font-weight:700; color:var(--blue); line-height:1; }

/* ===========================================================================
   Footer
   ========================================================================= */
.site-footer{ background:var(--blue-deep); color:#aebfd6; margin-top:40px; }
.site-footer .wrap{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; padding-top:26px; padding-bottom:26px; font-size:13.5px; }
.footer-brand{ display:flex; align-items:center; gap:9px; color:#fff; font-weight:600; font-family:var(--font-head); }
.footer-brand .star{ color:var(--yellow); }
.footer-menu{ list-style:none; display:flex; gap:18px; margin:0; padding:0; }
.footer-menu a{ color:#aebfd6; }
.footer-menu a:hover{ color:#fff; text-decoration:none; }
.footer-copy{ font-size:12px; opacity:.7; width:100%; text-align:center; border-top:1px solid rgba(255,255,255,.1); padding:14px 0; }

/* ===========================================================================
   Responsive
   ========================================================================= */
@media (max-width:860px){
	.menu-toggle{ display:block; }
	.nav{ position:absolute; top:100%; left:0; right:0; background:#fff; border-bottom:1px solid var(--border); flex-direction:column; align-items:stretch; gap:0; padding:8px 0; display:none; box-shadow:0 12px 24px rgba(16,50,95,.08); }
	.nav.is-open{ display:flex; }
	.nav-menu{ flex-direction:column; align-items:stretch; gap:0; }
	.nav-menu li{ border-bottom:1px solid var(--border); }
	.nav-menu a{ display:block; padding:13px 22px; }
	.nav-cta{ margin:10px 22px; justify-content:center; }
	.site-header .wrap{ position:relative; }
}
@media (max-width:600px){
	.topbar .socials{ display:none; }
	.content-wrap{ padding:22px; }
}

/* ===========================================================================
   Dark / light toggle button
   ========================================================================= */
.site-header .wrap{ justify-content:flex-start; gap:12px; }
.site-header .brand{ margin-right:auto; }
.theme-toggle{ display:inline-flex; align-items:center; gap:2px; background:#eef2f7; border:1px solid #dbe3ec; border-radius:20px; padding:4px; cursor:pointer; flex:none; }
.theme-toggle .tt-ic{ width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px; line-height:1; color:#8a94a4; }
.theme-toggle .tt-sun{ background:var(--yellow); color:var(--yellow-ink); }
html.apsl-dark .theme-toggle{ background:#1a212c; border-color:#2b3442; }
html.apsl-dark .theme-toggle .tt-sun{ background:transparent; color:#8a94a4; }
html.apsl-dark .theme-toggle .tt-moon{ background:var(--yellow); color:var(--yellow-ink); }

/* ===========================================================================
   Dark mode (whole site) — applied via html.apsl-dark
   ========================================================================= */
html.apsl-dark body{ background:#0e1320; color:#c7cdd6; }
html.apsl-dark h1, html.apsl-dark h2, html.apsl-dark h3, html.apsl-dark h4{ color:#eaf0f7; }
html.apsl-dark a{ color:#4f9bff; }
html.apsl-dark .topbar{ background:#0a0e16; color:#8a94a4; }
html.apsl-dark .topbar a{ color:#8a94a4; }
html.apsl-dark .topbar a:hover{ color:#fff; }
html.apsl-dark .site-header{ background:#11161d; border-bottom-color:#232b38; }
html.apsl-dark .brand-name{ color:#fff; }
html.apsl-dark .brand-tag{ color:#8a94a4; }
html.apsl-dark .nav-menu a{ color:#c7cdd6; }
html.apsl-dark .nav-menu a:hover, html.apsl-dark .nav-menu .current-menu-item > a{ color:#4f9bff; }
html.apsl-dark .nav{ background:#11161d; }
html.apsl-dark .nav-menu li{ border-bottom-color:#232b38; }
html.apsl-dark .card{ background:#161c28; border-color:#232b38; }
html.apsl-dark .card:hover{ border-color:#2b3a52; }
html.apsl-dark .card h3{ color:#fff; }
html.apsl-dark .card p, html.apsl-dark .section-head p{ color:#8a94a4; }
html.apsl-dark .ic-blue{ background:#16243a; color:#4f9bff; }
html.apsl-dark .ic-yellow{ background:#2a2410; color:#f5b800; }
html.apsl-dark .ic-red{ background:#2a1414; color:#ff6b6b; }
html.apsl-dark .post-card{ background:#161c28; border-color:#232b38; }
html.apsl-dark .post-card .thumb{ background:#16243a; }
html.apsl-dark .post-card h3 a{ color:#fff; }
html.apsl-dark .post-card .meta{ color:#8a94a4; }
html.apsl-dark .post-card .excerpt{ color:#c7cdd6; }
html.apsl-dark .content-wrap{ background:#161c28; border-color:#232b38; }
html.apsl-dark .entry .meta{ color:#8a94a4; }
html.apsl-dark .entry blockquote{ background:#241f06; }
html.apsl-dark .search-form input[type=search]{ background:#161c28; border-color:#232b38; color:#eaf0f7; }
html.apsl-dark .error404-box .big{ color:#4f9bff; }
/* The hero gradient and footer are already dark-friendly, so they carry over. */
