/*
Theme Name: MINHUI Native Astra
Theme URI: https://minhuiglobal.com/
Description: Astra child theme that preserves the MINHUI design using native WordPress content.
Author: MINHUI
Template: astra
Version: 1.0.34
Text Domain: minhui-native-astra
*/

:root {
  --minhui-blue: #1689d5;
  --minhui-dark: #153243;
  --minhui-text: #333333;
  --minhui-surface: #ffffff;
}

body.minhui-native-site {
  color: var(--minhui-text);
}

/* Preserve Elementor's original boxed widths while preventing edge-to-edge text. */
.minhui-native-site .elementor-top-section.elementor-section-boxed > .elementor-container {
  width: min(1200px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.minhui-native-form-slot {
  width: 100%;
}

.minhui-native-form-missing {
  padding: 24px;
  border: 1px solid #d8e5ee;
  background: #f7fbfe;
  text-align: center;
}

.minhui-native-form-missing a {
  display: inline-block;
  padding: 12px 24px;
  color: #fff;
  background: var(--minhui-blue);
  border-radius: 3px;
}

.minhui-native-modal[hidden] {
  display: none !important;
}

.minhui-native-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.minhui-native-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .62);
}

.minhui-native-modal__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 32px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .28);
}

.minhui-native-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  color: #333;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.minhui-native-modal__panel--social {
  width: min(560px, 100%);
}

.minhui-native-modal__panel--social .elementor {
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.forminator-ui.forminator-custom-form .forminator-label {
  color: var(--minhui-text) !important;
  font-weight: 500 !important;
}

.forminator-ui.forminator-custom-form .forminator-input,
.forminator-ui.forminator-custom-form .forminator-textarea {
  border: 1px solid #d8d8d8 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.forminator-ui.forminator-custom-form .forminator-button-submit {
  min-width: 140px;
  border-radius: 0 !important;
  color: #fff !important;
  background: #0073df !important;
  transition: color .2s ease, background-color .2s ease;
}

.forminator-ui.forminator-custom-form .forminator-button-submit:hover,
.forminator-ui.forminator-custom-form .forminator-button-submit:focus,
.forminator-ui.forminator-custom-form .forminator-button-submit:active {
  color: #fff !important;
  background: #84c4ff !important;
}

/* Keep the Contact artwork and heading separate so the text stays readable. */
.elementor-33 .elementor-element.elementor-element-ede6f42 {
  min-height: 0;
  padding: 260px 0 48px !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  background-size: 720px auto !important;
  background-attachment: scroll !important;
}

.elementor-33 .elementor-element.elementor-element-ede6f42 > .elementor-container {
  width: min(1140px, calc(100% - 40px));
  max-width: 1140px !important;
  min-height: 0;
  align-items: center;
}

.elementor-33 .elementor-element.elementor-element-9b2b193 > .elementor-element-populated {
  justify-content: center;
  padding: 0 !important;
}

.elementor-33 .elementor-element.elementor-element-ede6f42 .elementor-heading-title {
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.1;
}

/* The legacy header only switches to its mobile menu at 1024px. Keep the
   narrow desktop range tidy instead of allowing contact and menu items to
   collide or wrap onto each other. */
@media (min-width: 1025px) and (max-width: 1199px) {
  #header_pop .elementor-element-11c81b43 > .elementor-container {
    display: grid !important;
    grid-template-columns: minmax(360px, 1fr) max-content 48px;
    column-gap: 14px;
    align-items: center;
    box-sizing: border-box;
    padding-right: 120px;
  }

  #header_pop .elementor-element-11c81b43 > .elementor-container > .elementor-column {
    width: auto !important;
  }

  #header_pop .elementor-element-2a5daab2 > .elementor-widget-wrap,
  #header_pop .elementor-element-3ceebf8f > .elementor-widget-wrap,
  #header_pop .elementor-element-5eaeceda > .elementor-widget-wrap,
  #header_pop .elementor-element-8ca943d {
    margin-left: 0 !important;
  }

  #header_pop .elementor-element-3840a4cc,
  #header_pop .elementor-element-8ca943d {
    width: auto !important;
  }

  #header_pop .elementor-element-1f797864 .elementor-icon-list-items,
  #header_pop .elementor-element-3840a4cc .elementor-icon-list-items,
  #header_pop #menu-primary-menu {
    flex-wrap: nowrap !important;
  }

  #header_pop #menu-primary-menu > li > a {
    padding-right: 8px !important;
    padding-left: 8px !important;
    font-size: 15px !important;
    white-space: nowrap;
  }
}

