/**
 * Footer on inner pages — match home.css exactly.
 * Overrides legacy style.css (a { color:#999 }, body dark text).
 * Applies to index_page2 (legacy-body-page) and form pages like contact 613 (inner-font-compact).
 */
body.legacy-body-page footer.modern-footer,
body.inner-font-compact footer.modern-footer {
  background: #1a7c31 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  padding: 48px 24px 24px !important;
  margin: 0 !important;
  border: 0 !important;
  font-family: "Sarabun", sans-serif !important;
  font-size: 15px !important;
  line-height: 1.68 !important;
}

body.legacy-body-page footer.modern-footer,
body.legacy-body-page footer.modern-footer li,
body.legacy-body-page footer.modern-footer span,
body.inner-font-compact footer.modern-footer,
body.inner-font-compact footer.modern-footer li,
body.inner-font-compact footer.modern-footer span {
  color: rgba(255, 255, 255, 0.75) !important;
}

body.legacy-body-page footer.modern-footer .fb p,
body.legacy-body-page footer.modern-footer .fb p *,
body.inner-font-compact footer.modern-footer .fb p,
body.inner-font-compact footer.modern-footer .fb p * {
  color: #fff !important;
}

body.legacy-body-page footer.modern-footer a,
body.inner-font-compact footer.modern-footer a {
  color: rgba(255, 255, 255, 0.65) !important;
  text-decoration: none !important;
}

body.legacy-body-page footer.modern-footer a:focus,
body.legacy-body-page footer.modern-footer a:active,
body.inner-font-compact footer.modern-footer a:focus,
body.inner-font-compact footer.modern-footer a:active {
  outline: none !important;
  box-shadow: none !important;
}

body.legacy-body-page footer.modern-footer .footer-grid,
body.inner-font-compact footer.modern-footer .footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.legacy-body-page footer.modern-footer .fb h2,
body.inner-font-compact footer.modern-footer .fb h2 {
  font-family: "Athiti", sans-serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #fff !important;
  margin: 0 0 10px !important;
  text-transform: none !important;
}

body.legacy-body-page footer.modern-footer .fb,
body.legacy-body-page footer.modern-footer .fb p,
body.inner-font-compact footer.modern-footer .fb,
body.inner-font-compact footer.modern-footer .fb p {
  font-size: 14px !important;
  line-height: 1.7 !important;
  color: #fff !important;
}

body.legacy-body-page footer.modern-footer .fb p,
body.inner-font-compact footer.modern-footer .fb p {
  margin-bottom: 16px !important;
}

body.legacy-body-page footer.modern-footer .fb p a,
body.legacy-body-page footer.modern-footer .fb a:not(.soc-btn),
body.inner-font-compact footer.modern-footer .fb p a,
body.inner-font-compact footer.modern-footer .fb a:not(.soc-btn),
footer.modern-footer .fb p a[href^="tel:"] {
  font-size: 14px !important;
  color: #fff !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

body.legacy-body-page footer.modern-footer .fb p a:hover,
body.inner-font-compact footer.modern-footer .fb p a:hover {
  color: #edbe5c !important;
  text-decoration: underline !important;
}

body.legacy-body-page footer.modern-footer .social-row,
body.inner-font-compact footer.modern-footer .social-row {
  display: flex;
  gap: 10px;
}

body.legacy-body-page footer.modern-footer .soc-btn,
body.inner-font-compact footer.modern-footer .soc-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px !important;
  cursor: pointer;
  transition: background 0.2s;
}

body.legacy-body-page footer.modern-footer .soc-btn:hover,
body.inner-font-compact footer.modern-footer .soc-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff !important;
}

body.legacy-body-page footer.modern-footer .fc h3,
body.inner-font-compact footer.modern-footer .fc h3 {
  font-family: "Athiti", sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.68 !important;
  color: #fff !important;
  margin: 0 0 12px !important;
  padding: 0 0 8px !important;
  border-bottom: 2px solid #edbe5c !important;
  display: inline-block !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

body.legacy-body-page footer.modern-footer .fc ul,
body.inner-font-compact footer.modern-footer .fc ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.legacy-body-page footer.modern-footer .fc ul::after,
body.inner-font-compact footer.modern-footer .fc ul::after,
footer.modern-footer .fc ul::after {
  display: none !important;
  content: none !important;
  clear: none !important;
}

body.legacy-body-page footer.modern-footer .fc ul li,
body.inner-font-compact footer.modern-footer .fc ul li {
  margin-bottom: 8px !important;
  float: none !important;
  font-size: 13px !important;
  line-height: 1.68 !important;
  color: rgba(255, 255, 255, 0.65) !important;
}

body.legacy-body-page footer.modern-footer .fc ul li a,
body.inner-font-compact footer.modern-footer .fc ul li a {
  font-size: 13px !important;
  line-height: 1.68 !important;
  color: rgba(255, 255, 255, 0.65) !important;
}

body.legacy-body-page footer.modern-footer .fc ul li a:hover,
body.inner-font-compact footer.modern-footer .fc ul li a:hover {
  color: #edbe5c !important;
  padding-left: 6px;
}

body.legacy-body-page footer.modern-footer .fc ul li span,
body.inner-font-compact footer.modern-footer .fc ul li span {
  font-size: 13px !important;
  line-height: 1.68 !important;
  color: rgba(255, 255, 255, 0.65) !important;
}

body.legacy-body-page footer.modern-footer .footer-bottom,
body.inner-font-compact footer.modern-footer .footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 8px;
  font-size: 12px !important;
  line-height: 1.68 !important;
  color: rgba(255, 255, 255, 0.4) !important;
  width: 100%;
  box-sizing: border-box;
}

