/* ====================================================
   COMMON.CSS - 공통 스타일
   모든 페이지에서 공통으로 사용되는 스타일
   ==================================================== */

/* 네이버 나눔고딕 웹폰트 */
@font-face {
    font-family: 'NanumGothic';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/NanumGothic.woff2') format('woff2'),
         url('../fonts/NanumGothic.woff') format('woff');
}

@font-face {
    font-family: 'NanumGothic';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/NanumGothicBold.woff2') format('woff2'),
         url('../fonts/NanumGothicBold.woff') format('woff');
}

@font-face {
    font-family: 'NanumGothic';
    font-style: normal;
    font-weight: 900;
    src: url('../fonts/NanumGothicExtraBold.woff2') format('woff2'),
         url('../fonts/NanumGothicExtraBold.woff') format('woff');
}

/* 로컬 폰트 fallback 설정 */
@font-face {
    font-family: 'NanumGothic';
    src: local('NanumGothic'),
         local('나눔고딕'),
         local('Malgun Gothic'),
         local('맑은 고딕');
}

/* 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 가로 스크롤 방지 */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'NanumGothic', '맑은 고딕', 'Malgun Gothic', sans-serif;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* 모든 섹션 스크롤 방지 */
section {
    overflow: visible;
    max-width: 100%;
    width: 100%;
    position: relative;
}

/* 컨테이너 스크롤 방지 */
.container {
    max-width: 100%;
    overflow: visible;
}

/* 스크롤바 스타일 - 파란색 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f0f9ff;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 6px;
    border: 2px solid #f0f9ff;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #f0f9ff;
}

:root {
    /* BRIGHT CORPORATE 3-COLOR SYSTEM */
    /* Primary: Vibrant Blue - Trust, Technology, Clarity */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    --primary-950: #172554;

    /* Accent: Modern Purple - Innovation, Premium (Lighter) */
    --accent-50: #faf5ff;
    --accent-100: #f3e8ff;
    --accent-200: #e9d5ff;
    --accent-300: #d8b4fe;
    --accent-400: #c4b5fd;
    --accent-500: #a78bfa;
    --accent-600: #8b5cf6;
    --accent-700: #7c3aed;
    --accent-800: #6d28d9;
    --accent-900: #5b21b6;

    /* Success: Fresh Green - Growth, Success, Positivity */
    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-200: #bbf7d0;
    --success-300: #86efac;
    --success-400: #4ade80;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;
    --success-800: #166534;
    --success-900: #14532d;

    /* Premium Neutral Palette - More sophisticated grays */
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;
    --gray-950: #0f172a;

    /* Legacy compatibility - map to new system */
    --blue: var(--primary-600);
    --green: var(--success-600);
    --orange: var(--accent-600);
    --pink: var(--accent-500);
    --indigo: var(--primary-700);
    --cyan: var(--primary-500);
    --teal: var(--success-500);
    --red: var(--accent-700);
    --violet: var(--accent-600);
    --amber: var(--accent-500);

    /* Bright & Light Shadow System - Softer, lighter shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-premium: 0 20px 40px -8px rgba(59, 130, 246, 0.15);

    /* Premium Gradient System - Using 3-color palette */
    --gradient-primary: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-900) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-600) 0%, var(--accent-800) 100%);
    --gradient-success: linear-gradient(135deg, var(--success-600) 0%, var(--success-800) 100%);
    --gradient-premium: linear-gradient(135deg, var(--primary-800) 0%, var(--accent-700) 50%, var(--primary-900) 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'NanumGothic', '맑은 고딕', 'Malgun Gothic', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    color: var(--gray-950);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

.container {
    max-width: min(1320px, 100vw);
    width: 100%;
    margin: 0 auto;
    padding: 0 min(2.5rem, 5vw);
    box-sizing: border-box;
}

/* Premium Header - 모든 페이지에서 공통 사용 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    overflow: visible;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.header.scrolled {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    overflow: visible;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'NanumGothic', '맑은 고딕', 'Malgun Gothic', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--primary-900);
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--primary-600);
    transform: translateY(-2px);
}

.logo-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo:hover .logo-image {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.3));
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 데스크톱 네비게이션 스타일 */
.mobile-nav-header {
    display: none;
}

.mobile-close-btn {
    display: none;
}

/* 드롭다운 메뉴 스타일 (데스크톱) */
.nav-item-with-dropdown {
    position: relative;
}

button.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'NanumGothic', '맑은 고딕', 'Malgun Gothic', sans-serif;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

button.dropdown-trigger::after {
    content: '▼';
    font-size: 0.625rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button.dropdown-trigger:hover {
    color: var(--primary-600);
}

button.dropdown-trigger[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* 가맹문의 드롭다운 */
.franchise-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

button.dropdown-trigger[aria-expanded="true"] + .franchise-dropdown {
    opacity: 1;
    visibility: visible;
}

/* 드롭다운 리스트 */
.dropdown-list {
    list-style: none;
    padding: 0.5rem;
    margin: 0;
}

.dropdown-list li {
    margin: 0;
}

.dropdown-list a {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem 0.75rem;
    padding: 0.625rem 0.875rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.5);
}

.dropdown-list a:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    transform: translateX(4px);
}

/* 드롭다운 아이콘 */
.dropdown-list .dropdown-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 드롭다운 텍스트 */
.dropdown-list .dropdown-text {
    display: contents;
}

.dropdown-list .dropdown-text strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    grid-column: 2;
    grid-row: 1;
    line-height: 1.4;
}

