/* Variables & Reset */
:root {
    --primary-color: #1a365d;
    /* Deep Blue */
    --secondary-color: #d69e2e;
    /* Gold */
    --text-main: #2d3748;
    --text-muted: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --header-height: 60px;
}

/* :where()로 감싸면 명시도(specificity)가 0이 됩니다.
   XE 스킨의 어떤 선택자도 이 리셋보다 우선권을 가질 수 있게 됩니다. */
:where(#jjes-layout) * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

#jjes-layout {
    font-family: 'Noto Sans KR', 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: clip;  /* hidden → clip: sticky 헤더가 깨지지 않도록 */

    /* ── 전체 너비 고정 + 가운데 정렬 ── */
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    position: relative;   /* fixed 헤더의 기준점 */
}

#jjes-layout a {
    text-decoration: none;
    color: inherit;
}

#jjes-layout ul {
    list-style: none;
}

#jjes-layout .container {
    padding: 0 20px;
}

/* ============================================
   XE 동적 콘텐츠 영역 — 레이아웃 CSS 충돌 방지
   :where()로 리셋 명시도를 0으로 낮췄으므로
   XE 스킨 CSS가 자연스럽게 우선 적용됩니다.
   링크/리스트만 revert 처리합니다.
   ============================================ */

/* 링크: 레이아웃이 color:inherit / text-decoration:none 으로 덮어쓴 것을 복원 */
#jjes-layout .xe-content-area a {
    color: inherit ;
    text-decoration:none
}

/* 리스트: 레이아웃이 list-style:none 으로 덮어쓴 것을 복원 */
#jjes-layout .xe-content-area ul,
#jjes-layout .xe-content-area ol {
    list-style: none;
}

/* 로그인/사용자 메뉴 — 항상 우측 정렬 */
#jjes-layout .im_memberMenu {
    margin-left: auto;
}

/* Header */
#jjes-layout .header {
    position: sticky;     /* fixed → sticky: #jjes-layout 너비를 자동으로 상속 */
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#jjes-layout .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1279px) {
    #jjes-layout .pc-sidebar-logo {
        padding: 0;
        height: auto;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
}

#jjes-layout .logo img {
    height: 35px;
    object-fit: contain;
}

#jjes-layout .menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}


/* ============================================
   모바일 메뉴 - 로그인 사용자 정보 패널
   ============================================ */

/* 전체 패널 */
#jjes-layout .nav-user-panel {
    background: linear-gradient(160deg, #5C5B5B 0%, #3A3939 100%);
    padding: 0 0 4px;
    flex-shrink: 0;
}

/* 인사말 영역 */
#jjes-layout .nav-user-greeting {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
}

#jjes-layout .nav-user-icon {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1;
    flex-shrink: 0;
}

#jjes-layout .nav-user-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

#jjes-layout .nav-user-name strong {
    display: block;
    font-size: 15px;
    color: #ffffff;
    font-weight: 700;
}

/* 퀵버튼 그리드 */
#jjes-layout .nav-user-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

}

#jjes-layout .nav-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
    cursor: pointer;
}

#jjes-layout .nav-quick-btn:active {
    transform: scale(0.95);
}

/* 버튼 색상 */
#jjes-layout .btn-admin {
    background: #3b82f6;
    color: #fff;
}

#jjes-layout .btn-purple {
    background: #7e57c2;
    color: #fff;
}

#jjes-layout .btn-teal {
    background: #5f9ea0;
    color: #fff;
}

#jjes-layout .btn-dark {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#jjes-layout .btn-mypage {
    background: var(--secondary-color);
    color: #fff;
}

#jjes-layout .nav-quick-btn:hover {
    opacity: 0.85;
}

/* 하단 회원정보 / 로그아웃 */
#jjes-layout .nav-user-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
    z-index: 10;
}

#jjes-layout .nav-user-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

#jjes-layout .nav-user-link:hover {
    color: #ffffff;
}

#jjes-layout .nav-logout {
    color: #fca5a5;
}

#jjes-layout .nav-logout:hover {
    color: #f87171;
}

/* ============================================
   Mobile Nav - 3depth 좌측 슬라이딩 아코디언
   ============================================ */
#jjes-layout .mobile-nav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 1000;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

#jjes-layout .mobile-nav.active {
    left: 0;
}

