/*
Theme Name: Positive Hopes
Theme URI: https://positivehopes.com
Author: Positive Hopes
Author URI: https://positivehopes.com
Description: A bold, magazine-style WordPress theme for positivehopes.com, built around the Positive Hopes brand colors, a widget-ready 3-column layout, a 4-column footer, and a thumbs-up/heart reaction system on every post.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: positivehopes
Tags: blog, three-columns, custom-logo, footer-widgets, translation-ready

Positive Hopes WordPress Theme, Copyright 2026
Positive Hopes is distributed under the terms of the GNU GPL v2 or later.
*/

/* -------------------------------------------------------------------------
   TOKENS
   Color:  white #FFFFFF (page bg) / ink #17181C (text) / blue #00A1E8 /
           purple #A349A5 / orange #FF7E26 / lime #B5E61D — all four lifted
           directly from the Positive Hopes logo. Category badges and
           accents rotate through the four; body copy stays neutral so the
           brand colors read as intentional highlights, not noise.
   Type:   Poppins (bold geometric display/headlines, echoes the logo's
           rounded-square mark) + Work Sans (body/UI sans).
   Layout: 220px left rail / fluid center / 300px right rail, magazine
           card grid in the main column, 4-column dark footer.
------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
	--ph-white: #ffffff;
	--ph-paper-dim: #f5f6f8;
	--ph-ink: #17181c;
	--ph-ink-soft: #5b5f66;
	--ph-blue: #00a1e8;
	--ph-blue-dark: #0080ba;
	--ph-purple: #a349a5;
	--ph-purple-dark: #7e3580;
	--ph-orange: #ff7e26;
	--ph-orange-dark: #e2650f;
	--ph-lime: #b5e61d;
	--ph-lime-dark: #93c112;
	--ph-line: #e7e8ec;
	--ph-footer-bg: #15171c;
	--ph-max-width: 1240px;
	--ph-radius: 6px;
	--ph-font-display: 'Poppins', 'Segoe UI', Arial, sans-serif;
	--ph-font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* -------------------------------------------------------------------------
   RESET & BASE
------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--ph-white);
	color: var(--ph-ink);
	font-family: var(--ph-font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ph-blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--ph-orange); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--ph-orange);
	outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ph-font-display);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.5em;
	color: var(--ph-ink);
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 1.55rem + 1.4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.3em; }

blockquote {
	margin: 1.6em 0;
	padding: 0.2em 0 0.2em 1.2em;
	border-left: 4px solid var(--ph-purple);
	font-family: var(--ph-font-display);
	font-weight: 500;
	font-size: 1.15em;
	color: var(--ph-ink-soft);
}

figure { margin: 1.6em 0; }
figcaption { font-size: 0.85em; color: var(--ph-ink-soft); margin-top: 0.4em; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px;
	margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
	position: fixed; top: 8px; left: 8px; width: auto; height: auto;
	padding: 10px 16px; z-index: 100000;
	background: var(--ph-blue); color: #fff;
	clip: auto; border-radius: var(--ph-radius);
}

/* -------------------------------------------------------------------------
   LAYOUT SHELL
------------------------------------------------------------------------- */
.ph-wrap { max-width: var(--ph-max-width); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
.ph-site-header {
	background: var(--ph-white);
	border-bottom: 3px solid var(--ph-ink);
}

.ph-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px 0;
	flex-wrap: wrap;
}

.ph-branding { display: flex; align-items: center; gap: 14px; }
.ph-logo-link { display: inline-block; line-height: 0; }

.ph-site-title { font-family: var(--ph-font-display); font-size: 1.6rem; font-weight: 800; margin: 0; }
.ph-site-title a { color: var(--ph-ink); text-decoration: none; }
.ph-site-description { margin: 2px 0 0; font-size: 0.9rem; color: var(--ph-ink-soft); }

/* ---- Primary nav (with simple dropdown support) ---- */
.ph-primary-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin: 0;
	padding: 0;
}

.ph-primary-nav li { position: relative; }

.ph-primary-nav a {
	display: inline-block;
	padding: 10px 12px;
	color: var(--ph-ink);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: var(--ph-radius);
}

