/*
Theme Name: PHFUN Guide
Theme URI: https://phfun.net.ph/
Author: phfun.net.ph
Description: Fast, builder-free theme for phfun.net.ph. Page content lives in /inc/content/. Includes SEO metas, schema, breadcrumbs, FAQ, table of contents and internal linking.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: phfun
*/

:root {
	--navy: #14234a;
	--navy-2: #1d3263;
	--sun: #f5b82e;
	--sun-2: #ffd36b;
	--chili: #d63a40;
	--sky: #eef3fa;
	--paper: #ffffff;
	--ink: #1c2740;
	--muted: #56627c;
	--line: #dbe2ee;
	--r-sm: 8px;
	--r-md: 14px;
	--r-lg: 22px;
	--wrap: 1180px;
	--f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--chili); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; color: var(--navy); letter-spacing: -0.01em; }
h1 { font-weight: 800; font-size: clamp(2.3rem, 5.4vw, 3.9rem); margin: 0 0 .4em; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 2.8vw, 2.05rem); margin: 2.2em 0 .6em; }
h3 { font-weight: 600; font-size: 1.22rem; margin: 1.8em 0 .4em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--sun); color: var(--navy); padding: 8px 14px; border-radius: var(--r-sm); }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 46px; padding: 0 22px; border-radius: 999px;
	font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
	border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--sun); color: var(--navy); }
