/* ============================================
   style.css - 승봉도 펜션 바다로가는길목
   ============================================ */

:root {
    --gold: #f1c40f;
    --gold-dark: #c9a800;
    --white: #ffffff;
    --sidebar-width: 300px;
    --mobile-header-h: 54px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Nanum Gothic', sans-serif;
    color: var(--white);
    background-color: #161625;
}

/* ==========================================
   PC 사이드바 (769px 이상)
   ========================================== */
.glass-menu {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0; left: 0;
    background: #161625;
    border-right: 1px solid rgba(255,255,255,0.08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.logo-section { padding: 40px 20px 10px; text-align: center; }
.logo-section img { width: 100%; max-width: 250px; height: auto; }
.ladder-toggle { margin: 40px 0 40px 25px; cursor: pointer; width: fit-content; }
.ladder-toggle i { font-size: 3.5rem; color: var(--gold); }
.menu-list { list-style: none; padding: 0; margin: 0; }
.menu-list > li > a {
    display: block; padding: 20px 30px;
    color: #eee; text-decoration: none;
    font-size: 1.3rem; font-weight: 800;
    border-left: 6px solid transparent;
}
.menu-list > li.active > a,
.menu-list > li > a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    border-left: 6px solid var(--white) !important;
}
.sub-menu { display: none; background: rgba(255,255,255,0.04); list-style: none; padding: 6px 0; border-left: 3px solid var(--gold); margin-left: 16px; }
.sub-menu li a { display: block; padding: 10px 20px 10px 24px; color: #bbb; text-decoration: none; font-size: 1.05rem; }
.sub-menu li a:hover { color: var(--gold); background: rgba(241,196,15,0.07); }
.sub-menu.open { display: block; }
.util-menu { list-style: none; padding: 0 30px; margin-top: 80px; margin-bottom: 40px; }
.util-menu li { margin-bottom: 15px; }
.util-menu li a { color: #bbb; text-decoration: none; font-size: 1.2rem; font-weight: 700; }
.util-menu li.admin-link a { color: var(--gold); }
.float-right { float: right; margin-top: 5px; }

/* PC 메인 영역 */
main { margin-left: var(--sidebar-width); }
.glass-footer { text-align: center; padding: 60px 20px 40px; color: #fff; }

/* ==========================================
   PC 메뉴명 헤더 (모바일에서는 숨김)
   ========================================== */
.pc-page-header {
    background: #f1c40f;
    padding: 0 32px;
    min-height: 52px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #d4a800;
}
.pc-page-header__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.3px;
}
@media (max-width: 768px) {
    .pc-page-header { display: none !important; }
}

/* ==========================================
   공통: 서브탭 바 (PC+모바일)
   ========================================== */
.sub-tab-bar {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 0 0 0;
    margin-bottom: 0;
    background: #1a1a1a;
    border-bottom: 2px solid #333;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sub-tab-bar::-webkit-scrollbar { display: none; }
.sub-tab-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s;
}
.sub-tab-bar a:hover { color: #fff; }
.sub-tab-bar a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    font-weight: 800;
}

/* ==========================================
   공통: 하단 정보 카드
   ========================================== */
.bottom-info-bar {
    display: flex; gap: 16px; flex-wrap: wrap;
    justify-content: center;
    padding: 30px 20px 10px; margin: 0 20px;
}
.bottom-info-card {
    flex: 1; min-width: 240px; max-width: 420px;
    border-radius: 12px; padding: 20px 24px;
    display: flex; align-items: center; gap: 16px;
}
.bottom-info-card.account { background: rgba(30,60,100,0.85); border: 1px solid rgba(100,160,255,0.3); }
.bottom-info-card.phone { background: rgba(180,120,20,0.85); border: 1px solid rgba(241,196,15,0.4); }
.bottom-info-card .icon { font-size: 2rem; flex-shrink: 0; }
.bottom-info-card .label { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin: 0 0 4px; }
.bottom-info-card .value { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0; letter-spacing: 0.5px; }
.bottom-info-card .sub-value { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin: 2px 0 0; }

/* 모바일 전용 요소 기본값 (PC에서 숨김) */
.mob-topbar  { display: none; }
.mob-drawer  { display: none; }
.mob-page-bar { display: none; }

/* ==========================================
   모바일 전용 (768px 이하)
   ========================================== */
@media (max-width: 768px) {

    /* PC 사이드바 완전 숨김 */
    .glass-menu { display: none !important; }

    /* 콘텐츠 상단 여백 (고정 헤더 높이) */
    main { margin-left: 0; padding-top: var(--mobile-header-h); }

    /* ── 상단 고정 헤더바 ── */
    .mob-topbar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: var(--mobile-header-h);
        background: #161625;
        border-bottom: 2px solid var(--gold);
        padding: 0 18px;
        z-index: 2000;
    }
    .mob-topbar__title {
        color: var(--gold);
        font-size: 1.08rem;
        font-weight: 800;
        text-decoration: none;
        letter-spacing: -0.3px;
    }
    .mob-topbar__ham {
        background: none; border: none;
        color: var(--gold);
        font-size: 1.55rem;
        cursor: pointer; padding: 6px; line-height: 1;
    }

    /* ── 드로어 전체 ── */
    /* 모바일 드로어 오버레이 (배경 클릭 시 닫힘) */
    .mob-drawer-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        z-index: 4999;
        background: rgba(0,0,0,0.5);
    }
    .mob-drawer-overlay.is-open { display: block; }

    .mob-drawer {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 78%;
        max-width: 320px;
        bottom: 0;
        z-index: 5000;
        background: #0d0d0d;
        flex-direction: column;
        overflow: hidden;
        box-shadow: 4px 0 20px rgba(0,0,0,0.6);
        transform: translateX(-100%);
        transition: transform 0.28s ease;
    }
    .mob-drawer.is-open {
        display: flex;
        transform: translateX(0);
    }

    /* 드로어 헤더 */
    .mob-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--gold);
        height: 54px;
        padding: 0 18px;
        flex-shrink: 0;
    }
    .mob-drawer__head-title {
        font-size: 1.0rem; font-weight: 800; color: #000;
        letter-spacing: -0.3px;
    }
    .mob-drawer__close {
        background: none; border: none;
        font-size: 1.4rem; font-weight: 700;
        color: #000; cursor: pointer;
        padding: 4px 6px; line-height: 1;
    }

    /* 드로어 스크롤 영역 */
    .mob-drawer__body {
        flex: 1; overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 메뉴 행 */
    .mob-menu-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%; min-height: 44px;
        padding: 0 14px 0 16px;
        border: none;
        border-bottom: 1px solid #222;
        background: none;
        color: #f0f0f0;
        font-size: 0.95rem; font-weight: 700;
        font-family: 'Nanum Gothic', sans-serif;
        text-align: left; cursor: pointer;
        transition: background 0.15s;
    }
    .mob-menu-row:active,
    .mob-menu-row.is-open { background: #1a1a1a; }
    .mob-menu-row.is-open { color: var(--gold); }
    .mob-menu-row .mob-chevron {
        font-size: 0.85rem;
        color: rgba(255,255,255,0.35);
        transition: transform 0.2s, color 0.2s;
        flex-shrink: 0;
    }
    .mob-menu-row.is-open .mob-chevron {
        transform: rotate(180deg);
        color: var(--gold);
    }

    /* 서브메뉴 목록 */
    .mob-submenu {
        display: none;
        flex-direction: column;
        background: #161616;
        border-bottom: 1px solid #222;
    }
    .mob-submenu.is-open { display: flex; }

    .mob-submenu__link {
        display: flex; align-items: center;
        min-height: 36px;
        padding: 0 16px 0 28px;
        border-bottom: 1px solid #1f1f1f;
        color: #b8b8b8;
        font-size: 0.88rem; font-weight: 600;
        font-family: 'Nanum Gothic', sans-serif;
        text-decoration: none;
        transition: background 0.12s, color 0.12s;
    }
    .mob-submenu__link:last-child { border-bottom: none; }
    .mob-submenu__link::before {
        content: '';
        display: inline-block;
        width: 4px; height: 4px;
        border-radius: 50%;
        background: rgba(255,255,255,0.25);
        margin-right: 10px;
        flex-shrink: 0;
    }
    .mob-submenu__link:active,
    .mob-submenu__link:hover,
    .mob-submenu__link.active {
        background: rgba(241,196,15,0.12);
        color: var(--gold);
    }
    .mob-submenu__link:active::before,
    .mob-submenu__link:hover::before,
    .mob-submenu__link.active::before {
        background: var(--gold);
    }
    /* 현재 활성 서브메뉴 - 왼쪽 금색 바 */
    .mob-submenu__link.active {
        border-left: 3px solid var(--gold);
        padding-left: 25px;
        color: var(--gold);
        background: rgba(241,196,15,0.10);
    }

    /* 드로어 하단 유틸 */
    .mob-drawer__util {
        border-top: 1px solid #222;
        padding: 18px 22px 28px;
        display: flex; gap: 22px; flex-wrap: wrap;
        background: #0d0d0d; flex-shrink: 0;
    }
    .mob-drawer__util a {
        color: #888; text-decoration: none;
        font-size: 0.92rem; font-weight: 600;
    }
    .mob-drawer__util a.is-gold { color: var(--gold); }

    /* ── 페이지 진입 후 상단 타이틀 바 ── */
    .mob-page-bar {
        display: flex !important;
        align-items: center;
        background: var(--gold);
        min-height: 50px;
        flex-shrink: 0;
    }
    .mob-page-bar__back {
        display: flex; align-items: center; justify-content: center;
        width: 52px; min-height: 50px;
        background: none; border: none;
        cursor: pointer; flex-shrink: 0;
        color: #000;
        font-size: 2.4rem; font-weight: 900;
        line-height: 1; padding: 0;
    }
    .mob-page-bar__title {
        flex: 1;
        font-size: 1.08rem; font-weight: 800;
        color: #000; text-align: center;
        padding-right: 52px; /* back 버튼 너비 보정 */
    }

    /* ── 서브탭 모바일 - 흰 배경 탭 (구 사이트 스타일) ── */
    .sub-tab-bar {
        background: #fff !important;
        border-bottom: 2px solid #e0e0e0 !important;
        padding: 0 !important;
        gap: 0 !important;
        flex-wrap: wrap !important;
        overflow-x: hidden !important;
        justify-content: flex-start !important;
    }
    .sub-tab-bar a {
        color: #444 !important;
        border: none !important;
        border-bottom: 3px solid transparent !important;
        border-radius: 0 !important;
        background: none !important;
        padding: 10px 6px !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        text-shadow: none !important;
        box-shadow: none !important;
        flex: 1 1 22% !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
    /* 5번째 탭이 있을 때만 → 3+2 두 줄 */
    .sub-tab-bar a:nth-child(n+4):nth-last-child(n+2),
    .sub-tab-bar a:nth-child(n+4):nth-last-child(n+2) ~ a {
        flex: 1 1 45% !important;
    }
    .sub-tab-bar a.active {
        color: #c9a800 !important;
        border-bottom: 3px solid #f1c40f !important;
        background: none !important;
        font-weight: 800 !important;
    }

    /* ── 게시판 컨테이너 ── */
    .board-container {
        padding: 0 14px 50px !important;
    }

    /* ── 하단 정보 카드 모바일 ── */
    .bottom-info-bar {
        margin: 0 !important;
        padding: 18px 12px 10px !important;
        gap: 10px !important;
    }
    .bottom-info-card {
        min-width: 0 !important;
        padding: 14px 16px !important;
        gap: 12px !important;
    }
    .bottom-info-card .value { font-size: 1.05rem !important; }
    .bottom-info-card .icon { font-size: 1.4rem !important; }
    .bottom-info-card .label { font-size: 0.75rem !important; }
    .bottom-info-card .sub-value { font-size: 0.75rem !important; }

    /* ── 모바일 게시판 카드 글자 축소 + 제목 1줄 ── */
    .mob-item { min-height: 56px !important; }
    .mob-title {
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .mob-meta {
        font-size: 0.74rem !important;
        color: #888 !important;
        margin-top: 2px !important;
    }
    .mob-no {
        font-size: 0.78rem !important;
        min-width: 28px !important;
    }
    .mob-thumb {
        width: 52px !important;
        height: 52px !important;
        flex-shrink: 0 !important;
    }

    /* ── 푸터 ── */
    .glass-footer { padding: 30px 16px 24px; }
    .glass-footer p { font-size: 0.88rem !important; }
}

/* ── 하단 고정 홈 버튼 (모바일 전용) ── */
.mob-home-btn {
    display: none;
}
@media (max-width: 768px) {
    .mob-home-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: fixed;
        bottom: 24px;
        right: 18px;
        background: var(--gold);
        color: #000;
        font-size: 0.85rem;
        font-weight: 800;
        padding: 10px 18px;
        border-radius: 50px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.4);
        text-decoration: none;
        z-index: 999;
        border: none;
        cursor: pointer;
    }
    .mob-home-btn:active { opacity: 0.8; }
}