.dropdown-list .dropdown-text span {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 400;
    grid-column: 2;
    grid-row: 2;
    line-height: 1.4;
}

.nav-consultation {
    position: relative;
    padding: 0.875rem 1.5rem;
    margin-right: 1.5rem;
    color: var(--gray-700);
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.nav-consultation::before {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 2.5rem);
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #3b82f6 20%,
        #2563eb 50%,
        #3b82f6 80%,
        transparent 100%
    );
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.nav-consultation:hover {
    color: var(--primary-600);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.08) 100%);
    transform: translateY(-1px);
}

.nav-consultation:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-cta {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.nav-cta:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

/* ===================================
   고정 사이드바 스타일 (데스크톱)
   =================================== */
aside.sidebar {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 900;
}

/* login/signup 페이지에서 사이드바 숨기기 (데스크톱) */
body.hide-sidebar aside.sidebar {
    display: none !important;
}

aside.sidebar .sidebar-item {
    position: relative;
    z-index: 1;
}

aside.sidebar .sidebar-item:hover {
    z-index: 100001;
}

aside.sidebar .sidebar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 56px;
    background: white !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
    color: #4b5563 !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none !important;
}

aside.sidebar .sidebar-link:hover,
aside.sidebar .sidebar-link:focus,
aside.sidebar .sidebar-link:active,
aside.sidebar .sidebar-link:visited {
    text-decoration: none !important;
    outline: none !important;
}

/* 스터디케어 링크 - 기본 상태 */
aside.sidebar a.sidebar-link.studycare-link {
    background: white !important;
    border: 2px solid #9333ea !important;
}

/* 스터디케어 링크 - 텍스트 스타일 */
aside.sidebar a.sidebar-link.studycare-link span {
    font-size: 14px;
    font-weight: 600;
    color: #9333ea !important;
    letter-spacing: -0.3px;
}

/* 스터디케어 링크 - SVG/이모지 숨김 */
aside.sidebar a.sidebar-link.studycare-link svg,
aside.sidebar a.sidebar-link.studycare-link img {
    display: none !important;
}

/* 스터디케어 링크 - 호버 시 */
aside.sidebar a.sidebar-link.studycare-link:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%) !important;
    box-shadow: 0 8px 20px rgba(147, 51, 234, 0.45), 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid #9333ea !important;
    transform: scale(1.1) !important;
}

/* 스터디케어 링크 - focus/active 상태에서도 기본 테두리 유지 */
aside.sidebar a.sidebar-link.studycare-link:focus,
aside.sidebar a.sidebar-link.studycare-link:active {
    border: 2px solid #9333ea !important;
}

/* 스터디케어 링크 - 호버 시 텍스트 색상 */
aside.sidebar a.sidebar-link.studycare-link:hover span {
    color: white !important;
}

