/*
Theme Name: Newsmatic Child
Template: newsmatic
Description: Child theme for FindHealthTips.com with redesigned homepage
Version: 1.0
*/

/* =============================================
   CHECK THESE CALCULATORS — END OF POST
   ============================================= */

.fht-calc-suggest {
  margin: 48px 0 24px;
  background: linear-gradient(135deg, #f0faf8 0%, #e8f5f2 100%);
  border: 1.5px solid #c6e8e2;
  border-radius: 16px;
  overflow: hidden;
}

.fht-calc-suggest-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #c6e8e2;
  background: rgba(255,255,255,0.5);
}

.fht-calc-suggest-icon {
  font-size: 28px;
  line-height: 1;
}

.fht-calc-suggest-header h3 {
  font-size: 19px;
  font-weight: 800;
  color: #0f4c3e;
  margin: 0 0 2px;
  line-height: 1.2;
}

.fht-calc-suggest-header p {
  font-size: 13px;
  color: #4a7c70;
  margin: 0;
}

.fht-calc-suggest-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fht-calc-suggest-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  text-decoration: none;
  border-bottom: 1px solid #daf0ec;
  transition: background 0.2s;
  background: transparent;
}

.fht-calc-suggest-card:last-child {
  border-bottom: none;
}

.fht-calc-suggest-card:hover {
  background: rgba(26,127,110,0.07);
  text-decoration: none;
}

.fht-calc-suggest-emoji {
  font-size: 28px;
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.fht-calc-suggest-body {
  flex: 1;
  min-width: 0;
}

.fht-calc-suggest-body strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 3px;
  line-height: 1.3;
}

.fht-calc-suggest-body span {
  font-size: 13px;
  color: #4a7c70;
  line-height: 1.4;
}

.fht-calc-suggest-arrow {
  color: #1a7f6e;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.fht-calc-suggest-card:hover .fht-calc-suggest-arrow {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .fht-calc-suggest-header { padding: 16px 16px 12px; }
  .fht-calc-suggest-card   { padding: 14px 16px; gap: 12px; }
  .fht-calc-suggest-emoji  { width: 40px; height: 40px; font-size: 22px; }
}

/* =============================================
   INNER PAGE: FULL WIDTH — NO SIDEBAR OVERLAP
   ============================================= */

/* Hide both sidebars on all singular pages (posts, pages) */
.wp-singular .secondary-sidebar,
.wp-singular .secondary-left-sidebar,
.single .secondary-sidebar,
.single .secondary-left-sidebar,
.page .secondary-sidebar,
.page .secondary-left-sidebar {
  display: none !important;
  width: 0 !important;
}

/* Make primary content fill the full width when sidebars are hidden */
.wp-singular .primary-content,
.single .primary-content,
.page .primary-content {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

/* Fix the row layout so nothing overflows */
.wp-singular .newsmatic-container .row,
.single .newsmatic-container .row,
.page .newsmatic-container .row {
  display: block !important;
}

/* =============================================
   CLEAN NAV MENU FIX
   ============================================= */

/* Hide overflow from fallback wp_list_pages — only our clean nav shows */
.fht-clean-nav ul.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.fht-clean-nav ul.menu-list > li {
  position: relative;
}

.fht-clean-nav ul.menu-list > li > a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.fht-clean-nav ul.menu-list > li > a:hover,
.fht-clean-nav ul.menu-list > li:hover > a {
  background: rgba(26,127,110,0.1);
  color: #1a7f6e;
  text-decoration: none;
}

/* Dropdown */
.fht-clean-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  z-index: 9999;
}

.fht-clean-nav .menu-item-has-children:hover .sub-menu {
  display: block;
}

.fht-clean-nav .sub-menu li a {
  display: block;
  padding: 9px 18px;
  font-size: 14px;
  color: #2d3748;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.fht-clean-nav .sub-menu li a:hover {
  background: #e8f5f2;
  color: #1a7f6e;
  text-decoration: none;
}

/* Dropdown arrow indicator */
.fht-clean-nav .menu-item-has-children > a::after {
  content: ' ▾';
  font-size: 11px;
  opacity: 0.6;
}

/* =============================================
   GLOBAL RESETS & TYPOGRAPHY
   ============================================= */
:root {
  --primary: #1a7f6e;
  --primary-dark: #155f52;
  --primary-light: #e8f5f2;
  --accent: #f4a261;
  --text-dark: #1a1a2e;
  --text-mid: #4a5568;
  --text-light: #718096;
  --bg-white: #ffffff;
  --bg-soft: #f8fafb;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(26,127,110,0.18);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
}

/* =============================================
   HIDE DEFAULT NEWSMATIC HOMEPAGE ELEMENTS
   ============================================= */
.home.front-page #theme-content,
.home.front-page .newsmatic-main-banner,
.home.front-page .site-main > .newsmatic-container {
  display: none;
}

