/* ==========================================================================
   header.css - Header & Navigation System (Shinyoung Lofarma)
   - PC Desktop (>= 1181px): Original Pixel (px) Layout
   - Mobile / Tablet (<= 1180px -> 210px): Dynamic REM & Responsive Offcanvas/Layer
   ========================================================================== */

/* Header Base (PC Desktop) */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  color: var(--dark);
  box-shadow: none;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease);
}

.header .gnb-link {
  color: var(--dark);
  transition: color .25s var(--ease);
}

.header.is-scrolled,
.header.is-open,
.header:hover,
.header:focus-within {
  background: #fff !important;
  color: var(--dark) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
}

.header:hover .header-mask,
.header:focus-within .header-mask {
  opacity: 1;
}

.header:hover .gnb-link,
.header:focus-within .gnb-link {
  color: #222;
}

.header:hover .btn-language,
.header:focus-within .btn-language,
.header:hover .btn-gnb,
.header:focus-within .btn-gnb {
  color: var(--dark);
}

.header-mask {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: .35s;
}

.header.is-open .header-mask {
  opacity: 1;
}

.header-top {
  height: 38px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 56px;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.header.is-scrolled .header-top,
.header.is-open .header-top {
  border-bottom-color: var(--line);
}

.header-utility-list {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.header-bottom {
  height: 87px;
  display: flex;
  align-items: center;
  padding: 0 56px;
  position: relative;
}

.logo {
  margin: 0;
  min-width: 155px;
  display: flex;
  align-items: center;
  line-height: 1;
  font-size: 20px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
  gap: 10px;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--green));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.logo-img {
  display: block;
  height: 37px;
  width: auto;
}

.header-bottom-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.gnb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.gnb-item {
  position: static;
}

.gnb-link {
  display: flex;
  align-items: center;
  height: 82px;
  padding: 0 25px;
  font-size: 18px;
  font-weight: 750;
  color: #222;
}

.gnb-item.is-current>.gnb-link {
  color: var(--primary) !important;
  font-weight: 800;
  position: relative;
}

.gnb-item.is-current>.gnb-link::after {
  content: "";
  position: absolute;
  bottom: 18px;
  left: 25px;
  right: 25px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 3px;
}

.gnb-depth {
  position: absolute;
  left: 0;
  right: 0;
  top: 86px;
  background: #fff;
  color: var(--dark);
  border-top: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: .25s;
}

.gnb-item:hover .gnb-depth,
.gnb-item:focus-within .gnb-depth {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (min-width: 1181px) {
  .full-sitemap {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .09);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s var(--ease);
    z-index: 100;
    padding: 44px 0 56px;
  }

  .header.is-open .full-sitemap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .header.is-open .gnb-depth {
    display: none !important;
  }

  .full-sitemap-inner {
    width: min(1440px, calc(100% - 110px));
    margin: 0 auto;
  }

  .sitemap-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 36px;
  }

  .sitemap-col {
    display: flex;
    flex-direction: column;
  }

  .sitemap-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary);
  }

  .sitemap-title a {
    color: #07111f;
    text-decoration: none;
    transition: color .2s;
  }

  .sitemap-title a:hover {
    color: var(--primary);
  }

  .sitemap-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .sitemap-list a {
    font-size: 15px;
    color: #4b5563;
    text-decoration: none;
    transition: color .2s;
    font-weight: 500;
  }

  .sitemap-list a:hover {
    color: var(--primary);
    font-weight: 750;
  }
}

.header.is-open .icon-hamburger {
  background: transparent !important;
}

.header.is-open .icon-hamburger:before {
  transform: rotate(45deg) !important;
}

.header.is-open .icon-hamburger:after {
  transform: rotate(-45deg) !important;
}

.gnb-depth-wrap {
  width: min(1440px, calc(100% - 110px));
  margin: 0 auto;
}

.gnb-depth-inner {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 44px 0 48px;
}

.depth-intro-title {
  font-size: 34px;
  font-weight: 750;
  display: block;
  margin-bottom: 16px;
}

.depth-intro-desc {
  font-size: 17px;
  color: #616b7b;
}

.depth-intro-link {
  display: inline-flex;
  margin-top: 24px;
  color: var(--primary);
  font-weight: 800;
}

.gnb-depth-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 180px;
}

.gnb-depth-item {
  margin-bottom: 18px;
}

.gnb-depth-link {
  font-size: 16px;
  font-weight: 700;
}

.gnb-depth-link:hover {
  color: var(--primary);
}

.gnb-depth2-list,
.gnb-depth2-col-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.gnb-depth2-item,
.gnb-depth2-col-item {
  margin: 8px 0;
  color: #687282;
  font-size: 15px;
}

.gnb-brand-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  list-style: none;
  padding: 0;
  margin-top: 14px;
}

.gnb-brand-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: #f7f8fb;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
}

.header-bottom-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  justify-content: flex-end;
}

.header-form-search {
  height: 44px;
  width: 170px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  cursor: pointer;
}

.header.is-scrolled .header-form-search,
.header.is-open .header-form-search {
  border-color: var(--line);
  background: #f8fafc;
}

.suggestion-text {
  height: 20px;
  overflow: hidden;
}

.suggestion-track {
  display: block;
  animation: suggestion 10s infinite;
}

.suggestion-track span {
  display: block;
  height: 20px;
  font-size: 14px;
  color: inherit;
}