/* Nav Header */
#jjes-layout .nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #4F4E4E;
    flex-shrink: 0;
}

#jjes-layout .nav-header img {
    height: 28px;
    mix-blend-mode: multiply;
    filter: brightness(1.3);
}

#jjes-layout .close-menu {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#jjes-layout .close-menu:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ---- Depth 1 ---- */
#jjes-layout .nav-list.depth1 {
    padding: 4px 0;
    flex: 1;
}

#jjes-layout .d1-item {
    border-bottom: 1px solid #f0f4f8;
}

#jjes-layout .d1-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

#jjes-layout .d1-link:hover {
    background: #f5f4f4;
    color: #4F4E4E;
}

#jjes-layout .nav-icon {
    width: 28px;
    height: 28px;
    background: rgba(79, 78, 78, 0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #4F4E4E;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

#jjes-layout .d1-item.active>.d1-link .nav-icon {
    background: #4F4E4E;
    color: #fff;
}

#jjes-layout .nav-label {
    flex: 1;
}

#jjes-layout .nav-arrow {
    font-size: 11px;
    color: #b0b8c8;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

#jjes-layout .d1-item.active>.d1-link .nav-arrow {
    transform: rotate(90deg);
    color: #4F4E4E;
}

/* ---- Depth 2 ---- */
#jjes-layout .sub-nav.depth2 {
    display: none;
    background: #f7fafc;
    border-top: 1px solid #e8edf5;
    padding: 2px 0;
}

#jjes-layout .d1-item.active>.sub-nav.depth2 {
    display: block;
}

#jjes-layout .d2-item {
    border-bottom: 1px solid #edf1f7;
}

#jjes-layout .d2-item:last-child {
    border-bottom: none;
}

#jjes-layout .d2-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px 7px 34px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#jjes-layout .d2-link:hover {
    background: #f0eeee;
    color: #4F4E4E;
}

#jjes-layout .d2-arrow {
    font-size: 10px;
    color: #b0b8c8;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

#jjes-layout .d2-item.active>.d2-link .d2-arrow {
    transform: rotate(180deg);
    color: #C5A882;
}

#jjes-layout .d2-item.active>.d2-link {
    color: #4F4E4E;
    font-weight: 600;
}

/* ---- Depth 3 ---- */
#jjes-layout .depth3 {
    display: none;
    background: #fff;
    border-top: 1px solid #e8edf5;
    padding: 2px 0;
}

#jjes-layout .d2-item.active>.depth3 {
    display: block;
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#jjes-layout .depth3 li a {
    display: flex;
    align-items: center;
    padding: 6px 12px 6px 48px;
    font-size: 12px;
    color: #718096;
    transition: color 0.2s, padding-left 0.2s;
    position: relative;
}

#jjes-layout .depth3 li a::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #b0b8c8;
    border-radius: 50%;
    position: absolute;
    left: 42px;
    transition: background 0.2s;
}

#jjes-layout .depth3 li a:hover {
    color: var(--secondary-color);
    padding-left: 56px;
}

#jjes-layout .depth3 li a:hover::before {
    background: var(--secondary-color);
}

/* Nav Overlay */
#jjes-layout .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#jjes-layout .nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Main Content Padding - removed because .page-wrapper already handles it on mobile and grid handles it on PC */
/* #jjes-layout main {
    padding-top: var(--header-height);
} */

/* Hero Slider Section */
#jjes-layout .hero-slider {
    width: 100%;
   height: auto;
    aspect-ratio: 16 / 9;
    min-height: 250px;
}

#jjes-layout #hero-youtube-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#jjes-layout .hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--bg-white);
    width: 100%;
    height: 100%;
}

@media (max-width: 767px) {
    #jjes-layout .hero-slider {
        aspect-ratio: 4 / 3;
        height: auto;
        min-height: 320px;
    }
    #jjes-layout #hero-youtube-video {
        top: 50%;
        left: 50%;
        width: 133.33vw; /* 75vw * 16/9 */
        height: 75vw;
        min-height: 320px;
        min-width: 568px; /* 320px * 16/9 */
        transform: translate(-50%, -50%);
    }
}

#jjes-layout .swiper-pagination-bullet {
    background: var(--bg-white);
    opacity: 0.5;
}

#jjes-layout .swiper-pagination-bullet-active {
    background: var(--secondary-color);
    opacity: 1;
}

