/* ============================================================
   My Health, My Strong — Health Magazine Template
   (faithful replica of indaily.veeplay.info)
   Colors:   #62A801 / #2C7704 (green)  #130F40 (dark text)
             #F7F7F7 (category gray)   black footer
   Fonts:    Poppins
   ============================================================ */

:root {
  --green: #62A801;
  --green-deep: #2C7704;
  --dark: #130F40;
  --text: #555555;
  --gray-bg: #F7F7F7;
  --border: #E8E8E8;
  --adv-bg: #ABABAB;
  --white: #FFFFFF;
  --container: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-deep); text-decoration: none; transition: color 0.25s ease; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

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

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.row > * { padding: 0 15px; }

.col-md-6 { width: 50%; }
.col-lg-4 { width: 33.3333%; }
.col-lg-8 { width: 66.6667%; }

/* line clamping */
.text-limit-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-limit-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Off-canvas Sidebar Menu (mobile)
   ============================================================ */
.sidebar-wrap {
  position: fixed;
  top: 0;
  right: -485px;
  width: 445px;
  height: 100%;
  background: var(--white);
  overflow-y: auto;
  box-shadow: -5px 0 20px -5px rgba(0, 0, 0, 0.5);
  z-index: 9999999;
  transition: right 0.5s ease-out;
}

.sidebar-wrap.sidebar-opened { right: 0; }

.sidebar-inner {
  position: relative;
  padding: 45px;
}

.sidebar-close {
  position: absolute;
  top: 22px;
  right: 20px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.sidebar-close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--dark);
  border-radius: 50%;
  line-height: 38px;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  color: var(--dark);
}

.sidebar-content {
  margin-top: 24px;
}

.sidebar-menu {
  list-style: none;
  margin-bottom: 30px;
}

.sidebar-menu a {
  display: block;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark);
  padding: 10px 0;
}

.sidebar-menu a:hover,
.sidebar-menu a.active { color: var(--green-deep); }

.sidebar-search {
  display: inline-block;
}

.sidebar-search a {
  display: inline-block;
  background: var(--green);
  padding: 13px 20px;
  border-radius: 4px;
  line-height: 0;
  transition: background 0.25s ease;
}

.sidebar-search a:hover { background: var(--green-deep); }

/* ============================================================
   Header
   ============================================================ */
.header-area {
  background: var(--white);
}

.header-area.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(19, 15, 64, 0.12);
}

.main-menu-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 20px;
}

.main-menu-area { flex: 1; display: flex; justify-content: center; }

.mainmenu ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.mainmenu a {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  padding: 10px 3px;
  margin: 0 12px;
  position: relative;
}

.mainmenu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0;
  height: 3px;
  background: var(--green);
  transition: width 0.3s ease;
}

.mainmenu a:hover::after,
.mainmenu a.active::after { width: 100%; }

.mainmenu a:hover,
.mainmenu a.active { color: var(--green-deep); }

/* The configurable homepage can expose more categories than the reference menu.
   Keep every generated anchor reachable on desktop instead of clipping the end. */
@media (min-width: 1200px) {
  .main-menu-wrap {
    min-height: 78px;
    height: auto;
    padding: 5px 0;
  }

  .mainmenu ul {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0;
  }

  .mainmenu a {
    font-size: 14px;
    margin: 0 8px;
  }
}

.header-log-reg ul { list-style: none; }

.header-log-reg a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--dark);
}

.header-log-reg a:hover { color: var(--green-deep); background: rgba(98, 168, 1, 0.09); }

.header-toggle-btn {
  display: none;
}

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  color: var(--dark);
  cursor: pointer;
}

.sidebar-toggle-btn:hover { color: var(--green-deep); }

/* ============================================================
   Advertisement
   ============================================================ */
.adv {
  max-width: 1200px;
  margin: auto;
  background: var(--adv-bg);
  color: #000000;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 14px;
  padding: 2px 0;
}

