/*
Theme Name: HealthFitFresh Custom
Theme URI: https://healthfitfresh.com
Author: HealthFitFresh
Description: Custom lightweight magazine theme for HealthFitFresh. No page builder dependency. Built for speed, SEO, and easy content publishing.
Version: 1.0
Text Domain: hff
*/

/* ==========================================================================
   1. RESET / BASE / BRAND COLORS
   ========================================================================== */
:root {
  --hff-green: #8BFF00;
  --hff-green-dark: #5C9900;
  --hff-red: #E8432B;
  --hff-dark: #000000;
  --hff-text: #232323;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--hff-text);
  background: #fafafa;
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: 'Outfit', 'Poppins', sans-serif; font-weight: 700; margin: 0 0 .5em; line-height: 1.25; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   2. HEADER + MEGA MENU (logo left, nav centered, sticky)
   ========================================================================== */
/* Using position:fixed + an explicit body spacer instead of
   position:sticky. Sticky headers break (get clipped/overlapped) if
   ANY ancestor element has overflow set, or interacts badly with the
   WP admin bar / other fixed elements — fixed positioning avoids that
   whole category of bugs since it's always relative to the viewport. */
.site-header {
  background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.08);
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
}
body { padding-top: 50px; }
body.admin-bar .site-header { top: 32px; }
body.admin-bar { padding-top: 82px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
  body.admin-bar { padding-top: 96px; }
}
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 6px 20px; max-width: 1300px; margin: 0 auto; gap: 20px;
}
.site-logo img { max-height: 34px; display: block; }
.site-logo { justify-self: start; font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 700; color: var(--hff-green-dark); }
.header-spacer { justify-self: end; }

.hff-nav { justify-self: center; display: flex; gap: 4px; }
.hff-nav > ul { display: flex; gap: 4px; }
.hff-nav > ul > li { position: relative; }
.hff-nav > ul > li > a {
  display: block; padding: 14px 13px; font-weight: 600; font-size: 14px;
  text-transform: uppercase; letter-spacing: .3px; color: var(--hff-text);
  border-bottom: 3px solid transparent; transition: all .2s ease;
}
.hff-nav > ul > li:hover > a { color: var(--hff-green-dark); border-bottom-color: var(--hff-green); background: #f6fbee; border-radius: 8px 8px 0 0; }

/* Multi-level flyout dropdown — matches your original site's nested
   category menu. Category links only, fully editable from
   Appearance > Menus > Primary Mega Menu. First-level dropdown opens
   below the top nav item; each nested level flies out to the right.
   Modern styling: rounded corners, soft entrance animation, clear
   accent-bar hover state. */
.hff-nav li { position: relative; }
.hff-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; background: #fff;
  min-width: 240px; box-shadow: 0 18px 40px rgba(0,0,0,.16);
  border-radius: 12px; padding: 10px; z-index: 60;
  opacity: 0; transform: translateY(6px);
  animation: hffMenuIn .18s ease forwards;
}
@keyframes hffMenuIn { to { opacity: 1; transform: translateY(0); } }
.hff-nav li:hover > .sub-menu { display: block; }
.hff-nav .sub-menu .sub-menu { top: -10px; left: 100%; margin-left: -6px; }
.hff-nav .sub-menu li a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; font-size: 14px; white-space: nowrap; color: #333; border-radius: 8px;
  border-left: 3px solid transparent; transition: all .15s ease;
}
.hff-nav .sub-menu li a:hover {
  color: var(--hff-green-dark); background: #f6fbee; border-left: 3px solid var(--hff-green); padding-left: 14px; font-weight: 600;
}
.hff-nav .sub-menu li.menu-item-has-children > a::after { content: '\203A'; color: #8a8a8a; font-size: 17px; font-weight: 700; }
.hff-nav .sub-menu li.menu-item-has-children > a:hover::after { color: var(--hff-green-dark); }

.mobile-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; justify-self: end; color: var(--hff-text); line-height: 1; }