/* 쌤공 링크 - 기본 상태 */
aside.sidebar a.sidebar-link.ssamgong-link {
    background: white !important;
    border: 2px solid #14b8a6 !important;
}

/* 쌤공 로고 이미지 - 흰색 배경 제거 및 크기 조정 */
aside.sidebar a.sidebar-link.ssamgong-link img {
    mix-blend-mode: multiply;
    filter: contrast(1.2);
    width: 42px !important;
    height: auto !important;
    max-width: 42px !important;
    max-height: 32px !important;
    object-fit: contain !important;
}

/* 쌤공 링크 - SVG 아이콘 숨김 */
aside.sidebar a.sidebar-link.ssamgong-link svg {
    display: none !important;
}

/* 쌤공 링크 - 호버 시 */
aside.sidebar a.sidebar-link.ssamgong-link:hover {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.45), 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid #14b8a6 !important;
    transform: scale(1.1) !important;
}

/* 쌤공 링크 - focus/active 상태에서도 기본 테두리 유지 */
aside.sidebar a.sidebar-link.ssamgong-link:focus,
aside.sidebar a.sidebar-link.ssamgong-link:active {
    border: 2px solid #14b8a6 !important;
}

/* 쌤공 링크 - 호버 시 로고 색상 반전 */
aside.sidebar a.sidebar-link.ssamgong-link:hover img {
    filter: brightness(0) invert(1) !important;
    mix-blend-mode: normal;
}

.pc-only { /* 기본은 PC에서 보이게 */
    display: flex;
}



/* 사이드바 툴팁 (이미 아래쪽에 정의되어 있음) */

/* ===================================
   모바일 메뉴 스타일 (768px 이하)
   =================================== */
