/* 기본 초기화 및 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth; /* 핵심: 스크롤을 부드럽게 만들어주는 옵션 */
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
    word-break: keep-all;
    padding-top: 70px; /* 헤더 고정 높이에 대응 */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bg-light {
    background-color: #f8f9fa;
}

/* 헤더 내비게이션 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0056b3; /* 메인 컬러 정의 */
    letter-spacing: -1px;
}

.nav {
    display: flex;
    align-items: center;
}

.nav a {
    margin: 0 15px;
    font-weight: 500;
    font-size: 1.1875rem; /* 기존 1rem(16px) 대비 정확히 3px(0.1875rem) 커진 19px로 스타일 업 */
    color: #444;
    transition: color 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav a:hover,
.nav a.active {
    color: #0056b3;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0056b3;
    transition: width 0.3s;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-g1 {
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 18px;
    border: 1px solid #0056b3;
    color: #0056b3;
    background-color: transparent;
    border-radius: 30px;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    letter-spacing: -0.3px;
    box-shadow: 0 2px 6px rgba(0, 86, 179, 0.05);
}

.btn-g1:hover {
    background-color: #0056b3;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.15);
    transform: translateY(-1.5px);
}

.btn-login {
    font-size: 0.85rem;
    color: #666;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #eee;
}

/* 섹션 공통 */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    color: #111;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #0056b3;
    margin: 15px auto 0;
}

/* 1. 재단소개 스타일 */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    max-width: 1100px; /* 원래 넓이(1200px)와 이전 좁았던 넓이(1000px)의 가장 조화로운 정중앙 넓이인 1100px로 일괄 지정 */
    margin-left: auto;  
    margin-right: auto;
}

.card {
    border: 1px solid #e9ecef;
    padding: 40px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h3, .major-projects h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #0056b3;
    font-weight: 700;
}

.card .lead {
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #222;
}

.card .desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.7;
}

.badge {
    background-color: #f8f9fa; /* 다른 회색조 블록들과 색상 일치를 위해 연한 회색(#f8f9fa)으로 대체 변경 */
    color: #444; /* 회색 바탕에 맞게 텍스트 컬러를 차분한 차콜톤으로 변경 */
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    border-left: 4px solid #0056b3;
    margin-top: auto;
}

.bullet-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #444;
}

.bullet-list li::before {
    content: '•';
    color: #0056b3;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
    top: -2px;
}

.major-projects {
    margin-top: 60px;
    max-width: 1000px; /* 원래 지정하였던 안정적이고 오붓한 좁은 마진 영역 1000px로 롤백 */
    margin-left: auto; /* 화면 정중앙에 고정되도록 마진 오토 부여 */
    margin-right: auto;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr; /* 가로 가득 채우는 세로 3칸(1열) 레이아웃 */
    gap: 20px;
    margin-top: 25px;
}

.project-item {
    background: #fff;
    border-top: none;
    border-left: 4px solid #0056b3; /* 좌측에 포인트 선을 넣어 세로 정렬 시 더 정돈된 느낌 부각 */
    padding: 25px 30px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.project-item h4 {
    margin-bottom: 15px;
    font-size: 1.15rem;
    color: #222;
    font-weight: 700;
}

.project-item p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.intro-statement {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 500;
    color: #0056b3;
    margin: 60px auto;
    padding: 30px;
    max-width: 1000px; /* 슬로건 블록을 다시 원래 단독으로 집중감 있게 표현되던 1000px로 복구 */
    border-top: 1px solid #eaeaea; /* 깔끔하고 얇은 실선으로 변경 */
    border-bottom: 1px solid #eaeaea; /* 깔끔하고 얇은 실선으로 변경 */
    background-color: #f8f9fa; /* 다른 회색조 블록들과 깔끔한 톤온톤 조화를 위해 배경색을 연한 회색으로 변경 */
    line-height: 1.6;
}

/* 이미지 2x2 반응형 갤러리 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    text-align: center;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.img-placeholder {
    width: 100%;
    height: 250px;
    background-color: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-weight: bold;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border: none; /* 점선 경계선 완전히 제거 */
    background-size: cover;
    background-position: center;
}

/* 각 프리셋 이미지 (데모용 웹 전용 목업 일러스트 배경 또는 텍스트) */
.gallery-item:nth-child(1) .img-placeholder {
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.15)), url('https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?auto=format&fit=crop&w=600&q=80');
    color: #fff;
}
.gallery-item:nth-child(2) .img-placeholder {
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.15)), url('https://images.unsplash.com/photo-1465847899084-d164df4dedc6?auto=format&fit=crop&w=600&q=80');
    color: #fff;
}
.gallery-item:nth-child(3) .img-placeholder {
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.15)), url('https://images.unsplash.com/photo-1459749411175-04bf5292ceea?auto=format&fit=crop&w=600&q=80');
    color: #fff;
}
.gallery-item:nth-child(4) .img-placeholder {
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.15)), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=600&q=80');
    color: #fff;
}

