/* Home page hardening layer (loaded after legacy archive CSS) */

/* Restore normal document flow; legacy archive CSS used inline-block body */
html,
body,
body.mdc-typography {
  display: block !important;
  width: 100% !important;
  min-height: 100% !important;
  height: auto !important;
  overflow-x: hidden !important;
}

/* Keep navbar above hero and avoid brand/menu overlap */
#custom_navbar {
  z-index: 1000 !important;
  min-height: 92px !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(24, 47, 84, 0.14);
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  overflow: visible !important;
}

body {
  padding-top: 92px !important;
}

#custom_navbar .container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

#custom_navbar .logo {
  max-width: none !important;
  margin-right: 20px !important;
  flex: 0 0 auto !important;
  padding: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#custom_navbar .logo img {
  width: 72px !important;
  max-width: 72px !important;
  height: auto !important;
  display: block !important;
}

#custom_navbar .logo.animated,
#custom_navbar .logo img.animated {
  animation: none !important;
  transform: none !important;
}

#custom_navbar .navbar-collapse {
  flex-grow: 0 !important;
}

#custom_navbar .navbar-nav {
  align-items: center !important;
}

#custom_navbar .navbar-nav .nav-link {
  line-height: 1.15 !important;
  padding: 8px 10px !important;
  color: #1f3763 !important;
}

#custom_navbar .navbar-nav .nav-link:hover,
#custom_navbar .navbar-nav .nav-link:focus {
  color: #f26d35 !important;
}

/* Make dropdown readable and stable */
#custom_navbar .dropdown-menu {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  min-width: 11rem !important;
}

#custom_navbar .dropdown-item {
  color: #1b2f54 !important;
  font-weight: 500 !important;
}

#custom_navbar .dropdown-item:hover,
#custom_navbar .dropdown-item:focus {
  background: #f3f6fb !important;
  color: #f26d35 !important;
}

/* Neutralize legacy 100% height table layout that causes blank mid-page on reload */
#wrapper,
#wrapper > div {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

.homepage-slider,
.homepage-slider.swiper-container,
.homepage-slider .swiper-wrapper,
.homepage-slider .swiper-slide {
  height: auto !important;
  min-height: 0 !important;
}

#section1,
#eos-detail-section1 {
  min-height: 560px !important;
  height: auto !important;
  padding-top: 64px !important;
  background-image: none !important;
  background-color: #f26d35 !important;
}

#section1 .row.align-items-center,
#eos-detail-section1 .row.display-flex {
  min-height: 460px !important;
}

#section1 .section1-caption,
#eos-detail-section1 .eos-detail-section1-caption {
  color: #ffffff !important;
}

#section1 .section1-caption .harmonia-logo,
#eos-detail-section1 .eos-detail-section1-caption .eos-logo {
  display: inline-block;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 41, 78, 0.2);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

#section1 .section1-caption .harmonia-logo {
  width: 260px;
  max-width: 100%;
  height: auto;
}

#eos-detail-section1 .eos-detail-section1-caption .eos-logo {
  width: 170px;
  max-width: 100%;
  height: auto;
}

#eos-detail-section1 .eos-detail-section1-caption h1 {
  color: #ffffff !important;
  font-size: 2.4rem !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

#section1 .section1-caption h1 {
  color: #ffffff !important;
  font-size: 2.4rem !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

.harmonia-hero-right-empty {
  width: 100%;
  min-height: 360px;
}

#eos-detail-section1 .img-fluid {
  max-height: 420px;
  width: auto;
}

#section1 .container,
#section2 .container,
#section3 .container,
#section4 .container,
#section5 .container,
#eos-detail-section1 .container {
  display: block !important;
  height: auto !important;
}

#section1 .section1-cell,
#section2 .section2-cell,
#section3 .section3-cell,
#section4 .section4-cell,
#section5 .section5-cell,
#eos-detail-section1 .eos-detail-section1-cell {
  display: block !important;
  height: auto !important;
}

#section2,
#section3,
#section4,
#section5 {
  min-height: auto !important;
  height: auto !important;
}

/* Improve About section placement and readability */
#section2 {
  padding: 52px 0 56px !important;
}

#section2 .section2-caption {
  max-width: 980px;
  margin: 0 auto;
}

#section2 .section2-caption h2 {
  font-size: 56px;
  letter-spacing: 1px;
  margin-bottom: 20px !important;
}

#section2 .section2-caption .content {
  font-size: 34px;
  line-height: 1.45;
  max-width: 940px;
  margin: 0 auto 14px auto !important;
}

#section2 .section2-caption .secondary-btn {
  margin-top: 4px;
}

@media (max-width: 992px) {
  #custom_navbar .logo img {
    width: 66px !important;
    max-width: 66px !important;
  }

  #custom_navbar {
    min-height: 74px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  body {
    padding-top: 74px !important;
  }

  #section1,
  #eos-detail-section1 {
    min-height: 480px !important;
    padding-top: 54px !important;
  }

  #eos-detail-section1 .eos-detail-section1-caption h1 {
    font-size: 1.85rem !important;
  }

  #section1 .section1-caption .harmonia-logo,
  #eos-detail-section1 .eos-detail-section1-caption .eos-logo {
    padding: 6px 10px;
    border-radius: 8px;
  }

  #section1 .section1-caption .harmonia-logo {
    width: 220px;
  }

  #eos-detail-section1 .eos-detail-section1-caption .eos-logo {
    width: 150px;
  }

  #section1 .section1-caption h1,
  #eos-detail-section1 .eos-detail-section1-caption h1 {
    font-size: 1.85rem !important;
  }

  .harmonia-hero-right-empty {
    min-height: 0;
  }

  #section2 {
    padding: 36px 0 40px !important;
  }

  #section2 .section2-caption h2 {
    font-size: 42px;
  }

  #section2 .section2-caption .content {
    font-size: 26px;
  }
}