@media (max-width: 768px) {
    /* 햄버거 버튼 왼쪽 배치 */
    .header .container {
        position: relative;
    }

    .mobile-menu-btn {
        order: -1;
        margin-right: auto;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    /* 모바일에서 로고 호버 효과 제거 */
    .logo:hover {
        color: inherit;
        transform: translateX(-50%);
    }

    .logo:hover .logo-image {
        transform: none;
        filter: none;
    }

    /* 사이드바를 플로팅 버튼으로 변경 - 채팅 버튼과 같은 높이 */
    aside.sidebar {
        position: fixed;
        left: 20px;
        bottom: 30px;
        top: auto;
        transform: none;
        flex-direction: row;
        gap: 0.75rem;
    }

    aside.sidebar .sidebar-link {
        width: 62px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* 모바일에서 스터디케어 텍스트 크기 조정 */
    aside.sidebar a.sidebar-link.studycare-link span {
        font-size: 11px;
        letter-spacing: -0.5px;
    }

    /* 모바일에서 쌤공 로고 크기 조정 및 가시성 개선 */
    aside.sidebar a.sidebar-link.ssamgong-link img {
        width: 42px !important;
        max-width: 42px !important;
        max-height: 32px !important;
        object-fit: contain !important;
        /* 이미지가 잘 보이도록 크기 증가 */
    }

    /* 모바일에서 쌤공 링크 버튼 크기 조정 */
    aside.sidebar .sidebar-link.ssamgong-link {
        width: 68px !important;
        height: 52px !important;
    }

    /* 모바일에서 툴팁 완전히 제거 */
    aside.sidebar .sidebar-tooltip {
        display: none !important;
    }

    /* login/signup 페이지에서 사이드바 숨기기 */
    body.hide-sidebar aside.sidebar {
        display: none !important;
    }

    .pc-only { /*모바일 (768px 이하)에서는 숨김 */
        display: none !important;
    }

    .container {
        padding: 0 1.5rem;
    }

    /* 햄버거 버튼 */
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    /* 오버레이 배경 */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* 사이드 슬라이드 메뉴 - 왼쪽에서 슬라이드 */
    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        bottom: 0;
        width: 85vw;
        max-width: 380px;
        background: white;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        z-index: 999;
        padding: 0 1.5rem 2rem 1.5rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav.active,
    .nav.mobile-open {
        left: 0;
    }

    /* 모바일 메뉴 상단 헤더 */
    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1.5rem;
        margin: 0 -1.5rem 0.75rem;
        border-bottom: 1px solid var(--gray-200);
        background: white;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .mobile-nav-logo {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        text-decoration: none;
        font-family: 'NanumGothic', '맑은 고딕', 'Malgun Gothic', sans-serif;
        font-size: 1rem;
        font-weight: 700;
        color: var(--primary-900);
        letter-spacing: -0.03em;
        transition: all 0.3s ease;
    }

    .mobile-nav-logo:hover {
        color: var(--primary-600);
    }

    .mobile-nav-logo span {
        white-space: nowrap;
    }

    .mobile-logo-image {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    /* 닫기 버튼 - 최소 44x44px 터치 타겟 */
    .mobile-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.05);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .mobile-close-btn:hover {
        background: rgba(0, 0, 0, 0.1);
        transform: rotate(90deg);
    }

    .mobile-close-btn span {
        position: absolute;
        width: 18px;
        height: 2px;
        background: var(--gray-700);
    }

    .mobile-close-btn span:first-child {
        transform: rotate(45deg);
    }

    .mobile-close-btn span:last-child {
        transform: rotate(-45deg);
    }

    /* 기능 드롭다운 영역 (모바일) */
    .nav-item-with-dropdown {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* 드롭다운 트리거 버튼 (모바일) */
    button.dropdown-trigger,
    .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        font-weight: 600;
        color: var(--success-700);
        text-decoration: none;
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.12) 100%);
        border: 1px solid rgba(16, 185, 129, 0.25);
        border-radius: 10px;
        margin-bottom: 0.5rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
        cursor: pointer;
    }

    button.dropdown-trigger:hover,
    .nav-link:hover {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.18) 100%);
        border-color: rgba(16, 185, 129, 0.35);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
    }

    .nav-item-with-dropdown.active button.dropdown-trigger,
    .nav-item-with-dropdown.active .nav-link {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.18) 100%);
        color: var(--success-700);
        border-color: rgba(16, 185, 129, 0.35);
        box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
    }

    button.dropdown-trigger::after,
    .nav-link::after {
        content: '▼';
        font-size: 0.75rem;
        color: var(--success-600);
        margin-left: 0.5rem;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-item-with-dropdown.active button.dropdown-trigger::after,
    .nav-item-with-dropdown.active .nav-link::after {
        transform: rotate(180deg);
    }

    /* 드롭다운 메뉴 (모바일) */
    .features-dropdown,
    .franchise-dropdown {
        max-height: 0;
        overflow: hidden;
        position: static;
        width: 100%;
        max-width: 100%;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    }

    .nav-item-with-dropdown.active .features-dropdown,
    button.dropdown-trigger[aria-expanded="true"] + .franchise-dropdown {
        max-height: 70vh;
        overflow-y: auto;
        padding: 0.75rem 0 0 0;
    }

    /* 드롭다운 리스트 (모바일) */
    .dropdown-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .dropdown-list li {
        margin: 0;
    }

    .dropdown-list a {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 0.25rem 0.625rem;
        padding: 0.625rem 0.75rem;
        background: rgba(255, 255, 255, 0.5);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--gray-700);
        font-size: 0.9375rem;
        font-weight: 500;
    }

    .dropdown-list a:hover {
        background: var(--primary-50);
        color: var(--primary-600);
        transform: translateX(2px);
        border-color: var(--primary-300);
    }

    .dropdown-list .dropdown-icon {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
        font-size: 1.25rem;
    }

    .dropdown-list .dropdown-text {
        display: contents;
    }

    .dropdown-list .dropdown-text strong {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        font-size: 0.9375rem;
        font-weight: 700;
        color: var(--gray-900);
        text-align: left;
    }

    .dropdown-list .dropdown-text span {
        grid-column: 1 / 3;
        grid-row: 2;
        font-size: 0.8125rem;
        color: var(--gray-600);
        text-align: left;
        padding-left: 2.25rem;
    }

    .dropdown-grid {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .dropdown-item {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: flex-start;
        gap: 0.25rem 0.625rem;
        padding: 0.625rem 0.75rem;
        background: rgba(255, 255, 255, 0.5);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .dropdown-item:hover {
        background: var(--primary-50);
        transform: translateX(2px);
        border-color: var(--primary-300);
    }

    .dropdown-icon {
        flex-shrink: 0;
        width: auto;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        background: transparent;
        border-radius: 50%;
        transition: transform 0.2s ease;
        grid-column: 1;
        grid-row: 1;
        padding: 0.25rem;
        align-self: center;
    }

    .dropdown-item:hover .dropdown-icon {
        transform: scale(1.1);
    }

    .dropdown-content {
        display: contents;
    }

    .dropdown-content strong {
        display: inline-block;
        font-size: 0.9375rem;
        font-weight: 700;
        color: var(--gray-900);
        line-height: 1.3;
        white-space: normal;
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .dropdown-content span {
        display: block;
        font-size: 0.8125rem;
        color: var(--gray-600);
        line-height: 1.3;
        white-space: normal;
        overflow-wrap: break-word;
        word-wrap: break-word;
        grid-column: 1 / 3;
        grid-row: 2;
        padding-left: 2.25rem;
    }

    /* 상담하기 버튼 - 모바일 */
    .nav-consultation {
        display: block;
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        font-weight: 600;
        color: var(--success-700);
        text-decoration: none;
        text-align: center;
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.12) 100%);
        border: 1px solid rgba(16, 185, 129, 0.25);
        border-radius: 10px;
        margin-bottom: 0.5rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
    }

    .nav-consultation:hover {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.18) 100%);
        border-color: rgba(16, 185, 129, 0.35);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
    }

    /* 로그인 버튼 - 모바일 */
    .nav-cta {
        position: relative;
        display: block;
        width: 100%;
        padding: 1rem 1.25rem;
        text-align: center;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 10px;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        border: 1px solid var(--primary-700);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
    }

    .nav-cta:hover {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }

    /* 사용자 드롭다운 - 모바일 */
    .user-dropdown {
        display: none;
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        background: white;
        border-radius: 10px;
        border: 1px solid var(--gray-200);
        overflow: hidden;
    }

    .user-dropdown.show {
        display: block;
        animation: dropdownSlideDown 0.3s ease-out;
    }

    .user-dropdown a {
        display: block;
        padding: 1rem 1.25rem;
        color: var(--gray-700);
        text-decoration: none;
        text-align: center;
        font-size: 0.9375rem;
        font-weight: 500;
        transition: all 0.2s ease;
        border-bottom: 1px solid var(--gray-100);
    }

    .user-dropdown a:last-child {
        border-bottom: none;
    }

    .user-dropdown a:hover {
        background: var(--primary-50);
        color: var(--primary-600);
    }

    .dropdown-divider {
        height: 1px;
        background: var(--gray-200);
        margin: 0;
    }

    @keyframes dropdownSlideDown {
        from {
            opacity: 0;
            max-height: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            max-height: 200px;
            transform: translateY(0);
        }
    }

    .section-title {
        font-size: 2rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.nav a {
    font-family: 'Noto Sans KR', 'Pretendard', sans-serif;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: -0.01em;
    padding: 0.75rem 0.875rem;
    border-radius: 10px;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--primary-600);
}

