/* =========================================================
   The Health Pulse — Modern redesign
   Reset + Variables + Components + Pages
   ========================================================= */

:root {
    --green-900: #1F3A2A;
    --green-700: #3E6E45;
    --green-600: #5A8A3A;
    --green-500: #6FA13F;
    --green-100: #E8F0D9;
    --green-50:  #F4F8EC;

    --ink-900: #1A2E2E;
    --ink-700: #2B3A3A;
    --ink-500: #5A5A5A;
    --ink-300: #9CA3A0;
    --ink-200: #D5DAD6;
    --ink-100: #EEF1ED;

    --bg-soft:  #F8F8F8;
    --white:    #FFFFFF;

    --shadow-sm: 0 1px 2px rgba(20, 40, 30, 0.04);
    --shadow-md: 0 4px 12px rgba(20, 40, 30, 0.06);
    --shadow-lg: 0 12px 28px rgba(20, 40, 30, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --container: 1200px;
    --gutter: 24px;

    --ff-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ff-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--ff-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-600); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
ul { list-style: none; }

h1, h2, h3, h4, h5 {
    font-family: var(--ff-display);
    color: var(--ink-900);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(40px, 5.5vw, 72px); letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: clamp(28px, 3.5vw, 38px); }
h3 { font-size: clamp(20px, 2.2vw, 24px); }
h4 { font-size: 18px; }

p { color: var(--ink-500); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ====== Buttons ====== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    transition: transform .15s ease, background .15s ease, box-shadow .2s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--green-600);
    color: var(--white);
}
.btn-primary:hover { background: var(--green-700); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary {
    background: var(--white);
    color: var(--ink-900);
    border: 1px solid var(--ink-200);
}
.btn-secondary:hover { border-color: var(--green-600); color: var(--green-700); }

.btn-ghost {
    color: var(--ink-700);
    padding: 0;
    background: transparent;
    font-weight: 600;
}
.btn-ghost:hover { color: var(--green-600); }

.btn-icon {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--green-100);
    color: var(--green-700);
}

.icon-arrow {
    width: 16px; height: 16px;
    transition: transform .15s;
}
.btn:hover .icon-arrow { transform: translateX(3px); }

/* ====== Header ====== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--ink-100);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--ink-900);
}
.logo img { width: 60px; height: auto; object-fit: contain; }
.footer-brand .logo img { width: 52px; height: auto; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}
.main-nav > a:not(.nav-cta),
.main-nav .dropdown > a {
    color: var(--ink-700);
    font-size: 15px;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
}
.main-nav > a:not(.nav-cta):hover,
.main-nav .dropdown > a:hover { color: var(--green-700); }
.main-nav > a.active:not(.nav-cta) {
    color: var(--green-700);
}
.main-nav > a.active:not(.nav-cta)::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--green-600);
}
.nav-cta.btn {
    margin-left: 16px;
    padding: 10px 20px;
    font-size: 14px;
}
.nav-cta.btn-primary { color: var(--white); }

.dropdown {
    position: relative;
    padding-bottom: 18px;
    margin-bottom: -18px;
}
.dropdown > a::after {
    content: '▾';
    margin-left: 4px;
    font-size: 10px;
    opacity: .6;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--white);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
    z-index: 60;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition: opacity .15s ease, transform .15s ease, visibility 0s linear 0s;
}
.dropdown-menu a {
    display: block;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--ink-700);
    white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--green-50); color: var(--green-700); }

.menu-toggle {
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
}

/* ====== Hero ====== */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-50) 0%, #FEFFFA 60%);
}
.hero .hero-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 32px var(--gutter);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    min-height: 360px;
}
.hero-content h1 {
    font-size: clamp(32px, 3.6vw, 52px);
    line-height: 1.05;
    margin-bottom: 18px;
    letter-spacing: -0.03em;
}
.hero-subtitle {
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-500);
    margin-bottom: 26px;
    max-width: 460px;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.hero-visual {
    position: relative;
    height: 360px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}