.adv-bottom { background: #F1F1F1; color: #999; line-height: 20px; font-size: 9px; margin-bottom: 5px; }

/* floating bottom ad (placeholder) */
.float-ad {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--white);
  z-index: 99999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.float-ad .adv-label {
  width: 100%;
  text-align: center;
  background: #F1F1F1;
  color: #000;
  font-size: 0.5rem;
  line-height: 20px;
}

.float-ad .ad-slot {
  width: 100%;
  min-width: 320px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 12px;
}

@media (max-width: 767px) {
  .float-ad { display: flex; }
}

/* ============================================================
   Hero Slider
   ============================================================ */
.banner-slider-area { position: relative; }

.slider-viewport { position: relative; overflow: hidden; }

.slider-track {
  list-style: none;
  display: flex;
  transition: transform 0.6s ease;
}

/* entrance animations for the active slide (matches original site) */
@keyframes fadeInLeft {
  0% { opacity: 0; transform: translate3d(-100%, 0, 0); }
  100% { opacity: 1; transform: none; }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translate3d(0, 100%, 0); }
  100% { opacity: 1; transform: none; }
}

@keyframes fadeInRight {
  0% { opacity: 0; transform: translate3d(100%, 0, 0); }
  100% { opacity: 1; transform: none; }
}

.slider-item.active .slider-text h2,
.slider-item.active .slider-text p,
.slider-item.active .slider-text .thm-btn,
.slider-item.active .hero-slider-img img {
  animation-fill-mode: both;
  animation-duration: 1s;
}

.slider-item.active .slider-text h2 { animation-name: fadeInLeft; animation-delay: 0.3s; }
.slider-item.active .slider-text p { animation-name: fadeInLeft; animation-delay: 0.5s; }
.slider-item.active .slider-text .thm-btn { animation-name: fadeInUp; animation-delay: 0.9s; }
.slider-item.active .hero-slider-img img { animation-name: fadeInRight; animation-delay: 0.3s; }

.slider-item {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  min-height: 430px;
  background-size: cover;
  background-position: center;
}

.slider-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(19, 15, 64, 0.9) 0%, rgba(19, 15, 64, 0.6) 55%, rgba(19, 15, 64, 0.15) 100%);
}

.slider-item .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 430px;
  padding-top: 33px;
  padding-bottom: 30px;
}

.slider-item .row {
  width: 100%;
  align-items: center;
}

.col-text { width: 58.3333%; align-self: center; }
.col-img { width: 41.6667%; }

.hero-slider-img img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.slider-text h2 {
  font-size: 45px;
  font-weight: 500;
  line-height: 55px;
  color: var(--white);
  margin-bottom: 14px;
}

.slider-text h2 a { color: var(--white); }
.slider-text h2 a:hover { color: #C5E8A8; }

.slider-text p {
  font-size: 16px;
  line-height: 26px;
  color: var(--white);
  margin-bottom: 22px;
}

.slider-text p a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
}

.button-bar { margin-top: 6px; }

.thm-btn {
  display: inline-block;
  background: var(--green-deep);
  color: var(--white);
  font-size: 16px;
  padding: 12px 12px 12px 40px;
  border-radius: 32px;
  line-height: 22.86px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.thm-btn:hover {
  background: var(--green);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(44, 119, 4, 0.4);
}

.thm-btn .arrow { margin-left: 17px; font-size: 15px; }

/* slider controls */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dark);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease;
}

.slider-arrow:hover { background: var(--green); color: #FFFFFF; }

.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }

.owl-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  display: flex;
  z-index: 5;
}

.owl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 0;
  margin: 15px 6px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.owl-dot.active { background: var(--green); }

/* ============================================================
   Category carousel (3 per page, seamless loop)
   ============================================================ */
.category-area {
  background: var(--gray-bg);
  padding: 50px 0 10px;
}

.category-slider { position: relative; padding: 0 10px; }

.category-viewport { overflow: hidden; }

.category-track {
  display: flex;
  transition: transform 0.6s ease;
}

