/* main.css */

/* 인앱 알림 스타일 */
.notification-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 15px;
    cursor: pointer;
}

#notification-icon {
    font-size: 1.3rem;
    color: #333;
    cursor: pointer;
    position: relative;
}

#notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff6a00;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
    min-width: 18px;
    text-align: center;
}

#notification-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 2000;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f5f5f5;
    transform: translateX(-2px);
}

.notification-item.unread {
    background-color: #fff8f0;
    font-weight: 500;
    border-left: 3px solid #ff6a00;
}

.notification-item.unread:hover {
    background-color: #fff0e0;
}

.notification-item.read {
    opacity: 0.7;
}

.notification-content {
    display: flex;
    flex-direction: column;
}

.notification-message {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: #999;
}

.notification-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.notification-mark-all {
    width: 100%;
    padding: 10px;
    background-color: #f5f5f5;
    border: none;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-mark-all:hover {
    background-color: #e8e8e8;
}

/* 모바일 알림 스타일 */
@media (max-width: 768px) {
    /* 모바일 햄버거 메뉴에서 알림 아이콘 숨기기 */
    .notification-icon-wrapper {
        display: none !important;
    }
    
    #notification-dropdown {
        width: 280px;
        max-height: 350px;
    }
}

/* Pretendard 폰트 */
@font-face {
	font-family: 'Pretendard';
	font-weight: 900;
	font-display: swap;
	src: local('Pretendard Black'), url('/fonts/pretendard/static/woff2/Pretendard-Black.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-Black.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 800;
	font-display: swap;
	src: local('Pretendard ExtraBold'), url('/fonts/pretendard/static/woff2/Pretendard-ExtraBold.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-ExtraBold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 700;
	font-display: swap;
	src: local('Pretendard Bold'), url('/fonts/pretendard/static/woff2/Pretendard-Bold.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-Bold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 600;
	font-display: swap;
	src: local('Pretendard SemiBold'), url('/fonts/pretendard/static/woff2/Pretendard-SemiBold.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-SemiBold.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 500;
	font-display: swap;
	src: local('Pretendard Medium'), url('/fonts/pretendard/static/woff2/Pretendard-Medium.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-Medium.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 400;
	font-display: swap;
	src: local('Pretendard Regular'), url('/fonts/pretendard/static/woff2/Pretendard-Regular.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-Regular.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 300;
	font-display: swap;
	src: local('Pretendard Light'), url('/fonts/pretendard/static/woff2/Pretendard-Light.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-Light.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 200;
	font-display: swap;
	src: local('Pretendard ExtraLight'), url('/fonts/pretendard/static/woff2/Pretendard-ExtraLight.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-ExtraLight.woff') format('woff');
}

@font-face {
	font-family: 'Pretendard';
	font-weight: 100;
	font-display: swap;
	src: local('Pretendard Thin'), url('/fonts/pretendard/static/woff2/Pretendard-Thin.woff2') format('woff2'), url('/fonts/pretendard/static/woff/Pretendard-Thin.woff') format('woff');
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
    scroll-behavior: smooth;
    height: 100%; /* 전체 높이 확보 */
}

body {
    display: flex;
    flex-direction: column; /* 자식 요소를 세로 배열 */
    min-height: 100vh;
}

main {
    flex: 1; /* 남은 공간을 모두 차지하도록 확장 */
    padding-top: 100px;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #ffffff;
    transition: background-color 0.3s ease;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 90px;
}

.logo {
    text-decoration: none;
    line-height: 0;
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
}

/* 상단 헤더 메뉴 */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
    margin-left: 250px;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #000;
}

/* 알림 배지 스타일 */
.notification-badge {
    display: none;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.7rem;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    top: 5px;
    right: -10px;
    min-width: 16px;
    text-align: center;
}

/* 드롭다운 메뉴 스타일 */
.main-nav .right-menu {
    position: relative;
}

.main-nav .right-menu li {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav .right-menu .mypage-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 1001;
    min-width: 150px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.main-nav .right-menu li:hover .mypage-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.main-nav .right-menu .mypage-dropdown a {
    display: block;
    padding: 8px 15px;
    color: #555;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.main-nav .right-menu .mypage-dropdown a:hover {
    background-color: #f8f8f8;
    color: #000;
}

/* 드롭다운 메뉴 컨테이너 스타일 */
.main-nav .left-menu .dropdown {
    position: relative;
}

/* 드롭다운 메뉴 (숨겨진 상태) */
.main-nav .left-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* RESERVATION 메뉴 바로 아래에 위치 */
    left: 50%;
    transform: translateX(-50%); /* 중앙 정렬 */
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 1001;
    min-width: 180px;
    list-style: none;
    margin: 0;
    white-space: nowrap;
}

/* 마우스 호버 시 드롭다운 메뉴 표시 */
.main-nav .left-menu .dropdown:hover .dropdown-menu {
    display: block;
}

/* 드롭다운 항목 스타일 */
.main-nav .left-menu .dropdown-menu li {
    padding: 0;
    margin: 0;
}

.main-nav .left-menu .dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: #555;
    text-decoration: none;
    transition: background-color 0.2s;
    font-weight: 500;
}

.main-nav .left-menu .dropdown-menu a:hover {
    background-color: #f8f8f8;
    color: #000;
}

/* 모바일 반응형: 드롭다운 메뉴 처리 */
@media (max-width: 768px) {
    /* 모바일에서는 드롭다운을 인라인으로 표시 */
    .main-nav .left-menu .dropdown-menu {
        position: static; /* 절대 위치 해제 */
        transform: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        min-width: auto;
        background-color: transparent;
        display: block; /* 항상 표시되도록 설정 */
        margin-top: 0;
    }

    /* 역사투어 */
    .main-nav .left-menu .dropdown-menu li:first-child {
        padding-left: 30px;
    }
    
    /* 패키지투어 */
    .main-nav .left-menu .dropdown-menu li:last-child {
        padding-left: 23px;
    }

    .main-nav .left-menu .dropdown-menu a {
        padding: 12px 0;
        font-size: 1rem;
    }

    /* 모바일에서는 호버 상태 비활성화 */
    .main-nav .left-menu .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Footer */
.main-footer {
    background-color: #f8f8f8;
    color: #777;
    padding: 40px 20px;
    text-align: center;
    font-size: 0.9em;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.address-info p {
    margin: 5px 0;
}

.copyright-info {
    margin-top: 20px;
}

.social-links a {
    color: #777;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #333;
}

/* 햄버거 메뉴 버튼 (기본적으로 숨김) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle span {
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: #555;
    border-radius: 3px;
    transition: all 0.3s ease;
    left: 0;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 6px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span:nth-child(3) {
    bottom: 6px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Common Page Styles */
.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: center;
}

.content-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 비밀번호 토글 기능 스타일 */

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    flex-grow: 1;
    padding-right: 45px !important;
    margin-bottom: 0 !important;
}

.password-toggle-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.5rem;
    color: #999;
    transition: color 0.2s;
    user-select: none;
    line-height: 1;
    z-index: 10;
}

.password-toggle-btn.visible {
    color: #ff6a00;
}

/* 모바일 반응형 디자인 (768px 이하) */
@media (max-width: 768px) {
    main {
        padding-top: 70px;
    }

    /* 헤더 */
    .header-content {
        height: 70px;
        padding: 0 15px;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        order: 1;
        z-index: 1002;
    }

    .logo img {
        height: 45px;
    }

    /* 햄버거 버튼 표시 */
    .mobile-menu-toggle {
        display: flex !important;
        order: 3;
        z-index: 1002;
        margin-left: auto;
    }

    /* 네비게이션 */
    .main-nav {
        order: 2;
        margin-left: 0;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        z-index: 1000;
    }

    .main-nav.active {
        max-height: 500px;
        padding: 30px 20px 20px 20px;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-nav ul > li {
        margin: 0;
        padding: 0;
    }

    .main-nav a {
        font-size: 1.1rem;
        display: block;
        padding: 15px 0;
    }

    /* 드롭다운 모바일 최적화 - 항상 표시 */
    .main-nav .right-menu .mypage-dropdown {
        position: static;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        box-shadow: none;
        padding: 0;
        min-width: auto;
        margin: 0;
        background: transparent;
    }

    .main-nav .right-menu .mypage-dropdown li {
        padding: 0;
        text-align: center;
    }

    .main-nav .right-menu .mypage-dropdown a {
        display: block;
        padding: 12px 0;
        font-size: 0.9rem;
        color: #888;
    }

    .main-nav .right-menu .mypage-dropdown a:hover {
        color: #ff6a00;
        background: transparent;
    }

    /* 페이지 타이틀 */
    .page-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    /* 콘텐츠 섹션 */
    .content-section {
        padding: 40px 15px;
    }

    /* 푸터 */
    .main-footer {
        padding: 30px 15px;
        font-size: 0.85em;
    }

    .address-info p {
        font-size: 0.9em;
        line-height: 1.6;
    }

    .social-links {
        margin-top: 15px;
    }

    .social-links a {
        display: inline-block;
        margin: 5px 10px;
    }
}

/* 타블렛 반응형 디자인 (768px ~ 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-content {
        padding: 0 30px;
    }

    .main-nav {
        margin-left: 100px;
    }

    .main-nav ul {
        gap: 15px;
    }

    .page-title {
        font-size: 2.2rem;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
    .main-nav .right-menu li {
        position: static;
    }

    .notification-badge {
        position: static;
        margin-left: 5px;
        transform: none;
    }

    main {
        padding-top: 60px;
    }

    .header-content {
        height: 60px;
        padding: 0 10px;
    }

    .logo img {
        height: 40px;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    .main-nav {
        top: 60px;
        padding: 0;
    }

    .main-nav.active {
        padding: 25px 15px 15px 15px;
    }

    .main-nav a {
        font-size: 1rem;
        padding: 8px 0;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .content-section {
        padding: 30px 10px;
    }

    .main-footer {
        padding: 20px 10px;
        font-size: 0.8em;
    }
}