/* ============================================== */
/* 💡 index.css 스타일링 */
/* ============================================== */

/* Base Styles */
body { 
    margin: 0 auto;
    padding: 0;
    background: url(../images/common/bg_page_pattern.gif) repeat;
    max-width: 1200px;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }


.flex-box { display: flex; justify-content: space-between; align-items: center; }
.item-promo-widget-container{
    background-color: white; 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 10px; 
    box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 10px;
}
.card {
    background-color: white; 
    border-radius: 12px; 
    padding: 20px; 
} 
.card:hover {
}
.card-header { 
    font-size: 1.2em; 
    font-weight: 700; 
    margin-bottom: 15px; 
    border-bottom: 2px solid #c1c1c1; 
    padding-bottom: 10px; 
    color: #2C3E50;
}
.card-header a { font-size: 0.75em; font-weight: 500; color: #21a510; float: right; margin-top: 5px; }
.list-item { padding: 10px 0; border-bottom: 1px solid #ECEFF1; }
.list-item:last-child { border-bottom: none; }
.list-item .title { font-size: 0.95em; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.list-item .meta { font-size: 0.75em; color: #7F8C8D; margin-top: 2px; }


/* 로그인 상태 */
.logged-in-info-group { display: flex; align-items: center; gap: 20px; }
.logged-in-info-group .user-info { font-size: 0.95em; font-weight: 500; color: #464646; margin: 0; }
.logged-in-info-group .user-info strong { font-weight: 700; color: #21a510; }
.auth-button-group.logged-in { margin: 0; gap: 8px; flex-shrink: 0; }
.btn-mypage { font-size: 0.85em; font-weight: 600; color: #555; padding: 5px 10px; border-radius: 5px; transition: background-color 0.2s; background-color: #f0f0f0; }
.btn-mypage:hover { background-color: #EEE; }
.btn-logout { background-color: #E74C3C; color: white; padding: 5px 10px; border-radius: 4px; font-weight: bold; }

/* 로그아웃 상태 */
.user-info-message { font-size: 0.85em; color: #7F8C8D; margin: 0 0 5px 0; }
.auth-button-area { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.auth-button-group { display: flex; gap: 10px; margin: 0; justify-content: flex-end; align-items: center; }
/* 아이콘 색상 통일 (#21a510) */
.auth-button-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; background-color: #F0F0F0; color: #21a510; border: 1px solid #21a510; border-radius: 50%; font-size: 1.1em !important; transition: background-color 0.2s; }
.auth-button-icon:hover { background-color: #DDEEEe; }

.auth-button { background-color: #21a510; color: white; border-radius: 6px; font-size: 0.9em; padding: 5px 10px; font-weight: 600; transition: background-color 0.2s; }
.auth-button:hover { background-color: #1A790E; }
.auth-button.btn-login { padding: 8px 15px; font-size: 1em; }
.find-info-group { text-align: right; font-size: 0.75em; margin: 0; }
.find-info-group a { color: #21a510; padding: 0 5px; white-space: nowrap; }
.find-info-group .separator { color: #AAAAAA; font-size: 0.7em; font-weight: 300; }

.main-content { margin-top: 0; } 

.goal-card {
    background-color: #ECF0F1; 
    border-radius: 12px; 
    padding: 18px; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #21a510; 
}

/* 컨테이너 카드 */
.quick-links-card-in-grid {
    grid-column: 1 / -1; 
    padding: 15px 10px; /* 좌우 여백 최적화 */
    margin: 10px 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* 영역 밖으로 나가는 것 방지 */
}

/* 메뉴 그룹: Grid 대신 Flex 사용 */
.quick-links-group { 
    display: flex; 
    flex-wrap: nowrap;      /* 절대 줄바꿈 하지 않음 */
    justify-content: space-around; /* 아이템 간 간격을 균등하게 배분 */
    align-items: stretch;   /* 높이를 동일하게 유지 */
    gap: 5px;               /* 아이템 사이의 최소 간격 */
    width: 100%;
}

.link-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 2px;
    border-radius: 10px;
    transition: all 0.2s ease;
    background-color: transparent;
    /* 기본 상태에서 투명한 테두리를 미리 확보 (레이아웃 흔들림 방지) */
    outline: 2px solid transparent;
    outline-offset: -2px; /* 테두리를 안쪽으로 살짝 밀어넣음 */
}

/* 마우스를 올렸을 때 */
.link-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 탭이나 클릭으로 포커스가 되었을 때 바깥 테두리 자국 남기기 */
.link-item:focus,
.link-item:active {
    outline: 2px solid #AAAAAA;
    z-index: 10; /* 테두리가 다른 요소에 가려지지 않게 함 */
}

/* 클릭되어 활성화된 상태의 스타일 */
.link-item.selected {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--p-main); /* 이중 테두리 효과 (고급스러움) */
    background-color: #fff;
    transform: scale(1.02); /* 살짝 커지는 효과 */
    z-index: 5;
}

/* 데스크탑 호버 효과 */
@media (hover: hover) {
    .link-item:hover {
        background-color: #f8f9fa;
        transform: translateY(-2px);
    }
}

/* ── 퀵링크 드래그앤드롭 정렬 ────────────────────────────── */
/* 세로 스크롤은 그대로 두고 가로 드래그 제스처만 우리 로직이 처리 */
.quick-links-group[data-quicklinks-sortable] .link-item {
    touch-action: pan-y;
}
/* 드래그 활성 중: 텍스트 선택/링크 이동 방지 */
.quick-links-group.qs-active {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}
.quick-links-group.qs-active .link-item {
    transition: none; /* 재배치 중 흔들림 방지 */
}
/* 현재 잡고 있는 항목 */
.link-item.qs-dragging {
    opacity: 0.85;
    transform: scale(1.06);
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    z-index: 20;
    cursor: grabbing;
}

.link-item:active {
    background-color: #f1f3f5;
    transform: scale(0.92); /* 클릭 시 피드백 강화 */
}

.link-item .icon { 
    font-size: 2rem;        /* 7개 이상일 때를 대비해 살짝 조정 */
    margin-bottom: 6px; 
    line-height: 1;
    display: block;
}

.link-item .text { 
    font-size: 0.75rem;     /* 메뉴가 많아지면 글자 크기가 중요함 */
    font-weight: 600;       /* 가독성을 위해 더 진하게 */
    color: #444; 
    text-align: center;
    word-break: keep-all; 
    white-space: nowrap;    /* 글자가 한 줄에서 안 끊기게 처리 */
    overflow: hidden;       /* 너무 길면 숨김 */
    text-overflow: ellipsis;/* ... 처리 */
    width: 100%;            /* 영역 확보 */
}

/* 상세 콘텐츠 스타일 */
.content-grid .single-content-wrapper {
    grid-column: 1 / -1;
    margin-top: 0; 
    margin-bottom: 20px;
}
.btn-back-to-list {
    background-color: #7F8C8D;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    display: none;
    border: none;
    transition: background-color 0.2s;
}
.btn-back-to-list:hover {
    background-color: #5D6D7E;
}

/* -------------------------------------------------- */
/* 💡 [추가] 프로필 이미지 영역 스타일 */
/* -------------------------------------------------- */
.auth-button-group.logged-in {
    display: flex; /* 요소들을 가로로 나열 */
    align-items: center; /* 수직 중앙 정렬 */
    gap: 15px; /* 요소 간의 간격 */
}

.user-profile-info {
    /* 마이페이지 링크와 프로필 이미지를 감싸는 컨테이너 */
    display: flex;
    align-items: center;
}

.profile-avatar {
    width: 40px; /* 이미지 크기 설정 */
    height: 40px;
    border-radius: 50%; /* 원형으로 만듦 */
    object-fit: cover; /* 이미지가 잘리지 않고 채워지도록 설정 */
    border: 2px solid #3498DB; /* 테두리 추가 */
    transition: opacity 0.2s;
}

.profile-link:hover .profile-avatar {
    opacity: 0.8; /* 마우스 오버 시 투명도 변화 */
}

/* Specific List Styles */
.recruit-item .status { font-weight: 700; font-size: 0.8em; margin-left: 5px; flex-shrink: 0; }
.recruit-item .status.active { color: #21a510; }
.recruit-item .status.expired { color: #E74C3C; }
.edu-item .type { background-color: #21a510; color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.7em; margin-right: 5px; }
.edu-item .type.optional { background-color: #F39C12; }
.rental-item .status { font-weight: 700; font-size: 0.8em; flex-shrink: 0; }
.rental-item .status.rental-active { color: #21a510; }
.rental-item .status.rental-pending { color: #F39C12; }

/* 협력 파트너 섹션 스타일 */
.partner-promo-card .card-header { border-bottom-color: #1A790E; }
.partner-logo-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 10px 0; text-align: center; }
.partner-item { position: relative; background-color: #FFFFFF; border: 1px solid #DEDEDE; border-radius: 8px; padding: 15px 10px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s, border-color 0.3s; min-height: 80px; }
.partner-item:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); border-color: #21a510; }
.partner-item img { max-width: 90%; max-height: 40px; height: auto; display: block; margin: 0 auto; filter: grayscale(100%); opacity: 0.7; transition: filter 0.3s, opacity 0.3s; }
.partner-item:hover img { filter: grayscale(0%); opacity: 1; }
.partner-info { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(33, 165, 16, 0.95); color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s; padding: 10px; text-align: center; border-radius: 8px; }
.partner-item:hover .partner-info { opacity: 1; }
.partner-info .title { font-weight: 700; font-size: 1.1em; margin-bottom: 5px; }
.partner-info .promo { font-size: 0.85em; margin-bottom: 10px; padding: 0 5px; line-height: 1.3; }
.partner-info .site-link { font-size: 0.8em; color: #F8F8F8; text-decoration: underline; font-weight: 600; }

/* 💡 [추가] 파트너 등록 버튼 스타일 */
.registerBtnWrap {
    flex-shrink: 0; /* 버튼 영역이 찌그러지지 않도록 설정 */
}

.btn-register {
    display: inline-block;
    padding: 8px 15px;
    background-color: #21a510; /* 등록에 적합한 색상 */
    color: white !important; /* !important로 다른 스타일에 덮어쓰기 방지 */
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-register:hover {
    background-color: #27AE60;
}

.link-item {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* 마우스를 올렸을 때 */
.link-item:hover {
    background-color: #f1f1f1;
    border-radius: 8px;
}

/* [추가] 클릭 후 자국이 남는 상태 (Active) */
.link-item.active {
    background-color: #e7f5ff !important; /* 연한 파란색 자국 */
    border: 1px solid #3498db;          /* 테두리 강조 */
    border-radius: 8px;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.05); /* 안쪽 그림자로 누른 효과 */
}

/* 2. 검색창 내부 그리드 보정 (채용공고 등) */
.search-form-grid {
    display: grid;
    width: 100%;
    /* 화면이 좁아질 때 그리드가 찌그러지는 것을 방지 */
    grid-template-columns: 4fr 1fr 1fr 2fr; 
    gap: 12px;
}

/* 3. 모바일 환경(768px 이하)에서 검색창이 찌그러지지 않게 처리 */
@media (max-width: 768px) {
    .search-box-container, .search-box {
        padding: 10px;
        flex-direction: column; /* 모바일에서는 세로로 나열하여 너비 확보 */
        align-items: stretch;
    }
    
    .search-form-grid {
        grid-template-columns: 1fr; /* 모바일은 1열로 */
    }
}

/* ------------------------------------------------ */
/* --- 반응형 미디어 쿼리 (통합) --- */
/* ------------------------------------------------ */

/* 768px 이하 모바일 환경 조정 */
@media (max-width: 768px) {
    /* 1. 최상위 부모 및 컨테이너 제약 해제 */
    html, body {
        overflow-x: hidden; /* 가로 스크롤 방지 */
        width: 100%;
        margin: 0;
        padding: 0;
    }
    .container { padding: 0 2px; }
   .header-auth-wrap { width: 100%; text-align: center; }

    /* 로그인 상태 */
    .logged-in-info-group { flex-direction: row; justify-content: flex-end; align-items: center; width: 100%; gap: 10px; margin-bottom: 5px; }
    .logged-in-info-group .user-info { font-size: 0.85em; text-align: left; max-width: 50%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .auth-button-group.logged-in { gap: 5px; }
    .auth-button-group.logged-in a { padding: 4px 8px; font-size: 0.8em; }

    /* 로그아웃 상태: 헤더 내 버튼 그룹 숨김 (하단 탭 바 사용) */
    .user-info-message { display: none; }
    .header-auth-wrap .auth-button-area {
        display: none !important; 
    }
    
    /* ---------------------------------------------------- */
    /* 2. 하단 고정 바 스타일 (모바일 Tab Bar 디자인) */
    /* ---------------------------------------------------- */
    .mobile-fixed-bottom-bar.tab-bar { 
        position: fixed;
        bottom: 0; 
        left: 0;
        width: 100%;
        height: 60px; /* 탭 바 높이 고정 */
        background-color: white; 
        box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 0;
    }

    .mobile-fixed-bottom-bar.tab-bar .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        color: #7F8C8D; /* 비활성 색상 */
        transition: color 0.2s;
        padding: 5px 0;
        height: 100%;
    }
    .listHeader {
        flex-direction: column; /* 모바일에서 위아래로 쌓이도록 변경 */
        align-items: flex-start;
        gap: 10px;
    }

    .registerBtnWrap {
        width: 100%; /* 버튼을 모바일 너비에 맞게 확장 */
    }
    .btn-register {
        display: block; /* 블록 요소로 변경하여 100% 폭 사용 */
        text-align: center;
        padding: 10px;
        background-color: #21a510;
    }
    
    /* 활성 탭 */
    .mobile-fixed-bottom-bar.tab-bar .tab-item.active,
    .mobile-fixed-bottom-bar.tab-bar .tab-item:hover {
        color: #21a510; /* 활성/호버 색상 */
    }

    .mobile-fixed-bottom-bar.tab-bar .tab-item .icon {
        font-size: 1.4em;
        line-height: 1;
        margin-bottom: 2px;
    }

    .mobile-fixed-bottom-bar.tab-bar .tab-item .text {
        font-size: 0.7em;
        font-weight: 600;
    }
    
    /* 기존 find-info-group 및 auth-button-group 스타일 제거 */
    .mobile-fixed-bottom-bar .find-info-group,
    .mobile-fixed-bottom-bar .auth-button-group {
        display: none;
    }
    
    /* -------------------- */
    /* 3. Quick Links 및 파트너 조정 */
    /* -------------------- */
    .quick-links-group { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .link-item .icon { font-size: 1.8em; }
    .link-item .text { font-size: 0.7em; }
    .partner-logo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .partner-item { padding: 10px 5px; }
}

/* 400px 이하 좁은 화면 (Ultra Narrow Mobile) */
@media (max-width: 400px) {
    .quick-links-group { grid-template-columns: repeat(3, 1fr); }
    .header-logo { height: 40px; }
}

@media (max-width: 768px) {
    .header { width: 100% !important; }
}

/* 769px 이상 (Desktop View) - 하단 고정바 숨김 및 헤더 복원 */
@media (min-width: 769px) {
 
    /* 1. 모바일에서만 사용한 하단 고정바 숨기기 */
    .mobile-fixed-bottom-bar {
        display: none !important;
    }

    /* 2. 데스크탑에서는 헤더의 원래 로그인/회원가입 영역을 다시 보이게 합니다. */
    .header-auth-wrap .auth-button-area {
        display: flex !important; 
        flex-direction: column;
        align-items: flex-end;
    }
    
    /* 퀵 링크 */
    .quick-links-group {
        grid-template-columns: repeat(6, 1fr); 
        gap: 10px;
    }
    
    .quick-links-card-in-grid {
    margin-bottom: 2px;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 10px;
    grid-column: 1 / -1;
    padding: 15px;
}
    /* 주요 콘텐츠 2열 그리드 레이아웃 (2x2) */
    .content-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 20px; 
        margin-top: 15px;
        }
    
    /* 협력 파트너 그리드 (4열로 확장) */
    .partner-logo-grid {
        grid-template-columns: repeat(4, 1fr); 
        gap: 20px;
    }
}

.link-item {
    position: relative; /* 배지 위치의 기준점 */
}

.link-item .badge {
    position: absolute;
    top: 5px;
    right: 15%; /* 아이콘 위치에 맞춰 조절 */
    background-color: #ff3b30; /* 알림용 빨간색 */
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff; /* 배경과 구분되는 흰색 테두리 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

    /* 토글 스위치 디자인 */
    .switch { position: relative; display: inline-block; width: 34px; height: 18px; vertical-align: middle; }
    .switch input { opacity: 0; width: 0; height: 0; }
    .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
    .slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
    input:checked + .slider { background-color: #3498DB; }
    input:checked + .slider:before { transform: translateX(16px); }

    /* 레이아웃 보정 */

    .user-info-text p { margin: 0; line-height: 1.3; }
    .logged-in-info-group { display: flex; align-items: center; }

/* 컨테이너 설정 */
.user-profile-container {
    position: relative;
    display: inline-block;
    padding: 5px;
}

/* 프로필 버튼(트리거) */
.user-avatar-trigger {
    width: 40px;
    height: 40px;
    background: #f1f3f5;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.user-name { font-weight: bold; font-size: 1.05em; color: #202124; }
.level-badge { font-size: 0.8em; color: #3498DB; font-weight: bold; background: #ebf5fb; padding: 2px 8px; border-radius: 10px; }

.layer-body .welcome-text { margin: 0; font-size: 0.9em; color: #5f6368; }
.layer-body .site-info { margin: 8px 0 0 0; font-size: 0.85em; color: #7f8c8d; }

.layer-footer {
    margin-top: 15px;
    text-align: right;
}


/* ====================================================== */
/* 💡 사용자 프로필 및 레이어업 (최종 최적화) */
/* ====================================================== */

/* 헤더 로고 및 프로필 정렬 */
.header-logo-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 프로필 트리거 */
.user-profile-container {
    position: relative;
    display: inline-block;
}

.user-avatar-trigger {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #a4a4a4; /* 인트라뷰 컬러 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-avatar-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(33, 165, 16, 0.2);
}



/* 레이어 내부 디테일 */
.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f3f5;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.user-name { font-weight: 800; font-size: 1rem; color: #2C3E50; }
.level-badge { 
    font-size: 0.75rem; color: #fff; font-weight: 700; 
    background: #21a510; padding: 2px 10px; border-radius: 20px; 
}

.layer-body .welcome-text { margin: 0; font-size: 0.88rem; color: #555; }
.layer-body .site-info { margin: 8px 0 0 0; font-size: 0.8rem; color: #7F8C8D; font-weight: 500; }

.layer-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 푸터 버튼 스타일 */
.btn-manage, .btn-logout-layer {
    text-decoration: none; font-size: 0.75rem; font-weight: 700;
    padding: 5px 12px; border-radius: 6px; transition: all 0.2s;
}

.btn-manage { color: #21a510; background: #f1f9f1; border: 1px solid #21a510; }
.btn-manage:hover { background: #21a510; color: #fff; }

.btn-logout-layer { color: #E74C3C; background: #fff5f5; border: 1px solid #E74C3C; }
.btn-logout-layer:hover { background: #E74C3C; color: #fff; }

/* --- [1] 기본 헤더 레이아웃 (공통) --- */
.header {
    max-width: 1200px;
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    position: relative;
    z-index: 10000;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 좌우 끝 배치 핵심 */
    max-width: 1200px; /* 데스크탑 최대 너비 */
    height: 70px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 로고 영역 */
.header-logo-wrap .header-logo {
    height: 50px; /* 로고 높이 조절 */
    display: block;
}

/* 우측 인증/유저 영역 */
.header-auth-wrap {
    display: flex;
    align-items: center;
}

.logged-in-info-group {
    display: flex;
    align-items: center;
    gap: 20px; /* 요소 간 간격 */
}


/* 프로필 아이콘 및 레이어 */
.user-profile-container {
    position: relative;
}

.user-avatar-trigger {
    cursor: pointer;
}

.avatar-circle {
    font-size: 24px;
    background: #f1f1f1;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* --- [2] 유저 정보 레이어 (드롭다운) --- */
.user-info-layer {
    display: none; /* 기본 숨김 */
    position: absolute;
    top: 50px;
    right: 0;
    width: 220px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 15px;
}

/* 트리거 클릭 시 레이어 표시 (JS 연동 필요 혹은 hover 처리) */
.user-profile-container:hover .user-info-layer {
    display: block;
}


/* --------------------------------------------------- */
/* 📱 모바일 전용 스타일 (768px 이하) */
/* --------------------------------------------------- */
@media (max-width: 768px) {
    /* 1. 헤더 전체 폭 강제 확장 */
    .header {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* 2. 내부 행을 양 끝으로 강제 밀어내기 */
    .header-main-row {
        display: flex !important;
        width: 100% !important;
        max-width: none !important; /* 최대폭 제한 해제 */
        justify-content: space-between !important; /* [로고] <--- 여백 ---> [아이콘] */
        padding: 0 15px !important; /* 좌우 끝에서 살짝 띄움 */
        box-sizing: border-box !important;
    }

    /* 3. 로고 영역 - 왼쪽 정렬 보장 */
    .header-logo-wrap {
        display: flex !important;
        flex: 1; /* 왼쪽 공간 확보 */
        justify-content: flex-start !important; /* 내부 요소 왼쪽 정렬 */
    }

    /* 4. 유저/인증 영역 - 오른쪽 정렬 보장 */
    .header-auth-wrap {
        display: flex !important;
        flex: 1; /* 오른쪽 공간 확보 */
        justify-content: flex-end !important; /* 내부 요소 오른쪽 정렬 */
    }

    /* 5. 로그인 정보 그룹 내부 배치 */
    .logged-in-info-group {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }
}

.pageTop {
    display: flex;
    justify-content: space-between; /* 양 끝 정렬 */
    align-items: flex-end;         /* 글자 하단 라인을 맞춤 (취향에 따라 center로 변경 가능) */
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.pageTitle {
    margin: 0;                     /* 기본 마진 제거 */
    font-size: 1.5rem;
}

.pageSummary {
    margin: 0;                     /* 기본 마진 제거 */
    color: #666;
    font-size: 0.9rem;
    text-align: right;             /* 텍스트 자체도 우측 정렬 */
}

/* 모바일 대응: 화면이 좁아지면 다시 위아래로 배치 */
@media (max-width: 768px) {
    .pageTop {
        flex-direction: column;
        align-items: flex-start;    /* 모바일에서는 좌측 정렬 */
        gap: 10px;
    }
    .pageSummary {
        text-align: left;
    }
}
