/* Skin B Specific Styles - Premium Version */

/* Base Reset for Skin B */
.skin-b * {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* 1. Hide GNB in Header & Seamless Look */
.skin-b #header {
    background: #fff;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.skin-b #header .nav {
    display: none !important;
}

/* 2. Main Layout Centering & Width Control */
.skin-b .wrap-main {
    display: block !important;
    width: calc(100% - 80px) !important;
    /* Side padding fallback if screen < 1400px */
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent;
    overflow: visible;
}

/* Reset duplicate padding from common styles */
.skin-b .content-custom .content-wrap,
.skin-b .content-custom .content {
    padding: 0 !important;
    margin: 0 !important;
}

.skin-b .layout-main-b {
    display: flex !important;
    gap: 40px;
    width: 100%;
    padding: 0 0 60px 0;
    /* Removed top padding */
    align-items: flex-start;
}

.skin-b .layout-side {
    flex: 0 0 280px;
    width: 280px;
    min-width: 280px;
    position: sticky;
    top: 20px;
}

.skin-b .layout-content {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Adjust gaps for sub-page top elements */
.skin-b .tit-middle {
    padding-top: 30px !important;
    margin-bottom: -20px !important;
    /* Reduce space between Title and Breadcrumb */
}

.skin-b .tit-breadcrumb {
    margin-bottom: -40px !important;
    /* Completely remove space between Breadcrumb and Content */
}

/* 3. LNB (Side Menu) Styling */
.skin-b .lnb-wrap {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
}

.skin-b .lnb-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.skin-b .lnb-menu-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skin-b .lnb-menu-item {
    margin-bottom: 5px;
}

.skin-b .lnb-1depth {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    padding: 12px 18px;
    border-radius: 12px;
    background: #f8f9fc;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
}

.skin-b .lnb-1depth:hover {
    background: #fff;
    border-color: #b10022;
    color: #b10022;
    box-shadow: 0 5px 15px rgba(177, 0, 34, 0.1);
    transform: translateX(8px);
}

.skin-b .lnb-2depth-list {
    margin-top: 5px;
    padding: 4px 0 10px 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.skin-b .lnb-2depth {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #7d879c;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.skin-b .lnb-2depth::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #e1e4e8;
    border-radius: 50%;
    transition: all 0.2s;
}

.skin-b .lnb-2depth:hover {
    color: #333;
    background: #f1f3f5;
}

.skin-b .lnb-2depth:hover::before {
    background: #b10022;
}

.skin-b .lnb-2depth.active {
    color: #b10022;
    font-weight: 600;
}

.skin-b .lnb-2depth.active::before {
    background: #b10022;
}

.skin-b .lnb-3depth-list {
    margin-top: 3px;
    padding: 2px 0 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.skin-b .lnb-3depth {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #999;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    padding-left: 16px;
}

.skin-b .lnb-3depth::before {
    content: '-';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 12px;
}

.skin-b .lnb-3depth:hover {
    color: #b10022;
    background: #fef5f7;
}

.skin-b .lnb-3depth.active {
    color: #b10022;
    font-weight: 600;
}

.skin-b .lnb-3depth.active::before {
    color: #b10022;
}

/* 4. Middle Section (Board & Misa) */
.skin-b .middle-section {
    display: flex !important;
    gap: 30px;
    width: 100%;
    align-items: stretch;
    /* Ensure both boxes have same height */
}

.skin-b .middle-section .content-custom {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f2f5;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.skin-b .middle-section .content-custom+.content-custom {
    padding-top: 0 !important;
}

.skin-b .middle-section .content,
.skin-b .middle-section .content-wrap {
    padding: 0 !important;
    margin: 0 !important;
}

.skin-b .middle-section .content-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* Header Alignment Fix - Matching Skin A's 16px Gap */
.skin-b .middle-section .content-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 30px 0 30px;
    /* Top and Side padding only */
    border-bottom: 0;
    flex-shrink: 0;
}

.skin-b .middle-section .content {
    display: flex !important;
    flex-direction: column;
    gap: 16px !important;
    /* The 16px gap requested */
}

.skin-b .middle-section .content-cont {
    padding: 0 30px 30px 30px !important;
    /* Bottom and Side padding only */
    flex: 1;
}

.skin-b .middle-section .content-tit {
    font-family: "GyeonggiBatang", "Pretendard", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 !important;
    line-height: 1;
}

.skin-b .middle-section .btn-more {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.skin-b .middle-section .btn-more:hover {
    opacity: 1;
}

/* Board Styling in Middle Section */
.skin-b .content-custom[data-custom-style="board"] .content-cont {
    padding: 10px 30px 30px;
    flex: 1;
}

.skin-b .content-custom[data-custom-style="board"] .content-box {
    padding: 18px 0;
    border-bottom: 1px solid #f4f6f9;
}

.skin-b .content-custom[data-custom-style="board"] .content-box .tit {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Misa Styling in Middle Section */
.skin-b .content-custom[data-custom-style="misa"] .content-cont {
    padding: 10px 25px 25px;
}

.skin-b .content-custom[data-custom-style="misa"] .content-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skin-b .content-custom[data-custom-style="misa"] .content-li {
    background: #f9fafc;
    border-radius: 16px;
    padding: 15px;
}

.skin-b .time-block {
    display: inline-block;
    padding: 2px 8px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 6px;
    font-weight: 600;
    color: #004a9c;
}

/* 5. Banner Section (4 cols) */
.skin-b .banner-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    width: 100%;
}

.skin-b .banner-section .content-custom {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 20px;
    padding: 30px;
    background: #fff;
    max-width: 256px;
    height: 180px;
    border: 1px solid #f0f2f5;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    text-align: left;
}

.skin-b .banner-section .content-custom[data-custom-style="full"] {
    padding: 0;
}

.skin-b .banner-section .content-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    border-color: #b10022;
}

.skin-b .banner-section .content-top {
    margin-bottom: 0;
    padding: 0;
    height: auto;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.skin-b .banner-section .content-tit {
    font-family: "GyeonggiBatang", "Pretendard", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px !important;
}

.skin-b .banner-section .content-sub-tit {
    font-size: 15px;
    color: #7d879c;
    font-weight: 400;
}

.skin-b .banner-section .content-wrap {
    position: relative;
    height: 100%;
}

.skin-b .banner-section .content-cont {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.skin-b .banner-section .content-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.skin-b .banner-section .content-link .icon img {
    width: 20px;
    height: 20px;
    opacity: 0.3;
}

.skin-b .banner-section .content-icon img {
    max-height: 60px;
    max-width: 60px;
    width: auto;
    object-fit: contain;
}

.skin-b .banner-section .content-tit {
    text-align: left;
}

/* b타입 배너 Swiper (5개 초과 시) */
.skin-b .banner-section:has(.swiper-banner-b) {
    display: block;
}
.skin-b .swiper-banner-b .swiper-slide { height: auto; }
.skin-b .swiper-banner-b .content-custom { width: 100% !important; }

/* 6. Visual Adjustments */
.skin-b .swiper-visual-wrap {
    border-radius: 30px;
    overflow: hidden;
    height: auto !important;
    aspect-ratio: 1400 / 550;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.12);
}

.skin-b .swiper-visual {
    width: 100%;
    height: 100%;
}

.skin-b .swiper-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Swiper Pagination/Btns Premium Look */
.skin-b .swiper-visual-pagination {
    bottom: 30px !important;
}

@media (max-width: 1200px) {
    .skin-b .layout-side {
        flex: 0 0 240px;
        width: 240px;
        min-width: 240px;
    }
}

@media (max-width: 1024px) {
    .skin-b .layout-main-b {
        display: block !important;
        /* Switch from flex to block */
        padding: 20px 0;
    }

    .skin-b .wrap-main {
        width: calc(100% - 30px) !important;
    }

    .skin-b .layout-side {
        display: none !important;
        /* Hide side LNB in mobile */
    }

    .skin-b .middle-section {
        flex-direction: column;
    }

    .skin-b .banner-section {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }

    .skin-b .swiper-banner-b {
        width: 100% !important;
        overflow: hidden !important;
    }

    .skin-b .swiper-banner-b .swiper-slide {
        height: auto !important;
    }

    .skin-b .banner-section .content-custom {
        padding: 15px !important;
        min-height: unset !important;
        height: auto !important;
        aspect-ratio: 5 / 3 !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden;
    }

    /* 모바일 바로가기/아이콘 위치 보정 */
    .skin-b .banner-section .content-cont {
        position: absolute !important;
        bottom: 15px !important;
        left: 15px !important;
        right: 15px !important;
        justify-content: flex-end !important;
    }

    .skin-b .banner-section .content-wrap {
        position: relative;
        height: 100%;
    }

    .skin-b .banner-section .content-custom[data-custom-style="full"] {
        padding: 0 !important;
    }

    .skin-b .banner-section .content-tit {
        font-size: 14px !important;
        margin-bottom: 2px !important;
    }

    .skin-b .banner-section .content-sub-tit {
        display: none !important;
    }

    .skin-b .banner-section .content-link-wrap {
        display: none !important;
    }

    .skin-b .banner-section .content-icon img {
        max-height: 40px !important;
        max-width: 40px !important;
    }

    .skin-b .swiper-visual-wrap {
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    .skin-b .middle-section .content-custom {
        width: 100%;
    }

    .skin-b #header .layout {
        height: 6.6rem !important;
        /* Reduced to 2/3 of 10rem */
    }

    .skin-b #header .logo img {
        height: 35px !important;
    }

    .skin-b #header .more-menu .btn-wrap:not(.btn-fullmenu-wrap) {
        display: none !important;
    }

    /* Mobile Submenu Styling for Skin B */
    .skin-b .mobile-submenu-container {
        display: block !important;
        margin-bottom: 30px;
        padding: 5px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid #eee;
    }

    .skin-b .mobile-submenu-container::-webkit-scrollbar {
        display: none;
    }

    .skin-b .mobile-submenu-list {
        display: flex;
        gap: 12px;
        white-space: nowrap;
        padding: 5px 0;
    }

    .skin-b .mobile-submenu-list li {
        flex: 0 0 auto;
    }

    .skin-b .mobile-submenu-list a {
        display: block;
        padding: 10px 20px;
        border-radius: 50px;
        font-size: 15px;
        font-weight: 500;
        color: #666;
        background: #f5f7fa;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid transparent;
    }

    .skin-b .mobile-submenu-list li.active a {
        background: #004a9c;
        color: #fff;
        font-weight: 700;
        box-shadow: 0 8px 20px rgba(0, 74, 156, 0.25);
        transform: translateY(-2px);
    }
}

/* Hide mobile submenu on PC */
.skin-b .mobile-submenu-container {
    display: none;
}