@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* --- 1. 기본 스타일 --- */
body {
    margin: 0;
    font-family: 'Pretendard', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- 2. 헤더 및 네비게이션 --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    height: 80px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img { height: 50px; width: auto; display: block; }

.right-area {
    display: flex;
    align-items: center;
    gap: 40px;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0; padding: 0;
    gap: 25px;
}

nav ul li a {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    position: relative;
    padding: 8px 0;
}

nav ul li a:hover, nav ul li a.active { color: #003366; }

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: 0; left: 0;
    background-color: #003366;
    transition: width 0.3s ease;
}

nav ul li a:hover::after, nav ul li a.active::after { width: 100%; }

/* --- 3. About Us 드롭다운 --- */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
    border: 1px solid #eee;
    border-radius: 4px;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #555;
    padding: 12px 16px;
    display: block;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f9f9f9;
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: #f8f9fa; color: #003366; }
.dropdown:hover .dropdown-content { display: block; }

/* --- 4. 인증(로그인) 버튼 --- */
.auth-box { display: flex; align-items: center; gap: 15px; }
.user-name { font-size: 14px; font-weight: 600; }

.auth-link {
    font-weight: 700;
    color: #003366;
    padding: 8px 18px;
    border: 1.5px solid #003366;
    border-radius: 6px;
}

.auth-link:hover { background-color: #003366; color: #fff; }

.logout-btn {
    background: #f4f4f4; border: none; padding: 6px 12px;
    border-radius: 4px; cursor: pointer; font-size: 12px; color: #666;
}

/* --- 5. Home: Hero 섹션 --- */
.hero {
    height: 500px;
    background-color: #0d0e12;
    position: relative;
    overflow: hidden;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

#heroCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    pointer-events: none;
}

.hero-text {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin: 0 0 15px 0;
    text-shadow: 0 0 15px rgba(0,0,0,0.8);
}

.hero-text span {
    color: #7ba6c0;
    font-weight: bold;
}

.hero-line {
    width: 100%;
    max-width: 700px;
    height: 3px;
    background-color: #547d9a;
    margin: 0 auto;
}

/* --- 6. Home: Main News 아코디언 (수정됨) --- */
.news-container {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 40px;
}

.news-item {
    border-bottom: 1px solid #eee;
}

/* 뉴스 헤더 컨테이너: 제목과 버튼을 가로로 배치 */
.news-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* 뉴스 제목 버튼: 가변 너비로 변경 */
.news-header {
    flex: 1; /* 제목이 남은 공간을 다 차지함 */
    padding: 25px 15px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: left;
    transition: background 0.2s;
    min-width: 0; /* 텍스트 생략 기능을 위해 필요 */
}

.news-header span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-header:hover { background-color: #fafafa; }

.news-header::after {
    content: '＋';
    font-size: 1.2rem;
    color: #aaa;
    transition: transform 0.3s;
    margin-left: 10px;
    flex-shrink: 0;
}

.news-item.active .news-header::after {
    content: '－';
    transform: rotate(180deg);
}

/* 뉴스 전용 삭제 버튼 스타일 (절대 좌표 해제) */
.news-item .delete-btn {
    position: static; /* 카드 레이아웃의 absolute 해제 */
    margin-right: 15px;
    padding: 5px 12px;
    border: 1px solid #ff4d4d;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s;
    background: transparent;
    flex-shrink: 0; /* 버튼이 찌그러지지 않게 방어 */
}

.news-item .delete-btn:hover {
    background-color: #ff4d4d;
    color: #fff;
}

.news-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s;
    background-color: #fcfcfc;
    padding: 0 20px;
}

.news-item.active .news-content {
    max-height: 1000px;
    padding: 25px 20px;
}

.news-content-inner {
    line-height: 1.8;
    color: #444;
}

/* --- 7. 레이아웃 공통 --- */
.container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-action {
    text-align: right;
    margin-bottom: 15px;
}

/* 공통 카드 레이아웃 (Member, Publication 등) */
.member-card {
    display: flex;
    gap: 40px;
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 30px;
    position: relative; /* 삭제 버튼의 기준점 */
}

/* 카드용 삭제 버튼 (기존 우측 상단 고정 스타일 유지) */
.member-card .delete-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #ff4d4d;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.member-photo {
    flex: 0 0 280px;
    height: 180px;
    background: #f4f4f4;
    border-radius: 8px;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info { flex: 1; }
.email-link { color: #003366; text-decoration: underline; }