@charset "utf-8";
/* ==========================================================================
   파일명: /www/{$mall_id}/css/style_responsive.css
   설명: 펜션 홈페이지 프리미엄 고급형 전용 반응형 스타일 (Mobile & Tablet)
   ========================================================================== */

/* =======================================================
   1. 태블릿 반응형 (max-width: 1024px)
   ======================================================= */
@media (max-width: 1024px) {
    .special-card-grid, .card-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .heritage-banner { flex-direction: column; text-align: center; }
    .masonry-gallery { column-count: 2; column-gap: 16px; }
    .masonry-item { margin-bottom: 16px; }
}

/* =======================================================
   2. 모바일 반응형 (max-width: 767px)
   ======================================================= */
@media (max-width: 767px) {
    .container { padding: 40px 5%; }
    .header-inner { padding: 0 5%; height: 70px; }
    .logo img { max-height: 40px; }
    
    /* ★ [핵심] PC에서 숨겼던 모바일 UI들을 다시 활성화 */
    .mobile-gnb-header { display: flex !important; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid #f0f0f0; width: 100%; }
    .mobile-menu-toggle { display: flex !important; flex-direction: column; justify-content: space-between; width: 30px; height: 22px; background: none; border: none; cursor: pointer; padding: 0; z-index: 1002; }
    .mobile-menu-overlay { display: block !important; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); visibility: hidden; opacity: 0; transition: opacity 0.3s ease; z-index: 998; }
    
    /* 햄버거 버튼 애니메이션 */
    .mobile-menu-toggle .bar { width: 100%; height: 2px; background-color: #222; transition: all 0.3s ease; border-radius: 2px; }
    .mobile-menu-toggle.active .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
    .mobile-menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
    
    .mobile-menu-overlay.open { visibility: visible; opacity: 1; }
    body.menu-lock { overflow: hidden; }
    
    /* GNB 드로어(Drawer) 레이아웃 재정의 */
    .gnb { position: fixed; top: 0; right: -240px; width: 240px; height: 100%; background-color: #fff; box-shadow: -5px 0 15px rgba(0,0,0,0.08); flex-direction: column; transition: right 0.35s ease; z-index: 1001; }
    .gnb.open { right: 0; }
    
    .mobile-gnb-header .m-title { font-size: 14px; font-weight: 700; }
    .mobile-close-btn { background: none; border: none; font-size: 26px; cursor: pointer; }
    .gnb-links { flex-direction: column; align-items: flex-start; width: 100%; gap: 0; padding: 10px 0; }
    .gnb-links a { width: 100%; padding: 14px 20px; font-size: 15px; border-bottom: 1px solid #f8f8f8; }
    .gnb-links a.btn-reservation { margin: 16px 20px; width: calc(100% - 40px); text-align: center; }

    /* 서브페이지 모바일 레이아웃 1단 정렬 */
    .room-detail-layout, .intro-layout, .card-grid, .special-card-grid { flex-direction: column; grid-template-columns: 1fr; gap: 30px; width: 100%; }
    /* ▼ 정보 영역이 모바일에서 가로 100%를 꽉 채우도록 속성 강제 덮어쓰기 */
    .room-detail-info, .intro-text-wrap { position: relative; top: 0; padding: 25px 20px; width: 100% !important; box-sizing: border-box; }
    .sub-title { font-size: 28px; }
    .intro-content-area { padding: 30px 20px; }

    .special-modal-content { width: 95%; max-height: 90vh; }
    .modal-header { padding: 20px; }
    .modal-header h2 { font-size: 22px; }
    .modal-body { padding: 20px; }
    .btn-reserve-large { display: block; width: 100%; box-sizing: border-box; }
    
	/* 기존 가로 스크롤 형태 전면 해제 */
    .tab-menu {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr); /* 모바일에서 2열 그리드 세로 배치 (객실이 아주 많다면 1열로 변경 가능) */
        gap: 8px !important;
        overflow-x: visible !important;
        padding-bottom: 0 !important;
        justify-content: stretch !important;
    }
	
	.tab-menu a {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        white-space: normal !important; /* 줄바꿈 허용 */
        text-align: center !important;
        padding: 12px 10px !important;
        font-size: 14px !important;
        border-radius: 8px !important; /* 모서리를 둥근 사각형 블록 형태로 변경 */
        box-sizing: border-box !important;
    }
    
	/* 모바일 전용 미디어 쿼리 (style_responsive.css 에 추가하거나 모바일 환경일 때 자동 적용) */
    .footer-area { padding: 40px 0; }
    .company-info .info-item { display: block; margin-right: 0; margin-bottom: 6px; }
    .company-info .info-item::after { display: none; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }

    /* 갤러리 및 프리미엄 기능 모바일 최적화 */
    .masonry-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .premium-highlight { font-size: 24px; }
    .premium-features-grid { grid-template-columns: 1fr; gap: 20px; margin: 40px 0; }
    .premium-feature-item { padding: 30px 20px; }

	/* 모바일 환경에서 메인 갤러리 뷰어 화살표 크기 및 위치 최적화 */
	/* 기존 PC 고정 높이 해제 및 모바일 최적화 높이 적용 */
	/* 모바일 환경에서 메인 갤러리 뷰어 화살표 크기 및 위치 최적화 */
    .gallery-main {
        height: auto !important;
        padding-top: 0 !important; /* <== 과거의 꼼수를 무력화 */
        aspect-ratio: 4 / 3 !important; /* <== 모바일에 최적화된 최신 비율 유지 기법 적용 */
    }
    
    .gallery-main img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* 모바일 화살표 크기 및 위치 재정렬 */
    .main-slide-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
    .main-slide-btn.main-prev { left: 10px !important; }
    .main-slide-btn.main-next { right: 10px !important; }

    /* 썸네일 그리드 간격 및 정렬 보정 (하단 잘림 원천 방지) */
    .gallery-thumbs-wrapper {
        margin-top: 10px !important;
        margin-bottom: 20px !important;
    }
    .gallery-thumbs {
        gap: 8px !important;
        padding-bottom: 5px !important;
    }
    .gallery-thumbs .thumb-item {
        flex: 0 0 calc(25% - 6px) !important; /* 가로로 4개씩 배치 (유지) */
        padding-top: 0 !important; /* PC에 있던 padding-top 초기화 */
        height: auto !important; /* 고정 픽셀 제거 */
        aspect-ratio: 1 / 1 !important; /* 썸네일을 완벽한 정사각형으로 고정 (4:3이나 3:2로 하셔도 됨) */
    }

	.global-date-bar { flex-direction: column; gap: 15px; text-align: center; }
    .global-date-bar .g-info { flex-wrap: wrap; justify-content: center; width: 100%; }
    .global-date-bar .g-btn { width: 100%; justify-content: center; }

    #dynamicSmartCalendar { padding: 12px; width: 95vw !important; }
    .dyn-cal-wrap { flex-direction: column; gap: 15px; }
    
    /* 달력 일자 칸 높이 최적화 */
    .dyn-day { height: 42px; font-size: 12px; }
    
    /* 뱃지, 휴일명 겹침 방지 미세 조정 */
    .dyn-day.unavailable::after { margin-top: 0px; }
    .dyn-day .hol-text { margin-top: 1px; transform: scale(0.95); }
}
