/*
Theme Name: Truth Child
Template: truth
Description: Hustle and Habit child theme. Premium nonfiction blog design. Brand: Navy #1A1A2E, Amber #F59E0B, Teal #14B8A6. Typography: Montserrat + Inter.
Author: 
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: truth-child
Tags: blog, one-column, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-width-template, translation-ready, block-styles, wide-blocks
*/

/* ═══════════════════════════════════════════════════════════════════════
   HUSTLE AND HABIT — PREMIUM BLOG CSS
   Inspired by jamesclear.com, markmanson.net, zenhabits.net
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --hh-navy:       #1A1A2E;
    --hh-navy-soft:  #252550;
    --hh-amber:      #F59E0B;
    --hh-amber-dark: #D97706;
    --hh-teal:       #14B8A6;
    --hh-teal-dark:  #0F766E;
    --hh-white:      #FFFFFF;
    --hh-soft:       #F8F9FA;
    --hh-border:     #E5E7EB;
    --hh-text:       #374151;
    --hh-text-dark:  #1F2937;
    --hh-text-light: #6B7280;
    --hh-text-muted: #9CA3AF;

    --hh-font-head: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --hh-font-body: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* ─── Global typography ─────────────────────────────────────────────── */
body {
    font-family: var(--hh-font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--hh-text);
    background: var(--hh-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.wp-block-post-title,
.wp-block-heading {
    font-family: var(--hh-font-head);
    color: var(--hh-navy);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

h1, .wp-block-post-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-top: 2.5em; margin-bottom: 0.7em; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-top: 2em; margin-bottom: 0.6em; }
h4 { font-size: 1.2rem; margin-top: 1.5em; }

p { margin-bottom: 1.3em; }

a { color: var(--hh-teal); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--hh-amber); }

.entry-content a, article a { border-bottom: 1px solid var(--hh-teal); }
.entry-content a:hover, article a:hover { border-bottom-color: var(--hh-amber); }

/* ─── Site-wide container polish ────────────────────────────────────── */
.content_wrap, .wp-block-group.content_wrap {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ─── Header (Truth) polish ─────────────────────────────────────────── */
.top_panel, .header_wrap {
    background: var(--hh-white) !important;
    border-bottom: 1px solid var(--hh-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.site-title a, .wp-block-site-title a {
    font-family: var(--hh-font-head);
    font-weight: 800;
    color: var(--hh-navy) !important;
    letter-spacing: -0.02em;
}

.wp-block-site-tagline, .site-description {
    color: var(--hh-text-light) !important;
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* Navigation */
.wp-block-navigation,
.wp-block-navigation a,
.wp-block-navigation__container a {
    font-family: var(--hh-font-head);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--hh-navy) !important;
}

.wp-block-navigation a:hover { color: var(--hh-amber) !important; }

/* ─── Buttons ───────────────────────────────────────────────────────── */
.wp-block-button__link,
button,
.button,
input[type="submit"] {
    font-family: var(--hh-font-head);
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--hh-amber);
    color: var(--hh-navy);
    border: none;
    border-radius: 6px;
    padding: 14px 28px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.wp-block-button__link:hover,
button:hover,
.button:hover,
input[type="submit"]:hover {
    background: var(--hh-amber-dark);
    color: var(--hh-navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ─── Blog post list / archive ─────────────────────────────────────── */
.post, article.post,
.wp-block-post {
    padding-bottom: 48px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--hh-border);
}

.post:last-child, .wp-block-post:last-child { border-bottom: none; }

.wp-block-post-title a,
.post-title a,
.entry-title a {
    color: var(--hh-navy);
    transition: color 0.15s ease;
    border-bottom: none;
}

.wp-block-post-title a:hover,
.post-title a:hover,
.entry-title a:hover { color: var(--hh-amber); }

.wp-block-post-featured-image img,
.post-thumbnail img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.wp-block-post-featured-image:hover img,
.post-thumbnail:hover img { transform: scale(1.02); }

.wp-block-post-excerpt,
.excerpt, .entry-summary {
    font-size: 17px;
    color: var(--hh-text);
    line-height: 1.7;
}

/* Post meta (date, category, read time) */
.wp-block-post-date,
.wp-block-post-terms,
.post-date, .post-categories,
.entry-meta {
    font-family: var(--hh-font-head);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hh-text-light);
}

.wp-block-post-terms a {
    color: var(--hh-teal) !important;
    border-bottom: none !important;
}

.wp-block-post-terms a:hover { color: var(--hh-amber) !important; }

/* ─── Single post reading ──────────────────────────────────────────── */
.single .entry-content,
.single article,
.wp-block-post-content {
    max-width: 740px;
    margin: 0 auto;
}

.single h1, .single .wp-block-post-title { text-align: center; }

.single .entry-content p,
.wp-block-post-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--hh-text);
}

.single .entry-content p:first-of-type::first-letter,
.wp-block-post-content p:first-of-type::first-letter {
    font-family: var(--hh-font-head);
    font-weight: 800;
    font-size: 3.4em;
    float: left;
    line-height: 0.9;
    margin: 0.1em 0.1em 0 -0.05em;
    color: var(--hh-amber);
}

.single blockquote,
.wp-block-quote {
    border-left: 4px solid var(--hh-amber);
    padding: 8px 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--hh-navy);
    background: var(--hh-soft);
    border-radius: 0 6px 6px 0;
}

/* ─── Category badges (in-content) ─────────────────────────────────── */
.hh-category-badge {
    display: inline-block;
    background: var(--hh-teal);
    color: var(--hh-white) !important;
    font-family: var(--hh-font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    border: none !important;
    margin-bottom: 12px;
    transition: background 0.15s ease;
}

.hh-category-badge:hover { background: var(--hh-amber); color: var(--hh-navy) !important; }

.hh-read-time {
    font-family: var(--hh-font-head);
    font-size: 12px;
    font-weight: 600;
    color: var(--hh-text-light);
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════
   HH SHORTCODE COMPONENTS
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Category Grid (shortcode: [hh_category_grid]) ─────────────────── */
.hh-category-section { padding: 72px 0; background: var(--hh-soft); }
.hh-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hh-section-label {
    display: block;
    font-family: var(--hh-font-head);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--hh-amber);
    margin-bottom: 12px;
}
.hh-category-section h2 { margin-top: 0; }

.hh-category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 32px;
}

.hh-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    background: var(--hh-white);
    border: 1px solid var(--hh-border);
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
    border-bottom: 1px solid var(--hh-border) !important;
}