/* =============================================
   HOMEPAGE WRAPPER
   ============================================= */
.fht-homepage {
  width: 100%;
  overflow-x: hidden;
}

/* =============================================
   HERO SECTION
   ============================================= */
.fht-hero {
  background: linear-gradient(135deg, #0f4c3e 0%, #1a7f6e 50%, #2fb5a0 100%);
  color: white;
  padding: 80px 24px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fht-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.fht-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.fht-hero-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.fht-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.fht-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 20px;
  color: #fff;
  letter-spacing: -0.5px;
}

.fht-hero h1 span {
  color: #7ef0de;
}

.fht-hero p {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
  color: rgba(255,255,255,0.88);
  margin: 0 0 36px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.fht-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  padding: 15px 34px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.fht-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  color: var(--primary-dark);
  text-decoration: none;
}

.fht-hero-cta svg {
  width: 18px; height: 18px;
}

.fht-hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.fht-hero-stat {
  text-align: center;
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 40px;
}

.fht-hero-stat:first-child {
  border-left: none;
  padding-left: 0;
}

.fht-hero-stat strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.fht-hero-stat span {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
  display: block;
}

/* =============================================
   SECTION COMMON
   ============================================= */
.fht-section {
  padding: 64px 24px;
}

.fht-section-alt {
  background: var(--bg-soft);
}

.fht-section-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.fht-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.fht-section-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.fht-section-header h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 14px;
  letter-spacing: -0.3px;
}

.fht-section-header p {
  font-size: 17px;
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* =============================================
   CALCULATOR CARDS
   ============================================= */
.fht-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.fht-calc-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.fht-calc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #2fb5a0);
  transform: scaleX(0);
  transition: transform 0.25s ease;
  transform-origin: left;
}

.fht-calc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  text-decoration: none;
}

.fht-calc-card:hover::before {
  transform: scaleX(1);
}

.fht-calc-icon {
  width: 46px; height: 46px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.fht-calc-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
}

.fht-calc-card p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

.fht-calc-arrow {
  color: var(--primary);
  font-size: 18px;
  margin-top: auto;
  font-weight: 700;
  transition: transform 0.2s;
}

.fht-calc-card:hover .fht-calc-arrow {
  transform: translateX(4px);
}

/* =============================================
   CATEGORY PILLARS
   ============================================= */
.fht-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.fht-pillar {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  text-decoration: none;
  display: block;
}

.fht-pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.fht-pillar-header {
  padding: 28px 28px 20px;
  position: relative;
}

.fht-pillar-header.green { background: linear-gradient(135deg, #1a7f6e, #2fb5a0); }
.fht-pillar-header.orange { background: linear-gradient(135deg, #e76f51, #f4a261); }
.fht-pillar-header.blue { background: linear-gradient(135deg, #2b6cb0, #4299e1); }

.fht-pillar-icon-big {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}

.fht-pillar-header h3 {
  font-size: 22px;
  font-weight: 800;
  color: white;
  margin: 0 0 6px;
}

.fht-pillar-header p {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin: 0;
  line-height: 1.5;
}

.fht-pillar-links {
  padding: 20px 28px;
}

.fht-pillar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.fht-pillar-link:last-child {
  border-bottom: none;
}

.fht-pillar-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.fht-pillar-link::before {
  content: '→';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* =============================================
   RECENT POSTS
   ============================================= */
.fht-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

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

.fht-post-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.fht-post-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--primary-light);
}

.fht-post-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-light), #d0ede9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.fht-post-body {
  padding: 20px;
}

.fht-post-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
  text-decoration: none;
}

.fht-post-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin: 0 0 10px;
  text-decoration: none;
  display: block;
}

.fht-post-title:hover {
  color: var(--primary);
  text-decoration: none;
}

.fht-post-meta {
  font-size: 12px;
  color: var(--text-light);
}

.fht-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.25s;
}

.fht-view-all:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

.fht-view-all-wrap {
  text-align: center;
  margin-top: 10px;
}

/* =============================================
   TRUST BAR
   ============================================= */
.fht-trust {
  background: var(--primary);
  padding: 36px 24px;
  text-align: center;
}

.fht-trust-inner {
  max-width: 900px;
  margin: 0 auto;
}

.fht-trust p {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.fht-trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.fht-trust-item {
  color: white;
  font-size: 18px;
  font-weight: 800;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fht-trust-item span {
  font-size: 22px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .fht-hero { padding: 60px 20px 70px; }
  .fht-hero-stats { gap: 20px; }
  .fht-hero-stat { border-left: none; padding-left: 0; }
  .fht-section { padding: 48px 20px; }
  .fht-calc-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .fht-pillars { grid-template-columns: 1fr; }
  .fht-posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .fht-calc-grid { grid-template-columns: 1fr; }
}