.nav a.nav-cta {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    transition: all 0.4s ease;
    font-weight: 600;
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.35), 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.nav a.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.45);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 0.375rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-btn span {
    width: 1.5rem;
    height: 2px;
    background: var(--gray-700);
    transition: all 0.3s ease;
}

/* Premium Button System - 공통 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 3rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4),
                0 8px 10px -6px rgba(37, 99, 235, 0.3),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 35px -5px rgba(37, 99, 235, 0.5),
                0 12px 15px -6px rgba(37, 99, 235, 0.4),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-secondary {
    background: white;
    color: var(--primary-700);
    border: 2px solid var(--primary-600);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.2);
    font-weight: 700;
    justify-content: center;
}

.btn-secondary:hover {
    background: var(--primary-700);
    color: white;
    border-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-outline-primary {
    background: white;
    color: var(--primary-700);
    border: 2px solid var(--primary-600);
    font-weight: 700;
}

.btn-outline-primary:hover {
    background: var(--primary-700);
    color: white;
    border-color: var(--primary-700);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Premium Section Spacing */
section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(59, 130, 246, 0.12) 100%);
    color: var(--primary-700);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 100px;
    margin-bottom: 2rem;
    border: 1.5px solid rgba(37, 99, 235, 0.25);
}

.section-title {
    font-family: 'Noto Sans KR', 'Pretendard', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.section-title .highlight {
    color: var(--primary-700);
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-family: '맑은 고딕', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--gray-600);
    font-weight: 400;
    max-width: 720px;
    margin: 0 auto;
}