#jjes-layout .hero-content {
    padding: 0 20px;
}

#jjes-layout .badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

#jjes-layout .hero h1 {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: 700;
}

#jjes-layout .hero .highlight {
    color: var(--secondary-color);
}

#jjes-layout .hero p {
    font-size: 15px;
    margin-bottom: 30px;
    opacity: 0.9;
}

#jjes-layout .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

#jjes-layout .btn {
    display: inline-block;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    text-align: center;
}

#jjes-layout .btn-primary {
    background: var(--secondary-color);
    color: var(--bg-white);
}

#jjes-layout .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

/* Quick Links */
#jjes-layout .quick-links {
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

#jjes-layout .grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#jjes-layout .quick-card {
    background: var(--bg-white);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

#jjes-layout .quick-card:active {
    transform: scale(0.95);
}

#jjes-layout .icon-box {
    width: 50px;
    height: 50px;
    background: rgba(26, 54, 93, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: var(--primary-color);
    font-size: 20px;
}

#jjes-layout .quick-card h3 {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 5px;
}

#jjes-layout .quick-card p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Board Tabs Section */
#jjes-layout .board-tabs-section {
    padding: 0px 10px 10px;
    background: var(--bg-white);
    margin-top: 5px;
}

#jjes-layout .board-tabs-header {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

#jjes-layout .tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 5px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

#jjes-layout .tab-btn.active {
    color: var(--primary-color);
}

#jjes-layout .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

#jjes-layout .tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

#jjes-layout .tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#jjes-layout .more-btn {
    display: block;
    text-align: center;
    margin-top: 15px;
    padding: 12px;
    background: var(--bg-light);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

#jjes-layout .more-btn:hover {
    background: #e2e8f0;
}

#jjes-layout .more-btn i {
    margin-left: 5px;
    font-size: 12px;
}

#jjes-layout .notice-list li {
    border-bottom: 1px solid var(--border-color);
}

#jjes-layout .notice-list li:last-child {
    border-bottom: none;
}

#jjes-layout .notice-list a {
    display: flex;
    align-items: center;
    padding: 15px 0;
}

#jjes-layout .tag {
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
}

#jjes-layout .title {
    font-size: 14px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    margin-right: 10px;
}

#jjes-layout .date {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* CTA Section */
#jjes-layout .cta-section {
    background: var(--primary-color);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

#jjes-layout .cta-section h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

#jjes-layout .cta-section p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 25px;
}

#jjes-layout .contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#jjes-layout .contact-info a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
}

/* Footer */
#jjes-layout .footer {
    background: #111;
    color: #888;
    padding: 40px 0 20px;
    font-size: 13px;
}

#jjes-layout .footer-logo img {
    height: 30px;
    filter: grayscale(1) brightness(2);
    margin-bottom: 20px;
}

#jjes-layout .footer-info p {
    margin-bottom: 5px;
}

#jjes-layout .copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 12px;
    text-align: center;
}

/* Partner & Certification Banners */
#jjes-layout .partner-banners {
    padding: 20px 0 40px;
    background: var(--bg-white);
}

#jjes-layout .partner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on all devices */
    gap: 8px;
    /* Tighter gap for mobile */
}

#jjes-layout .partner-card {
    display: flex;
    flex-direction: column;
    /* Vertical stack for mobile */
    align-items: center;
    text-align: center;
    padding: 12px 5px;
    /* Smaller padding */
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s;
}

#jjes-layout .partner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

#jjes-layout .partner-icon {
    width: 38px;
    /* Smaller icon for mobile */
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 0;
    margin-bottom: 8px;
    flex-shrink: 0;
}

#jjes-layout .partner-text {
    flex-grow: 1;
}

#jjes-layout .partner-text h4 {
    font-size: 11px;
    /* Smaller text for mobile */
    color: var(--text-main);
    margin-bottom: 2px;
    font-weight: 700;
    line-height: 1.2;
    word-break: keep-all;
}

#jjes-layout .partner-text p {
    font-size: 9px;
    /* Smaller text for mobile */
    font-weight: 600;
    line-height: 1.2;
    word-break: keep-all;
}

/* Specific colors */
#jjes-layout .pt-tesda .partner-icon {
    background: rgba(26, 54, 93, 0.1);
    color: #1a365d;
}