.ph-primary-nav > ul > li > a:hover,
.ph-primary-nav > ul > li > a:focus,
.ph-primary-nav .current-menu-item > a {
	background: var(--ph-ink);
	color: #fff;
}

.ph-primary-nav ul ul {
	display: none;
	position: absolute;
	top: 100%; left: 0;
	min-width: 220px;
	background: var(--ph-white);
	border: 1px solid var(--ph-line);
	border-top: 3px solid var(--ph-blue);
	border-radius: 0 0 var(--ph-radius) var(--ph-radius);
	box-shadow: 0 12px 24px rgba(0,0,0,0.08);
	padding: 6px;
	z-index: 50;
	flex-direction: column;
}

.ph-primary-nav li:hover > ul,
.ph-primary-nav li:focus-within > ul {
	display: flex;
}

.ph-primary-nav ul ul a { color: var(--ph-ink); font-weight: 500; padding: 8px 10px; border-radius: 4px; }
.ph-primary-nav ul ul a:hover { background: var(--ph-paper-dim); color: var(--ph-blue); }

.ph-menu-toggle {
	display: none;
	background: var(--ph-ink);
	color: #fff;
	border: 0;
	border-radius: var(--ph-radius);
	padding: 10px 14px;
	font-family: var(--ph-font-body);
	font-weight: 600;
	cursor: pointer;
}

/* ---- Three column grid ---- */
.ph-content-wrap { padding: 36px 0 64px; }

.ph-columns {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr) 300px;
	gap: 36px;
	align-items: start;
}
.ph-columns.ph-no-left  { grid-template-columns: minmax(0, 1fr) 300px; }
.ph-columns.ph-no-right { grid-template-columns: 220px minmax(0, 1fr); }
.ph-columns.ph-no-sidebars { grid-template-columns: minmax(0, 1fr); }

.ph-main { min-width: 0; }
.ph-sidebar { min-width: 0; }

.ph-widget {
	margin-bottom: 30px;
	padding-bottom: 26px;
	border-bottom: 1px solid var(--ph-line);
}
.ph-widget:last-child { border-bottom: 0; }

.ph-widget-title {
	font-family: var(--ph-font-display);
	font-size: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--ph-ink);
	margin-bottom: 0.9em;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--ph-blue);
	display: inline-block;
}

.ph-widget ul { list-style: none; padding-left: 0; margin: 0; counter-reset: ph-widget-counter; }
.ph-widget li {
	padding: 10px 0;
	border-bottom: 1px dashed var(--ph-line);
	counter-increment: ph-widget-counter;
	display: flex;
	gap: 10px;
	align-items: baseline;
}
.ph-widget li::before {
	content: counter(ph-widget-counter);
	flex: 0 0 auto;
	font-family: var(--ph-font-display);
	font-weight: 800;
	font-size: 0.85rem;
	color: var(--ph-white);
	background: var(--ph-purple);
	width: 22px; height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ph-widget li:nth-child(4n+1)::before { background: var(--ph-blue); }
.ph-widget li:nth-child(4n+2)::before { background: var(--ph-purple); }
.ph-widget li:nth-child(4n+3)::before { background: var(--ph-orange); }
.ph-widget li:nth-child(4n+4)::before { background: var(--ph-lime-dark); }
.ph-widget li:last-child { border-bottom: 0; }
.ph-widget a { text-decoration: none; color: var(--ph-ink); font-weight: 500; }
.ph-widget a:hover { color: var(--ph-blue); }

/* ---- Category badges (rotate the 4 brand colors) ---- */
.ph-badge {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 999px;
	font-family: var(--ph-font-display);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #fff;
	text-decoration: none;
	background: var(--ph-blue);
}
.ph-badge:hover { color: #fff; opacity: 0.88; }
.ph-badge-blue   { background: var(--ph-blue); }
.ph-badge-purple { background: var(--ph-purple); }
.ph-badge-orange { background: var(--ph-orange); }
.ph-badge-lime   { background: var(--ph-lime-dark); }

/* ---- Magazine post grid ---- */
.ph-post-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 36px 28px;
}

.ph-post-grid .ph-post { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.ph-post-grid .ph-post.ph-post-wide { grid-column: 1 / -1; }
.ph-post-grid .ph-post.ph-post-wide .ph-post-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }

.ph-post {
	margin-bottom: 40px;
	padding-bottom: 40px;
	border-bottom: 1px solid var(--ph-line);
}
.ph-post:last-child { border-bottom: 0; margin-bottom: 0; }

.ph-post-thumb { position: relative; margin: 0 0 16px; border-radius: var(--ph-radius); overflow: hidden; background: var(--ph-paper-dim); aspect-ratio: 16 / 10; }
.ph-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ph-post-thumb .ph-badge { position: absolute; top: 12px; left: 12px; }

.ph-post-title { margin-bottom: 0.3em; font-size: 1.25rem; }
.ph-post-title a { text-decoration: none; color: var(--ph-ink); }
.ph-post-title a:hover { color: var(--ph-blue); }

.ph-post-meta { font-size: 0.85rem; color: var(--ph-ink-soft); margin-bottom: 0.7em; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ph-post-meta a { color: var(--ph-ink-soft); text-decoration: none; }
.ph-post-meta a:hover { color: var(--ph-blue); }
.ph-post-meta .sep { color: var(--ph-line); }

.ph-entry-summary { color: var(--ph-ink-soft); }

.ph-read-more {
	display: inline-block;
	margin-top: 2px;
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--ph-ink);
	text-decoration: none;
	border-bottom: 2px solid var(--ph-orange);
}
.ph-read-more:hover { color: var(--ph-orange-dark); }

.ph-post-footer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 14px;
}