@media (max-width: 960px) {
  .header-inner { display: flex; align-items: center; justify-content: space-between; }
  .hff-nav { display: none; }
  .hff-nav.mobile-open {
    display: block; position: fixed; top: 50px; left: 0; right: 0; bottom: 0;
    background: #fff; overflow-y: auto; z-index: 998; padding: 6px 0 60px;
  }
  body.admin-bar .hff-nav.mobile-open { top: 82px; }
  .hff-nav.mobile-open > ul { display: flex; flex-direction: column; gap: 0; }
  .hff-nav.mobile-open li { width: 100%; border-bottom: 1px solid #f0f0f0; }

  /* Flat top-level links only — tapping always navigates straight to
     that category page (which already lists everything underneath it),
     no expand/collapse state to get stuck in. */
  .hff-nav.mobile-open > ul > li > a {
    display: block; padding: 17px 20px; font-weight: 600; font-size: 15.5px;
    text-transform: uppercase; letter-spacing: .3px; border-bottom: 0;
  }
  .hff-nav.mobile-open li:hover > a { background: none; }
  .hff-nav.mobile-open .sub-menu { display: none !important; }

  body.hff-nav-open { overflow: hidden; }
  .mobile-toggle { display: block; }
}

/* Mobile category tab strip — quick horizontal access to top-level
   sections, shown under the header on every page. Mobile only, not
   sticky (scrolls away with the page). */
.hff-mobile-tabs { display: none; }
@media (max-width: 960px) {
  .hff-mobile-tabs {
    display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px;
    background: #fff; border-bottom: 1px solid #eee; -webkit-overflow-scrolling: touch;
  }
  .hff-mobile-tabs::-webkit-scrollbar { display: none; }
  .hff-mobile-tabs a {
    flex: 0 0 auto; padding: 8px 16px; border-radius: 20px; background: #f4f4f4;
    font-size: 13px; font-weight: 600; color: #444; white-space: nowrap;
  }
  .hff-mobile-tabs a.current { background: var(--hff-green); color: #143d00; }
}

/* ==========================================================================
   3. HOMEPAGE MAGAZINE LAYOUT
   ========================================================================== */
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin: 30px 0; }
.hero-main { position: relative; border-radius: 14px; overflow: hidden; min-height: 440px; }
.hero-main img { width: 100%; height: 440px; object-fit: cover; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.hero-card { position: relative; border-radius: 14px; overflow: hidden; min-height: 210px; }
.hero-card img { width: 100%; height: 210px; object-fit: cover; }

.card-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0) 60%);
  padding: 18px;
}
.card-overlay .cat-tag {
  display: inline-block; background: var(--hff-green-dark); color: #fff; font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px; padding: 3px 10px; border-radius: 20px; margin-bottom: 8px;
}
.card-overlay h3 { color: #fff; font-size: 18px; margin: 0; }
.hero-main .card-overlay h3 { font-size: 28px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 46px 0 18px; }
.section-title h2 { font-size: 24px; border-left: 5px solid var(--hff-green); padding-left: 12px; }
.section-title a { font-size: 13px; text-transform: uppercase; font-weight: 600; color: var(--hff-green-dark); }

.post-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.post-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: transform .2s ease; }
.post-card:hover { transform: translateY(-4px); }
.post-card img { width: 100%; height: 160px; object-fit: cover; }
.post-card .pc-body { padding: 14px; }
.post-card .pc-body h3,
.popular-post-item h5,
.post-nav .pn-title,
.mega-col h4 {
  font-family: 'Poppins', sans-serif;
}
.post-card .cat-tag { color: var(--hff-green-dark); font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .4px; }
.post-card h3 { font-size: 16px; margin: 6px 0 0; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   4. SINGLE POST LAYOUT
   ========================================================================== */
.post-layout { display: grid; grid-template-columns: 2.4fr 1fr; gap: 40px; margin: 34px 0; align-items: start; }
.post-content-area { background: #fff; padding: 34px; border-radius: 14px; }
.post-content-area .entry-title { font-size: 34px; margin-bottom: 10px; }
.post-meta { color: #888; font-size: 13.5px; margin-bottom: 20px; text-transform: uppercase; letter-spacing: .4px; }
.entry-content { font-size: 17.5px; }
.entry-content p { margin: 0 0 20px; }
.entry-content h2 { font-size: 24px; margin-top: 34px; }
.entry-content h3 { font-size: 20px; margin-top: 28px; }
.entry-content img { border-radius: 10px; margin: 20px auto; }

.social-share { display: flex; gap: 10px; margin: 20px 0; }
.social-share a {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #f2f2f2; font-size: 14px; font-weight: 700; transition: transform .15s ease;
}
.social-share a:hover { transform: translateY(-2px); }
.social-share.fb a { color: #1877f2; }
.social-share.tw a { color: #000; }
.social-share.wa a { color: #25d366; }
.social-share.pin a { color: #e60023; }
.social-share.top { margin-top: 0; }
.social-share.bottom { border-top: 1px solid #eee; padding-top: 20px; margin-top: 30px; }

/* Sticky side share bar (desktop only) */
.social-share.side {
  position: sticky; top: 140px; flex-direction: column; width: 46px; margin: 0;
  float: left; margin-left: -66px; margin-top: 220px;
}
@media (max-width: 1160px) { .social-share.side { display: none; } }

.ad-slot { margin: 30px 0; text-align: center; clear: both; }
.ad-slot span.ad-label { display: block; font-size: 10px; color: #aaa; text-transform: uppercase; margin-bottom: 6px; }

.related-posts { margin-top: 44px; clear: both; }
.related-posts h3 { font-size: 20px; border-left: 5px solid var(--hff-green); padding-left: 12px; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* Previous / Next post navigation */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 34px; clear: both; }
.post-nav a { display: flex; align-items: center; gap: 12px; background: #f7f7f7; border-radius: 10px; padding: 12px; }
.post-nav .pn-next { flex-direction: row-reverse; text-align: right; }
.post-nav img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.post-nav .pn-label { font-size: 11px; text-transform: uppercase; color: var(--hff-green-dark); font-weight: 700; }
.post-nav .pn-title { font-size: 13.5px; font-weight: 600; }
@media (max-width: 700px) { .post-nav { grid-template-columns: 1fr; } }

/* Sidebar */
.sidebar-widget { background: #fff; border-radius: 14px; padding: 22px; margin-bottom: 24px; }
.sidebar-widget h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; margin-bottom: 14px; }
.popular-post-item { display: flex; gap: 12px; margin-bottom: 14px; }
.popular-post-item img { width: 66px; height: 66px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.popular-post-item h5 { font-size: 13.5px; margin: 0; line-height: 1.4; }

/* Sidebar tabs: Popular / Latest / Categories */
.sidebar-tabs { padding: 0; }
.tab-buttons { display: flex; border-radius: 10px 10px 0 0; overflow: hidden; }
.tab-buttons button {
  flex: 1; border: 0; padding: 12px 6px; font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  background: #f0f0f0; color: #666; cursor: pointer; letter-spacing: .3px;
}
.tab-buttons button.active { background: var(--hff-green); color: #fff; }
.tab-panels { padding: 18px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel .cat-list li { margin-bottom: 10px; }
.tab-panel .cat-list a { font-size: 14px; color: #444; }
.tab-panel .cat-list a:hover { color: var(--hff-green-dark); }

/* Social follow — card style (icon, count, label) */
.social-follow-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sf-card {
  background: #f7f7f7; border-radius: 12px; padding: 16px 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s ease;
}
.sf-card:hover { transform: translateY(-3px); }
.sf-icon { width: 26px; height: 26px; }
.sf-icon svg { width: 100%; height: 100%; }
.sf-facebook .sf-icon, .sf-card.sf-facebook .sf-icon svg { color: #1877f2; }
.sf-card strong { font-size: 16px; color: #222; }
.sf-label { font-size: 12px; color: #888; }
.sf-facebook .sf-icon { color: #1877f2; }
.sf-youtube .sf-icon { color: #ff0000; }
.sf-twitter .sf-icon { color: #000; }
.sf-pinterest .sf-icon { color: #e60023; }
.sf-instagram .sf-icon { color: #d6249f; }

/* Sidebar search */
.hff-search-form { display: flex; gap: 8px; }
.hff-search-form input {
  flex: 1; border: 1px solid #e2e2e2; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.hff-search-form button {
  border: 0; background: var(--hff-green); color: #fff; border-radius: 8px; width: 42px; display: flex;
  align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}

/* Icon sizing wherever hff_icon() SVGs are used (share buttons, footer) */
.social-share a svg, .footer-social a svg { width: 17px; height: 17px; }
.social-share a, .footer-social a { display: flex; align-items: center; justify-content: center; }

/* Back to top button */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 10px;
  background: #000; color: var(--hff-green); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  z-index: 500; border: 2px solid var(--hff-green); cursor: pointer;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* Load more button */
.load-more-wrap { text-align: center; margin: 40px 0; }
.load-more-btn {
  background: var(--hff-green); color: #fff; border: 0; padding: 14px 34px; border-radius: 30px;
  font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; cursor: pointer;
}
.load-more-btn:disabled { opacity: .6; cursor: default; }
.sidebar-tools-list li { margin-bottom: 12px; }
.sidebar-tools-list a { font-size: 14px; color: #444; }
.sidebar-tools-list a:hover { color: var(--hff-green-dark); }

/* Pagination */
.pagination, .nav-links { display: flex; gap: 8px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.page-numbers { display: inline-block; padding: 8px 15px; border-radius: 8px; background: #fff; font-size: 14px; font-weight: 600; }
.page-numbers.current { background: var(--hff-green); color: #fff; }
.page-numbers.dots { background: transparent; }

@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.site-footer { background: var(--hff-dark); color: #fff; margin-top: 60px; padding: 56px 0 0; position: relative; }
.site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--hff-green), var(--hff-green-dark), var(--hff-green));
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 20px 50px; }
.footer-col { padding-right: 10px; }
.footer-col:not(:last-child) { border-right: 1px solid #222; }
.footer-col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 18px; }
.footer-logo { max-height: 84px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-desc { color: #fff; font-size: 13.5px; max-width: 300px; line-height: 1.8; margin-bottom: 18px; }
.footer-copyright { color: #fff; font-size: 12.5px; line-height: 1.8; max-width: 320px; margin: 0 0 22px; opacity: .85; }
.footer-bottom-bar { text-align: left; padding: 20px 20px; margin-top: 40px; border-top: 1px solid #222; font-size: 13px; color: #fff; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #fff; font-size: 14px; opacity: .8; }
.footer-col ul li a:hover { color: var(--hff-green); opacity: 1; }
.footer-social { display: flex; gap: 10px; margin-top: 26px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px; background: #1a1a1a; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--hff-green); color: #1c1c1c; }
.footer-popular-title { color: #fff !important; }
.footer-popular-title a {
  color: #fff; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4;
}
.footer-popular-title a:hover { color: var(--hff-green); opacity: 1; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px 24px; }
  .footer-col:not(:last-child) { border-right: 0; border-bottom: 1px solid #222; padding-bottom: 20px; }
  .footer-col .popular-post-item { margin-bottom: 18px; align-items: flex-start; gap: 10px; }
  .footer-col .popular-post-item img { width: 52px; height: 52px; }
  .footer-popular-title { font-size: 12.5px; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col:not(:last-child) { border-bottom: 1px solid #222; padding-bottom: 24px; margin-bottom: 4px; }
  .footer-col .popular-post-item { margin-bottom: 16px; }
  .footer-popular-title a { -webkit-line-clamp: 1; }
}

/* ==========================================================================
   6. TOOLS PAGE
   ========================================================================== */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 30px 0; }
.tool-card { background: #fff; border-radius: 14px; padding: 26px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: transform .2s ease; }
.tool-card:hover { transform: translateY(-4px); }
.tool-card .tool-icon { font-size: 34px; margin-bottom: 12px; }
.tool-card h3 { font-size: 17px; margin-bottom: 6px; }
.tool-card p { font-size: 13.5px; color: #777; margin: 0; }
@media (max-width: 900px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tools-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   7. PROFESSIONAL TOOLS PAGE
   ========================================================================== */
.tools-hero { text-align: center; max-width: 640px; margin: 50px auto 30px; }
.tools-hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.tools-hero p { color: #666; font-size: 16px; }

.tools-page-layout { display: flex; gap: 24px; align-items: flex-start; justify-content: center; max-width: 1200px; margin: 0 auto; }
.tools-side-ad { flex: 0 0 160px; position: sticky; top: 100px; }
.tools-grid-pro { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 900px; margin: 0 auto 20px; flex: 1; }
@media (max-width: 1150px) { .tools-side-ad { display: none; } }
.tool-card-pro {
  display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 14px;
  padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: box-shadow .2s ease, transform .2s ease;
}
.tool-card-pro:hover { box-shadow: 0 10px 26px rgba(0,0,0,.09); transform: translateY(-2px); }
.tool-icon-pro {
  width: 46px; height: 46px; border-radius: 12px; background: rgba(139,255,0,.14); color: var(--hff-green-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tool-icon-pro svg { width: 22px; height: 22px; }
.tool-card-pro-text { flex: 1; min-width: 0; }
.tool-card-pro h3 { font-size: 15.5px; margin: 0 0 3px; font-family: 'Poppins', sans-serif; font-weight: 600; }
.tool-card-pro p { font-size: 12.5px; color: #888; margin: 0; line-height: 1.4; }
.tool-arrow { color: #ccc; flex-shrink: 0; }
.tool-arrow svg { width: 18px; height: 18px; }
.tool-card-pro:hover .tool-arrow { color: var(--hff-green-dark); }

@media (max-width: 700px) { .tools-grid-pro { grid-template-columns: 1fr; } }

/* Homepage tools teaser — same professional card style, compact */
.tools-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 10px; }
@media (max-width: 900px) { .tools-teaser-grid { grid-template-columns: 1fr; } }

/* Sidebar tools widget — consistent single-color icon, no emoji */
.sidebar-tools-list { display: flex; flex-direction: column; gap: 4px; }
.sidebar-tools-list li { margin: 0; }
.sidebar-tools-list a {
  display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; color: #444;
}
.sidebar-tools-list a:hover { color: var(--hff-green-dark); }
.sidebar-tools-list .st-icon { width: 26px; height: 26px; border-radius: 8px; background: rgba(139,255,0,.14); color: var(--hff-green-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-tools-list .st-icon svg { width: 13px; height: 13px; }
.sidebar-tools-list .st-see-all { color: var(--hff-green-dark); font-weight: 600; padding-left: 36px; }

/* ==========================================================================
   8. CALCULATOR PAGES
   ========================================================================== */
.calc-intro { font-size: 17px; color: #555; margin-top: -6px; }
.calc-widget-wrap { background: #f7f9f4; border: 1px solid #e8f0dd; border-radius: 16px; padding: 30px; margin: 26px 0; }
.hff-calc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px 20px; }
.hff-calc-field { display: flex; flex-direction: column; gap: 6px; }
.hff-calc-field label { font-size: 12.5px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: .3px; }
.hff-calc-field input, .hff-calc-field select {
  border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-size: 15px; font-family: 'Poppins', sans-serif; background: #fff;
}
.hff-calc-submit {
  grid-column: 1 / -1; background: #000; color: #fff; border: 2px solid #000; border-radius: 30px;
  padding: 14px; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .4px; cursor: pointer; margin-top: 4px;
  transition: all .2s ease;
}
.hff-calc-submit:hover { background: #fff; color: #000; }
.hff-calc-result {
  display: none; margin-top: 22px; padding: 20px; background: #fff; border-left: 4px solid var(--hff-green);
  border-radius: 10px; font-size: 15px; line-height: 1.7;
}
.hff-calc-result.visible { display: block; }

.calc-how-to { margin: 34px 0; }
.calc-how-to ol { padding-left: 20px; }
.calc-how-to li { margin-bottom: 10px; font-size: 15.5px; }

.calc-faqs { margin: 40px 0; }
.calc-faq-item { border: 1px solid #eee; border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.calc-faq-item summary { font-weight: 600; cursor: pointer; font-size: 15px; }
.calc-faq-item p { margin: 12px 0 0; color: #555; font-size: 14.5px; }

.related-tools-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool-card-pro.small { padding: 14px; }
.tool-card-pro.small .tool-icon-pro { width: 36px; height: 36px; }
.tool-card-pro.small .tool-icon-pro svg { width: 17px; height: 17px; }
.tool-card-pro.small h3 { font-size: 13.5px; margin: 0; }
@media (max-width: 900px) { .related-tools-row { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   9. HOMEPAGE — TRENDING NOW (animated marquee) + EDITOR'S PICKS LIST
   ========================================================================== */
.trending-marquee { overflow: hidden; position: relative; padding: 6px 2px 10px; }
.trending-marquee::before, .trending-marquee::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none;
}
.trending-marquee::before { left: 0; background: linear-gradient(to right, #fafafa, transparent); }
.trending-marquee::after { right: 0; background: linear-gradient(to left, #fafafa, transparent); }
.trending-track {
  display: flex; gap: 20px; width: max-content;
  animation: hffMarquee 32s linear infinite;
}
.trending-marquee:hover .trending-track { animation-play-state: paused; }
@keyframes hffMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.trending-item { flex: 0 0 220px; transition: transform .2s ease; }
.trending-item:hover { transform: translateY(-4px); }
.trending-item img, .trending-item .ph { width: 220px; height: 140px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.trending-item h3 { font-size: 14.5px; font-family: 'Poppins', sans-serif; font-weight: 600; margin: 0 0 6px; line-height: 1.4; }
.trending-item .trending-date { font-size: 12px; color: #999; }

.editors-picks-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.editors-pick-item { display: flex; gap: 14px; align-items: center; }
.editors-pick-item img, .editors-pick-item .ph { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.editors-pick-item h3 { font-size: 14.5px; font-family: 'Poppins', sans-serif; font-weight: 600; margin: 0; line-height: 1.4; }
@media (max-width: 700px) { .editors-picks-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .trending-track { animation: none; } }

/* ==========================================================================
   10. GENERAL MOBILE POLISH
   ========================================================================== */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .post-content-area { padding: 20px; }
  .entry-title { font-size: 26px; }
  .tools-hero h1 { font-size: 26px; }
  .hero-main, .hero-main img { height: 280px; }
  .hero-card, .hero-card img { height: 150px; }
  .social-share.side { display: none; }
  .container { padding: 0 16px; }
  .back-to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

/* Breadcrumbs */
.hff-breadcrumbs { font-size: 12.5px; color: #999; margin-bottom: 14px; }
.hff-breadcrumbs a { color: #999; }
.hff-breadcrumbs a:hover { color: var(--hff-green-dark); }
.hff-breadcrumbs .crumb-sep { margin: 0 8px; color: #ccc; }
.hff-breadcrumbs span[aria-current] { color: #666; }

/* Homepage search bar */
.home-search-form {
  display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 24px auto 10px;
  background: #fff; border: 1px solid #e6e6e6; border-radius: 14px; padding: 6px 6px 6px 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.home-search-form svg { color: #999; flex-shrink: 0; }
.home-search-form input { flex: 1; border: 0; outline: none; font-size: 15px; font-family: 'Poppins', sans-serif; padding: 10px 0; }
.home-search-form button {
  background: #000; color: #fff; border: 0; border-radius: 10px; padding: 12px 22px;
  font-weight: 600; font-size: 13.5px; cursor: pointer; flex-shrink: 0;
}
.home-search-form button:hover { background: var(--hff-green); color: #143d00; }

/* Tools ad slot layout spacing */
.tools-side-ad .ad-slot { margin: 0; }

/* Empty-state notice on homepage when no posts exist yet */
.hff-empty-state {
  background: #fffbea; border: 1px solid #f5e6a8; border-radius: 12px;
  padding: 18px 22px; margin: 20px 0; font-size: 14.5px; color: #6b5b1e;
}
.hff-empty-state strong { display: block; margin-bottom: 6px; font-size: 15px; }
.hff-empty-state p { margin: 0; line-height: 1.6; }
