/* BEOM Mobile V2 — Global UI. Buddy Header structure + BEOM colors/logo/footer. */

:root {
    --beom-tangelo: #D54C15;
    --beom-tangelo-dark: #B53E10;
    --beom-chocolate: #663924;
    --beom-linen: #F9E8D4;
    --beom-botticelli: #8DB6C7;
    --beom-text: #1C140F;
    --beom-muted: #6B5346;
    --beom-line: #EADFD4;
    --beom-surface: #FFFFFF;
    --beom-surface-soft: #F9E8D4;
}

body.beom-has-global-ui {
    padding-top: var(--ntelecom-header-offset, 73px) !important;
}

.buddy-mega-nav .mega-trigger {
    border: 0;
    background: transparent;
    color: #222;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}

.buddy-mega-panel {
    display: none;
}

.buddy-mega-link.is-disabled,
.buddy-mobile-link.is-disabled {
    color: #aaa !important;
    cursor: default;
    pointer-events: none;
}

.buddy-mega-coming {
    display: inline-block;
    margin-left: 5px;
    color: #aaa;
    font-size: 10px;
    font-weight: 600;
    vertical-align: 1px;
}

.buddy-mobile-tabs {
    display: none;
}

.buddy-popular {
    margin: 0 0 24px;
    padding: 0 0 24px;
    border-bottom: 1px solid #e7e7e7;
}

.buddy-popular-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 16px;
    color: #171717;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.buddy-popular-title:after {
    content: '›';
    color: var(--ntelecom-primary);
    font-size: 25px;
    font-weight: 500;
}

.buddy-popular-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.buddy-popular-link {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #222;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    word-break: keep-all;
    text-decoration: none;
}

.buddy-popular-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--ntelecom-primary-soft);
    color: var(--ntelecom-primary);
    font-size: 22px;
    font-weight: 900;
}

@media (min-width: 960px) {
    #header .inner {
        width: min(1280px, calc(100% - 40px));
        height: 88px;
        margin: 0 auto;
        padding: 0;
    }

    #header .site-logo,
    #header h1 {
        width: 84px;
    }

    #header .header-right nav {
        display: block;
    }

    #header .menu-btn {
        display: none;
    }

    aside {
        display: none;
    }

    #header {
        overflow: visible;
    }

    #header .inner {
        position: relative;
    }

    #header .buddy-mega-nav > ul {
        display: flex;
        align-items: center;
        gap: 0;
    }

    #header .buddy-mega-nav > ul > li {
        position: static;
    }

    #header .buddy-mega-nav .mega-trigger {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 88px;
        padding: 0 14px;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: -.04em;
        white-space: nowrap;
    }

    #header .buddy-mega-nav .mega-trigger:after {
        content: '';
        position: absolute;
        left: 17px;
        right: 17px;
        bottom: 0;
        height: 3px;
        border-radius: 3px;
        background: var(--beom-tangelo);
        transform: scaleX(0);
        transition: transform .2s ease;
    }

    #header .buddy-mega-nav > ul > li:hover .mega-trigger:after,
    #header .buddy-mega-nav > ul > li.is-open .mega-trigger:after {
        transform: scaleX(1);
    }

    #header .buddy-mega-item--link:hover .mega-trigger:after {
        transform: scaleX(1);
    }

    #header .buddy-mega-panel {
        position: fixed;
        z-index: 110;
        left: 0;
        right: 0;
        top: var(--ntelecom-header-offset);
        display: block;
        box-sizing: border-box;
        min-height: 170px;
        padding: 16px 0 22px;
        border-top: 1px solid #e8e8e8;
        background: #fff;
        box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .12s linear, visibility .12s linear;
    }

    #header .buddy-mega-nav > ul > li:hover .buddy-mega-panel,
    #header .buddy-mega-nav > ul > li.is-open .buddy-mega-panel {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .buddy-mega-inner {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: start;
        gap: 42px;
        width: min(1160px, calc(100% - 48px));
        min-height: 132px;
        margin: 0 auto;
    }

    .buddy-mega-column {
        min-width: 0;
    }

    #header .buddy-mega-column > .buddy-mega-heading {
        display: flex !important;
        align-items: center !important;
        width: auto !important;
        height: 28px !important;
        min-height: 28px !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #171717;
        font-size: 16px !important;
        font-weight: 800 !important;
        line-height: 1.35 !important;
        text-align: left !important;
        letter-spacing: -.03em !important;
        text-decoration: none;
    }

    a.buddy-mega-heading:hover {
        color: var(--ntelecom-primary);
    }

    .buddy-mega-children {
        display: grid !important;
        align-items: start !important;
        gap: 8px !important;
        margin: 10px 0 0 !important;
        padding: 0 !important;
        list-style: none;
    }

    .buddy-mega-children li {
        position: static !important;
    }

    #header .buddy-mega-children .buddy-mega-link {
        display: inline !important;
        width: auto !important;
        padding: 0 !important;
        color: #777;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.55 !important;
        text-align: left !important;
        letter-spacing: -.02em;
        text-decoration: none;
    }

    #header .buddy-mega-children a.buddy-mega-link:hover {
        color: var(--ntelecom-primary);
    }

    #header .header-right .btn-join {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 118px;
        height: 46px;
        margin-left: 12px;
        border: 1px solid var(--beom-tangelo);
        border-radius: 24px;
        background: var(--ntelecom-primary-soft);
        color: var(--beom-tangelo-dark);
        font-size: 15px;
        font-weight: 800;
        white-space: nowrap;
        text-decoration: none;
    }

    #header .header-right .btn-join:hover,
    #header .header-right .btn-join:active {
        background: var(--beom-tangelo-dark);
        border-color: var(--beom-tangelo-dark);
        color: #fff;
    }

    #header .header-right .btn-join:focus-visible {
        outline: 3px solid var(--beom-tangelo);
        outline-offset: 2px;
    }
}

