/* ==========================================================================
   HealthyVate — Static Blog Theme
   Style: magazine / blog, primary #3858F6, support light & dark
   ========================================================================== */

:root {
  --primary: #3858F6;
  --primary-dark: #2a43c9;
  --secondary: #D93E40;
  --black: #050505;
  --grey-bg: #f5f5f5;
  --border: #e5e5e5;
  --text: #222;
  --text-soft: #666;
  --card-bg: #ffffff;
  --header-bg: #0b0b0b;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --container: 1240px;
  --font: 'Segoe UI', 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html[data-theme='dark'] {
  --grey-bg: #161616;
  --border: #2c2c2c;
  --text: #e8e8e8;
  --text-soft: #9a9a9a;
  --card-bg: #1f1f1f;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --header-bg: #0b0b0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--card-bg);
  line-height: 1.65;
  font-size: 16px;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.bg-grey { background: var(--grey-bg); }

/* ---------- Header ---------- */
.site-header {
  background: var(--header-bg);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.header-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo img { height: 34px; width: auto; }
html[data-theme='light'] .logo .logo-dark { display: none; }
html[data-theme='dark'] .logo .logo-light { display: none; }

.mainmenu-nav { flex: 1; display: flex; justify-content: center; }
.mainmenu { display: flex; gap: 4px; }
.mainmenu > li { position: relative; }
.mainmenu > li > a {
  display: block;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .3px;
  color: rgba(255,255,255,.85);
  transition: color .2s;
}
.mainmenu > li > a:hover,
.mainmenu > li.active > a { color: #fff; }
.mainmenu > li.active > a::after {
  content: '';
  display: block;
  height: 2px;
  width: 20px;
  margin: 4px auto 0;
  background: var(--primary);
}
.axil-submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 180px;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: all .25s;
}
.has-dropdown:hover .axil-submenu,
.has-dropdown:focus-within .axil-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.axil-submenu a {
  display: block;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
}
.axil-submenu a:hover { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.search-toggle:hover { color: var(--primary); }

.my_switcher {
  display: flex;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.my_switcher button {
  font-size: 11px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  padding: 0;
  justify-content: center;
}
.my_switcher button.active { background: var(--primary); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 2px; }

/* Search popup */
.search-popup {
  display: none;
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 20px;
}
.search-popup.open { display: block; }
.search-form { max-width: 700px; margin: 0 auto; display: flex; gap: 10px; }
.search-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 15px;
  outline: none;
}
.search-form input::placeholder { color: rgba(255,255,255,.5); }
.search-form button {
  padding: 12px 26px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Section headers ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.section-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.3px;
  position: relative;
  padding-left: 16px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--primary);
}
.see-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}
.see-all:hover { text-decoration: underline; }

/* ---------- Hero slider ---------- */
.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.slider-nav { display: flex; gap: 8px; }
.slider-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
}
.slider-nav button:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.slider-main { position: relative; }
.slide { display: none; position: relative; border-radius: var(--radius); overflow: hidden; }
.slide.active { display: block; animation: fadeIn .5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.slide-link { display: block; position: relative; }
.slide-img img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  filter: brightness(.75);
}
.slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.75));
}
.post-number {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: var(--secondary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.slide-title {
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  max-width: 760px;
}
.slider-dots { display: flex; gap: 8px; margin-top: 18px; justify-content: center; }
.slider-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: all .25s;
}
.slider-dots span.active { width: 24px; background: var(--primary); }

/* ---------- Trending ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.cat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-thumb { aspect-ratio: 16/9; overflow: hidden; }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cat-card:hover .cat-thumb img { transform: scale(1.06); }
.cat-title {
  text-align: center;
  padding: 14px 10px;
  font-size: 14.5px;
  font-weight: 700;
}

/* ---------- Main layout (content + sidebar) ---------- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  padding-top: 20px;
  padding-bottom: 60px;
}
.content-area { min-width: 0; }

/* ---------- Healthy Lifestyle ---------- */
.life-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.life-card {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: box-shadow .25s;
}
.life-card:hover { box-shadow: var(--shadow); }
.life-card img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.life-card-big { flex-direction: column; grid-column: 1 / -1; padding: 0; overflow: hidden; }
.life-card-big img { width: 100%; height: 320px; border-radius: 0; }
.life-card-big .life-content { padding: 20px; }
.cat-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.life-card .title { font-size: 15px; line-height: 1.45; font-weight: 700; }
.life-card-big .title { font-size: 22px; font-weight: 800; }
.life-card .title a:hover { color: var(--primary); }
.post-meta { margin-top: 8px; font-size: 13px; color: var(--text-soft); }

/* ---------- Featured Posts grid ---------- */
.fp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.fp-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.fp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.fp-thumb { display: block; aspect-ratio: 4/3; overflow: hidden; }
.fp-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.fp-card:hover .fp-thumb img { transform: scale(1.06); }
.fp-content { padding: 16px; }
.fp-content .title { font-size: 16.5px; line-height: 1.45; font-weight: 700; }
.fp-content .title a:hover { color: var(--primary); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 30px; }
.widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.widget-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 34px;
  height: 2px;
  background: var(--primary);
}
.widget-search form { display: flex; gap: 8px; }
.widget-search input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--grey-bg);
  color: var(--text);
  outline: none;
  font-size: 14px;
}
.widget-search button {
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.widget-advert { padding: 0; overflow: hidden; }
.widget-advert a { display: block; }
.widget-advert img { width: 100%; }
.widget-advert.ad-trio img { padding: 14px; background: #fff; }
.widget-advert.ad-cbdfx img { background: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }

.recent-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.recent-item:last-child { border-bottom: none; }
.recent-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.recent-content h6 { font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.recent-content h6 a:hover { color: var(--primary); }
.recent-content .post-meta { margin-top: 4px; font-size: 12px; }

.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12.5px;
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all .2s;
}
.tag:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Single article ---------- */
.article-head { margin-bottom: 26px; }
.article-title { font-size: 34px; font-weight: 800; line-height: 1.3; margin: 10px 0 12px; }
.article-hero-img { margin-bottom: 28px; border-radius: var(--radius); overflow: hidden; }
.article-hero-img img { width: 100%; max-height: 460px; object-fit: cover; }
.article-content { font-size: 17px; line-height: 1.9; color: var(--text); }
.article-content p { margin-bottom: 20px; }
.article-content h2 { font-size: 24px; font-weight: 800; margin: 34px 0 14px; }
.article-content h3 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.article-content h4 { font-size: 18px; font-weight: 700; margin: 24px 0 10px; }
.article-content img { border-radius: var(--radius); }
.article-img { margin: 24px 0; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0; }
.related-posts { margin-top: 40px; }
.rel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rel-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  transition: box-shadow .25s;
}
.rel-item:hover { box-shadow: var(--shadow); }
.rel-item img { width: 76px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.rel-item h5 { font-size: 14px; line-height: 1.4; font-weight: 600; }
.rel-item h5 a:hover { color: var(--primary); }

/* ---------- Category / info pages ---------- */
.page-heading { margin-bottom: 30px; }
.page-title { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.page-heading p { color: var(--text-soft); }
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: box-shadow .25s, transform .25s;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card-thumb { display: flex; gap: 20px; align-items: flex-start; padding: 16px; }
.card-thumb { flex-shrink: 0; width: 220px; }
.card-thumb img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; transition: transform .4s; }
.post-card-thumb:hover .card-thumb img { transform: scale(1.03); }
.card-body { min-width: 0; flex: 1; padding-top: 6px; }
.post-card .title { font-size: 19px; font-weight: 700; line-height: 1.4; }
.post-card .title a:hover { color: var(--primary); }
.read-more { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--primary); }
.info-content p {
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-line;
}
.info-content p:first-child {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}
.info-content p:nth-of-type(2),
.info-content p:first-child + p {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.info-content p:first-child { color: var(--text); font-size: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: #0b0b0b; color: rgba(255,255,255,.8); }
.footer-top { border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-top-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-top .logo img { height: 32px; }
.follow { display: flex; align-items: center; gap: 16px; }
.follow-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0; }
.social-icon { display: flex; gap: 10px; }
.social-icon a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.social-icon a:hover { background: var(--primary); transform: translateY(-2px); }
.copyright-area { max-width: var(--container); margin: 0 auto; padding: 20px; }
.copyright-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}
.footer-menu { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-menu a:hover { color: var(--primary); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(56, 88, 246, .4);
}
.back-to-top.show { opacity: 1; visibility: visible; }

/* ---------- Mouse cursor ---------- */
.mouse-cursor { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .fp-grid { grid-template-columns: repeat(2, 1fr); }
  .main-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .article-title { font-size: 26px; }
  .rel-grid { grid-template-columns: 1fr; }
  .post-card-thumb { flex-direction: column; }
  .card-thumb { width: 100%; }
  .card-thumb img { height: 180px; }
  .mainmenu-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    flex-direction: column;
    padding: 16px 20px 26px;
    transform: translateY(-130%);
    transition: transform .3s;
    overflow-y: auto;
    max-height: calc(100vh - 76px);
  }
  .mainmenu-nav.open { transform: translateY(0); }
  .mainmenu { flex-direction: column; }
  .mainmenu > li > a { padding: 12px 0; }
  .axil-submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: none;
    box-shadow: none;
    border: none;
    color: rgba(255,255,255,.7);
    padding: 0 0 0 14px;
    display: none;
  }
  .has-dropdown.open .axil-submenu { display: block; }
  .nav-toggle { display: flex; }
  .life-grid { grid-template-columns: 1fr; }
  .slide-img img { height: 340px; }
  .slide-overlay { padding: 24px; }
  .slide-title { font-size: 22px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 40px 0; }
  .footer-top-inner { justify-content: center; }
  .copyright-inner { justify-content: center; text-align: center; }
}
@media (max-width: 520px) {
  .fp-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
}
