@charset "UTF-8";

/* ===================================================== */
/* [모바일 전용 스타일 통합] (Max-width: 1024px)         */
/* ===================================================== */
@media (max-width: 1024px) {

    /* [추가] 화면 폭을 600px로 강제 고정 */
    html, body {
        min-width: 600px !important;
        width: 600px !important;
        max-width: 600px !important;
        overflow-x: hidden;
        margin: 0 auto;
    }

    /* --- 기존 코드 계속 --- */
    /* --- 1. 레이아웃 및 그리드 --- */
    /* ... */
@media (max-width: 1024px) {

    /* --- 1. 레이아웃 및 그리드 --- */
    /* 기본 그리드는 1열 유지 */
    .grid-container,
    .climate-sub-grid,
    #section-climate .panel-grid,
    .panel-grid {
        grid-template-columns: 1fr !important;
    }

    /* [수정 1] 최상단 메타데이터는 2x2 그리드로 변경 */
    .panel-criteria-group {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* 2열 강제 */
        gap: 10px !important;
    }

    /* 기후 지도 펼쳤을 때는 1열로 복귀 */
    .panel-criteria-group.map-open {
        grid-template-columns: 1fr !important;
    }

    .content-section {
        padding: 20px 10px 400px 10px; /* 섹션 전체 좌우 여백 축소 */
    }

    /* --- 2. 헤더 및 네비게이션 (PC 숨김 등) --- */
    .nav-tabs, .nav-group::after { display: none !important; }

    header {
        justify-content: flex-start;
        padding: 0 20px;
        height: 60px;
    }
    header:not(.header-shrunk):has(.nav-group:hover),
    header:not(.header-shrunk):has(.sub-tab-btn.active) {
        padding-bottom: 0;
    }

    /* 햄버거 버튼 */
    #mobile-menu-btn {
        display: block !important;
        position: fixed; top: 8px; left: 10px; z-index: 9998;
        width: 44px; height: 44px; background: transparent; border: none; cursor: pointer;
    }
    .hamburger-icon, .hamburger-icon::before, .hamburger-icon::after {
        position: relative; display: block; width: 24px; height: 2px;
        background-color: var(--text-primary); border-radius: 2px; transition: all 0.3s ease;
    }
    .hamburger-icon::before { content: ''; position: absolute; top: -8px; left: 0; width: 100%; }
    .hamburger-icon::after { content: ''; position: absolute; bottom: -8px; left: 0; width: 100%; }

    /* 모바일 패널 & 오버레이 */
    #mobile-nav-overlay {
        display: block !important; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px);
        z-index: 9990; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    }
    #mobile-nav-panel {
        display: flex !important; position: fixed; top: 0; left: -100%;
        width: 320px; max-width: 85%; height: 100%;
        background: rgba(248, 249, 250, 0.7);
        backdrop-filter: blur(8px) brightness(1.1); -webkit-backdrop-filter: blur(8px) brightness(1.1);
        border-right: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 10px 0 35px rgba(0,0,0,0.2);
        z-index: 9995; transition: left 0.5s cubic-bezier(0.25, 1, 0.5, 1);
        flex-direction: column;
    }
    #mobile-nav-overlay.active { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }
    #mobile-nav-panel.active { left: 0; }

    /* 닫기 버튼 */
    #mobile-close-btn {
        display: block !important; position: fixed; top: 8px; left: -50px;
        z-index: 10000; opacity: 0; transition: left 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s;
        width: 44px; height: 44px; background: transparent; border: none; cursor: pointer;
    }
    #mobile-nav-panel.active + #mobile-close-btn { left: 330px; opacity: 1; }
    .close-icon, .close-icon::before, .close-icon::after {
        position: relative; display: block; width: 24px; height: 24px;
    }
    .close-icon::before, .close-icon::after {
        content: ''; position: absolute; left: 0; top: 11px; width: 100%; height: 2px;
        background-color: #fff; box-shadow: 0 0 5px rgba(0,0,0,0.5); border-radius: 2px;
    }
    .close-icon::before { transform: rotate(45deg); }
    .close-icon::after { transform: rotate(-45deg); }

    /* 메뉴 내부 스타일 */
    .mobile-nav-header { height: 0; border: none; }
    #mobile-nav-content { flex-grow: 1; overflow-y: auto; padding: 30px 20px; }
    #mobile-nav-content .tab-btn, #mobile-nav-content .group-btn {
        display: flex; align-items: center; width: 100%; padding: 18px 15px;
        text-align: left; border-radius: 8px; margin: 0 0 8px 0;
        font-family: 'Noto Serif KR', serif; font-size: 1.2rem; font-weight: 700;
        color: var(--text-secondary); transition: all 0.2s;
    }
    #mobile-nav-content .tab-btn:hover, #mobile-nav-content .group-btn:hover { background: rgba(0,0,0,0.05); }
    #mobile-nav-content .tab-btn.active, #mobile-nav-content .nav-group.open > .group-btn {
        color: var(--text-primary); background: rgba(0,0,0,0.08);
    }
    #mobile-nav-content .tab-btn.active .menu-icon, #mobile-nav-content .nav-group.open > .group-btn .menu-icon {
        filter: grayscale(0%); opacity: 1;
    }
    #mobile-nav-content .nav-group .sub-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: none; padding: 0; min-width: auto;
        background: transparent; margin: 0; border-radius: 0;
        max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    }
    #mobile-nav-content .nav-group.open .sub-menu { max-height: 1000px; padding-top: 5px; }
    #mobile-nav-content .sub-tab-btn {
        grid-template-columns: 25px 1fr; gap: 15px; padding: 12px 10px 12px 30px;
        margin: 0; width: 100%; border-radius: 0;
    }
    #mobile-nav-content .sub-tab-btn .menu-icon { font-size: 1.2rem; opacity: 0.5; }
    #mobile-nav-content .sub-tab-btn .menu-title { font-size: 1rem; font-weight: 500; }
    #mobile-nav-content .sub-tab-btn .menu-desc { font-size: 0.8rem; line-height: 1.4; opacity: 0.6; }
    #mobile-nav-content .sub-tab-btn.active { background: rgba(0,0,0,0.04); color: var(--text-primary) !important; }
    #mobile-nav-content .sub-tab-btn.active .menu-title { font-weight: 700; }
    #mobile-nav-content .sub-tab-btn.active .menu-desc { opacity: 0.8; color: var(--text-primary) !important; }
    #mobile-nav-content .sub-tab-btn.active .menu-icon { filter: grayscale(0%); opacity: 1; }

    /* --- 3. 카드 외부 디자인 (목록) --- */
    .region-card {
        height: auto; min-height: 120px; padding: 15px 0;
        transition: transform 0.1s ease, background-color 0.2s;
    }
    .region-card:active { transform: scale(0.98) !important; background-color: rgba(255, 255, 255, 0.9) !important; }
    .region-card:hover { transform: none; box-shadow: 0 0 10px rgba(0, 255, 255, 0.4); }
    .card-header { padding: 0 20px; align-items: center; flex-direction: row; }
    .header-content h2 {
        font-size: 1.5rem !important; margin-bottom: 6px; margin-top: 15px !important;
        line-height: 1.2; letter-spacing: -0.03em;
    }
    .header-content p { font-size: 0.95rem !important; font-weight: 400; line-height: 1.4; }
    .header-content h2::before {
        display: block !important; position: absolute; top: -25px; left: -2px;
        font-size: 1.0rem !important; font-weight: 900; opacity: 0.4; color: var(--theme); font-family: 'Inter', sans-serif;
    }
    .geo-badge { font-size: 0.8rem !important; padding: 2px 6px; vertical-align: middle; transform: translateY(-3px); }
    .expand-icon {
        width: 36px !important; height: 36px !important; font-size: 1.2rem !important;
        border-width: 2px !important; border-radius: 50%; flex-shrink: 0; margin-left: 15px;
    }
    .card-bg-icon { width: 100px; height: 100px; bottom: -15px; left: -15px; opacity: 0.05 !important; }

    /* --- 4. 카드 내부 디자인 (상세 패널) --- */
    .detail-panel.open {
        /* [수정 3] 패널 좌우 여백 극한 축소 (5px) */
        padding: 25px 15px !important;
        max-height: 8000px !important; overflow: visible !important; padding-bottom: 100px !important;
    }

    /* 상단 정보 (Criteria) */
    .criteria-item { align-items: center; }
    .criteria-icon {
        font-size: 1.1rem; /* 아이콘 축소 */
        margin-right: 6px; /* 간격 축소 */
    }
    .criteria-label { font-size: 0.8rem; opacity: 0.8; }
    /* [수정 2] 메타데이터 폰트 축소 */
    .criteria-text {
        font-size: 0.85rem !important;
        font-weight: 600; line-height: 1.2;
    }
    
    .panel-criteria-group.map-open .climate-map-area { grid-column: 1; grid-row: auto; margin-top: 15px; }
    .map-toggle-btn { position: static; margin-bottom: 10px; display: inline-block; }

    /* 중분류 카드 (Sub Cards) */
    .sub-region-card {
        /* [수정 3] 카드 내부 여백 극한 축소 (5px) */
        padding: 20px 15px !important;
        margin-bottom: 20px; box-shadow: none !important; border: 1px solid rgba(0,0,0,0.05) !important;
    }
    .sub-title-number { width: 32px; height: 32px; font-size: 1.2rem; border-width: 1.5px; }
    .sub-title-heading { font-size: 1.2rem !important; margin-bottom: 5px; }
    .sub-title-description { font-size: 0.9rem !important; line-height: 1.5; }

    /* 리스트 아이템 */
    .detail-item {
        /* [수정 3] 리스트 아이템 여백 축소 */
        padding: 15px 10px !important;
        margin-bottom: 10px;
    }
    .detail-name { font-size: 1.0rem !important; display: block; margin-bottom: 5px; }
    .detail-examples {
        font-size: 0.85rem !important; text-align: left !important;
        display: block; margin-left: 0 !important; margin-bottom: 8px; color: var(--text-primary);
    }
    .detail-desc { font-size: 0.9rem !important; line-height: 1.5; color: #555; }

    /* 도약 버튼 */
    .jump-btn-container { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 40px; }
    .jump-link-btn { width: 100%; justify-content: center; padding: 12px 0; font-size: 1rem; font-weight: 600; }
    .jump-guide-text { text-align: center; margin-bottom: 10px; font-size: 0.9rem; }

    /* --- 5. 플로팅 버튼 위치 조정 --- */
    .floating-search { bottom: 20px; right: 20px; }
    .bg-view-btn { bottom: 85px; right: 20px; }
    .map-reset-btn { bottom: 145px; right: 20px; }
}
}
/* [수정 1] 기후 섹션에서만 로마자(I, II...) 강제 제거 */
    #climate-main-grid .region-card .header-content h2::before {
        display: none !important;
    }

    /* [수정 2] 기후 섹션을 '제외'한 나머지 카드들의 스타일 조정 */
    .region-card:not([id^="card-climate-"]) {
        padding: 10px 0 !important;   /* 상하 패딩 축소 (15px -> 10px) */
        min-height: 100px !important; /* 최소 높이 축소 (120px -> 100px) */
    }

    /* 설명 문구 폰트 키우기 (기후 제외) */
    .region-card:not([id^="card-climate-"]) .header-content p {
        font-size: 1.05rem !important; /* 폰트 확대 (0.95rem -> 1.05rem) */
        line-height: 1.35 !important;  /* 줄간격 살짝 조절 */
    }
    /* ===================================================== */
    /* [모바일 가독성 리뉴얼] 기후 섹션 제외, 상세 패널 디자인 개선 */
    /* ===================================================== */

    /* 1. 리스트 아이템 레이아웃: 좌우 배치 -> 상하 수직 배치로 변경 */
    .content-section:not(#section-climate) .detail-item {
        display: flex !important;
        flex-direction: column !important; /* 위에서 아래로 흐르게 */
        align-items: flex-start !important;
        padding: 22px 18px !important; /* 터치하기 좋게 패딩 대폭 확대 */
        margin-bottom: 15px !important; /* 항목끼리 확실히 떨어뜨림 */
        background: #fff !important;
        border: 1px solid rgba(0,0,0,0.08) !important; /* 테두리 살짝 진하게 */
        box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
    }

    /* 2. 항목 이름 (맨 위): 크기 키우고 아래 여백 추가 */
    .content-section:not(#section-climate) .detail-name {
        font-size: 1.2rem !important; /* 제목답게 큼직하게 */
        font-weight: 800 !important;
        margin-bottom: 8px !important;
        width: auto !important;
    }

    /* 3. 예시 데이터 (중간): 우측 구석에서 왼쪽으로 당겨옴 */
    .content-section:not(#section-climate) .detail-examples {
        display: block !important;
        text-align: left !important;
        margin-left: 0 !important;
        margin-bottom: 12px !important; /* 본문과 구분감 주기 */
        font-size: 1.0rem !important;
        color: #2d3436 !important; /* 연한 회색 -> 진한 먹색으로 변경 (가독성↑) */
        font-weight: 600 !important;
        line-height: 1.4 !important;
        opacity: 1 !important; /* 투명도 제거 */
    }

    /* 4. 설명 문구 (맨 아래): 줄간격 넓히고 글자 키움 */
    .content-section:not(#section-climate) .detail-desc {
        font-size: 1.05rem !important; /* 본문 폰트 확대 */
        line-height: 1.65 !important;   /* 줄간격 시원하게 (165%) */
        color: #444 !important;         /* 흐릿한 회색 -> 진한 회색 */
        margin-top: 5px !important;
        word-break: keep-all !important; /* 단어 중간에 끊기지 않게 */
    }

    /* 5. 중분류 카드(흰색 박스) 제목도 밸런스 맞게 키움 */
    .content-section:not(#section-climate) .sub-title-heading {
        font-size: 1.35rem !important;
        margin-bottom: 8px !important;
    }
    .content-section:not(#section-climate) .sub-title-description {
        font-size: 1.0rem !important;
        line-height: 1.5 !important;
        color: #555 !important;
    }
    /* ===================================================== */
    /* [모바일 기후 섹션 최종 수정] 세로 적층형 & 텍스트 제거 */
    /* ===================================================== */

    /* 1. 헤더 전체 레이아웃: 가로 배치 (제목 - 분류그룹 - 버튼) */
    #climate-main-grid .card-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important; /* 수직 중앙 정렬 */
        justify-content: space-between !important;
        padding: 10px 15px !important;
        height: auto !important; /* 내용물(세로로 쌓인 박스)에 따라 높이 자동 조절 */
        min-height: 100px !important;
    }

    /* 2. 제목 영역: 좌측 정렬 */
    #climate-main-grid .header-content {
        width: auto !important;
        flex: 1 !important; /* 남는 공간 차지 */
        margin-right: 5px !important;
    }
    #climate-main-grid .header-content h2 {
        font-size: 1.4rem !important;
        margin: 0 0 5px 0 !important;
    }
    /* 로마자 제거 (유지) */
    #climate-main-grid .header-content h2::before {
        display: none !important;
    }

    /* 3. [핵심] 분류 가이드 그룹: 세로(Column) 배치 & 텍스트 숨김 */
    #climate-main-grid .climate-sub-group-2,
    #climate-main-grid .climate-sub-group-3 {
        display: flex !important;
        flex-direction: column !important; /* [중요] 박스들을 위에서 아래로 쌓음 */
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        font-size: 0 !important; /* "여름 고온" 같은 텍스트 숨김 */
        gap: 3px !important; /* 박스 사이 간격 좁게 */
    }

    /* 4. 알파벳 박스 스타일 복구 */
    #climate-main-grid .guide-char {
        font-size: 0.8rem !important; /* 폰트 크기 복구 */
        width: 22px !important;
        height: 22px !important;
        line-height: 22px !important;
        display: inline-block !important;
        text-align: center !important;
        margin: 0 !important; /* 불필요한 여백 제거 */
        padding: 0 !important;
        border-radius: 4px !important;
    }

    /* 5. 각 행(Row) 스타일: 텍스트가 없으므로 박스만 감쌈 */
    #climate-main-grid .guide-row {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
        display: flex !important;
    }

    /* 6. 수직 구분선: 그룹 높이에 맞춰 길게 설정 */
    #climate-main-grid .classification-separator {
        display: block !important;
        height: 50px !important; /* 세로로 쌓인 박스들을 커버할 높이 */
        margin: 0 6px !important;
        background-color: rgba(0,0,0,0.15) !important;
        align-self: center !important;
    }

    /* 7. 확장 아이콘 */
    #climate-main-grid .expand-icon {
        margin-left: 8px !important;
        align-self: center !important;
    }

    /* 8. [요청 반영] 식생/토양 패널의 이모지(아이콘) 살리기 */
    .criteria-item {
        display: flex !important;
        align-items: flex-start !important;
    }
    .criteria-icon {
        display: block !important; /* 숨김 해제 */
        font-size: 1.4rem !important;
        width: 30px !important;
        margin-right: 10px !important;
        text-align: center;
        flex-shrink: 0 !important;
    }