/* 모던 디자인 시스템 - 차봄 (chabom) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 컬러 팔레트 - 더 세련된 색상 */
    --primary-dark: #3A3126;
    --primary-brown: #6B5D54;
    --primary-light: #9B8B7E;
    --accent-gold: #D4AF37;
    --accent-green: #7A8450;
    --bg-cream: #FBF9F6;
    --bg-white: #FFFFFF;
    --text-dark: #2A2520;
    --text-gray: #6E6A65;
    --border-light: rgba(0,0,0,0.08);
    
    /* 그림자 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-cream);
    overflow-x: hidden;
}

/* ==================== 사이드바 디자인 ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-brown) 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    overflow-x: hidden;
}

/* 로고 섹션 */
.sidebar .logo {
    background: white;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.sidebar .logo img {
    max-width: 120px;
    height: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .logo:hover img {
    transform: scale(1.05);
}

/* 소셜 그리드 - 공백 제거 및 스타일 개선 */
.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    margin: 0 !important;
}

.social-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.1);
}

.social-grid a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: var(--accent-gold);
}

.social-grid svg {
    width: 22px;
    height: 22px;
    margin-bottom: 6px;
    stroke-width: 1.8;
}

.social-grid span {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

/* 메뉴 스타일 개선 */
.sidebar .menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.sidebar .menu li {
    position: relative;
}

.sidebar .menu a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    padding: 16px 24px;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    letter-spacing: 0.3px;
}

.sidebar .menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-gold);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .menu a:hover {
    background: rgba(255,255,255,0.08);
    padding-left: 32px;
}

.sidebar .menu a:hover::before,
.sidebar .menu a.active::before {
    height: 60%;
}

.sidebar .menu a.active {
    background: rgba(255,255,255,0.12);
    color: var(--accent-gold);
    font-weight: 500;
}

/* 사이드바 푸터 개선 */
.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    background: rgba(0,0,0,0.15);
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    line-height: 1.5;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer .contact-info {
    margin-bottom: 12px;
}

.sidebar-footer .contact-info p {
    margin: 3px 0;
    opacity: 0.95;
}

.sidebar-footer .contact-info strong {
    color: var(--accent-gold);
    font-weight: 500;
}

.sidebar-footer .copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px;
    margin-top: 12px;
    font-size: 10px;
    opacity: 0.8;
}

.sidebar-footer .copyright p {
    margin: 2px 0;
}

/* ==================== 메인 콘텐츠 ==================== */
.main-content {
    margin-left: 240px;
    margin-right: 360px;
    min-height: 100vh;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded {
    margin-right: 0;
}

/* 히어로 섹션 개선 */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--bg-cream);
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide:nth-child(1) {
    background: linear-gradient(rgba(42,37,32,0.4), rgba(42,37,32,0.4)), 
                url('slider1.jpg') center/cover;
}

.slide:nth-child(2) {
    background: linear-gradient(rgba(42,37,32,0.4), rgba(42,37,32,0.4)), 
                url('slider2.jpg') center/cover;
}

.slide:nth-child(3) {
    background: linear-gradient(rgba(42,37,32,0.4), rgba(42,37,32,0.4)), 
                url('slider3.jpg') center/cover;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 700px;
    padding: 0 40px;
    animation: heroFadeIn 1.5s ease-out;
}

.hero-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    line-height: 1.2;
}

.hero-text p {
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 12px;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
    line-height: 1.8;
    opacity: 0.95;
}

.hero-text .company-name {
    margin-top: 32px;
    font-size: clamp(20px, 2.5vw, 26px);
    color: var(--accent-gold);
    font-weight: 500;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 슬라이더 도트 개선 */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.dot:hover {
    background-color: rgba(255,255,255,0.6);
    transform: scale(1.2);
}

.dot.active {
    background-color: var(--accent-gold);
    width: 32px;
    border-radius: 5px;
    border-color: white;
}

/* ==================== 우측 패널 디자인 개선 ==================== */
.right-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 360px;
    height: 100vh;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8F6F3 100%);
    padding: 24px 20px;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 24px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 16px;
    overflow-y: auto;
}

.right-panel.show {
    transform: translateX(0);
}

.right-panel.hidden {
    transform: translateX(100%);
}

/* 패널 섹션 카드 스타일 */
.panel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: white;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.panel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(212,175,55,0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: var(--accent-gold);
}

.panel-section:hover::before {
    opacity: 1;
}

.panel-section:hover .section-icon {
    transform: scale(1.1);
}

.panel-section:hover .section-category {
    color: var(--accent-gold);
}

/* 섹션별 그라데이션 배경 */
.notice-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9F0 100%);
}

.location-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F9FF 100%);
}

.kakao-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFEF0 100%);
}

.school-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FFF4 100%);
}

.chabom-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF0F5 100%);
}

.video-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F5F0FF 100%);
}

.service-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF5F0 100%);
}

.gallery-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FFF9 100%);
}

/* 아이콘 스타일 */
.section-icon {
    margin-bottom: 12px;
    color: var(--primary-brown);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

/* 카카오 아이콘 */
.kakao-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FEE500, #FFDC00);
    color: #3C1E1E;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: -0.5px;
    box-shadow: 0 2px 8px rgba(254,229,0,0.3);
}

/* 텍스트 스타일 */
.section-text {
    text-align: center;
}

.section-category {
    font-size: 10px;
    color: var(--text-gray);
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.section-subtitle {
    font-size: 11px;
    color: var(--text-gray);
    line-height: 1.4;
    opacity: 0.85;
}

/* 패널 토글 버튼 */
.panel-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 64px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    box-shadow: -4px 0 12px rgba(0,0,0,0.08);
}

.panel-toggle:hover {
    background: var(--bg-cream);
    width: 36px;
}

.panel-toggle.expanded {
    right: 360px;
}

.panel-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-dark);
    transition: transform 0.3s ease;
}

.panel-toggle.expanded svg {
    transform: rotate(180deg);
}

/* ==================== 모달 디자인 개선 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    animation: modalFadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content.large {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-brown));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.close-modal {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

/* ==================== 반응형 디자인 ==================== */
@media (max-width: 1400px) {
    .right-panel {
        width: 320px;
    }
    
    .main-content {
        margin-right: 320px;
    }
    
    .panel-toggle.expanded {
        right: 320px;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .right-panel {
        width: 280px;
    }
    
    .main-content {
        margin-right: 280px;
    }
    
    .panel-toggle.expanded {
        right: 280px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        margin-right: 0;
    }
    
    .right-panel {
        transform: translateX(100%);
    }
    
    .panel-toggle {
        display: none;
    }
}

/* ==================== 유틸리티 클래스 ==================== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-brown);
}

/* 선택 영역 스타일 */
::selection {
    background: var(--accent-gold);
    color: white;
}

::-moz-selection {
    background: var(--accent-gold);
    color: white;
}