body.legacy-body-page footer.modern-footer .footer-bottom span,
body.inner-font-compact footer.modern-footer .footer-bottom span {
  display: inline !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1.68 !important;
  color: rgba(255, 255, 255, 0.4) !important;
}

body.legacy-body-page footer.modern-footer .footer-bottom a,
body.inner-font-compact footer.modern-footer .footer-bottom a {
  display: inline !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.65) !important;
}

body.legacy-body-page footer.modern-footer .footer-bottom a:hover,
body.inner-font-compact footer.modern-footer .footer-bottom a:hover {
  color: #edbe5c !important;
}

/* Floating widgets (stacked column, same as home) */
body.legacy-body-page .wrap.push > .modern-floating-stack,
body.inner-font-compact .wrap.push > .modern-floating-stack {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 600 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 10px !important;
}

body.legacy-body-page .wrap.push > .modern-floating-stack .chat-float,
body.inner-font-compact .wrap.push > .modern-floating-stack .chat-float {
  position: static !important;
  bottom: auto !important;
  right: auto !important;
}

@media (max-width: 1024px) {
  body.legacy-body-page footer.modern-footer .footer-grid,
  body.inner-font-compact footer.modern-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  body.legacy-body-page footer.modern-footer .footer-grid,
  body.inner-font-compact footer.modern-footer .footer-grid {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 600px) {
  body.legacy-body-page footer.modern-footer .footer-grid,
  body.inner-font-compact footer.modern-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  body.legacy-body-page footer.modern-footer .footer-bottom,
  body.inner-font-compact footer.modern-footer .footer-bottom {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px 10px !important;
  }

  body.legacy-body-page footer.modern-footer .footer-bottom span,
  body.inner-font-compact footer.modern-footer .footer-bottom span,
  body.legacy-body-page footer.modern-footer .footer-bottom a,
  body.inner-font-compact footer.modern-footer .footer-bottom a {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

/* No patterned strip / extra scroll area below footer */
body.legacy-body-page .wrap.push,
body.inner-font-compact .wrap.push {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

body.legacy-body-page .wrap.push > footer.modern-footer,
body.inner-font-compact .wrap.push > footer.modern-footer {
  margin-bottom: 0 !important;
}

body.legacy-body-page .wrap.push > footer.modern-footer ~ *,
body.inner-font-compact .wrap.push > footer.modern-footer ~ * {
  margin: 0 !important;
  padding: 0 !important;
}

/* Form pages: normal block layout (header visible); no extra height below footer */
html.has-form-page-root,
html:has(body.has-form-page) {
  overflow-x: hidden;
  background-color: #1a7c31 !important;
}

body.has-form-page {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  background-color: #1a7c31 !important;
  background-image: none !important;
}

body.has-form-page .wrap.push {
  display: block !important;
  box-sizing: border-box;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  background-color: #f9f9f9;
  background-image: url(../../../assets/images/nonghoi-pattern.jpg);
}

body.has-form-page .wrap.push > .main-wrap.form-main-wrap {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body.has-form-page .wrap.push > footer.modern-footer {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.has-form-page .main-wrap.form-main-wrap > .container > .theme-padding,
body.has-form-page .main-wrap.form-main-wrap .theme-padding {
  padding-top: 32px !important;
  padding-bottom: 24px !important;
}

body.has-form-page > .md-overlay {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.has-form-page > .sidebar-overlay,
body.has-form-page > .sb-float-btn,
body.has-form-page > .modern-floating-stack {
  position: fixed !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.has-form-page .main-wrap .map-holder.form-shell-map:has(#map:empty),
body.has-form-page .form-main-wrap .map-holder:has(#map:empty) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.has-form-page .main-wrap .map-holder.form-shell-map #map:empty,
body.has-form-page .form-main-wrap .map-holder #map:empty {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.has-form-page .main-wrap .map-holder.form-shell-map {
  clear: both;
  max-width: 1240px;
  margin: 0 auto 22px;
  padding: 0 16px;
  box-sizing: border-box;
}

body.has-form-page .main-wrap .map-holder.form-shell-map #map {
  width: 100%;
  height: clamp(300px, 42vw, 460px);
  min-height: 300px;
  border: 1px solid #e6ecf8;
  border-radius: 14px;
  overflow: hidden;
  background: #f5f8ff;
}

body.has-form-page .main-wrap .map-holder.form-shell-map #map iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

@media (max-width: 767px) {
  body.has-form-page .main-wrap .map-holder.form-shell-map {
    padding: 0 10px;
    margin-bottom: 16px;
  }

  body.has-form-page .main-wrap .map-holder.form-shell-map #map {
    height: clamp(260px, 62vw, 360px);
  }
}

/* index_page2: nested form inside legacy main — drop outer bottom padding */
body.has-form-page .main-wrap.legacy-body-main:has(.form-main-wrap) > .theme-padding {
  padding-bottom: 0 !important;
}

body.has-form-page .main-wrap.legacy-body-main .form-main-wrap .theme-padding {
  padding-bottom: 50px !important;
}

@media (max-width: 767px) {
  body.has-form-page .main-wrap.form-main-wrap > .container > .theme-padding,
  body.has-form-page .main-wrap.form-main-wrap .theme-padding {
    padding-top: 24px !important;
    padding-bottom: 20px !important;
  }

  body.has-form-page .main-wrap.legacy-body-main .form-main-wrap .theme-padding {
    padding-bottom: 30px !important;
  }
}