.category-single {
  flex: 0 0 calc(33.3333% - 15px);
  min-width: calc(33.3333% - 15px);
  background: var(--white);
  padding: 20px 20px 10px;
  margin: 0 7.5px 30px;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-single:hover { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(19, 15, 64, 0.12); }

.mini-link { display: block; overflow: hidden; }

.mini-link img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-single:hover img { transform: scale(1.05); }

.category-cont { margin-top: 10px; }

.category-cont h4 {
  font-size: 24px;
  font-weight: 700;
  line-height: 24px;
  color: var(--dark);
  margin-bottom: 8px;
  min-height: 72px;
}

.category-cont h4 a { color: var(--dark); }
.category-cont h4 a:hover { color: var(--green-deep); }

/* ============================================================
   Wonderful Article
   ============================================================ */
.service-area { padding: 10px 0 50px; }

.sec-heading { text-align: center; margin-bottom: 10px; }

.sec-heading h2 {
  font-size: 30px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
}

.service-area .row { margin-top: 24px; }

.service-single {
  display: flex;
  align-items: center;
  padding: 20px;
  margin-bottom: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-single:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(19, 15, 64, 0.1); }

.service-img {
  flex-shrink: 0;
  width: 42%;
}

.service-img img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 4px;
}

.service-content { padding: 0 20px 0 30px; }

.service-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: #0F2B00;
  line-height: 27px;
  margin-bottom: 10px;
}

.service-content h3 a { color: #0F2B00; }
.service-content h3 a:hover { color: var(--green-deep); }

.service-content p {
  font-size: 13.5px;
  line-height: 24px;
  color: var(--text);
  margin-bottom: 14px;
}

.service-content p a { color: var(--text); }

.service-btn { margin-top: 4px; }

.service-btn a {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: 15px;
  padding: 5px 15px;
  border-radius: 4px;
  transition: background 0.25s ease;
}

.service-btn a:hover { background: var(--green-deep); }

/* ============================================================
   Latest Articles (same treatment as Wonderful Article)
   ============================================================ */
.news-area {
  background: var(--white);
  padding: 56px 0 48px;
}

.news-area .sec-heading {
  text-align: center;
  margin-bottom: 30px;
}

.news-area .sec-heading h2 {
  font-size: 30px;
  font-weight: 700;
  color: #000000;
}

.news-post {
  margin-top: 26px;
}

.news-post { margin-top: 26px; }

.news-single {
  background: var(--white);
  margin-bottom: 30px;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-single:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16); }

.post-media { position: relative; overflow: hidden; }

.post-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-single:hover .post-media img { transform: scale(1.05); }

.news-date {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
}

.news-date span {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 3px;
}

.news-post-content { padding: 18px 20px 22px; }

.news-post-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #0F2B00;
  line-height: 25px;
  margin-bottom: 8px;
}

.news-post-content h3 a { color: #0F2B00; }
.news-post-content h3 a:hover { color: var(--green-deep); }

.news-post-content p {
  font-size: 13.5px;
  line-height: 24px;
  color: var(--text);
}

.news-post-content p a { color: var(--text); }

/* ============================================================
   Article detail page (post.html)
   ============================================================ */
.post-detail { padding: 30px 0 10px; }

.post-detail .sec-heading { margin-bottom: 20px; }

.post-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 22px;
  color: var(--dark);
  margin: auto;
  max-width: 1200px;
  padding: 0 10px;
}

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

.dt p {
  color: var(--dark);
  font-size: 15px;
  line-height: 26px;
  margin-bottom: 12px;
}

.dt p.post-img {
  text-align: center;
  margin: 20px 0;
}

.dt img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}

.dt .post-img img:not([width]) { width: 100%; max-width: 360px; }

.dt h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--heading-deep);
  margin: 24px 0 10px;
}

.dt h4.post-section-title {
  font-size: 22px;
  border-left: 4px solid var(--green);
  padding-left: 12px;
}

.dt .post-list {
  margin: 0 0 14px;
  padding-left: 20px;
}

.dt .post-list li {
  list-style: disc;
  color: var(--dark);
  font-size: 15px;
  line-height: 26px;
  margin-bottom: 6px;
}