.hh-category-card:hover {
    border-color: var(--hh-amber);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26,26,46,0.08);
}

.hh-category-card .cat-icon { font-size: 28px; margin-bottom: 10px; }
.hh-category-card .cat-name {
    font-family: var(--hh-font-head);
    font-weight: 600;
    font-size: 13px;
    color: var(--hh-navy);
    line-height: 1.3;
    margin-bottom: 4px;
}
.hh-category-card .cat-count {
    font-size: 11px;
    color: var(--hh-text-muted);
    font-weight: 500;
}

/* ─── Post Grid (shortcode: [hh_post_grid]) ─────────────────────────── */
.hh-posts-section { padding: 72px 0; }
.hh-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-top: 32px;
}

.hh-post-card {
    background: var(--hh-white);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s ease;
    border: 1px solid var(--hh-border);
}

.hh-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(26,26,46,0.1);
    border-color: var(--hh-amber);
}

.hh-post-card .card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.hh-post-card .card-body { padding: 24px; }

.hh-card-title {
    display: block;
    font-family: var(--hh-font-head);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
    color: var(--hh-navy) !important;
    margin: 12px 0 10px;
    border-bottom: none !important;
}

.hh-card-title:hover { color: var(--hh-amber) !important; }

.hh-card-excerpt {
    color: var(--hh-text);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.hh-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--hh-text-light);
}
.meta-divider { color: var(--hh-border); }

