/* ================================== */
/* 2. 메인 페이지 (index.html)        */
/* ================================== */

/* 2-1. 히어로 캐러셀 (Hero Carousel) */
.hero-carousel { position: relative; width: 100%; height: 500px; overflow: hidden; }
.carousel-slides { display: flex; width: 300%; height: 100%; transition: transform 0.5s ease-in-out; }
.carousel-slide { width: 33.333%; height: 100%; background-size: cover; background-position: center; display: flex; justify-content: center; align-items: center; text-align: center; color: #fff; }
.hero-content { max-width: 800px; padding: 20px; }
.hero-content h2 { font-size: 42px; font-weight: 300; margin-bottom: 20px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero-content h2 strong { font-weight: 700; }
.hero-content p { font-size: 18px; max-width: 600px; margin: 0 auto 30px; opacity: 0.9; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.btn-primary { background-color: #005aab; color: #fff; padding: 15px 30px; border-radius: 50px; text-decoration: none; font-weight: 700; transition: background-color 0.3s; }
.btn-primary:hover { background-color: #004b8d; }
.carousel-control { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0,0,0,0.3); color: #fff; border: none; font-size: 24px; padding: 15px; cursor: pointer; z-index: 10; border-radius: 50%; width: 50px; height: 50px; line-height: 0; display: flex; justify-content: center; align-items: center; }
.carousel-control:hover { background-color: rgba(0,0,0,0.5); }
.carousel-control.prev { left: 30px; } 
.carousel-control.next { right: 30px; }
.carousel-indicators { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.indicator { width: 12px; height: 12px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); cursor: pointer; transition: background-color 0.3s; }
.indicator.active { background-color: #fff; }

/* 2-2. 퀵 링크 (Quick Links) */
.quick-links-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    align-items: stretch;
}
.quick-links-item {
    display: flex;
    flex-direction: column;
}
.quick-links-item h3 { 
    font-size: 22px; 
    font-weight: 700; 
    color: #2c3e50; 
    margin-bottom: 20px; 
    padding-bottom: 10px; 
    border-bottom: 2px solid #ddd; 
}
.link-box { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background-color: #fff; 
    padding: 20px; 
    margin-bottom: 15px; 
    border: 1px solid #e0e0e0; 
    border-radius: 8px; 
    text-decoration: none; 
    color: #333; 
    font-size: 18px; 
	height: 80px;
    font-weight: 500; 
    transition: all 0.3s ease; 
}
.link-box:last-child {
    margin-bottom: 0;
}
.link-box:hover { 
    border-color: #005aab; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    transform: translateY(-3px); 
    color: #005aab; 
}
.link-box span { font-size: 14px; color: #777; }
.link-box:hover span { color: #005aab; }
.status-box { 
    background-color: #fff; 
    padding: 0;
    border: 1px solid #e0e0e0; 
    border-radius: 8px; 
    height: 175px;
    box-sizing: border-box;
}
.status-box.news-slider {
    padding: 0;
    overflow: hidden;
    position: relative;
}
.slider-track {
    width: 100%;
    height: 50%;
}
.slide-item {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}
.slide-item .date {
    font-size: 22px;
    font-weight: 700;
    color: #555;
    margin-bottom: 12px;
}
.slide-item .title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* 2-3. 공지사항 및 보도자료 (Information) */
.info-section { padding: 80px 0; background-color: #fff; border-top: 1px solid #f0f0f0; }
.info-section .container {
    grid-template-columns: 1fr;
    gap: 40px;
}
.info-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #333; padding-bottom: 15px; margin-bottom: 20px; }
.info-header h2 { font-size: 24px; font-weight: 700; }
.info-header .plus-btn { font-size: 24px; color: #888; text-decoration: none; transition: transform 0.3s; }
.info-header .plus-btn:hover { transform: rotate(90deg); }
.post-list { list-style: none; padding-left: 0; }
.post-list li { margin-bottom: 15px; }
.post-list li a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: #555; font-size: 16px; transition: color 0.2s; }
.post-list li a:hover { color: #005aab; }
.post-list li a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 20px; }
.post-list li a .date { color: #999; flex-shrink: 0; }
.right-wrapper { display: flex; flex-direction: column; gap: 30px; }


/* ================================== */
/* 3. 사이트맵 페이지 (map.html)      */
/* ================================== */

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    background-color: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
}

.sitemap-column h3 {
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid #34495e;
}

.sitemap-column h3 a {
    text-decoration: none;
    color: #2c3e50;
}

.sitemap-column ul {
    list-style: none;
    padding-left: 0;
}

.sitemap-column li {
    margin-bottom: 12px;
}

.sitemap-column li a {
    text-decoration: none;
    font-size: 16px;
    color: #555;
    transition: color 0.2s;
}

.sitemap-column li a:hover {
    color: #e67e22;
    text-decoration: underline;
}


/* ================================== */
/* 4. 회원가입 페이지 (signup.html)   */
/* ================================== */

/* 4-1. 회원 구분 (signup-type.html) */
.signup-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.type-card {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.type-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.type-card p {
    color: #555;
    margin-bottom: 30px;
    flex-grow: 1;
}

.type-card.border-green { border-top: 4px solid #2ecc71; }
.type-card.border-red { border-top: 4px solid #e74c3c; }
.type-card.border-blue { border-top: 4px solid #3498db; }

.cta-btn-main.green { background-color: #27ae60; border-color: #27ae60; }
.cta-btn-main.green:hover { background-color: #2ecc71; }
.cta-btn-main.red { background-color: #c0392b; border-color: #c0392b; }
.cta-btn-main.red:hover { background-color: #e74c3c; }

/* 4-2. 약관 동의 (signup-terms.html) */
.terms-container {
    max-width: 800px;
    margin: 0 auto;
}

.terms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 10px;
}

.terms-header h3 {
    font-size: 20px;
}

.terms-box {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
}

.terms-box textarea {
    width: 100%;
    height: 150px;
    border: none;
    resize: none;
    background-color: #f8f9fa;
    padding: 10px;
}

.agree-check-item {
    text-align: right;
    margin-top: 10px;
}
.agree-check-item label, .agree-check-all label {
    margin-right: 5px;
    cursor: pointer;
}

/* 4-3. 회원가입 폼 (signup-over14, etc.) */
.signup-form-container.detailed {
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid #ddd;
    padding: 40px;
    border-radius: 8px;
}

.form-section-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}
.form-section-title:first-of-type {
    margin-top: 0;
}

.required-text {
    font-size: 14px;
    color: #888;
    font-weight: 400;
    float: right;
    line-height: 2.5;
}

.form-group.half {
    width: calc(50% - 10px);
    display: inline-block;
    vertical-align: top;
}


.input-with-btn {
    display: flex;
    gap: 10px;
}
.input-with-btn input {
    flex-grow: 1;
}

.email-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.email-group .at-sign { font-size: 16px; color: #888; }
.email-group input { flex: 1; }
.email-group select { flex-basis: 150px; }


.radio-group {
    display: flex;
    align-items: center;
    padding-top: 10px;
}

.radio-group label {
    margin: 0 20px 0 5px;
    cursor: pointer;
}

.photo-upload {
    display: flex;
    align-items: center;
    gap: 15px;
}

.photo-preview {
    width: 100px;
    height: 133px;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    color: #ccc;
}
.photo-upload .cta-btn-sub {
    cursor: pointer;
}

.file-hidden { display: none; }

.cta-btn-main.large {
    padding: 15px 80px;
    font-size: 18px;
}


/* ================================== */
/* 5. 정책/약관/FAQ 페이지 (policy.html) */
/* ================================== */

/* 5-1. 약관/개인정보/규정 공통 */
.policy-content,
.info-content {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.policy-content h2,
.regulation-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}
.policy-content h2:first-of-type,
.regulation-section:first-of-type h2 {
    margin-top: 0;
}
.policy-content h3,
.info-content h3 {
    font-size: 22px;
    font-weight: 500;
    color: #333;
    margin-top: 40px;
    margin-bottom: 15px;
}
.policy-content h4,
.info-content h4 {
    font-size: 18px;
    font-weight: 500;
    color: #444;
    margin-top: 30px;
    margin-bottom: 10px;
}
.policy-content p,
.info-content p {
    margin-bottom: 15px;
}
.policy-content ol,
.policy-content ul,
.info-content ol,
.info-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}
.policy-content li,
.info-content li {
    margin-bottom: 10px;
}
.policy-content strong,
.info-content strong {
    font-weight: 700;
    color: #333;
}
.policy-table,
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 15px;
}
.policy-table th,
.policy-table td,
.info-table th,
.info-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
}
.policy-table th,
.info-table th {
    background-color: #f8f9fa;
    font-weight: 500;
    text-align: center;
}

/* 5-2. 시험관리규정 페이지 전용 */
.regulation-section .info-content h3:first-of-type {
    margin-top: 0;
}
.info-list {
    list-style: none;
    padding-left: 0;
}
.info-list li {
    padding-left: 15px;
    position: relative;
}
.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3498db;
}
.info-list.ordered {
    list-style-type: decimal;
    padding-left: 20px;
}
.info-list.ordered li::before {
    content: '';
}

/* 5-3. FAQ 페이지 전용 */
.faq-section {
    border-top: 2px solid #2c3e50;
}
.faq-item {
    border-bottom: 1px solid #e0e0e0;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: background-color 0.3s;
}
.faq-question:hover {
    background-color: #f8f9fa;
}
.faq-question span {
    flex-grow: 1;
}
.faq-question i {
    font-size: 16px;
    color: #888;
    transition: transform 0.3s ease-in-out;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    background-color: #f8f9fa;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
}
.faq-answer p {
    padding: 20px 40px;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin: 0;
}
.faq-answer a {
    color: #005aab;
    text-decoration: underline;
}
.faq-item.active .faq-question {
    color: #005aab;
}
.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: #005aab;
}
.faq-item.active .faq-answer {
    max-height: 500px; 
    padding-bottom: 20px;
}


/* ================================== */
/* 6. 반응형 스타일 (모바일) @768px   */
/* ================================== */
@media (max-width: 768px) {
    
    /* --- 메인 페이지 (index.html) --- */
    .hero-carousel { height: 400px; }
    .hero-content h2 { font-size: 26px; }
    .hero-content p { font-size: 15px; }
    .carousel-control { display: none; }
    .quick-links-section { padding: 40px 0; }
    .quick-links-grid { grid-template-columns: 1fr; gap: 20px; }
    .info-section { padding: 40px 0; }
    .info-section .container { display: flex; flex-direction: column; gap: 20px; }
    .info-col { padding: 0; }
    .info-header { padding-bottom: 10px; margin-bottom: 15px; }
    .info-header h2 { font-size: 20px; }
    .post-list li a span { padding-right: 10px; }
    .footer-main { flex-direction: column; gap: 20px; }
    .footer-nav { flex-wrap: wrap; gap: 15px; }

    /* --- 사이트맵 페이지 (map.html) --- */
    .sitemap-grid {
        grid-template-columns: 1fr;
    }

    /* --- 회원가입 페이지 (signup.html) --- */
    .signup-type-grid {
        grid-template-columns: 1fr;
    }
    .signup-form-container.detailed {
        padding: 25px;
        border: none;
    }
    .form-group.half {
        width: 100%;
        margin-left: 0;
    }
    .email-group {
        flex-direction: column;
        align-items: stretch;
    }

    /* --- 정책/약관/FAQ 페이지 (policy.html) --- */
    .policy-content h2,
    .regulation-section h2 {
        font-size: 24px;
    }
    .policy-content h3,
    .info-content h3 {
        font-size: 20px;
    }
    .policy-table,
    .info-table {
        font-size: 14px;
    }
    .policy-table th,
    .policy-table td,
    .info-table th,
    .info-table td {
        padding: 10px;
    }
	
	/* ▼▼▼ 사이드 배너 숨김 처리 ▼▼▼ */
    .side-banner-left,
    .side-banner-right {
        display: none;
    /* ▲▲▲ 사이드 배너 숨김 처리 ▲▲▲ */
}
	
}

@media (max-width: 1024px) {
	
	
	/* ▼▼▼ 사이드 배너 숨김 처리 ▼▼▼ */
    .side-banner-left,
    .side-banner-right {
        display: none;
    /* ▲▲▲ 사이드 배너 숨김 처리 ▲▲▲ */
	
}

}



/* ================================== */
/* 추가. 사이드 배너 스타일           */
/* ================================== */
main {
    position: relative; /* 자식 요소인 배너의 위치 기준점 역할을 위해 추가 */
}

.side-banner-left,
.side-banner-right {
    position: absolute; /* main 태그를 기준으로 위치를 절대적으로 지정 */
    top: 700px; /* 히어로 캐러셀 높이만큼 아래에서 시작 */
    width: 150px; /* 배너의 너비 */
    z-index: 20; /* 다른 요소들보다 위에 표시되도록 z-index 설정 */
}

/* 좌측 배너 위치 지정 */
.side-banner-left {
    left: 50%;
    /* * 화면 중앙에서 왼쪽으로 이동시키는 값
     * 계산: -(메인 컨테이너 너비 절반 + 배너와 컨테이너 간격 + 배너 너비)
     * 예: -(600px + 20px + 150px) = -770px 
     */
    margin-left: -770px; 
}

/* 우측 배너 위치 지정 */
.side-banner-right {
    left: 50%;
    /*
     * 화면 중앙에서 오른쪽으로 이동시키는 값
     * 계산: (메인 컨테이너 너비 절반 + 배너와 컨테이너 간격)
     * 예: (600px + 20px) = 620px
     */
    margin-left: 620px;
}

.side-banner-left img,
.side-banner-right img {
    width: 100%;
    height: auto;
    display: block;
}


/* ================================== */
/* 추가. 팝업 모달 스타일 (선택자 수정) */
/* ================================== */

/* 모달 컨테이너 (기본적으로 숨김) */
.main-popup-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: transparent; /* ◀ 검은색 배경을 투명하게 변경 */
    pointer-events: none;         /* ◀ 뒷배경 클릭이 가능하도록 설정 */
    justify-content: center;
    align-items: center;
}

/* 모달 내용 박스 */
.main-popup-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
    animation-name: animatetop;
    animation-duration: 0.4s;
    pointer-events: auto; /* ◀ 모달창 자체는 클릭이 가능하도록 재설정 */
}

/* 닫기 버튼 */
.main-popup-close { /* <<<< .close-button 에서 변경 */
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.main-popup-close:hover,
.main-popup-close:focus { /* <<<< .close-button 에서 변경 */
    color: #000;
    text-decoration: none;
}

/* 모달 제목 */
.main-popup-content h2 { /* <<<< .modal-content h2 에서 변경 */
    color: #d9534f;
    font-size: 1.8em;
    margin-bottom: 15px;
}

/* ================================== */
/* 추가. 반응형 (모바일) 모달 조정    */
/* ================================== */
@media (max-width: 768px) {
    .main-popup-content {
        padding: 20px;
        width: 95%; /* 모바일에서 더 넓게 */
    }

    .main-popup-content h2 {
        font-size: 1.5em;
    }

    .main-popup-content p {
        font-size: 1em;
    }
}