.post-related-title {
  font-size: 26px;
  font-weight: 600;
  color: #000000;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: #000000;
  color: var(--white);
  padding: 5px 0 10px;
  line-height: 24px;
}

.fp { text-align: center; }

.pt {
  margin: 0;
  height: 30px;
  display: flex;
  justify-content: center;
}

.pt p { margin: 0 10px; }

.pt a {
  line-height: 30px;
  text-decoration: underline;
  color: var(--white);
  font-size: 16px;
}

.pt a:hover { color: #C5E8A8; }

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet & mobile: hamburger menu below 1200px (meanScreenWidth 1199) */
@media (max-width: 1199px) {
  .main-menu-wrap { height: 62px; }
  .main-menu-area { display: none; }
  .header-toggle-btn { display: block; }
  .header-log-reg { margin-left: auto; }
}

/* Tablet */
@media (max-width: 1024px) {
  .col-text { width: 55%; }
  .col-img { width: 45%; }
  .slider-text h2 { font-size: 34px; line-height: 44px; }
  .service-single { align-items: flex-start; }
  .service-img { width: 38%; }
  .service-img img { height: 150px; }
}

/* Category carousel responsive widths (owl responsive config) */
@media (min-width: 768px) and (max-width: 990px) {
  .category-single {
    flex: 0 0 calc(50% - 15px);
    min-width: calc(50% - 15px);
  }
}

@media (min-width: 1920px) {
  .category-single {
    flex: 0 0 calc(25% - 15px);
    min-width: calc(25% - 15px);
  }
}

/* Mobile */
@media (max-width: 767px) {
  /* sidebar: full-width overlay on mobile */
  .sidebar-wrap { width: 100%; }
  .sidebar-close { top: 22px; right: 20px; }

  /* hero slider: text above, image below */
  .slider-item { min-height: auto; }
  .slider-item .container { min-height: auto; padding-top: 40px; padding-bottom: 64px; flex-direction: column; }
  .slider-item .row { flex-direction: column; }
  .col-text { width: 100%; margin-bottom: 24px; }
  .col-img { width: 100%; max-width: 380px; margin: 0 auto; }
  .slider-text h2 { font-size: 26px; line-height: 36px; }
  .slider-text p { font-size: 14.5px; line-height: 24px; }
  .slider-arrow { width: 38px; height: 38px; font-size: 15px; }
  .slider-arrow.prev { left: 10px; }
  .slider-arrow.next { right: 10px; }

  .category-area { padding: 36px 0 0; }
  /* 1 card per page on mobile (owl responsive: 0: {items:1}) */
  .category-single {
    flex: 0 0 calc(100% - 15px);
    min-width: calc(100% - 15px);
    padding: 14px 14px 8px;
    margin: 0 7.5px 20px;
  }
  .mini-link img { height: 110px; }
  .category-cont h4 { font-size: 17px; line-height: 22px; min-height: 44px; }

  .service-area { padding: 6px 0 30px; }
  .col-md-6 { width: 100%; }
  .sec-heading h2 { font-size: 24px; }
  .service-single { flex-direction: column; align-items: stretch; padding: 14px; }
  .service-img { width: 100%; }
  .service-img img { height: 190px; width: 100%; }
  .service-content { padding: 16px 6px 4px; }
  .service-content h3 { font-size: 19px; }

  .news-area { padding: 30px 0 16px; }
  .col-lg-4 { width: 100%; }
  .col-md-6 { width: 100%; }
  .news-single { margin-bottom: 22px; }
  .post-media img { height: 180px; }
  .news-area .sec-heading h2 { font-size: 24px; }

  .footer { flex-direction: column; text-align: center; justify-content: center; }
}

/* Language tools share one row with the search control on every viewport. */
.header-log-reg,
.sidebar-search,
.search-language-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.search-language-tools { justify-content: center; flex-wrap: wrap; }
.language-select {
  max-width: 125px;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid var(--green-deep);
  border-radius: 4px;
  background: var(--white);
  color: var(--dark);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.language-select:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 3px; }