/* ─── Post List (shortcode: [hh_post_list]) ─────────────────────────── */
.hh-post-list-section { padding: 72px 0; background: var(--hh-soft); }

.hh-post-list { list-style: none; padding: 0; margin: 32px 0 0; }

.hh-post-list-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--hh-border);
    align-items: center;
}

.list-thumb img { width: 160px; height: 120px; object-fit: cover; border-radius: 6px; }

.list-title {
    display: block;
    font-family: var(--hh-font-head);
    font-weight: 700;
    font-size: 20px;
    color: var(--hh-navy) !important;
    margin-bottom: 8px;
    line-height: 1.3;
    border-bottom: none !important;
}

.list-title:hover { color: var(--hh-amber) !important; }

.list-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--hh-text-light);
    flex-wrap: wrap;
}

.hh-load-more-wrap { text-align: center; margin-top: 40px; }
#hh-load-more-btn {
    font-family: var(--hh-font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 14px;
    padding: 14px 36px;
    background: var(--hh-navy);
    color: var(--hh-white);
}
#hh-load-more-btn:hover { background: var(--hh-amber); color: var(--hh-navy); }

/* ─── Newsletter Bar ────────────────────────────────────────────────── */
.hh-newsletter-bar {
    padding: 72px 24px;
    background: linear-gradient(135deg, var(--hh-navy) 0%, var(--hh-navy-soft) 100%);
    color: var(--hh-white);
    text-align: center;
}
.hh-newsletter-bar h3 { color: var(--hh-white); font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 12px; }
.hh-newsletter-bar p { color: rgba(255,255,255,0.75); font-size: 16px; margin-bottom: 28px; }

.hh-signup-form {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.hh-signup-form input[type="email"] {
    flex: 1;
    min-width: 240px;
    padding: 14px 18px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: var(--hh-white);
    border-radius: 6px;
    font-size: 15px;
    font-family: var(--hh-font-body);
}
.hh-signup-form input[type="email"]::placeholder { color: rgba(255,255,255,0.5); }
.hh-signup-form input[type="email"]:focus { outline: none; border-color: var(--hh-amber); }

.hh-signup-form button {
    background: var(--hh-amber);
    color: var(--hh-navy);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 13px;
    padding: 14px 28px;
}

/* ─── Author box ────────────────────────────────────────────────────── */
.hh-author-box {
    display: flex;
    gap: 20px;
    padding: 32px;
    background: var(--hh-soft);
    border-radius: 10px;
    margin: 48px 0;
    border-left: 4px solid var(--hh-amber);
    align-items: flex-start;
}
.hh-author-box .author-avatar { width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0; }
.hh-author-box .author-name {
    display: block;
    font-family: var(--hh-font-head);
    font-weight: 700;
    color: var(--hh-navy);
    font-size: 16px;
    margin-bottom: 4px;
}
.hh-author-box .author-bio {
    color: var(--hh-text);
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
}

/* ─── Related Posts ─────────────────────────────────────────────────── */
.hh-related-posts {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 2px solid var(--hh-border);
}
.hh-related-posts h3 { text-align: center; margin-bottom: 32px; font-size: 24px; }
.hh-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hh-related-card { display: block; text-decoration: none; border-bottom: none !important; }
.related-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}
.related-title {
    display: block;
    font-family: var(--hh-font-head);
    font-weight: 600;
    color: var(--hh-navy);
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 6px;
}
.hh-related-card:hover .related-title { color: var(--hh-amber); }
.related-meta { display: block; font-size: 12px; color: var(--hh-text-light); }

/* ─── Social Share Bar ──────────────────────────────────────────────── */
.hh-share-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--hh-border);
    border-bottom: 1px solid var(--hh-border);
    flex-wrap: wrap;
}
.hh-share-label {
    font-family: var(--hh-font-head);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hh-navy);
    margin-right: 8px;
}
.hh-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--hh-soft);
    color: var(--hh-navy) !important;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.15s ease;
    border: none !important;
    cursor: pointer;
}
.hh-share-btn:hover { background: var(--hh-amber); transform: translateY(-2px); }

