/*
Theme Name: Health Tidbits
Theme URI: https://healthtidbits.net
Author: QodeGenie
Author URI: https://qodegenie.com
Description: Custom theme for Health Tidbits — featuring large-header article layouts inspired by health advertorials and a magazine-style homepage. Built for supplement listicles, health tips, and recipes. No page builders, lightweight, fast.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: health-tidbits
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #2c3e50;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0a3d62; text-decoration: none; transition: color .2s ease; }
a:hover { color: #1e88e5; }
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    color: #0a3d62;
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 700;
}
p { margin: 0 0 1.2em; }
button { font-family: inherit; cursor: pointer; }

/* ============================================
   LAYOUT WRAPPERS
   ============================================ */
.ht-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.ht-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   HEADER
   ============================================ */
.ht-site-header {
    background: #0a3d62;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ht-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.ht-logo a {
    color: #fff;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .5px;
}
.ht-logo img { max-height: 44px; width: auto; }
.ht-main-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 28px;
}
.ht-main-nav a {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.ht-main-nav a:hover { color: #4fc3f7; }

.ht-mobile-toggle {
    display: none;
    background: none;
    border: 0;
    color: #fff;
    font-size: 26px;
    padding: 4px 8px;
}

/* ============================================
   HOMEPAGE — FoodRevolution-inspired
   ============================================ */
.ht-hero {
    background: linear-gradient(135deg, #0a3d62 0%, #1e88e5 100%);
    color: #fff;
    padding: 70px 0 60px;
    text-align: center;
}
.ht-hero h1 {
    color: #fff;
    font-size: clamp(32px, 5vw, 52px);
    margin-bottom: 18px;
}
.ht-hero p {
    font-size: 20px;
    max-width: 720px;
    margin: 0 auto 28px;
    opacity: .95;
}
.ht-hero-cta {
    display: inline-block;
    background: #f39c12;
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 15px;
    box-shadow: 0 6px 20px rgba(243,156,18,.4);
    transition: transform .2s, box-shadow .2s;
}
.ht-hero-cta:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(243,156,18,.5);
}

/* Section headers */
.ht-section { padding: 60px 0; }
.ht-section-alt { background: #f8f6f1; }
.ht-section-title {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #555;
    font-family: 'Source Sans Pro', sans-serif;
    margin-bottom: 36px;
    position: relative;
    padding: 0 60px;
}
.ht-section-title::before,
.ht-section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background: #ccc;
}
.ht-section-title::before { left: 0; }
.ht-section-title::after { right: 0; }

/* Featured / Trending grid */
.ht-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.ht-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: #2c3e50;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    transition: transform .25s, box-shadow .25s;
}
.ht-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,.15);
}
.ht-card a { display: block; height: 100%; color: #fff; }
.ht-card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.ht-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 50%, rgba(0,0,0,0) 100%);
}
.ht-card-title {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 20px;
    color: #fff;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    z-index: 2;
}

/* Hero featured (large) */
.ht-featured-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}
.ht-featured-hero .ht-card.large { aspect-ratio: 16/9; }
.ht-featured-hero .ht-card.large .ht-card-title { font-size: 26px; padding: 30px; }
.ht-featured-hero .ht-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.ht-featured-hero .ht-side .ht-card { aspect-ratio: 16/10; }

/* Category strip */
.ht-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 0;
}
.ht-categories a {
    background: #fff;
    border: 2px solid #0a3d62;
    color: #0a3d62;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.ht-categories a:hover {
    background: #0a3d62;
    color: #fff;
}

/* Newsletter band */
.ht-newsletter {
    background: #f39c12;
    color: #fff;
    padding: 50px 0;
    text-align: center;
}
.ht-newsletter h2 { color: #fff; font-size: 32px; margin-bottom: 10px; }
.ht-newsletter p { font-size: 18px; max-width: 600px; margin: 0 auto 24px; }
.ht-newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 8px;
}
.ht-newsletter-form input[type="email"] {
    flex: 1;
    padding: 14px 18px;
    border: 0;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}
.ht-newsletter-form button {
    background: #0a3d62;
    color: #fff;
    border: 0;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}
.ht-newsletter-form button:hover { background: #062a43; }

/* ============================================
   SINGLE ARTICLE — NativePath-inspired
   ============================================ */
.ht-article-header {
    background: #0a3d62;
    height: 50px;
}
.ht-article-brand {
    text-align: center;
    padding: 24px 0 0;
}
.ht-article-brand img { max-height: 50px; margin: 0 auto; }
.ht-article-brand .ht-brand-text {
    color: #0a3d62;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
}

.ht-article {
    max-width: 760px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}
.ht-article h1.ht-article-title {
    color: #0a3d62;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.15;
    margin-bottom: 18px;
    font-weight: 800;
}
.ht-article-subtitle {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 22px;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 30px;
    font-weight: 400;
}
.ht-article-hero-img {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}
.ht-article-hero-img img { width: 100%; }

/* Site/brand byline (replaces author) */
.ht-site-byline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 32px;
}
.ht-site-byline-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #0a3d62;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
    overflow: hidden;
}
.ht-site-byline-logo img { width: 100%; height: 100%; object-fit: cover; }
.ht-site-byline-info { line-height: 1.4; }
.ht-site-byline-name {
    font-weight: 700;
    color: #0a3d62;
    font-size: 16px;
}
.ht-site-byline-tag {
    font-size: 14px;
    color: #666;
}