/* ---- Reactions: thumbs-up + heart, with live counts ---- */
.ph-reactions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ph-react-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1.5px solid var(--ph-line);
	background: var(--ph-white);
	color: var(--ph-ink-soft);
	font-family: var(--ph-font-body);
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.ph-react-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ph-react-btn:hover { border-color: currentColor; transform: translateY(-1px); }

.ph-react-thumb { color: var(--ph-blue-dark); }
.ph-react-thumb:hover { background: rgba(0,161,232,0.08); }
.ph-react-thumb.is-active { background: var(--ph-blue); border-color: var(--ph-blue); color: #fff; }
.ph-react-thumb svg { fill: none; stroke: currentColor; stroke-width: 2; }
.ph-react-thumb.is-active svg { fill: currentColor; }

.ph-react-heart { color: var(--ph-orange-dark); }
.ph-react-heart:hover { background: rgba(255,126,38,0.08); }
.ph-react-heart.is-active { background: var(--ph-orange); border-color: var(--ph-orange); color: #fff; }
.ph-react-heart svg { fill: none; stroke: currentColor; stroke-width: 2; }
.ph-react-heart.is-active svg { fill: currentColor; }

.ph-react-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.ph-react-count { min-width: 1ch; }

.ph-reactions-single {
	margin: 30px 0;
	padding: 18px 20px;
	background: var(--ph-paper-dim);
	border-radius: var(--ph-radius);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
}
.ph-reactions-single .ph-reactions-label {
	font-family: var(--ph-font-display);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--ph-ink);
}
.ph-reactions-single .ph-react-btn { font-size: 0.95rem; padding: 9px 16px; }

/* ---- Single article ---- */
.ph-article-header { margin-bottom: 22px; }
.ph-entry-content { font-size: 1.05rem; }
.ph-entry-content > *:first-child { margin-top: 0; }
.ph-entry-content img, .ph-entry-content iframe, .ph-entry-content video { border-radius: var(--ph-radius); }

.ph-tags { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--ph-line); font-size: 0.9rem; }
.ph-tags a {
	display: inline-block; margin: 0 8px 8px 0; padding: 5px 13px;
	background: var(--ph-paper-dim); border-radius: 999px;
	text-decoration: none; color: var(--ph-ink); font-size: 0.82rem; font-weight: 600;
}
.ph-tags a:hover { background: var(--ph-purple); color: #fff; }

/* ---- Pagination ---- */
.ph-pagination { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 40px; }
.ph-pagination a, .ph-pagination span {
	display: inline-block; padding: 8px 14px; border: 1.5px solid var(--ph-line);
	border-radius: var(--ph-radius); text-decoration: none; color: var(--ph-ink); font-size: 0.9rem; font-weight: 600;
}
.ph-pagination .current { background: var(--ph-ink); border-color: var(--ph-ink); color: #fff; }
.ph-pagination a:hover { border-color: var(--ph-blue); color: var(--ph-blue); }

/* ---- Search ---- */
.ph-search-form { display: flex; gap: 8px; }
.ph-search-form input[type="search"] {
	flex: 1; padding: 10px 13px; border: 1.5px solid var(--ph-line);
	border-radius: var(--ph-radius); font-family: var(--ph-font-body); font-size: 0.95rem;
}
.ph-search-form button {
	padding: 10px 18px; background: var(--ph-ink); color: #fff; border: 0;
	border-radius: var(--ph-radius); font-weight: 700; cursor: pointer;
}
.ph-search-form button:hover { background: var(--ph-blue); }

/* ---- 404 ---- */
.ph-404 { text-align: left; padding: 20px 0 40px; }
.ph-404 .ph-404-code { font-family: var(--ph-font-display); font-size: 5rem; font-weight: 800; color: var(--ph-purple); line-height: 1; margin-bottom: 0.2em; }

/* -------------------------------------------------------------------------
   FOOTER — dark shell, 4 widget columns, bright link hovers.
------------------------------------------------------------------------- */
.ph-site-footer { background: var(--ph-footer-bg); color: #c7c9d1; margin-top: 48px; }

.ph-footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 56px 0 40px; }
.ph-footer-widgets .ph-widget { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.ph-footer-widgets .ph-widget-title { color: #fff; border-bottom-color: var(--ph-lime); }
.ph-footer-widgets a { color: #c7c9d1; }
.ph-footer-widgets a:hover { color: var(--ph-lime); }
.ph-footer-widgets li { border-bottom: 1px dashed rgba(255,255,255,0.12); }
.ph-footer-widgets li:nth-child(4n+1)::before { background: var(--ph-blue); }
.ph-footer-widgets li:nth-child(4n+2)::before { background: var(--ph-purple); }
.ph-footer-widgets li:nth-child(4n+3)::before { background: var(--ph-orange); }
.ph-footer-widgets li:nth-child(4n+4)::before { background: var(--ph-lime-dark); color: #17181c; }

.ph-footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding: 20px 0; font-size: 0.85rem;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
	color: #9195a0;
}
.ph-footer-bottom a { color: #d7d9e0; }
.ph-footer-bottom a:hover { color: var(--ph-orange); }

/* -------------------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------------------- */
@media (max-width: 960px) {
	.ph-columns { grid-template-columns: minmax(0, 1fr) 260px; }
	.ph-sidebar-left { display: none; }
	.ph-columns.ph-no-right { grid-template-columns: minmax(0, 1fr); }
	.ph-footer-widgets { grid-template-columns: repeat(2, 1fr); }
	.ph-post-grid { grid-template-columns: 1fr; }
	.ph-post-grid .ph-post.ph-post-wide .ph-post-inner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
	.ph-columns, .ph-columns.ph-no-left, .ph-columns.ph-no-right { grid-template-columns: minmax(0, 1fr); }
	.ph-sidebar-left { display: block; }
	.ph-header-inner { padding: 14px 0; }
	.ph-primary-nav { width: 100%; display: none; }
	.ph-primary-nav.is-open { display: block; }
	.ph-primary-nav ul { flex-direction: column; gap: 0; }
	.ph-primary-nav a { padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--ph-line); }
	.ph-primary-nav > ul > li > a:hover, .ph-primary-nav .current-menu-item > a { background: transparent; color: var(--ph-blue); }
	.ph-primary-nav ul ul { position: static; box-shadow: none; border: 0; padding-left: 14px; display: flex; }
	.ph-menu-toggle { display: inline-block; }
	.ph-footer-widgets { grid-template-columns: 1fr; padding: 40px 0 24px; }
	.ph-reactions-single { flex-direction: column; align-items: flex-start; }
	h1 { font-size: 1.8rem; }
	.ph-404 .ph-404-code { font-size: 3.4rem; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
