/* Sagwi header and floating contact patch 1.1.5 */
/* Six supplied menu titles stay on one desktop row. */
@media (min-width: 992px) {
    .sg-header > .d-flex { flex-wrap: nowrap; gap: 20px; }
    .sg-header .logo { flex: 0 0 auto; margin-right: 0 !important; }
    .sg-header .logo img { width: auto; max-width: 210px; max-height: 72px; }
    .sg-header .main-menu { flex: 0 1 auto; min-width: 0; }
    .sg-header .main-menu > .gnb-nav {
        display: flex; flex-wrap: nowrap; align-items: center;
    }
    .sg-header .main-menu > .gnb-nav > li { flex: 0 0 auto; }
    .sg-header .main-menu > .gnb-nav > li > a {
        white-space: nowrap; font-size: clamp(16px, 1.1vw, 20px);
        padding: 28px clamp(8px, 1vw, 16px); font-weight: 500;
    }
    .kso-sticky.sticked .sg-header .main-menu > .gnb-nav > li > a {
        padding: 24px clamp(8px, 1vw, 16px);
    }
    .sg-header .header-right {
        flex: 0 0 auto; min-width: 40px; margin-left: 0 !important;
    }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .sg-header > .d-flex { gap: 12px; }
    .sg-header .logo img { max-width: 180px; }
    .sg-header .main-menu > .gnb-nav > li > a,
    .kso-sticky.sticked .sg-header .main-menu > .gnb-nav > li > a {
        padding-left: 8px; padding-right: 8px; font-size: 16px;
    }
}
/* Retain the original mobile drawer and search button. */
@media (max-width: 991px) {
    .sg-header .logo { min-width: 0; }
    .sg-header .logo img { max-width: min(210px, 52vw); height: auto; }
    .sg-header .header-right { flex-shrink: 0; }
}
/* Below header/drawer (10) and Bootstrap modals; above ordinary content. */
.sg-floating-contact {
    position: fixed; right: 24px; bottom: 140px;
    z-index: 9; margin: 0; padding: 0;
}
.sg-floating-contact__link {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 10px; box-sizing: border-box;
    width: 96px; min-height: 112px; padding: 16px 10px;
    border: 1px solid rgba(255,255,255,.3); border-radius: 20px;
    background: #263a31; color: #fff !important;
    text-align: center; text-decoration: none !important;
    font-size: 14px; font-weight: 600; line-height: 1.5;
    box-shadow: 0 6px 20px rgba(38,58,49,.2);
    transition: background-color 180ms ease, box-shadow 180ms ease;
}
.sg-floating-contact__link > i { font-size: 27px; }
.sg-floating-contact__label { display: block; }
.sg-floating-contact__link:hover {
    background: #96523c; box-shadow: 0 8px 24px rgba(38,58,49,.25);
}
.sg-floating-contact__link:focus-visible {
    outline: 3px solid #96523c; outline-offset: 4px;
}
@media (max-width: 767px) {
    .sg-floating-contact {
        right: max(16px, env(safe-area-inset-right));
        bottom: calc(132px + env(safe-area-inset-bottom));
    }
    .sg-floating-contact__link {
        flex-direction: row; width: auto; min-height: 48px;
        padding: 11px 16px; border-radius: 999px; gap: 8px;
        font-size: 13px;
    }
    .sg-floating-contact__link > i { font-size: 20px; }
    .sg-floating-contact__label { display: inline; margin-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .sg-floating-contact__link { transition: none; }
}
@media print { .sg-floating-contact { display: none; } }

/* v1.1.6: same viewport-top spacing on main and sub pages.
   Do not change sticky wrapper height, hero height, or sub content padding. */
html:has(#kso-container),
body:has(#kso-container) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
#kso-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* v1.1.8: header moved outside the padded content container.
   Keep inner logo/menu container centered; spacing only above sub visual. */
header.sg-header {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none;
    background-color: #fff !important;
}
#kso-container > .kso-contents {
    padding-top: 24px;
}
@media (max-width: 767px) {
    #kso-container > .kso-contents {
        padding-top: 16px;
    }
}