/* Article body large headers — NativePath style */
.ht-article-body {
    font-size: 19px;
    line-height: 1.75;
    color: #2c3e50;
}
.ht-article-body h2 {
    font-size: clamp(26px, 3.5vw, 36px);
    text-align: center;
    color: #0a3d62;
    margin: 50px 0 24px;
    line-height: 1.25;
    font-weight: 800;
}
.ht-article-body h3 {
    font-size: clamp(22px, 3vw, 28px);
    color: #0a3d62;
    margin: 36px 0 18px;
}
.ht-article-body img {
    border-radius: 10px;
    margin: 24px auto;
}
.ht-article-body strong { color: #0a3d62; }
.ht-article-body blockquote {
    border-left: 4px solid #f39c12;
    padding: 6px 20px;
    margin: 24px 0;
    background: #fdf8ef;
    font-style: italic;
    color: #555;
}
.ht-article-body ul, .ht-article-body ol { padding-left: 24px; margin: 0 0 1.2em; }
.ht-article-body li { margin-bottom: 8px; }
.ht-article-body a {
    color: #1e88e5;
    text-decoration: underline;
}

/* ============================================
   CUSTOM META BLOCKS — products & promo image
   ============================================ */
.ht-promo-block {
    margin: 48px auto;
    max-width: 760px;
    padding: 0 20px;
}
.ht-promo-block-img {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.ht-promo-block-img img { width: 100%; }

/* Product cards (1, 2, or 3 product layout) */
.ht-products {
    margin: 48px auto;
    max-width: 1000px;
    padding: 0 20px;
}
.ht-products-title {
    text-align: center;
    font-size: 28px;
    color: #0a3d62;
    margin-bottom: 30px;
}
.ht-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.ht-product {
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: #fff;
    transition: border-color .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.ht-product:hover {
    border-color: #f39c12;
    transform: translateY(-3px);
}
.ht-product.featured {
    border-color: #0a3d62;
    background: #f0f7fc;
    position: relative;
}
.ht-product.featured::before {
    content: 'TOP PICK';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #0a3d62;
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}
.ht-product-img {
    height: 160px;
    object-fit: contain;
    margin: 0 auto 16px;
}
.ht-product-name {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 18px;
    color: #0a3d62;
    margin: 0 0 8px;
    font-weight: 700;
}
.ht-product-desc {
    font-size: 14px;
    color: #555;
    margin-bottom: 14px;
    flex-grow: 1;
}
.ht-product-price {
    font-size: 26px;
    color: #0a3d62;
    font-weight: 800;
    margin-bottom: 14px;
}
.ht-product-price .strike {
    color: #999;
    text-decoration: line-through;
    font-size: 16px;
    font-weight: 400;
    margin-right: 8px;
}
.ht-product-cta {
    display: block;
    background: #2e7d32;
    color: #fff;
    padding: 14px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}
.ht-product-cta:hover {
    background: #1b5e20;
    color: #fff;
}

/* ============================================
   FOOTER
   ============================================ */
.ht-footer {
    background: #0a3d62;
    color: #cfd8dc;
    padding: 50px 0 24px;
    margin-top: 60px;
}
.ht-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.ht-footer h4 {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    font-family: 'Source Sans Pro', sans-serif;
}
.ht-footer ul { list-style: none; padding: 0; margin: 0; }
.ht-footer li { margin-bottom: 8px; }
.ht-footer a { color: #cfd8dc; font-size: 15px; }
.ht-footer a:hover { color: #4fc3f7; }
.ht-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #90a4ae;
}

/* ============================================
   ARCHIVE / BLOG
   ============================================ */
.ht-archive-header {
    text-align: center;
    padding: 50px 20px 30px;
    background: #f8f6f1;
}
.ht-archive-header h1 { font-size: 38px; }
.ht-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.ht-post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.ht-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.ht-post-card-img {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
}
.ht-post-card-body { padding: 20px; }
.ht-post-card-cat {
    font-size: 12px;
    font-weight: 700;
    color: #f39c12;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.ht-post-card h3 {
    font-size: 19px;
    margin: 0 0 10px;
    line-height: 1.35;
}
.ht-post-card h3 a { color: #0a3d62; }
.ht-post-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Pagination */
.ht-pagination {
    text-align: center;
    padding: 30px 20px 60px;
}
.ht-pagination a, .ht-pagination span {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    color: #0a3d62;
    font-weight: 600;
}
.ht-pagination .current {
    background: #0a3d62;
    color: #fff;
    border-color: #0a3d62;
}

/* ============================================
   COMMENTS (lightweight)
   ============================================ */
.ht-comments {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px;
}
.ht-comments h3 { font-size: 24px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .ht-grid { grid-template-columns: repeat(2, 1fr); }
    .ht-archive-grid { grid-template-columns: repeat(2, 1fr); }
    .ht-featured-hero { grid-template-columns: 1fr; }
    .ht-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    body { font-size: 17px; }
    .ht-mobile-toggle { display: block; }
    .ht-main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #0a3d62;
        padding: 20px;
    }
    .ht-main-nav.is-open { display: block; }
    .ht-main-nav ul { flex-direction: column; gap: 14px; }
    .ht-section { padding: 40px 0; }
    .ht-section-title { padding: 0 20px; font-size: 12px; }
    .ht-section-title::before, .ht-section-title::after { width: 10%; }
    .ht-newsletter-form { flex-direction: column; padding: 0 20px; }
    .ht-article { padding: 20px 16px 40px; }
    .ht-article-body { font-size: 17px; }
}
@media (max-width: 600px) {
    .ht-grid { grid-template-columns: 1fr; }
    .ht-archive-grid { grid-template-columns: 1fr; }
    .ht-footer-grid { grid-template-columns: 1fr; }
    .ht-hero { padding: 50px 0 40px; }
}