#jjes-layout .pt-tesda p {
    color: #dd6b20;
}

#jjes-layout .pt-ielts .partner-icon {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
}

#jjes-layout .pt-ielts p {
    color: #e53e3e;
}

#jjes-layout .pt-ssp .partner-icon {
    background: rgba(49, 130, 206, 0.1);
    color: #3182ce;
}

#jjes-layout .pt-ssp p {
    color: #dd6b20;
}

#jjes-layout .pt-faq .partner-icon {
    background: rgba(221, 107, 32, 0.1);
    color: #dd6b20;
}

#jjes-layout .pt-faq p {
    color: #dd6b20;
}

#jjes-layout .pt-permit .partner-icon {
    background: rgba(214, 158, 46, 0.1);
    color: #d69e2e;
}

#jjes-layout .pt-permit p {
    color: #dd6b20;
}

#jjes-layout .pt-online .partner-icon {
    background: rgba(213, 63, 140, 0.1);
    color: #d53f8c;
}

#jjes-layout .pt-online p {
    color: #dd6b20;
}

@media (min-width: 768px) {
    #jjes-layout .partner-grid {
        gap: 20px;
    }

    #jjes-layout .partner-card {
        flex-direction: row;
        text-align: left;
        padding: 20px;
    }

    #jjes-layout .partner-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        font-size: 28px;
        margin-right: 18px;
        margin-bottom: 0;
    }

    #jjes-layout .partner-text h4 {
        font-size: 16px;
        margin-bottom: 5px;
    }

    #jjes-layout .partner-text p {
        font-size: 13px;
    }
}


/* ================================================================
   반응형 레이아웃 — 다모앙 스타일 단계별 사이드바
   모바일(~1023px)  : 1단 (헤더 + 콘텐츠)
   태블릿(1024px~)  : 2단 (헤더 + 콘텐츠 + 우측사이드)
   PC(1280px~)      : 3단 (좌측사이드 + 헤더 + 콘텐츠 + 우측사이드)
   ================================================================ */

/* ── 모바일 기본값 ── */
#jjes-layout .page-wrapper {
    display: block;
}

#jjes-layout .pc-sidebar {
    display: none;
}

#jjes-layout .main-content {
    min-width: 0;
}

/* 모바일: 우측 사이드바 숨김 (파트너 배너만 노출) */
#jjes-layout .right-sidebar {
    display: block;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

#jjes-layout .right-sidebar > .rs-widget {
    display: none;
}

#jjes-layout .right-sidebar > .partner-banners {
    display: block;
}


/* ================================================================
   태블릿 1024px+ — 우측 사이드바 등장, 2단 레이아웃
   좌측 사이드바는 아직 없음
   ================================================================ */
@media (min-width: 1024px) {

    /* 모바일 메뉴 숨기기 */
    #jjes-layout .menu-toggle,
    #jjes-layout .mobile-nav,
    #jjes-layout .nav-overlay {
        display: none !important;
    }

    /* grid: [헤더 전체] / [콘텐츠 | 우측사이드] */
    #jjes-layout {
        display: grid;
        grid-template-columns: 1fr 320px;
        grid-template-rows: auto 1fr auto;
        grid-template-areas:
            "topbar   topbar"
            "content  rightbar"
            "footer   footer";
        height: 100vh;        /* 스크롤 컨테이너로 만들어 sticky 작동 */
        overflow-y: auto;
    }

    #jjes-layout .page-wrapper {
        display: contents;
    }

    /* 헤더: 상단 전체 폭, 스크롤 시 고정 */
    #jjes-layout .header {
        grid-area: topbar;
        position: sticky;
        top: 0;
        width: auto;
        z-index: 100;
        box-shadow: 0 1px 0 #e2e8f0;
        border-bottom: none;
        background: #fff;
        align-self: start;  /* grid 안에서 sticky 정상 작동 */
    }

    /* 중앙 콘텐츠 */
    #jjes-layout .main-content {
        grid-area: content;
        background: #f7fafc;
        min-width: 0;
    }

    /* 우측 사이드바 등장 */
    #jjes-layout .right-sidebar {
        grid-area: rightbar;
        display: flex;
        flex-direction: column;
        gap: 12px;
        background: #f0f4f8;
        border-left: 1px solid #e2e8f0;
        padding: 14px 10px;
    }

    /* 우측 사이드바 위젯 표시 */
    #jjes-layout .right-sidebar > .rs-widget {
        display: block;
    }

    #jjes-layout .right-sidebar .partner-banners {
        padding: 12px 0;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
        margin-bottom: 5px;
    }

    #jjes-layout .right-sidebar .partner-banners .container {
        padding: 0 8px;
        width: 100%;
    }

    #jjes-layout .right-sidebar .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    #jjes-layout .right-sidebar .partner-card {
        padding: 10px 4px;
        flex-direction: column;
        text-align: center;
        border-radius: 8px;
    }

    #jjes-layout .right-sidebar .partner-icon {
        width: 36px;
        height: 36px;
        margin-right: 0;
        margin-bottom: 6px;
        font-size: 18px;
    }

    #jjes-layout .right-sidebar .partner-text h4 { font-size: 10px; margin-bottom: 2px; }
    #jjes-layout .right-sidebar .partner-text p  { font-size: 8px; }

    /* 푸터 */
    #jjes-layout .footer {
        grid-area: footer;
    }
}