/* Gradient Text - 공통 텍스트 스타일 */
.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

/* Footer - 공통 푸터 스타일 */
.footer {
    background: linear-gradient(180deg, #0f172a 0%, #18181b 100%);
    color: white;
    padding: 5rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.5) 50%, transparent 100%);
}

.footer-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h3 {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* 푸터 로고 */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'NanumGothic', '맑은 고딕', 'Malgun Gothic', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-logo span {
    color: white;
    font-family: 'NanumGothic', '맑은 고딕', 'Malgun Gothic', sans-serif;

}

.footer-logo:hover {
    transform: translateY(-2px);
}

.footer-logo:hover span {
    color: #60a5fa;
}

.footer-logo-image {
    width: 72px;
    height: 72px;
    object-fit: contain;
    transition: all 0.3s ease;
    background: white;
    border-radius: 12px;
    padding: 6px;
}

.footer-logo:hover .footer-logo-image {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-social-icons .social-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 0.5rem;
    color: var(--primary-600);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.footer-social-icons .social-icon:hover {
    background: var(--primary-600);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
}

.footer-social-icons .social-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.footer-social-icons .social-icon svg path {
    fill: currentColor;
}

.footer-social-icons .social-icon:hover svg path {
    fill: white;
}

/* SVG 아이콘 스타일 */
.footer-social-icons .social-icon {
    color: var(--gray-700) !important;
}

.footer-social-icons .social-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.footer-social-icons .social-icon:hover {
    transform: translateY(-2px) scale(1.05) !important;
}

.footer-social-icons .social-icon i {
    font-size: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.5rem;
    color: var(--primary-400);
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.footer-social a:hover {
    background: var(--primary-600);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-200);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-400);
    transform: translateX(4px);
}

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-legal {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-legal a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary-400);
}

/* Footer Divider */
.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.5) 50%, transparent 100%);
    margin-bottom: 0;
}

/* Footer Description */
.footer-description {
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Footer Contact */
.footer-contact {
    margin-bottom: 1.5rem;
}

.footer-contact .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--gray-400);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-contact .contact-item i {
    color: var(--primary-400);
    font-size: 1rem;
    width: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.footer-contact .contact-item span {
    color: var(--gray-400);
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Footer Section */
.footer-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-200);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--primary-400);
    transform: translateX(4px);
}

/* =============================================
   채팅 버튼 & 채팅창 스타일
   ============================================= */

/* 채팅 플로팅 버튼 */
.chat-float-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-float-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