/* PC에서 모바일 전용 요소 숨김 */
@media (min-width: 769px) {
    .mob-topbar { display: none !important; }
    .mob-drawer { display: none !important; }
    .mob-page-bar { display: none !important; }
}


/* ==========================================
   공통 콘텐츠 스타일 통일 (모바일 최적화)
   ========================================== */

/* 공통 섹션 박스 */
.content-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 18px;
    color: #fff;
}
.content-section-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--gold);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201,147,58,0.2);
}

/* 공통 본문 텍스트 */
.content-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    color: #fff;
    font-size: 0.92rem;
    line-height: 1.8;
}
.content-wrap p { font-size: 0.92rem; line-height: 1.8; color: #ccc; }
.content-wrap li { font-size: 0.92rem; line-height: 1.8; color: #ccc; }
.content-wrap strong { color: #fff; }

/* 인사말 페이지 */
.greeting-text {
    font-size: 1rem !important;
    line-height: 2 !important;
    color: rgba(255,255,255,0.9) !important;
}

/* 게시판 본문 */
.post-content {
    font-size: 0.95rem;
    line-height: 1.9;
    color: #ddd;
    word-break: keep-all;
}

/* 게시판 본문 - 검정 배경에서 파란색 보완 */
.detail-content a { color: #00cfcf !important; text-decoration: underline; }
.detail-content a:hover { color: #f1c40f !important; }
.detail-content [style*="color: blue"],
.detail-content [style*="color:blue"],
.detail-content [style*="color: #0000ff"],
.detail-content [style*="color:#0000ff"],
.detail-content [style*="color: #00f"],
.detail-content [style*="color:#00f"],
.detail-content [color="blue"],
.detail-content [color="#0000ff"] {
    color: #00cfcf !important;
}
.detail-content [style*="color: navy"],
.detail-content [style*="color:navy"],
.detail-content [color="navy"] {
    color: #00cfcf !important;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.post-content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* 모바일 공통 */
@media (max-width: 768px) {
    .content-wrap {
        padding: 14px 14px 60px;
        font-size: 0.88rem;
    }
    .content-wrap p,
    .content-wrap li { font-size: 0.88rem; }
    .content-section { padding: 14px 16px; }
    .content-section-title { font-size: 0.95rem; }
    .greeting-text { font-size: 0.95rem !important; }
    .post-content { font-size: 0.9rem; }
}