/* ─── Bottom Email CTA ──────────────────────────────────────────────── */
.hh-email-cta-bottom {
    background: linear-gradient(135deg, var(--hh-navy) 0%, var(--hh-navy-soft) 100%);
    color: var(--hh-white);
    padding: 48px 32px;
    border-radius: 12px;
    margin: 48px 0;
    text-align: center;
}
.hh-email-cta-bottom h3 { color: var(--hh-white); font-size: 28px; margin: 0 0 12px; }
.hh-email-cta-bottom p {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    margin: 0 auto 24px;
    max-width: 520px;
    line-height: 1.6;
}
.hh-email-form-inline {
    display: flex;
    gap: 8px;
    max-width: 460px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.hh-email-input {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: var(--hh-white);
    border-radius: 6px;
    font-size: 14px;
}
.hh-email-input::placeholder { color: rgba(255,255,255,0.5); }
.hh-email-submit {
    background: var(--hh-amber);
    color: var(--hh-navy);
    font-weight: 700;
    padding: 12px 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 13px;
}

/* ─── Affiliate Disclosure Notice ────────────────────────────────────── */
.hh-affiliate-notice {
    background: rgba(20, 184, 166, 0.08);
    border-left: 3px solid var(--hh-teal);
    padding: 12px 16px;
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--hh-text);
    border-radius: 0 6px 6px 0;
}
.hh-affiliate-notice em { font-style: normal; }

/* ─── Ad Zones (hidden by default, shown when .hh-ads-active) ────────── */
.hh-ad-zone { display: none; }
body.hh-ads-active .hh-ad-zone {
    display: block;
    background: var(--hh-soft);
    border: 1px dashed var(--hh-border);
    min-height: 90px;
    margin: 32px 0;
    text-align: center;
    padding: 20px;
}

/* ─── Footer polish ──────────────────────────────────────────────────── */
.site-footer, .footer_wrap {
    background: var(--hh-navy) !important;
    color: rgba(255,255,255,0.8);
}
.site-footer a, .footer_wrap a { color: var(--hh-teal) !important; border-bottom: none !important; }
.site-footer a:hover, .footer_wrap a:hover { color: var(--hh-amber) !important; }
.site-footer .widget-title, .footer_wrap .widget-title {
    color: var(--hh-white);
    font-family: var(--hh-font-head);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}
.site-footer .copyright, .footer_wrap .copyright { color: rgba(255,255,255,0.4); font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .hh-category-grid { grid-template-columns: repeat(3, 1fr); }
    .hh-post-grid { grid-template-columns: repeat(2, 1fr); }
    .hh-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1, .wp-block-post-title { font-size: clamp(1.75rem, 7vw, 2.4rem); }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    body, .single .entry-content p { font-size: 16px; }

    .hh-category-grid { grid-template-columns: repeat(2, 1fr); }
    .hh-post-grid { grid-template-columns: 1fr; }
    .hh-related-grid { grid-template-columns: 1fr; }

    .hh-post-list-item { grid-template-columns: 100px 1fr; gap: 14px; }
    .list-thumb img { width: 100px; height: 75px; }
    .list-title { font-size: 16px; }

    .single .entry-content p:first-of-type::first-letter,
    .wp-block-post-content p:first-of-type::first-letter { font-size: 2.8em; }

    .hh-author-box { flex-direction: column; text-align: center; align-items: center; }
    .hh-share-bar { gap: 6px; }
    .hh-share-btn { width: 34px; height: 34px; font-size: 12px; }

    .hh-category-section, .hh-posts-section, .hh-post-list-section, .hh-newsletter-bar { padding: 48px 0; }
}

@media (max-width: 480px) {
    .hh-signup-form { flex-direction: column; }
    .hh-email-form-inline { flex-direction: column; }
}
