/*
Theme Name: PhoneParental Blog
Theme URI: https://phoneparental.com/
Author: PhoneParental
Author URI: https://phoneparental.com/
Description: Blog theme matching the PhoneParental static site — shared header, footer and design system. Built for the /blog/ section running on WordPress.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
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: phoneparental-blog
*/

/* =========================================================================
   The full shared design system is loaded from design-system.css (enqueued
   separately in functions.php) so it stays byte-identical to the static site.
   Below are ONLY the blog-specific additions layered on top.
   ========================================================================= */

/* ---- Blog hero / archive header ---- */
.blog-head { padding: 60px 0 26px; text-align: center; }
.blog-head .eyebrow { margin-bottom: 18px; }
.blog-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.blog-head p { margin: 14px auto 0; max-width: 60ch; }

/* ---- Layout: content + sidebar ---- */
.blog-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
@media (max-width: 940px) { .blog-layout { grid-template-columns: 1fr; gap: 40px; } }

/* ---- Post cards (archive / index) ---- */
.post-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 680px) { .post-grid { grid-template-columns: 1fr; } }
.post-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d9d3c5; }
.post-card .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--teal-soft), #eaf6f2); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb.placeholder { display: grid; place-items: center; color: var(--teal-deep); }
.post-card .thumb.placeholder svg { width: 54px; height: 54px; opacity: .5; }
.post-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .cat { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); }
.post-card h2, .post-card h3 { font-size: 1.25rem; line-height: 1.25; }
.post-card h2 a, .post-card h3 a { color: var(--ink); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--teal-deep); }
.post-card .excerpt { font-size: .96rem; color: var(--ink-soft); }
.post-card .meta { margin-top: auto; padding-top: 8px; font-size: .85rem; color: var(--ink-faint); display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Single post ---- */
.post-hero { padding: 56px 0 24px; }
.post-hero .cat { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep); }
.post-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin: 14px 0; }
.post-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--ink-faint); font-size: .92rem; }
.post-meta .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-deep); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.post-feature-img { border-radius: var(--radius-lg); overflow: hidden; margin: 8px 0 12px; box-shadow: var(--shadow); }
.post-feature-img img { width: 100%; height: auto; }

/* article typography reuses .prose; a few blog extras */
.entry-content { max-width: 760px; }
.entry-content img { border-radius: var(--radius); margin: 24px auto; box-shadow: var(--shadow-sm); }
.entry-content figure { margin: 24px 0; }
.entry-content figcaption { text-align: center; font-size: .88rem; color: var(--ink-faint); margin-top: 8px; }
.entry-content blockquote {
  border-left: 4px solid var(--teal); background: var(--teal-soft);
  padding: 18px 24px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 24px 0;
  font-family: var(--font-display); font-size: 1.18rem; color: var(--ink);
}
.entry-content pre { background: var(--ink); color: #e8eef2; padding: 20px; border-radius: var(--radius-sm); overflow:auto; font-size: .9rem; }
.entry-content code { background: var(--paper-2); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--paper-2); font-family: var(--font-body); }

/* tags / share */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.post-tags a { font-size: .82rem; background: var(--paper-2); color: var(--ink-soft); padding: 6px 14px; border-radius: 100px; }
.post-tags a:hover { background: var(--teal-soft); color: var(--teal-deep); }

/* author box */
.author-box { display: flex; gap: 18px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-top: 36px; }
.author-box .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-deep); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; flex: none; }
.author-box h4 { font-family: var(--font-body); font-size: 1rem; margin-bottom: 4px; }

/* post navigation */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
@media (max-width: 560px){ .post-nav { grid-template-columns: 1fr; } }
.post-nav a { display: block; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); transition: .18s; }
.post-nav a:hover { border-color: var(--teal); transform: translateY(-2px); }
.post-nav small { color: var(--ink-faint); font-size: .8rem; }
.post-nav b { display: block; color: var(--ink); margin-top: 4px; }
.post-nav .next { text-align: right; }

/* ---- Sidebar ---- */
.sidebar .widget { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.sidebar .widget-title { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 14px; color: var(--ink); }
.sidebar ul { list-style: none; }
.sidebar li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink-soft); font-size: .95rem; }
.sidebar a:hover { color: var(--teal-deep); }
.sidebar .search-form { display: flex; gap: 8px; }
.sidebar .search-form input[type=search] { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 100px; font-family: var(--font-body); font-size: .95rem; background: var(--paper); }
.sidebar .search-form input[type=search]:focus { outline: none; border-color: var(--teal); }
.sidebar .search-form button { border: 0; background: var(--teal); color: #fff; padding: 0 18px; border-radius: 100px; cursor: pointer; font-weight: 700; }

/* sidebar CTA card */
.side-cta { background: linear-gradient(140deg, var(--navy-grad-a), var(--navy-grad-b)); color: #fff; border: 0; }
.side-cta .widget-title, .side-cta p { color: #fff; }
.side-cta p { font-size: .94rem; color: #c4d2da; margin-bottom: 16px; }

/* ---- Pagination ---- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 100px; background: var(--white); border: 1px solid var(--line); color: var(--ink-soft); font-weight: 600; box-shadow: var(--shadow-sm); }
.pagination .page-numbers.current { background: var(--teal); color: #fff; border-color: var(--teal); }
.pagination a.page-numbers:hover { border-color: var(--teal); color: var(--teal-deep); }

/* ---- Comments ---- */
.comments-area { max-width: 760px; margin: 44px auto 0; }
.comments-area .comment-list { list-style: none; }
.comments-area .comment-body { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.comments-area .comment-author { font-weight: 700; color: var(--ink); }
.comments-area .comment-metadata { font-size: .82rem; color: var(--ink-faint); }
.comment-form input, .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); margin-bottom: 12px; background: var(--paper); }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--teal); }

/* breadcrumb */
.crumbs { font-size: .86rem; color: var(--ink-faint); padding: 18px 0 0; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--teal-deep); }

/* sticky offset so anchored content clears the sticky header */
:target { scroll-margin-top: 90px; }
