/*
Theme Name: Pearl Harbor Guide Blog
Theme URI: https://pearlharbor.guide
Author: Pearl Harbor Guide
Description: Blog theme matching the look, fonts, and top/bottom navigation of pearlharbor.guide, for use on blog.pearlharbor.guide.
Version: 1.0.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: phg-blog
*/

/* =========================================================================
   Pearl Harbor Guide design system, ported from pearlharbor.guide (ph.css)
   so the blog subdomain matches the main site's look and feel.
   ========================================================================= */
:root {
  --ph-navy: #02272f;
  --ph-teal: #125065;
  --ph-yellow: #ffc72e;
  --ph-red: #990000;
  --ph-blue: #c5e1ff;
  --ph-light-blue: #eef5f7;
  --ph-grey: #454545;
  --ph-link: #0074db;
  --ph-max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Belt-and-suspenders: nothing (a stray fixed-width embed, a long unbroken
   URL, etc.) should be able to force horizontal scroll on the whole page. */
html, body { max-width: 100%; overflow-x: hidden; }
body.ph {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ph-grey);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  background: #fff;
}
.ph-wrap { max-width: var(--ph-max); margin: 0 auto; padding: 0 40px; }
.ph h1, .ph h2, .ph h3, .ph h4 { font-family: 'Inter', system-ui, sans-serif; color: var(--ph-navy); font-weight: 800; margin: 0; line-height: 1.1; }
.ph a { color: inherit; text-decoration: none; }
.ph a:hover { color: var(--ph-teal); }
.ph a.ph-btn, .ph a.ph-btn--navy { color: #fff; }
.ph a.ph-btn:hover, .ph a.ph-btn--navy:hover { color: #fff; }
.ph .ph-arthero__title { color: #fff; }
.ph-lora { font-family: 'Lora', Georgia, serif; }

.ph-h1 { font-size: 60px; font-weight: 800; line-height: 1.1; }
.ph-h2 { font-size: 40px; font-weight: 800; line-height: 1.05; }
.ph-eyebrow { font-size: .75rem; text-transform: uppercase; font-weight: 700; letter-spacing: .4em; color: var(--ph-teal); }

/* ---- Buttons ---- */
.ph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ph-red); color: #fff; font-weight: 700; font-size: 14px; line-height: 1; padding: 15px 30px; border-radius: 4px; border: 0; cursor: pointer; white-space: nowrap; text-decoration: none; transition: filter .15s ease, background .15s ease; }
.ph-btn:hover { filter: brightness(0.93); color: #fff; text-decoration: none; }
.ph-btn--navy { background: var(--ph-navy); color: #fff; }
.ph-btn--outline { background: transparent; border: 2px solid var(--ph-light-blue); color: #fff; }
.ph-btn--outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---- Header / nav (matches pearlharbor.guide) ---- */
header.ph { position: sticky; top: 0; z-index: 1030; }
.ph-header { position: relative; z-index: 1000; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.ph-header__inner { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.ph-logo img { height: 50px; width: auto; display: block; }
.ph-nav { display: flex; align-items: center; gap: 34px; }
.ph-nav__item { position: relative; }
.ph-nav__link { color: var(--ph-navy); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; padding: 30px 0; display: inline-block; background: none; border: 0; }
.ph-nav__link:hover { color: var(--ph-teal); }
.ph-nav__link.is-current { color: var(--ph-teal); }

/* Mega dropdown (hover) */
.ph-dropdown { position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.16); border-radius: 10px; padding: 18px; width: 600px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.ph-nav__item:hover .ph-dropdown, .ph-nav__item.is-open .ph-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.ph-dropdown__item { display: flex; gap: 12px; padding: 8px; border-radius: 8px; transition: background .15s ease; }
.ph-dropdown__item:hover { background: #f4f7f8; }
.ph-dropdown__item img { width: 84px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.ph-dropdown__title { font-family: 'Inter', system-ui, sans-serif; font-weight: 700; text-transform: uppercase; color: var(--ph-navy); font-size: 14px; letter-spacing: .5px; }
.ph-dropdown__desc { color: var(--ph-grey); font-size: 12.5px; line-height: 1.4; margin-top: 3px; }
.ph-dropdown__compare { grid-column: 1 / -1; border-top: 1px solid #eee; padding-top: 12px; margin-top: 2px; display: inline-flex; align-items: center; gap: 8px; color: var(--ph-navy); font-weight: 700; }
.ph-burger { display: none; background: none; border: 0; cursor: pointer; font-size: 26px; color: var(--ph-navy); }

/* Mobile slide-down menu */
.ph-mobile { display: none; background: #fff; border-top: 1px solid #eee; }
.ph-mobile.open { display: block; }
.ph-mobile a { display: block; padding: 14px 20px; color: var(--ph-navy); font-weight: 700; border-bottom: 1px solid #f0f0f0; }

@media (max-width: 991px) {
  .ph-wrap { padding: 0 20px; }
  .ph-nav, .ph-header__cta { display: none; }
  .ph-burger { display: block; }
  .ph-h1 { font-size: 38px; }
  .ph-h2 { font-size: 30px; }
}

/* ---- Generic section ---- */
.ph-section { padding: 64px 0; }
.ph-section--cream { background: var(--ph-light-blue); }
.ph-section__head { text-align: center; max-width: 760px; margin: 0 auto 36px; }

/* ---- Breadcrumb ---- */
.ph-crumb { font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.ph-crumb a { color: var(--ph-teal); }
.ph-crumb > span { color: #b3b3b3; }
.ph-crumb__current { color: #666; }
.ph-crumb--light a { color: #fff; }
.ph-crumb--light > span { color: rgba(255,255,255,.55); }
.ph-crumb--light .ph-crumb__current { color: rgba(255,255,255,.85); }

/* ---- Article hero (blog post header) ---- */
.ph-arthero { background-size: cover; background-position: center; color: #fff; padding: 84px 0 58px; }
.ph .ph-arthero__title { font-size: 50px; font-weight: 800; line-height: 1.08; color: #fff; max-width: 860px; margin: 14px 0 0; }
.ph-arthero__dek { font-size: 19px; line-height: 1.55; color: rgba(255,255,255,.92); max-width: 720px; margin: 18px 0 0; }
.ph-arthero__meta { margin-top: 18px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.72); font-weight: 700; }
@media (max-width: 860px) {
  .ph .ph-arthero__title { font-size: 33px; }
  .ph-arthero__dek { font-size: 17px; }
}

/* ---- Article body (single post) ---- */
.ph-artbody { max-width: 760px; overflow-wrap: break-word; word-wrap: break-word; }
.ph-artbody h1, .ph-artbody h2, .ph-artbody h3 { margin-top: 1.9em; margin-bottom: 1.1em; line-height: 1.3; }
.ph-artbody > *:first-child { margin-top: 0; }
.ph-artbody p { color: var(--ph-grey); font-size: 17px; line-height: 1.7; margin: 10px 0 0; }
.ph-artbody ul, .ph-artbody ol { margin: 12px 0 0; padding-left: 22px; color: var(--ph-grey); font-size: 17px; line-height: 1.7; }
.ph-artbody li { margin: 8px 0; }
.ph-artbody li::marker { color: var(--ph-teal); }
.ph-artbody a { color: var(--ph-teal); text-decoration: underline; }
.ph-artbody blockquote { border-left: 3px solid var(--ph-teal); margin: 24px 0; padding: 4px 0 4px 20px; font-style: italic; color: var(--ph-navy); }
.ph-artbody img { max-width: 100%; height: auto; border-radius: 12px; display: block; }
.ph-artbody figure { margin: 28px 0 6px; }
.ph-artbody figcaption { font-size: 13px; color: #888; margin-top: 9px; text-align: center; }
.ph-artbody pre, .ph-artbody code { background: var(--ph-light-blue); border-radius: 6px; }
.ph-artbody pre { padding: 16px; overflow-x: auto; }
.ph-artbody code { padding: 2px 6px; }
.ph-artbody table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
/* Pasted YouTube/Vimeo embeds (and any iframe with fixed width/height attrs)
   otherwise stay at their fixed pixel size and force the page wider than a
   phone screen in portrait. Force them fluid at a 16:9 aspect ratio. */
.ph-artbody iframe, .ph-artbody embed, .ph-artbody object, .ph-artbody video { max-width: 100%; }
.ph-artbody iframe[width][height] { width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* ---- Article / post cards (blog index, related posts) ---- */
.ph-artgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.ph-artgrid--3 { grid-template-columns: repeat(3, 1fr); }
.ph-artcard { display: flex; flex-direction: column; background: #fff; border: 1px solid #eee; border-radius: 14px; overflow: hidden; transition: box-shadow .15s ease, transform .15s ease; }
.ph-artcard:hover { box-shadow: 0 14px 34px rgba(2,39,47,.12); transform: translateY(-3px); }
.ph-artcard img { width: 100%; height: 200px; object-fit: cover; display: block; background: #eee; }
.ph-artcard__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.ph-artcard__body h3 { font-size: 21px; color: var(--ph-navy); font-weight: 800; line-height: 1.25; }
.ph-artcard__body p { color: var(--ph-grey); font-size: 14.5px; margin: 0; }
.ph-artcard__more { color: var(--ph-teal); font-weight: 700; font-size: 14px; margin-top: 2px; }
@media (max-width: 860px) {
  .ph-artgrid, .ph-artgrid--3 { grid-template-columns: 1fr; }
}

.ph-artcta { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; margin-top: 44px; }
.ph-artcta p { color: var(--ph-grey); margin-top: 8px; max-width: 560px; }
.ph-artcta__btns { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 860px) { .ph-artcta { grid-template-columns: 1fr; } }

/* ---- Pagination ---- */
.ph-pagination { display: flex; gap: 10px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.ph-pagination a, .ph-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid #e0e6ea; color: var(--ph-navy); font-weight: 700; font-size: 14px; }
.ph-pagination a:hover { background: var(--ph-light-blue); }
.ph-pagination .current { background: var(--ph-teal); border-color: var(--ph-teal); color: #fff; }

/* ---- Blog index layout (posts + optional sidebar) ---- */
.ph-bloglayout { display: flex; gap: 48px; align-items: flex-start; }
.ph-blogmain { flex: 1; min-width: 0; }
.ph-blogsidebar { flex: 0 0 320px; max-width: 320px; }
@media (max-width: 900px) {
  .ph-bloglayout { flex-direction: column; }
  .ph-blogsidebar { flex-basis: auto; max-width: none; width: 100%; }
}

/* ---- Sidebar / widgets ---- */
.ph-widget { background: var(--ph-light-blue); border: 1px solid #d7e3f3; border-radius: 14px; padding: 22px 22px 26px; margin-bottom: 24px; }
.ph-widget h2, .ph-widget .widgettitle { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--ph-navy); margin-bottom: 14px; }
.ph-widget ul { list-style: none; margin: 0; padding: 0; }
.ph-widget li { padding: 7px 0; border-top: 1px solid #d7e3f3; }
.ph-widget li:first-child { border-top: 0; }
.ph-widget a { color: var(--ph-teal); font-weight: 600; font-size: 14px; }

/* ---- Comments ---- */
.ph-comments { margin-top: 48px; max-width: 760px; }
.ph-comments h2 { font-size: 26px; margin-bottom: 20px; }
.ph-comments ol.comment-list { list-style: none; margin: 0; padding: 0; }
.ph-comments .comment { border-top: 1px solid #eee; padding: 20px 0; }
.ph-comments .comment-author { font-weight: 700; color: var(--ph-navy); font-size: 14px; }
.ph-comments .comment-metadata { font-size: 12px; color: #999; margin-bottom: 8px; }
.ph-comments .comment-content p { margin: 6px 0 0; color: var(--ph-grey); }
.ph-comments .comment-respond { margin-top: 30px; background: var(--ph-light-blue); border: 1px solid #d7e3f3; border-radius: 14px; padding: 26px 24px; }
.ph-comments input[type="text"], .ph-comments input[type="email"], .ph-comments input[type="url"], .ph-comments textarea {
  width: 100%; border: 1px solid #d7e3f3; border-radius: 8px; padding: 11px 13px; font-size: 15px; font-family: inherit; background: #fff; color: var(--ph-grey); margin-bottom: 14px;
}
.ph-comments textarea { resize: vertical; }
.ph-comments .form-submit input { width: auto; }

/* ---- Footer (matches pearlharbor.guide) ---- */
.ph-footer { background: var(--ph-navy); color: #fff; padding: 56px 0 28px; text-align: center; }
.ph-footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.ph-footer__title { color: var(--ph-blue); font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.ph-footer a { color: #fff; font-size: 13px; display: block; padding: 4px 0; opacity: .92; }
.ph-footer a:hover { opacity: 1; text-decoration: underline; }
.ph-footer__brand { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ph-footer__logo { display: inline-block; }
.ph-footer__logo img { height: 46px; width: auto; display: block; }
.ph-footer__legal { font-size: 13px; color: #fff; opacity: .8; max-width: 760px; margin: 0 auto; }
.ph-footer__legal a { display: inline; padding: 0; }
@media (max-width: 1100px) { .ph-footer__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .ph-footer__cols { grid-template-columns: 1fr; } }

/* ---- WordPress core alignment/caption classes ---- */
.alignleft { float: left; margin: 6px 24px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 24px; }
.aligncenter { display: block; margin: 20px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: #888; text-align: center; margin-top: 8px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.gallery img { width: 100%; border-radius: 8px; }