.btn--primary:hover { background: var(--sun-2); color: var(--navy); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.btn--ghost:hover { border-color: #fff; color: #fff; }
.btn--line { color: var(--navy); border-color: var(--navy); background: transparent; }
.btn--line:hover { background: var(--navy); color: #fff; }

/* Header */
.site-head { background: var(--navy); position: sticky; top: 0; z-index: 50; }
.site-head__in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { text-decoration: none; flex: none; }
.brand__mark { font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; color: #fff; letter-spacing: -0.02em; }
.brand__mark b { color: var(--sun); }
.brand__img { max-height: 44px; width: auto; }
.primary { flex: 1; }
.nav { list-style: none; display: flex; flex-wrap: nowrap; gap: 2px; margin: 0; padding: 0; }
.nav a { white-space: nowrap; color: #d9e1f2; text-decoration: none; font-weight: 600; font-size: .93rem; padding: 6px 9px; border-radius: 6px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { color: var(--sun); }
.site-head__cta { display: flex; gap: 8px; }
.site-head__cta .btn { min-height: 40px; padding: 0 16px; font-size: .93rem; }
.mnav { display: none; margin-left: auto; }
.mnav summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; }
.mnav nav { position: absolute; left: 0; right: 0; top: 68px; background: var(--navy); border-top: 1px solid rgba(255,255,255,.1); padding: 8px 16px 18px; }
.mnav__list { list-style: none; margin: 0; padding: 0; }
.mnav__list a { display: block; color: #fff; text-decoration: none; font-weight: 600; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mnav__list a[aria-current="page"] { color: var(--sun); }
@media (max-width: 1200px) {
	.primary, .site-head__cta { display: none; }
	.mnav { display: block; }
}

/* Jeepney stripe: the one decorative signature */
.hero, .phero { position: relative; }
.hero::after, .phero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
	background: linear-gradient(to bottom, var(--sun) 0 4px, var(--paper) 4px 6px, var(--chili) 6px 10px);
}

/* Home hero */
.hero { background: var(--navy); color: #e3e9f6; padding: 56px 0 74px; }
.hero__in { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: .15em; }
.hero__sub { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--sun); margin: 0 0 1em; }
.hero .lead { color: #cfd8ec; max-width: 60ch; }
.hero .btn--line { color: #fff; border-color: rgba(255,255,255,.55); }
.hero .btn--line:hover { background: #fff; color: var(--navy); }
.phero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Ticket offer card */
.ticket { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); position: relative; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(0,0,0,.55); }
.ticket__top { display: flex; align-items: center; gap: 16px; padding: 22px 24px 10px; }
.ticket__top img { width: 84px; height: 100px; object-fit: contain; flex: none; overflow: hidden; }
.ticket__title { font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; line-height: 1.2; color: var(--navy); margin: 0; }
.ticket__rows { display: grid; grid-template-columns: repeat(3, 1fr); margin: 8px 24px 20px; border: 1px solid var(--line); border-radius: var(--r-md); }
.ticket__rows div { padding: 10px 12px; text-align: center; }
.ticket__rows div + div { border-left: 1px solid var(--line); }
.ticket__rows dt { font-size: .82rem; color: var(--muted); }
.ticket__rows dd { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; color: var(--chili); }
.ticket__stub { position: relative; border-top: 2px dashed var(--line); padding: 18px 24px 20px; background: var(--sky); }
.ticket__stub::before, .ticket__stub::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); }
.ticket__stub::before { left: -12px; }
.ticket__stub::after { right: -12px; }
.ticket__stub .btn { width: 100%; }
.ticket__stub p { font-size: .8rem; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }

/* Inner page hero */
.phero { background: var(--sky); padding: 28px 0 54px; }
.phero__in { display: grid; grid-template-columns: 1.4fr .8fr; gap: 40px; align-items: center; }
.phero .lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; margin: 0; }
.phero__img img { margin-left: auto; max-height: 300px; width: auto; }
.crumbs { font-size: .88rem; color: var(--muted); margin: 0 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

@media (max-width: 860px) {
	.hero__in, .phero__in { grid-template-columns: 1fr; gap: 28px; }
	.hero { padding: 36px 0 60px; }
	.phero__img { display: none; }
	.ticket { max-width: 460px; }
}

/* Steps */
.steps-band { padding: 56px 0 8px; }
.steps-band h2 { margin-top: 0; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; }
.steps li { counter-increment: s; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 20px 18px; position: relative; }
.steps li::before { content: counter(s); font-family: var(--f-display); font-weight: 800; font-size: 1rem; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--sun); display: grid; place-content: center; margin-bottom: 10px; }
.steps h3 { margin: 0 0 4px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); font-size: .97rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Tiles (internal link hub) */
.related { padding: 56px 0; }
.related h2 { margin-top: 0; }
.related:not(.related--home) { background: var(--sky); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile a { display: grid; grid-template-columns: 56px 1fr; gap: 4px 14px; align-items: start; height: 100%; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.tile a:hover { border-color: var(--navy); }
.tile img { width: 56px; height: 56px; object-fit: contain; grid-row: span 2; overflow: hidden; }
.tile__t { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.tile__d { font-size: .88rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* Promotions band */
.promo-band { background: var(--navy); padding: 48px 0; }
.promo-band h2 { color: #fff; margin: 0; }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.textlink { color: var(--sun); font-weight: 700; }
.textlink:hover { color: var(--sun-2); }
.promo-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.promo-strip img { border-radius: var(--r-md); width: 100%; aspect-ratio: 768 / 351; object-fit: cover; background: var(--navy-2); }
@media (max-width: 760px) { .promo-strip { grid-template-columns: 1fr; } }

/* News */
.news { padding: 48px 0 0; }
.news h2 { margin-top: 0; }
.news__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news__list a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.news__list img { border-radius: var(--r-md); aspect-ratio: 16 / 9; object-fit: cover; }
.news__t { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; color: var(--navy); line-height: 1.3; }
.news__list time { font-size: .85rem; color: var(--muted); }
.news__list--archive { grid-template-columns: 1fr; }
@media (max-width: 760px) { .news__list { grid-template-columns: 1fr; } }

/* Guide layout: article + table of contents */
.guide { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 56px; align-items: start; }
.guide--single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.toc { position: sticky; top: 92px; }
.toc details { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.toc summary { font-family: var(--f-display); font-weight: 600; color: var(--navy); cursor: pointer; }
.toc ol { margin: 10px 0 0; padding-left: 20px; font-size: .92rem; line-height: 1.5; }
.toc li { margin: 6px 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--navy); text-decoration: underline; }
@media (max-width: 960px) {
	.guide { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
	.toc { position: static; }
}

/* Reviewer */
.reviewer { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; display: grid; grid-template-columns: 44px 1fr; gap: 2px 12px; align-items: center; }
.reviewer__av { width: 44px; height: 44px; border-radius: 50%; background: var(--sun); color: var(--navy); font-family: var(--f-display); font-weight: 800; display: grid; place-content: center; grid-row: span 2; }
.reviewer__n { margin: 0; font-weight: 700; font-size: .95rem; color: var(--navy); }
.reviewer__r { margin: 0; font-size: .85rem; color: var(--muted); }
.reviewer__b { grid-column: 1 / -1; margin: 10px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* Article typography */
.prose { max-width: 760px; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: #2a3550; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--chili); font-weight: 700; }
.prose figure { margin: 1.6em 0; }
.prose figure img { border-radius: var(--r-md); }
.prose strong { color: var(--ink); }
.inline-cta { margin: 1.8em 0; }
.note, .meta { font-size: .9rem; color: var(--muted); }

.promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 1.2em 0; }
.promo { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.promo img { aspect-ratio: 768 / 351; object-fit: cover; width: 100%; background: var(--sky); }
.promo h3 { margin: 14px 16px 4px; font-size: 1.08rem; }
.promo p { margin: 0 16px 16px; font-size: .95rem; }
@media (max-width: 600px) { .promo-grid { grid-template-columns: 1fr; } }

.game-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 1.2em 0; }
.game-grid img { border-radius: var(--r-sm); aspect-ratio: 1; object-fit: cover; background: var(--sky); width: 100%; }
@media (max-width: 600px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }

.logo-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.logo-row figure { margin: 0; width: 120px; text-align: center; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 10px 8px; }
.logo-row img { width: 100%; height: 60px; object-fit: contain; }
.logo-row figcaption { font-size: .82rem; font-weight: 600; color: var(--muted); margin-top: 6px; }

/* FAQ */
.faq { margin-top: 3em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 700; color: var(--navy); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.5rem; font-weight: 400; color: var(--chili); }
.faq details[open] summary::after { content: "\2212"; }
.faq__a p { margin: 0 0 18px; }

/* Footer */
.site-foot { background: var(--navy); color: #c5cfe4; padding: 56px 0 96px; font-size: .95rem; }
.site-foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 32px; }
.site-foot h3 { color: #fff; font-size: 1rem; margin: 0 0 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 6px 0; }
.site-foot a { color: #c5cfe4; text-decoration: none; }
.site-foot a:hover { color: var(--sun); }
.site-foot__about p { margin: 12px 0 0; }
.age { display: inline-grid; place-content: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--chili); color: #fff; font-weight: 800; font-size: .85rem; margin-right: 6px; vertical-align: middle; }
.site-foot__legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: .85rem; color: #9fabc6; }
.site-foot__legal p { margin: 0 0 6px; max-width: 90ch; }
@media (max-width: 860px) { .site-foot__grid { grid-template-columns: 1fr 1fr; } .site-foot__about, .site-foot__rg { grid-column: 1 / -1; } }

/* Mobile quick bar */
.mbar { display: none; }
@media (max-width: 760px) {
	.mbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--navy); box-shadow: 0 -6px 20px rgba(0,0,0,.25); }
	body { font-size: 16px; }
}

/* WordPress basics */
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