@keyframes suggestion {

  0%,
  12% {
    transform: translateY(0);
  }

  18%,
  30% {
    transform: translateY(-20px);
  }

  36%,
  48% {
    transform: translateY(-40px);
  }

  54%,
  66% {
    transform: translateY(-60px);
  }

  72%,
  84% {
    transform: translateY(-80px);
  }

  90%,
  100% {
    transform: translateY(-100px);
  }
}

.btn {
  border: 0;
  background: none;
  cursor: pointer;
}

.btn-language,
.btn-gnb,
.btn-search {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  color: var(--dark);
}

.btn-gnb {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all .2s var(--ease);
}

.btn-gnb:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}

.header.is-scrolled .btn-gnb,
.header.is-open .btn-gnb {
  border-color: #e2e8f0 !important;
  background: #ffffff !important;
}

.icon-hamburger {
  position: relative;
  width: 16px;
  height: 2px;
  background: #07111f;
  display: block;
  transition: all .25s var(--ease);
  border-radius: 1px;
}

.icon-hamburger:before,
.icon-hamburger:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 2px;
  background: #07111f;
  display: block;
  transition: all .25s var(--ease);
  border-radius: 1px;
}

.icon-hamburger:before {
  transform: translateY(-4px);
}

.icon-hamburger:after {
  transform: translateY(4px);
}

/* Layer Search Modal (PC Base) */
.layer-search {
  position: fixed;
  inset: 0;
  background: rgba(7, 17, 31, .88);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.layer-search.is-open {
  display: flex;
}

.layer-panel {
  width: min(780px, 100%);
  background: #fff;
  border-radius: 34px;
  padding: 44px;
}

.layer-panel h2 {
  font-size: 38px;
  margin: 0 0 22px;
}

.search-row {
  display: flex;
  border-bottom: 3px solid var(--dark);
}

.search-row input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 24px;
  padding: 18px 4px;
}

.search-row button {
  border: 0;
  background: var(--dark);
  color: #fff;
  border-radius: 16px;
  padding: 0 24px;
}

.keyword-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.keyword-list a {
  padding: 10px 16px;
  background: #f2f5f9;
  border-radius: 999px;
  font-weight: 750;
}

.layer-close {
  position: absolute;
  right: 30px;
  top: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  background: transparent;
  font-size: 24px;
}

/* Responsive Header Rules (Mobile / Tablet <= 1180px -> 210px) */
@media (max-width: 1180px) {
  .header-top {
    display: none;
  }

  .header-bottom {
    height: 4rem;
    padding: 0 1.25rem;
    justify-content: space-between;
    display: flex;
    align-items: center;
  }

  .logo {
    min-width: auto;
    margin: 0;
  }

  .logo-link {
    display: inline-flex;
    align-items: center;
  }

  .logo-img {
    display: block;
    height: clamp(1.4rem, 5.5vw, 1.8rem);
    width: auto;
    margin-top: 0;
  }

  .header-bottom-right {
    min-width: auto;
    margin-left: auto;
    display: flex;
    align-items: center;
  }

  .header-bottom-center {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    color: var(--dark);
    display: none;
    overflow-y: auto;
    z-index: 9999;
    border-top: 0.0625rem solid var(--line);
  }

  .header.is-open .header-bottom-center {
    display: block;
  }

  .gnb-list {
    display: block;
    padding: 1.25rem;
  }

  .gnb-link {
    height: auto;
    padding: 1.25rem 0;
    font-size: clamp(1.25rem, 4.5vw, 1.5rem);
    border-bottom: 0.0625rem solid var(--line);
  }

  .gnb-item.is-current>.gnb-link::after {
    display: none !important;
  }

  .gnb-depth {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    display: none;
  }

  .gnb-item.is-active .gnb-depth {
    display: block;
  }

  .gnb-depth-wrap {
    width: 100%;
  }

  .gnb-depth-inner {
    display: block;
    padding: 1rem 0 1.75rem;
  }

  .gnb-depth-list {
    margin-bottom: 1.375rem;
  }
}

@media (max-width: 850px) {
  .layer-panel {
    padding: 2rem 1.5rem;
  }

  .layer-panel h2 {
    font-size: 1.875rem;
  }

  .search-row input {
    font-size: 1.125rem;
  }
}

@media (max-width: 680px) {
  .header-bottom {
    height: 3.75rem;
    padding: 0 1rem;
  }

  .header-bottom-center {
    top: 3.75rem;
  }

  .logo-img {
    height: clamp(1.3rem, 5vw, 1.6rem);
  }

  .header-form-search,
  .btn-language {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-bottom {
    padding: 0 0.75rem;
  }

  .logo-img {
    height: clamp(1.2rem, 4.8vw, 1.4rem);
  }
}

@media (max-width: 360px) {
  .header-bottom {
    padding: 0 0.5rem;
  }

  .btn-gnb {
    width: 2.25rem;
    height: 2.25rem;
  }

  .logo-mark {
    width: 2rem;
    height: 2rem;
  }

  .layer-panel {
    padding: 1.5rem 1rem;
    border-radius: 1.25rem;
  }

  .layer-panel h2 {
    font-size: 1.5rem;
  }

  .search-row input {
    font-size: 1rem;
    padding: 0.75rem 0.25rem;
  }

  .search-row button {
    padding: 0 1rem;
  }
}