.chat-float-button svg {
    stroke: white;
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* 채팅창 */
.chat-window {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 380px;
    max-width: calc(100vw - 4rem);
    height: 600px;
    max-height: calc(100vh - 4rem);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 16px 16px 0 0;
    color: white;
}

.chat-header-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.chat-status {
    font-size: 0.875rem;
    opacity: 0.9;
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: white;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-close-btn svg {
    stroke: white !important;
}

.chat-close-btn svg path {
    stroke: white !important;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f9fafb;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chat-message.user .chat-avatar {
    background: #e5e7eb;
}

.chat-bubble {
    background: white;
    padding: 0.875rem 1rem;
    border-radius: 16px;
    max-width: 70%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-message.user .chat-bubble {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.chat-bubble p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.chat-bubble p:last-of-type {
    margin-bottom: 0.25rem;
}

.chat-time {
    font-size: 0.75rem;
    opacity: 0.6;
    display: block;
    margin-top: 0.25rem;
}

.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-reply-btn {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.625rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
}

.quick-reply-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.chat-input-area {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: white;
    border-radius: 0 0 16px 16px;
}

.chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* =============================================
   모달 스타일
   ============================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.modal-close-btn {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #e5e7eb;
}

.modal-close-btn svg {
    stroke: #374151;
}

.modal-body {
    padding: 2rem;
}

.modal-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.franchise-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.franchise-form .form-group {
    margin-bottom: 1rem;
}

.franchise-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.franchise-form input,
.franchise-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.franchise-form input:focus,
.franchise-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.franchise-form textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    margin-bottom: 1.5rem !important;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400 !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.checkbox-label a {
    color: #3b82f6;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.btn-lg {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-map {
    margin-top: 0px;
}

.footer-map h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.map-link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
}

.map-image {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.map-image:hover {
    transform: scale(1.03);
}

.map-desc {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #bfc7d5;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .chat-float-button {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
    }

    .chat-window {
        bottom: 1.5rem;
        right: 1.5rem;
        width: calc(100vw - 3rem);
        height: calc(100vh - 3rem);
    }

    .franchise-form .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body {
        padding: 1.25rem 1.5rem;
    }

    .map-image {
        max-width: 100%;
    }

    .footer-map {
        margin-top: 20px;
    }

}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% - 2rem));
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(calc(-100% - 2rem));
    }
    100% {
        transform: translateX(0);
    }
}

/* 사이드바 툴팁 스타일 - 위쪽으로 표시 */
aside.sidebar .sidebar-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: linear-gradient(135deg, #18181b 0%, #0f172a 100%);
    color: white;
    padding: 0.375rem 0.5rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 200px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* 툴팁 화살표 - 아래쪽으로 향하는 화살표 */
aside.sidebar .sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0f172a;
}

/* 호버 시 툴팁 표시 - 즉시 나타남 */
aside.sidebar .sidebar-link:hover .sidebar-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 12px);
    transition-delay: 0s;
}

/* 스터디케어 툴팁 - 왼쪽으로 더 이동하여 잘림 방지 */
aside.sidebar .studycare-tooltip {
    left: -20px;
    transform: translateX(0);
}

aside.sidebar .studycare-tooltip::before {
    left: 50px;
    transform: translateX(0);
}

aside.sidebar .studycare-link:hover .studycare-tooltip {
    z-index: 100000;
}

/* 쌤공 툴팁 - 오른쪽 정렬로 겹침 방지 */
aside.sidebar .ssamgong-tooltip {
    right: 0;
    left: auto;
    transform: translateX(0);
    max-width: 280px;
    white-space: normal;
    word-break: keep-all;
}

aside.sidebar .ssamgong-tooltip::before {
    left: auto;
    right: 24px;
    transform: translateX(0);
}

aside.sidebar .ssamgong-link:hover .ssamgong-tooltip {
    z-index: 99999;
}