.elementor-widget-video .elementor-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.elementor-widget-video .elementor-video,
.elementor-widget-video .elementor-video iframe,
.elementor-widget-video .elementor-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

body.minhui-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .minhui-native-site .elementor-top-section.elementor-section-boxed > .elementor-container {
    width: calc(100% - 28px);
  }

  .elementor-33 .elementor-element.elementor-element-ede6f42 {
    padding: 155px 0 36px !important;
    background-size: calc(100% - 28px) auto !important;
  }

  .elementor-33 .elementor-element.elementor-element-ede6f42 > .elementor-container {
    width: calc(100% - 28px);
    max-width: calc(100% - 28px) !important;
  }
}

.minhui-native-slider .swiper-slide {
  display: none;
}

.minhui-native-slider .swiper-slide.is-active {
  display: block;
}

.minhui-native-carousel .swiper-wrapper {
  display: flex;
  transition: transform .45s ease;
}

.minhui-native-carousel .swiper-slide {
  flex: 0 0 16.6667%;
}

.minhui-native-post {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0;
}

.minhui-native-post__header {
  max-width: 900px;
  margin: 0 auto 36px;
  text-align: center;
}

.minhui-native-post__title {
  margin: 0 0 16px;
  color: var(--minhui-dark);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
}

.minhui-native-post__meta {
  color: #6a7480;
  font-size: 14px;
}

.minhui-native-post__image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 38px;
}

.minhui-native-post__content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
}

.minhui-native-post__content img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 976px) {
  .minhui-native-carousel .swiper-slide {
    flex-basis: 33.3333%;
  }
}

@media (max-width: 767px) {
  .minhui-native-modal {
    padding: 12px;
  }

  .minhui-native-modal__panel {
    max-height: calc(100vh - 24px);
    padding: 28px 18px 18px;
  }

  .minhui-native-carousel .swiper-slide {
    flex-basis: 50%;
  }

  .minhui-native-post {
    width: min(100% - 28px, 900px);
    padding: 44px 0;
  }
}

.minhui-native-lightbox[hidden] { display: none; }
.minhui-native-site .elementor-gallery__container {
  display: grid;
  grid-template-columns: repeat(var(--minhui-gallery-columns, 3), minmax(0, 1fr));
  gap: var(--minhui-gallery-gap, 10px);
}
.minhui-native-site .elementor-gallery__container .e-gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.minhui-native-site .elementor-gallery__container .e-gallery-image {
  position: absolute;
  inset: 0;
  padding: 0 !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: transform .35s ease;
}
.minhui-native-site .elementor-gallery__container .e-gallery-item:hover .e-gallery-image { transform: scale(1.04); }
.minhui-native-site .elementor-swiper-button {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.minhui-native-site .elementor-swiper-button::before {
  color: currentColor;
  font: 400 38px/1 Arial, sans-serif;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.minhui-native-site .elementor-swiper-button-prev::before { content: '\2039'; }
.minhui-native-site .elementor-swiper-button-next::before { content: '\203a'; }
.minhui-native-site .elementor-custom-embed-image-overlay {
  cursor: pointer;
}
.minhui-native-site .elementor-custom-embed-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(216, 20, 28, .92);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
}
.minhui-native-site .elementor-custom-embed-play::before {
  content: '';
  position: absolute;
  left: 29px;
  top: 22px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #fff;
}
@media (max-width: 976px) {
  .minhui-native-site .elementor-gallery__container {
    grid-template-columns: repeat(var(--minhui-gallery-tablet, 2), minmax(0, 1fr));
    gap: var(--minhui-gallery-gap-tablet, 10px);
  }
}
@media (max-width: 767px) {
  .minhui-native-site .elementor-gallery__container {
    grid-template-columns: repeat(var(--minhui-gallery-mobile, 1), minmax(0, 1fr));
    gap: var(--minhui-gallery-gap-mobile, 10px);
  }
}
.minhui-native-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 5rem;
  background: rgba(0, 0, 0, .9);
}
.minhui-native-lightbox figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.minhui-native-lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 8rem); margin: auto; object-fit: contain; }
.minhui-native-lightbox figcaption { margin-top: .75rem; color: #fff; }
.minhui-native-lightbox button {
  position: absolute;
  border: 0;
  padding: .5rem .75rem;
  background: transparent;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
}
.minhui-native-lightbox__close { top: 1rem; right: 1rem; }
.minhui-native-lightbox__previous { left: 1rem; top: 50%; transform: translateY(-50%); }
.minhui-native-lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 767px) {
  .minhui-native-lightbox { padding: 3rem 2.75rem; }
  .minhui-native-lightbox__previous { left: .25rem; }
  .minhui-native-lightbox__next { right: .25rem; }
}