.img-caption {
    font-size: 1.05rem;
    color: #333;
    font-weight: 700;
}

/* 2. 연혁 스타일 (타임라인 레이아웃) */
.history-timeline {
    max-width: 950px;
    margin: 0 auto;
    position: relative;
    padding-left: 20px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 170px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: #dee2e6;
}

.history-year-group {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.year-label {
    width: 150px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0056b3;
    flex-shrink: 0;
    text-align: right;
    padding-right: 40px;
    position: relative;
}

.year-label::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #0056b3;
    border: 3px solid #fff;
    z-index: 2;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.history-details {
    flex-grow: 1;
    padding-left: 30px;
}

.history-row {
    display: flex;
    margin-bottom: 14px;
    font-size: 1rem;
    line-height: 1.6;
}

.history-row span {
    width: 90px;
    font-weight: 700;
    color: #495057;
    flex-shrink: 0;
}

.history-row p {
    color: #333;
}

.font-award {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
    border: 1px solid #e9ecef;
    flex-direction: column;
}

.font-award-header {
    display: flex;
    margin-bottom: 10px;
}

.font-award-header span {
    width: 90px;
    font-weight: 700;
    color: #0056b3;
}

.font-award-header strong {
    font-size: 1.05rem;
    color: #111;
    font-weight: 700;
}

.font-award ul {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #0056b3;
    font-size: 0.92rem;
    color: #555;
    margin-top: 5px;
}

.font-award ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.font-award ul li:last-child {
    margin-bottom: 0;
}

/* 추가 연혁 토글 영역 스타일 */
.history-more-container {
    height: 0;
    overflow: hidden;
    transition: height 0.5s ease-out;
}

.history-more-container.open {
    height: auto;
}

.btn-more-container {
    text-align: center;
    margin-top: 40px;
    position: relative;
    z-index: 5;
}

.btn-history-toggle {
    background-color: #fff;
    border: 1px solid #0056b3;
    color: #0056b3;
    padding: 12px 35px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-history-toggle:hover {
    background-color: #0056b3;
    color: #fff;
    box-shadow: 0 6px 15px rgba(0, 86, 179, 0.2);
}

/* 3. 이사진 소개 스타일 */
.greeting-box {
    background: #f8f9fa;
    padding: 50px;
    border-radius: 16px;
    margin: 0 auto 60px; /* 가운데 정렬 */
    max-width: 1100px; /* 가로 중심 넓이인 1100px로 완벽 맞춤 변경 */
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.greeting-box h3 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    text-align: center;
    color: #111;
    font-weight: 700;
}

.greeting-content p {
    margin-bottom: 18px;
    color: #444;
    line-height: 1.8;
    font-size: 1.05rem;
}

.signature {
    text-align: right;
    margin-top: 40px;
    font-size: 1.15rem;
    color: #333;
}

.signature strong {
    font-size: 1.35rem;
    color: #0056b3;
    margin-left: 5px;
}

.org-box h3 {
    text-align: center;
    margin-bottom: 45px;
    font-size: 1.6rem;
    font-weight: 700;
}

.leader-card {
    max-width: 320px;
    margin: 0 auto 50px; /* 원래 이사장 하단 마진 복구 */
    text-align: center;
    padding: 30px;
    border: 2px solid #0056b3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.08);
    position: relative;
    z-index: 10;
}

.leader-card::after {
    content: '';
    position: absolute;
    bottom: -52px; /* 50px 간격을 확실하게 관통하도록 2px 연장 */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 52px;
    background-color: #dee2e6;
    z-index: -1;
}

/* 2단계 상임이사 전용 가운데 카드 스타일 */
.executive-card {
    max-width: 320px;
    margin: 0 auto 50px; /* 원래 상임이사 하단 마진 복구 */
    text-align: center;
    padding: 30px;
    border: 1.5px solid #0056b3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.05);
    position: relative;
    z-index: 10;
}

.executive-card::after {
    content: '';
    position: absolute;
    bottom: -52px; /* 아래의 가로 중심 전선과 끊어짐 없이 완전 교차하도록 2px 연장 */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 52px;
    background-color: #dee2e6;
    z-index: -1;
}

.executive-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.1);
}

.position {
    font-size: 0.95rem;
    color: #0056b3;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.name {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #111;
}

.career {
    font-size: 0.9rem;
    color: #666;
}

.member-grid {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 20px;
    max-width: 960px;
    margin: 0 auto;
}