.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ====== Section title ====== */
.section { padding: 80px 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 24px;
}
.section-header h2 { margin: 0; }
.section-link {
    color: var(--green-700);
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.section-link:hover { color: var(--green-600); }

/* ====== Trust strip ====== */
.trust-strip {
    margin-top: -40px;
    position: relative;
    z-index: 5;
    padding: 0 var(--gutter);
}
.trust-strip-inner {
    max-width: var(--container);
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.trust-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.trust-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--green-100);
    color: var(--green-700);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.trust-icon svg { width: 22px; height: 22px; }
.trust-item h4 {
    font-size: 16px;
    margin-bottom: 4px;
}
.trust-item p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-500);
    margin: 0;
}

/* ====== Article cards ====== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.article-card {
    background: var(--white);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.article-card .thumb {
    position: relative;
    aspect-ratio: 16/10;
    background: var(--green-100);
    overflow: hidden;
}
.article-card .thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.category-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--green-600);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}
.article-card .body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.article-card h3 {
    font-size: 19px;
    line-height: 1.35;
    margin-bottom: 12px;
}
.article-card h3 a { color: inherit; }
.article-card h3 a:hover { color: var(--green-700); }
.article-meta {
    font-size: 13px;
    color: var(--ink-500);
    margin-bottom: 12px;
}
.article-meta a { color: var(--ink-500); }
.article-meta a:hover { color: var(--green-700); }
.article-excerpt {
    font-size: 14px;
    color: var(--ink-500);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}
.read-more {
    color: var(--green-700);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}
.read-more:hover { color: var(--green-600); }
.read-more:hover .icon-arrow { transform: translateX(3px); }

/* ====== Category grid ====== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.category-card {
    background: var(--white);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--green-200, var(--green-100));
}
.category-card .icon-wrap {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    background: var(--green-50);
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
}
.category-card .icon-wrap svg { width: 28px; height: 28px; }
.category-card h4 {
    font-size: 16px;
    color: var(--ink-900);
    margin-bottom: 4px;
}
.category-card .count {
    font-size: 13px;
    color: var(--ink-500);
}

/* Each category gets a tint */
.cat-nutrition .icon-wrap   { background: #E7F3E1; color: #4F8B3D; }
.cat-fitness .icon-wrap     { background: #DFF1F1; color: #3F8B89; }
.cat-mental-health .icon-wrap { background: #EAE7F8; color: #6D5DB0; }
.cat-lifestyle .icon-wrap   { background: #ECF2DC; color: #6A8C3D; }
.cat-medical .icon-wrap     { background: #E2EBF4; color: #4C73A4; }
.cat-well-being .icon-wrap  { background: #F1E8F4; color: #8A5BA0; }

/* ====== Newsletter block ====== */
.newsletter-block {
    background: var(--green-100);
    background-image: radial-gradient(at top left, rgba(111, 161, 63, 0.10), transparent 50%), radial-gradient(at bottom right, rgba(111, 161, 63, 0.08), transparent 50%);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    align-items: center;
}
.newsletter-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--white);
    display: flex; align-items: center; justify-content: center;
    color: var(--green-700);
    flex-shrink: 0;
}
.newsletter-icon svg { width: 36px; height: 36px; }
.newsletter-text h3 {
    color: var(--ink-900);
    margin-bottom: 6px;
}
.newsletter-text p {
    font-size: 14px;
    margin: 0;
}
.newsletter-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    max-width: 440px;
}
.newsletter-form input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--ink-200);
    background: var(--white);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--ink-900);
}
.newsletter-form input:focus {
    outline: none;
    border-color: var(--green-600);
    box-shadow: 0 0 0 3px rgba(111, 161, 63, 0.15);
}
.newsletter-form button {
    background: var(--green-600);
    color: var(--white);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}
.newsletter-form button:hover { background: var(--green-700); }
.newsletter-disclaimer {
    grid-column: 3;
    font-size: 12px;
    color: var(--ink-500);
    margin-top: 8px;
}