/* Keep the Blog heading and legal pages aligned with the site's 1200px content grid. */
.minhui-blog-index-header {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto 2rem;
  text-align: center;
}
body.privacy-policy #content.site-content {
  width: min(1200px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
  padding: 40px 0 60px;
  box-sizing: border-box;
}
@media (max-width: 767px) {
  .minhui-blog-index-header {
    width: calc(100% - 32px);
    margin-bottom: 1.5rem;
  }
  body.privacy-policy #content.site-content {
    width: calc(100% - 32px);
    padding: 28px 0 40px;
  }
}


/* Blog archive: use the same centered 1200px grid as the rest of the site. */
body.blog #content.site-content , body.archive.category #content.site-content {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  box-sizing: border-box;
}
body.blog #primary , body.archive.category #primary {
  width: 100%;
  margin: 0;
  padding: 40px 0 72px;
  box-sizing: border-box;
}
body.blog #main.site-main , body.archive.category #main.site-main { width: 100%; }
body.blog #main.site-main > .ast-row , body.archive.category #main.site-main > .ast-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
  margin: 0;
}
body.blog #main.site-main > .ast-row > .minhui-blog-index-header , body.archive.category #main.site-main > .ast-row > .minhui-blog-index-header {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 0 4px;
  text-align: center;
}
body.blog #main.site-main > .ast-row > article , body.archive.category #main.site-main > .ast-row > article {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  float: none;
  display: flex;
}
body.blog #main.site-main > .ast-row > article .ast-article-inner , body.archive.category #main.site-main > .ast-row > article .ast-article-inner {
  width: 100%;
  margin: 0;
  padding: 28px 26px 24px;
  box-sizing: border-box;
  display: flex;
  border: 1px solid #e2ebf4;
  border-top: 4px solid var(--minhui-blue, #1689d5);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 56, 92, .08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
body.blog #main.site-main > .ast-row > article .ast-article-inner:hover , body.archive.category #main.site-main > .ast-row > article .ast-article-inner:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 137, 213, .45);
  box-shadow: 0 14px 30px rgba(16, 56, 92, .14);
}
body.blog #main.site-main > .ast-row > article .post-content , body.archive.category #main.site-main > .ast-row > article .post-content {
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
}
body.blog #main.site-main > .ast-row > article .entry-title , body.archive.category #main.site-main > .ast-row > article .entry-title {
  margin: 0 0 15px;
  font-size: clamp(1.2rem, 1.6vw, 1.48rem);
  line-height: 1.38;
}
body.blog #main.site-main > .ast-row > article .entry-title a , body.archive.category #main.site-main > .ast-row > article .entry-title a {
  color: #1e3855;
  text-decoration: none;
}
body.blog #main.site-main > .ast-row > article .entry-title a:hover , body.archive.category #main.site-main > .ast-row > article .entry-title a:hover {
  color: var(--minhui-blue, #1689d5);
}
body.blog #main.site-main > .ast-row > article .ast-excerpt-container , body.archive.category #main.site-main > .ast-row > article .ast-excerpt-container {
  flex: 1 1 auto;
  color: #5f6f80;
  font-size: .98rem;
  line-height: 1.78;
}
body.blog #main.site-main > .ast-row > article .ast-excerpt-container p , body.archive.category #main.site-main > .ast-row > article .ast-excerpt-container p { margin: 0; }
body.blog #main.site-main > .ast-row > article .read-more , body.archive.category #main.site-main > .ast-row > article .read-more { margin: 22px 0 0; }
body.blog #main.site-main > .ast-row > article .read-more a , body.archive.category #main.site-main > .ast-row > article .read-more a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .62rem 1rem;
  border-radius: 999px;
  background: var(--minhui-blue, #1689d5);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
}
body.blog #main.site-main > .ast-row > article .read-more a:hover , body.archive.category #main.site-main > .ast-row > article .read-more a:hover {
  background: #0d70b5;
  color: #fff;
}
body.blog .ast-pagination , body.archive.category .ast-pagination {
  grid-column: 1 / -1;
  margin-top: 20px;
  text-align: center;
}
body.blog .ast-pagination .nav-links , body.archive.category .ast-pagination .nav-links { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
body.blog .ast-pagination .page-numbers , body.archive.category .ast-pagination .page-numbers {
  min-width: 38px;
  padding: .5rem .72rem;
  box-sizing: border-box;
  border: 1px solid #dce7f1;
  border-radius: 999px;
  color: #31506d;
  line-height: 1.2;
  text-decoration: none;
}
body.blog .ast-pagination .page-numbers.current,
body.blog .ast-pagination .page-numbers:hover , body.archive.category .ast-pagination .page-numbers.current,
body.blog .ast-pagination .page-numbers:hover {
  border-color: var(--minhui-blue, #1689d5);
  background: var(--minhui-blue, #1689d5);
  color: #fff;
}
@media (max-width: 1023px) {
  body.blog #main.site-main > .ast-row , body.archive.category #main.site-main > .ast-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
}
@media (max-width: 767px) {
  body.blog #content.site-content , body.archive.category #content.site-content { width: calc(100% - 32px); }
  body.blog #primary , body.archive.category #primary { padding: 28px 0 48px; }
  body.blog #main.site-main > .ast-row , body.archive.category #main.site-main > .ast-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  body.blog #main.site-main > .ast-row > .minhui-blog-index-header , body.archive.category #main.site-main > .ast-row > .minhui-blog-index-header { margin-bottom: 2px; }
  body.blog #main.site-main > .ast-row > article .ast-article-inner , body.archive.category #main.site-main > .ast-row > article .ast-article-inner { padding: 24px 22px 22px; }
  body.blog #main.site-main > .ast-row > article .entry-title , body.archive.category #main.site-main > .ast-row > article .entry-title { font-size: 1.24rem; }
}


/* Single posts: keep the title and reading column aligned with the 1200px site grid. */
body.single-post .minhui-native-post {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 72px;
  box-sizing: border-box;
}
body.single-post .minhui-native-post__header {
  max-width: 1000px;
  margin: 0 auto 28px;
}
body.single-post .minhui-native-post__title {
  max-width: 1000px;
  margin: 0 auto;
  color: var(--minhui-dark, #153243);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.16;
}
body.single-post .minhui-native-post__meta { display: none; }
body.single-post .minhui-native-post__content {
  max-width: 900px;
  margin: 28px auto 0;
  font-size: 17px;
  line-height: 1.8;
}
body.single-post .minhui-native-post__content h2,
body.single-post .minhui-native-post__content h3 {
  color: var(--minhui-dark, #153243);
  line-height: 1.3;
  margin-top: 2.2em;
  margin-bottom: .8em;
}
body.single-post .minhui-native-post__content p,
body.single-post .minhui-native-post__content ul,
body.single-post .minhui-native-post__content ol { margin-bottom: 1.35em; }
body.single-post .minhui-native-post__content a { color: var(--minhui-blue, #1689d5); }
@media (max-width: 767px) {
  body.single-post .minhui-native-post {
    width: calc(100% - 32px);
    padding: 36px 0 48px;
  }
  body.single-post .minhui-native-post__header {
    margin-bottom: 16px;
  }
  body.single-post .minhui-native-post__title {
    font-size: clamp(1.72rem, 7vw, 2.25rem);
    line-height: 1.2;
  }
  body.single-post .minhui-native-post__content {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.78;
  }
}


/* Give the single-post shell enough specificity to override Astra's #primary width. */
body.single-post main#primary.minhui-native-post {
  width: min(1200px, calc(100% - 40px)) !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}
@media (max-width: 767px) {
  body.single-post main#primary.minhui-native-post {
    width: calc(100% - 32px) !important;
    max-width: none !important;
  }
}


/* Center the native single-post shell within the full browser width. */
body.single-post main#primary.minhui-native-post {
  margin-left: max(20px, calc((100vw - 1200px) / 2)) !important;
  margin-right: max(20px, calc((100vw - 1200px) / 2)) !important;
}
@media (max-width: 767px) {
  body.single-post main#primary.minhui-native-post {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}


/* Hide featured cover images on single posts; keep inline article images and Blog thumbnails. */
body.single-post .minhui-native-post__image {
  display: none !important;
}


/* Category archives: match the Blog index grid and centered heading. */
body.archive.category #primary > .ast-archive-description {
  width: 100%;
  margin: 0 0 28px;
  text-align: center;
}
body.archive.category #primary > .ast-archive-description .page-title {
  margin: 0;
  color: var(--minhui-dark, #153243);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.16;
}
@media (max-width: 767px) {
  body.archive.category #primary > .ast-archive-description { margin-bottom: 20px; }
  body.archive.category #primary > .ast-archive-description .page-title {
    font-size: clamp(1.72rem, 7vw, 2.25rem);
  }
}


/* Prevent Astra clearfix pseudo-elements from occupying a category grid cell. */
body.archive.category #main.site-main > .ast-row::before,
body.archive.category #main.site-main > .ast-row::after {
  content: none !important;
  display: none !important;
}
