@charset "UTF-8";

/* [기본 설정 유지] */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { 
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif; 
    background-color: #ffffff; 
    color: #333; 
    max-width: 100%;
    overflow-x: hidden; 
    overflow-y: auto; 
    height: auto !important;
    line-height: 1.5;
}
/* ============================================================
   [인트로 텍스트 애니메이션 효과 복구]
============================================================ */

.intro-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
                url('https://3.34.82.220.nip.io/images/ChatGPT_Image2.png') no-repeat center center/cover;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.intro-bg h1 {
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-size: 4.2rem;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    /* 애니메이션을 위한 초기 상태 설정 */
    opacity: 0;
    filter: blur(15px);
    transition: opacity 1.2s ease-in-out, filter 1.2s ease-in-out;
}

/* 나타날 때 효과: 블러 제거 + 페이드 인 */
.intro-bg h1.show {
    opacity: 1;
    filter: blur(0);
}

/* 사라질 때 효과: 블러 추가 + 페이드 아웃 */
.intro-bg h1.hide {
    opacity: 0;
    filter: blur(15px);
}
.intro-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), 
                url('https://3.34.82.220.nip.io/images/ChatGPT_Image2.png') no-repeat center center/cover;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.intro-bg h1 {
    color: white;
    font-family: 'Cormorant Garamond', serif;
    font-size: 4.2rem;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 1.2s ease;
}

/* [섹션 및 레이아웃 유지] */
.content-section {
    position: relative;
    z-index: 5;
    margin-top: 100vh; 
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.15);
    min-height: 500px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3열 균등 배치 유지 */
    gap: 20px;
}

.card {
    background: #fff;
    padding: 22px 20px;
    border-radius: 18px;
    border: 1px solid #f2f2f2;
    display: flex;
    flex-direction: column;
    min-height: 420px; /* 카드 높이 균일화를 위한 최소 높이 설정 */
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #222;
}

.card h2::before {
    content: '';
    width: 3px;
    height: 14px;
    background: #007bff;
    margin-right: 8px;
    border-radius: 10px;
}

.list-style li {
    padding: 10px 0;
    border-bottom: 1px solid #f8f8f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-style li a {
    font-size: 0.9rem;
    color: #444;
    text-decoration: none;
}

.date-text { font-size: 0.75rem; color: #aaa; }

/* ============================================================
   [사진 자료실 집중 수정] 이미지 이탈 및 정렬 문제 해결
============================================================ */

.photo-grid-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 내부 3열 유지 */
    gap: 10px;
    width: 100%; /* 부모 카드 너비를 벗어나지 않도록 고정 */
}

.photo-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%; /* 아이템 너비 고정 */
    overflow: hidden;
}

/* 썸네일 박스: 이미지의 감옥 역할을 하여 튀어나가지 못하게 함 */
.post-thumb {
    width: 100% !important;
    aspect-ratio: 1 / 1; /* 정사각형 비율 강제 */
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden; /* 영역 밖으로 나가는 이미지 숨김 */
    border: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 실제 이미지 속성: 캡처화면처럼 커지는 현상 방지 핵심 코드 */
.post-thumb img, 
.post-thumb th:block img,
.post-thumb div img {
    width: 100% !important;   /* 부모(.post-thumb) 너비에 맞춤 */
    height: 100% !important;  /* 부모(.post-thumb) 높이에 맞춤 */
    object-fit: cover !important; /* 비율 유지하며 꽉 채움 */
    display: block;
}

.photo-info { 
    padding: 8px 0; 
}

.photo-title { 
    font-size: 0.8rem; 
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis; /* 긴 제목 말줄임표 */
    white-space: nowrap; 
}

.photo-date { 
    font-size: 0.7rem; 
    color: #bbb; 
}

.more-text {
    margin-top: auto; /* 하단 고정 효과 */
    padding-top: 15px;
    font-size: 0.75rem;
    color: #bbb;
    cursor: pointer;
    text-align: right;
}

/* ============================================================
   [반응형 유지 및 보정]
============================================================ */

@media (max-width: 991px) {
    .container { grid-template-columns: 1fr; } /* 모바일 카드 세로 정렬 */
    .content-section { margin-top: 100vh; }
    .intro-bg h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    /* 모바일에서는 사진이 너무 작아지지 않게 2열로 변경 */
    .photo-grid-mini { grid-template-columns: repeat(2, 1fr); }
    .card { min-height: auto; }
}