/* ================================================================
   PC 1280px+ — 좌측 사이드바 등장, 완전한 3단 레이아웃
   헤더와 좌측 사이드바가 흰색으로 연결되어 다모앙 스타일의 L자형 느낌
   ================================================================ */
@media (min-width: 1280px) {

    /* grid: [헤더 전체 3열] / [좌측사이드 | 콘텐츠 | 우측사이드] */
    #jjes-layout {
        grid-template-columns: 220px 1fr 320px;
        grid-template-areas:
            "topbar   topbar   topbar"
            "sidebar  content  rightbar"
            "sidebar   footer   rightbar";
    }

    /* 헤더: topbar 영역 (우측 2열) — 좌측 사이드바와 흰색으로 연결 */
    #jjes-layout .header {
        grid-area: topbar;
        box-shadow: none;
        border-bottom: 1px solid #e2e8f0;
        background: #fff;
    }



    /* 좌측 사이드바 등장 — 헤더 아래부터 시작, 헤더와 흰색 연결 */
    #jjes-layout .pc-sidebar {
        grid-area: sidebar;
        display: flex;
        flex-direction: column;
        position: sticky;
        top: var(--header-height);           /* 헤더(60px) 바로 아래 고정 */
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
        background: #fff;              /* 헤더와 동일한 흰색 */
        border-right: 1px solid #e2e8f0;
        scrollbar-width: thin;
        z-index: 90;                   /* 헤더(z:100)보다 낮게 */
    }

    #jjes-layout .pc-sidebar::-webkit-scrollbar { width: 3px; }
    #jjes-layout .pc-sidebar::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 2px;
    }
}

/* 1440px+: 사이드바 폭 확장 */
@media (min-width: 1440px) {
    #jjes-layout {
        grid-template-columns: 240px 1fr 320px;
    }
}

/* PC 사용자 패널 */
#jjes-layout .pc-user-panel {
    background: linear-gradient(160deg, #5C5B5B 0%, #3A3939 100%);
    padding: 10px;
    flex-shrink: 0;
}

#jjes-layout .pc-user-greeting {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 9px;
}

#jjes-layout .pc-user-avatar {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.85);
}

#jjes-layout .pc-user-greeting small {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
}

#jjes-layout .pc-user-greeting strong {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
}

#jjes-layout .pc-user-actions {
    display: flex;
    gap: 5px;
}

#jjes-layout .pc-user-btn {
    flex: 1;
    text-align: center;
    padding: 5px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s;
}

#jjes-layout .pc-user-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

#jjes-layout .pc-btn-logout {
    background: rgba(220, 38, 38, 0.3);
    border-color: rgba(220, 38, 38, 0.4);
}

#jjes-layout .pc-btn-logout:hover {
    background: rgba(220, 38, 38, 0.5);
}

/* PC 3depth 네비게이션 */
#jjes-layout .pc-nav {
    flex: 1;
}

#jjes-layout .pc-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#jjes-layout .pc-d1-item {
    border-bottom: 1px solid #f1f5f9;
}

#jjes-layout .pc-d1-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1a365d;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

#jjes-layout .pc-d1-link i:first-child {
    width: 16px;
    text-align: center;
    color: #d69e2e;
    font-size: 12px;
}