/* ====== Footer ====== */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--ink-100);
    padding: 64px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    gap: 48px;
    padding-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p {
    font-size: 14px;
    color: var(--ink-500);
    margin-bottom: 20px;
}
.footer-col h4 {
    font-size: 14px;
    color: var(--ink-900);
    margin-bottom: 18px;
    font-weight: 700;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a {
    font-size: 14px;
    color: var(--ink-500);
}
.footer-col a:hover { color: var(--green-700); }

.footer-newsletter input,
.footer-newsletter button {
    height: 44px;
}
.footer-newsletter {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.footer-newsletter input {
    flex: 1;
    padding: 0 14px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
}
.footer-newsletter button {
    width: 44px;
    background: var(--green-600);
    color: var(--white);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.footer-newsletter button:hover { background: var(--green-700); }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--ink-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--ink-500);
}
.footer-bottom-links {
    display: flex;
    gap: 24px;
}
.footer-bottom-links a {
    color: var(--ink-500);
    font-size: 13px;
}
.footer-bottom-links a:hover { color: var(--green-700); }

/* ====== Page-specific ====== */
.page-hero {
    padding: 64px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--green-50), transparent);
}
.page-hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: 12px;
}
.page-hero p {
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto;
}

/* About page */
.about-section {
    padding: 64px 0;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 48px 0;
}
.stat {
    background: var(--green-50);
    padding: 32px 16px;
    text-align: center;
    border-radius: var(--radius-md);
}
.stat .num {
    font-family: var(--ff-display);
    font-size: 40px;
    font-weight: 800;
    color: var(--green-700);
    line-height: 1;
    margin-bottom: 8px;
}
.stat .label {
    font-size: 13px;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Contact page */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 64px;
}
.contact-form {
    background: var(--white);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}
.field {
    margin-bottom: 20px;
}
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    color: var(--ink-900);
    background: var(--white);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--green-600);
    box-shadow: 0 0 0 3px rgba(111, 161, 63, 0.15);
}
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-info-card {
    background: var(--green-50);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.contact-info-card h3 { margin-bottom: 20px; }
.contact-info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}
.contact-info-item .ic {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--white);
    color: var(--green-700);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.contact-info-item .ic svg { width: 18px; height: 18px; }
.contact-info-item h4 {
    font-size: 14px;
    margin-bottom: 4px;
}
.contact-info-item p {
    margin: 0;
    font-size: 14px;
}
.contact-info-item a { font-size: 14px; }

/* Listing / archive pages */
.posts-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 48px;
}
.pagination a, .pagination span {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--ink-200);
    color: var(--ink-700);
}
.pagination a:hover { background: var(--green-50); border-color: var(--green-600); color: var(--green-700); }
.pagination .current { background: var(--green-600); color: var(--white); border-color: var(--green-600); }
.pagination .next { width: auto; padding: 0 16px; }

/* Single post */
.post-container {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.post-hero {
    padding: 48px 0 32px;
    text-align: center;
}
.post-hero .category-badge {
    position: static;
    display: inline-block;
    margin-bottom: 20px;
}
.post-hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 20px;
}
.post-hero .meta {
    font-size: 14px;
    color: var(--ink-500);
}
.post-feature-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 40px;
}
.post-body { padding-bottom: 64px; }
.post-body p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--ink-700);
}
.post-body h2 { margin: 40px 0 16px; }
.post-body h3 { margin: 32px 0 12px; }
.post-body img { border-radius: var(--radius-md); margin: 24px 0; }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 20px; }
.post-body li { margin-bottom: 8px; color: var(--ink-700); }

/* ====== Mobile ====== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .trust-strip-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }
    .site-header .container { height: 72px; }
    .logo img { width: 48px; height: 48px; }
    .logo { font-size: 18px; }

    .section { padding: 56px 0; }
    .articles-grid, .posts-list { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-strip-inner { grid-template-columns: 1fr; padding: 24px; }
    .trust-strip { margin-top: 0; padding-top: 24px; }
    .section-header { flex-direction: column; align-items: flex-start; }

    .newsletter-block { grid-template-columns: 1fr; padding: 32px 24px; text-align: center; }
    .newsletter-icon { margin: 0 auto; }
    .newsletter-form { max-width: 100%; }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 16px; }

    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .about-stats { grid-template-columns: 1fr; }

    .hero .hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 40px var(--gutter);
        min-height: auto;
    }
    .hero-visual {
        min-height: 260px;
        max-height: 320px;
        order: -1;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}