.member-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%; /* 첫째·셋째 이사 카드의 중심선에 맞춤 */
    right: 15%;
    height: 2px;
    background-color: #dee2e6;
    z-index: 1;
}

.member-card {
    text-align: center;
    padding: 25px 20px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
    position: relative;
    width: 30%; /* 3개 카드가 좌-중-우 균등한 여백(between)으로 배치되도록 30% 고정 */
    box-sizing: border-box;
}

.member-card::before {
    content: '';
    position: absolute;
    top: -20px; /* 원래 선 길이 복구 */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background-color: #dee2e6;
}

.member-card:hover {
    transform: translateY(-5px);
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: #cdd8f4;
}

/* 4. 기부금 실적 (iframe) */
.board-container {
    width: 100%;
    height: auto;
    position: relative;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.donation-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    text-align: center;
    pointer-events: none;
}

.iframe-placeholder-text svg {
    margin-bottom: 15px;
    color: #6c757d;
}

.iframe-placeholder-text p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.iframe-placeholder-text span {
    font-size: 0.9rem;
    color: #aaa;
}

/* 푸터 스타일 */
.footer {
    background-color: #1a1a1a;
    color: #999;
    padding: 30px 0 15px; /* 상단 패딩은 30px로 날씬함을 지키고, 하단(카피라이트 밑부분) 패딩만 기존 30px에서 정확히 50% 축소한 15px로 분할 설계 */
    font-size: 0.9rem;
    border-top: 1px solid #222;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: baseline; /* 첫 번째 텍스트 라인(로고와 주소라인)의 글꼴 바닥선(Baseline)을 축 단위로 정확하게 강제 일치 */
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    line-height: 1.4; /* 보기 좋은 자연스러운 줄간 간격 */
    margin: 0;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    margin-bottom: 0;
    line-height: 1.4; /* 동일한 행간 높이를 이루어 시야 왜곡 차단 */
}

.copy {
    color: #555;
    margin-top: 8px; /* 카피라이트 문안과의 여백 확보 */
}

/* 로그인 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    border: none;
    background: none;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #111;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 0.95rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #0056b3;
    outline: none;
}

.btn-submit {
    display: block;
    width: 100%;
    background-color: #0056b3;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #004094;
}

.custom-select {
    display: inline-block;
    width: 100%;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem 1.75rem .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    vertical-align: middle;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 반응형 모바일 브레이크포인트 설정 */
@media (max-width: 992px) {
    body { padding-top: 125px; }
    .header-container { flex-wrap: wrap; gap: 4px 0; }
    .header-right { display: flex; margin-left: auto; gap: 4px; }
    .btn-g1 { padding: 6px 10px; font-size: 0.76rem; }
    .btn-login { padding: 6px 4px; font-size: 0.78rem; }
    .nav {
        display: flex;
        order: 3;
        width: 100%;
        justify-content: space-between;
        padding: 4px 0 0;
    }
    .nav a { margin: 0; padding: 6px 0; font-size: 1rem; }
    .intro-grid { grid-template-columns: 1fr; gap: 30px; }
    .member-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    .member-card {
        width: calc(50% - 10px);
        max-width: 320px;
    }
    .member-grid::before { display: none; }
    .executive-card::after { display: none; } /* 모바일에서 이사장과 겹치는 선 제거 */
    .member-card::before { display: none; }
    .history-timeline::before { left: 80px; }
    .year-label { width: 90px; padding-right: 20px; font-size: 1.4rem; }
    .year-label::after { right: -6px; }
    .history-details { padding-left: 20px; }
}

@media (max-width: 768px) {
    body { padding-top: 115px; }
    .header-container { padding: 12px 15px; }
    .logo { font-size: 1.15rem; }
    .section { padding: 60px 0; }
    .section-title { font-size: 1.8rem; margin-bottom: 35px; }
    .image-gallery { grid-template-columns: 1fr; gap: 20px; } /* 요구사항: 모바일 1열 배열 */
    .history-timeline::before { display: none; }
    .history-year-group { flex-direction: column; margin-bottom: 30px; border-bottom: 1px solid #e9ecef; padding-bottom: 15px; }
    .year-label { text-align: left; width: auto; padding-right: 0; margin-bottom: 15px; }
    .year-label::after { display: none; }
    .history-details { padding-left: 0; }
    .history-row { font-size: 0.92rem; }
    .history-row span { width: 65px; }
    .member-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .member-card {
        width: 100%;
        max-width: 320px;
    }
    .member-grid::before { display: none; }
    .member-card::before { display: none; }
    .footer-flex { flex-direction: column; text-align: center; gap: 20px; }
    .footer-info { text-align: center; }
}