#jjes-layout .pc-d1-link span {
    flex: 1;
}

#jjes-layout .pc-arrow {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s;
}

#jjes-layout .pc-d1-item.active>.pc-d1-link {
    background: #eef2ff;
}

#jjes-layout .pc-d1-item.active>.pc-d1-link .pc-arrow {
    transform: rotate(180deg);
}

#jjes-layout .pc-d1-link:hover {
    background: #f8fafc;
}

#jjes-layout .pc-depth2 {
    display: none;
    list-style: none;
    margin: 0;
    padding: 2px 0;
    background: #f8fafc;
    border-top: 1px solid #e8edf5;
}

#jjes-layout .pc-d1-item.active>.pc-depth2 {
    display: block;
}

#jjes-layout .pc-d2-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px 7px 28px;
    font-size: 12px;
    color: #4a5568;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

#jjes-layout .pc-d2-link:hover {
    color: #1a365d;
    background: #eef2ff;
}

#jjes-layout .pc-d2-item.active>.pc-d2-link {
    color: #1a365d;
    font-weight: 600;
}

#jjes-layout .pc-d2-arrow {
    font-size: 9px;
    color: #94a3b8;
    transition: transform 0.2s;
}

#jjes-layout .pc-d2-item.active>.pc-d2-link .pc-d2-arrow {
    transform: rotate(90deg);
}

#jjes-layout .pc-depth3 {
    display: none;
    list-style: none;
    margin: 0;
    padding: 2px 0;
    background: #fff;
    border-top: 1px solid #e8edf5;
}

#jjes-layout .pc-d2-item.active>.pc-depth3 {
    display: block;
}

#jjes-layout .pc-depth3 li a {
    display: block;
    padding: 5px 12px 5px 40px;
    font-size: 11px;
    color: #718096;
    text-decoration: none;
    transition: color 0.15s;
    position: relative;
}

#jjes-layout .pc-depth3 li a::before {
   
    position: absolute;
    left: 28px;
    color: #cbd5e0;
}

#jjes-layout .pc-depth3 li a:hover {
    color: #1a365d;
}

/* 우측 사이드바 */
#jjes-layout .rs-cta {
    background: linear-gradient(135deg, #1a365d, #2a5298);
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

#jjes-layout .rs-cta h4 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px;
}

#jjes-layout .rs-cta p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 10px;
}

#jjes-layout .rs-cta-btn {
    display: inline-block;
    padding: 7px 18px;
    background: #d69e2e;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

#jjes-layout .rs-cta-btn:hover {
    opacity: 0.85;
}

#jjes-layout .rs-widget {
    border-bottom: 1px solid #e2e8f0;
}

#jjes-layout .rs-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #fff;
    border-bottom: 1px solid #e8edf5;
}
#jjes-layout .rs-gallery-header  {
    font-size: 18px;

    font-weight: 700;
    padding:15px;
}

#jjes-layout .rs-widget-header span {
    font-size: 12px;
    font-weight: 700;
    color: #1a365d;
}

#jjes-layout .rs-more {
    font-size: 11px;
    color: #94a3b8;
    text-decoration: none;
}

#jjes-layout .rs-more:hover {
    color: #1a365d;
}

#jjes-layout .rs-widget-body {
    padding: 0;
    font-size: 11px;
}

#jjes-layout .rs-widget-body .title {
    font-size: 12px;
}

#jjes-layout .rs-widget-body a {
    padding: 0;
    font-size: 10px;
    margin: 5px;
}


#jjes-layout .rs-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

#jjes-layout .rs-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 6px;
    background: #fff;
    text-decoration: none;
    transition: background 0.15s;
}

#jjes-layout .rs-quick-item:hover {
    background: #eef2ff;
}

#jjes-layout .rs-quick-item i {
    font-size: 18px;
    color: #d69e2e;
}

#jjes-layout .rs-quick-item span {
    font-size: 10px;
    color: #4a5568;
    font-weight: 600;
    text-align: center;
}

#jjes-layout .rs-sns-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 12px 12px;
}

#jjes-layout .rs-sns-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s;
}

#jjes-layout .rs-sns-btn:hover {
    opacity: 0.85;
}

#jjes-layout .rs-youtube {
    background: #ff0000;
}

#jjes-layout .rs-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