/* ===================================
   Tablet Responsive Design (769px - 1024px)
   =================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .dropdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

/* ===================================
   Mobile Responsive Design (max 768px)
   =================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 10003;
        position: relative;
    }

    .mobile-menu-btn.active {
        z-index: 10003;
    }

    /* 햄버거 버튼 활성화 시 완전히 숨김 */
    .mobile-menu-btn.active span {
        opacity: 0;
        transform: scale(0);
    }

    /* 모바일 메뉴 닫기 버튼 - 최소 44x44px 터치 타겟 */
    .mobile-close-btn {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
        background: var(--gray-100);
        border: none;
        border-radius: 50%;
        font-size: 1.5rem;
        color: var(--gray-700);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        z-index: 10002;
    }

    .mobile-close-btn:hover {
        background: var(--gray-200);
        color: var(--gray-900);
        transform: rotate(90deg);
    }

    .nav {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 300px !important;
        max-width: 85vw !important;
        height: 100vh !important;  /* 기본값 */
        height: 100dvh !important;  /* iOS Safari에서 흔들림 방지 */


        background: white !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 1.5rem 2rem !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2) !important;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 10001 !important;
        overflow-y: auto !important;

    }

    .nav.active {
        left: 0 !important;

    }

    .section-title {
        font-size: 2rem;
    }

    /* Footer 모바일 최적화 */
    .footer {
        padding: 3rem 0 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .footer-logo-image {
        width: 56px;
        height: 56px;
    }

    .footer-brand p {
        font-size: 0.875rem;
        word-break: keep-all;
        white-space: normal;
        line-height: 1.6;
    }

    .footer-links {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }

    .footer-section h4 {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
    }

    .footer-section ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .footer-section li {
        margin-bottom: 0;
    }

    .footer-section a {
        font-size: 0.875rem;
        word-break: keep-all;
        white-space: normal;
    }

    .footer-social-icons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem !important;
    }

    .footer-social-icons .social-icon {
        width: 3rem !important;
        height: 3rem !important;
        background: white !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0.75rem !important;
        color: var(--primary-600) !important;
        font-size: 1.25rem !important;
    }

    .footer-social-icons .social-icon:hover {
        background: var(--primary-600) !important;
        color: white !important;
        border-color: var(--primary-600) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5) !important;
    }

    .footer-social-icons .social-icon svg,
    .footer-social-icons .social-icon i {
        width: 1.5rem !important;
        height: 1.5rem !important;
        font-size: 1.5rem !important;
    }

    .footer-social-icons .social-icon svg path {
        fill: currentColor !important;
    }

    .footer-social-icons .social-icon:hover svg path {
        fill: white !important;
    }

    /* 모바일 SVG 아이콘 크기 조정 */
    .footer-social-icons .social-icon svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }

    /* Footer Contact 최적화 */
    .footer-contact {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }

    .footer-contact .contact-item {
        display: flex !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        font-size: 0.8125rem !important;
        line-height: 1.5 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    .footer-contact .contact-item i,
    .footer-contact .contact-item .fas {
        flex-shrink: 0 !important;
        width: 1rem !important;
        font-size: 1rem !important;
        color: var(--primary-400) !important;
        margin-top: 0.125rem !important;
    }

    .footer-contact .contact-item span {
        flex: 1 !important;
        word-break: break-all !important;
        white-space: normal !important;
    }

    .footer-bottom {
        padding-top: 2rem;
    }

    .footer-bottom p {
        font-size: 0.8125rem;
        word-break: keep-all;
        white-space: normal;
        line-height: 1.5;
    }

    /* 레거시 지원 */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-section {
        min-width: 0;
    }

    /* 버튼 텍스트 줄바꿈 방지 */
    .btn-block span {
        white-space: nowrap;
    }

    .btn-block {
        display: inline-flex;
        width: auto;
        min-width: 200px;
        padding: 1rem 2rem;
    }
}

/* ===================================
   Extra Small Mobile (max 480px)
   =================================== */
@media (max-width: 480px) {
    .footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .footer-logo-image {
        width: 48px;
        height: 48px;
    }

    .footer-brand p {
        font-size: 0.8125rem;
    }

    .footer-links {
        gap: 1.5rem;
    }

    .footer-section h4 {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .footer-section a {
        font-size: 0.8125rem;
    }

    .footer-social-icons {
        gap: 0.75rem !important;
    }

    .footer-social-icons .social-icon {
        width: 2.75rem !important;
        height: 2.75rem !important;
        background: white !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
    }

    .footer-social-icons .social-icon svg,
    .footer-social-icons .social-icon i {
        width: 1.375rem !important;
        height: 1.375rem !important;
        font-size: 1.375rem !important;
    }

    .footer-social-icons .social-icon svg path {
        fill: currentColor !important;
    }

    .footer-social-icons .social-icon:hover svg path {
        fill: white !important;
    }

    /* 작은 화면 SVG 아이콘 크기 조정 */
    .footer-social-icons .social-icon svg {
        width: 1.375rem !important;
        height: 1.375rem !important;
    }

    .footer-contact .contact-item {
        font-size: 0.75rem !important;
    }

    .footer-contact .contact-item i,
    .footer-contact .contact-item .fas {
        width: 0.875rem !important;
        font-size: 0.875rem !important;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }

    .footer-bottom p {
        font-size: 0.75rem;
    }
}