@media (max-width: 959px) {
    aside {
        top: var(--ntelecom-header-offset);
    }

    .buddy-mobile-group {
        border-bottom: 1px solid #eee;
    }

    aside .m-nav li .buddy-mobile-main,
    aside .m-nav li .buddy-mobile-direct {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    aside .m-nav li .buddy-mobile-main:after {
        content: '+';
        color: var(--ntelecom-primary);
        font-size: 24px;
        font-weight: 500;
    }

    aside .m-nav li .buddy-mobile-main.is-open:after {
        content: '−';
    }

    aside .m-nav .buddy-mobile-depth {
        padding: 6px 0 18px;
    }

    .buddy-mobile-column {
        padding: 10px 0;
    }

    .buddy-mobile-heading {
        display: block;
        color: #171717;
        font-size: 17px;
        font-weight: 800;
        line-height: 1.5;
        text-decoration: none;
    }

    .buddy-mobile-children {
        display: grid !important;
        gap: 5px !important;
        margin-top: 6px !important;
        padding-left: 14px !important;
        list-style: none;
    }

    aside .m-nav .buddy-mobile-children a,
    aside .m-nav .buddy-mobile-children span {
        font-size: 15px;
        line-height: 1.6;
        text-decoration: none;
    }
}

@media (max-width: 767px) {
    .buddy-mobile-tabs {
        display: block;
        border-top: 1px solid #eee;
        background: #fff;
        box-shadow: none;
    }

    .buddy-mobile-tabs > ul {
        display: flex;
        box-sizing: border-box;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 50px;
        padding: 0 12px;
        gap: 0;
        overflow: hidden;
        scrollbar-width: none;
        list-style: none;
        margin: 0;
    }

    .buddy-mobile-tabs > ul::-webkit-scrollbar {
        display: none;
    }

    .buddy-mobile-tabs li {
        flex: 0 0 auto;
    }

    .buddy-mobile-tab {
        display: block;
        padding: 16px 0 11px;
        border: 0;
        border-bottom: 3px solid transparent;
        background: transparent;
        color: #888;
        font-family: inherit;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: -.055em;
        white-space: nowrap;
        cursor: pointer;
        text-decoration: none;
    }

    .buddy-mobile-tab.is-active {
        color: var(--ntelecom-primary);
        border-bottom-color: var(--ntelecom-primary);
    }

    .buddy-mobile-drilldown {
        display: none;
        padding: 14px 20px;
        border-top: 1px solid #eee;
        background: #fff;
    }

    .buddy-mobile-drilldown.is-open {
        display: block;
    }

    .buddy-drill-group {
        display: none;
    }

    .buddy-drill-group.is-active {
        display: block;
    }

    .buddy-drill-level {
        display: flex;
        align-items: center;
        gap: 9px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .buddy-drill-level::-webkit-scrollbar {
        display: none;
    }

    .buddy-drill-button,
    .buddy-drill-direct {
        display: flex;
        box-sizing: border-box;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: auto !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 0 17px !important;
        border: 1px solid #dedede;
        border-radius: 22px;
        background: #fff;
        color: #333;
        font-family: inherit;
        font-size: 14px !important;
        font-weight: 700;
        line-height: 1.2 !important;
        letter-spacing: -.04em;
        white-space: nowrap;
        text-decoration: none;
        transition: background-color .2s, color .2s, border-color .2s;
    }

    .buddy-drill-button:after {
        display: none;
        content: none;
    }

    .buddy-drill-button.is-active {
        border-color: var(--beom-tangelo-dark) !important;
        background-color: var(--beom-tangelo-dark) !important;
        color: #fff !important;
    }

    .buddy-drill-button:focus-visible {
        outline: 3px solid var(--beom-tangelo);
        outline-offset: 2px;
    }

    .buddy-drill-children {
        display: none;
        align-items: center;
        gap: 30px;
        margin: 12px -20px -14px;
        padding: 12px 40px 13px;
        border-top: 1px solid #ededed;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .buddy-drill-children.is-active {
        display: flex;
    }

    .buddy-drill-children::-webkit-scrollbar {
        display: none;
    }

    .buddy-drill-child {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        min-height: 24px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #999;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        text-decoration: none;
    }

    .buddy-drill-child:hover,
    .buddy-drill-child:focus {
        color: #333;
    }

    .buddy-drill-child.is-disabled {
        background: transparent;
        color: #bbb;
        pointer-events: none;
    }

    aside .aside-inner {
        padding: 22px 20px;
    }
}

@media (min-width: 768px) and (max-width: 959px) {
    #header .inner {
        padding-left: 32px;
        padding-right: 32px;
    }
}

.beom-site-footer {
    background: #f7f4f1;
    padding: 40px 0 28px;
}

.beom-site-footer .beom-footer-inner {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.beom-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.beom-site-footer .beom-footer-brand img {
    display: block;
    flex: 0 0 auto;
    align-self: center;
    width: auto;
    max-width: 140px;
    height: auto !important;
    max-height: 56px;
    object-fit: contain;
}

.beom-footer-brand-name {
    color: var(--beom-chocolate);
    font-size: 16px;
    font-weight: 800;
}

.beom-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.beom-footer-nav a {
    color: var(--beom-chocolate);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.beom-footer-nav a:hover {
    color: var(--beom-tangelo);
}

.beom-footer-company {
    color: #6e5a4e;
    font-size: 13px;
    font-style: normal;
    line-height: 1.7;
}

.beom-footer-company span + span:before {
    content: "  |  ";
    color: #cbb8ab;
}

.beom-footer-sns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.beom-footer-copy {
    margin: 18px 0 0;
    color: #9a877b;
    font-size: 13px;
}

.beom-footer-cert {
    display: inline-block;
    margin-top: 18px;
}

.beom-footer-cert img {
    display: block;
    width: 100px;
    height: auto;
}

.beom-kakao-fab {
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 180;
    display: none;
}

.beom-kakao-fab a {
    display: block;
}

.beom-kakao-fab img {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.beom-mobile-actions {
    display: none;
}

@media (min-width: 960px) {
    .beom-mobile-actions {
        display: none !important;
    }

    .beom-kakao-fab {
        display: block;
    }

    .beom-site-footer {
        padding-bottom: 40px;
    }

    .beom-footer-cert {
        position: relative;
        float: right;
        margin-top: 0;
    }
}

@media (max-width: 959px) {
    body.beom-has-global-ui {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .beom-site-footer {
        margin-bottom: 8px;
        padding-bottom: 24px;
    }

    .beom-mobile-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 190;
        display: block;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.94);
        border-top: 1px solid var(--beom-line);
        backdrop-filter: blur(10px);
    }

    .beom-mobile-actions ul {
        display: flex;
        gap: 8px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .beom-mobile-actions li {
        flex: 1;
    }

    .beom-mobile-actions a {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(102, 57, 36, 0.12);
        color: var(--beom-chocolate);
        font-size: 14px;
        font-weight: 800;
        text-decoration: none;
    }

    .beom-mobile-actions a.is-primary {
        background: var(--beom-tangelo-dark);
        color: #fff;
    }

    .beom-mobile-actions a:focus-visible {
        outline: 3px solid var(--beom-tangelo);
        outline-offset: 2px;
    }

    .beom-mobile-actions a.is-primary:hover,
    .beom-mobile-actions a.is-primary:active {
        background: #9c350d;
        color: #fff;
    }

    .beom-kakao-fab {
        display: none !important;
    }
}