#jjes-layout .rs-facebook {
    background: #1877f2;
}

/* ================================================================
   PC 사이드바 - 로고 영역 & 퀵 메뉴 버튼
   ================================================================ */

/* 사이드바 로고 */
#jjes-layout .pc-sidebar-logo {
    display: flex;
    align-items: center;
    padding: 14px 16px 12px;
    /* border-bottom: 1px solid #e8edf5;
    background: #fff; */
    filter: drop-shadow(-0.1px -0.1px 0px rgb(253, 253, 253,0.7));
    /* filter: drop-shadow(1px 0px 0px rgba(255, 255, 255, 0.6))
          drop-shadow(-1px 0px 0px rgba(255, 255, 255, 0.6))
          drop-shadow(0px 1px 0px rgba(255, 255, 255, 0.6))
          drop-shadow(0px -1px 0px rgba(255, 255, 255, 0.6)); */
    flex-shrink: 0;
    height: var(--header-height);
}

#jjes-layout .pc-sidebar-logo img {
    height: 32px;
    object-fit: contain;
}

/* 퀵 메뉴 탭 버튼 */
#jjes-layout .pc-quick-nav {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
    background: #fff;
}

#jjes-layout .pc-qnav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 4px;
    font-size: 10px;
    color: #718096;
    text-decoration: none;
    border-right: 1px solid #f1f5f9;
    transition: background 0.15s, color 0.15s;
    font-weight: 600;
}

#jjes-layout .pc-qnav-btn:last-child {
    border-right: none;
}

#jjes-layout .pc-qnav-btn i {
    font-size: 15px;
}

#jjes-layout .pc-qnav-btn:hover {
    background: #f0f4f8;
    color: #1a365d;
}

#jjes-layout .pc-qnav-btn.pc-qnav-highlight {
    color: #d69e2e;
}

#jjes-layout .pc-qnav-btn.pc-qnav-highlight:hover {
    background: #fffbeb;
}

/* 비로그인 로그인 버튼 */
#jjes-layout .pc-login-prompt {
    padding: 10px 12px;
    border-bottom: 1px solid #e8edf5;
    flex-shrink: 0;
}

#jjes-layout .pc-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    background: #4F4E4E;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

#jjes-layout .pc-login-btn:hover {
    background: #3A3939;
}

/* ================================================================
   우측 사이드바 — 카드 박스 스타일 (재정의)
   ================================================================ */
#jjes-layout .right-sidebar .rs-cta,
#jjes-layout .right-sidebar .rs-widget {
    border: none;
    border-bottom: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    background: #fff;
    flex-shrink: 0;
}

#jjes-layout .right-sidebar .rs-cta {
    background: linear-gradient(135deg, #1a365d, #2a5298);
}

/* 우측 사이드바 탭 전용 스타일 */
#jjes-layout .rs-tabs-header {
    display: flex;
    /* background: #f8fafc; */
    border-bottom: 1px solid #e8edf5;
}

#jjes-layout .rs-tabs-header .tab-btn {
    flex: 1;
    padding: 10px 5px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

#jjes-layout .rs-tabs-header .tab-btn {
    flex: 1;
    padding: 10px 5px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}


#jjes-layout .rs-tabs-header .tab-btn.active {
    color: #1a365d;
    border-bottom-color: #1a365d;
    background: #fff;
}

#jjes-layout .rs-more-link {
    display: block;
    text-align: right;
    padding: 8px 12px;
    font-size: 10px;
    color: #94a3b8;
    text-decoration: none;
    border-top: 1px dashed #e8edf5;
}

#jjes-layout .rs-more-link:hover {
    color: #1a365d;
}

/* Custom Image Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.custom-modal.active {
    display: flex;
}

.custom-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.custom-modal .modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: calc(100vh - 100px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.custom-modal .modal-header {
    background: var(--primary-color);
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.custom-modal .modal-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.custom-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.custom-modal .modal-content img {
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.custom-modal .modal-desc-box {
    background: #f8fafc;
    border-left: 4px solid var(--secondary-color);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    flex-shrink: 0;
}

.custom-modal .modal-desc-box i {
    color: var(--secondary-color);
    font-size: 18px;
    margin-top: 2px;
}

.custom-modal .modal-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.custom-modal .modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10;
}

.custom-modal .modal-close-btn:hover {
    color: #fff;
}
