/*
 * @file style.css (Main Page)
 * @brief 연수강좌 메인 페이지 스타일시트 (v3.0 - 전면 디자인 리뉴얼)
 * @author AI Software Engineer
 * @version 3.0
 * @date 2023-10-27
 * @description 가독성, 정보 계층, 시각적 매력도 향상에 초점을 맞춘 전면 재설계
 */

/* --- 1. 전역 스타일 및 변수 정의 --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Roboto:wght@700&display=swap');

:root {
    --primary-color: #005a9e;
    --primary-dark-color: #00437a;
    --accent-color: #fca311; /* 시선을 끄는 강조색 */
    --text-color-dark: #1a1a1a;
    --text-color-light: #555;
    --background-light: #fdfdfd;
    --background-gray: #f4f7f9;
    --border-color: #e6e6e6;
    --white-color: #ffffff;
    
    --font-family-base: 'Noto Sans KR', sans-serif;
    --font-family-heading: 'Roboto', sans-serif;

    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.1);
    --border-radius-medium: 12px;
    --border-radius-large: 16px;
}

/* --- 2. 기본 스타일 초기화 --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color-dark);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- 3. 헤더 --- */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    gap: 0.5rem;
}

nav .nav-link {
    padding: 0.5rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color-light);
    border-radius: 8px;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease;
}

nav .nav-link:hover {
    color: var(--primary-dark-color);
    background-color: var(--background-gray);
}

nav .nav-link.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

nav .nav-link.nav-highlight {
    background-color: var(--accent-color);
    color: var(--text-color-dark);
}

nav .nav-link.nav-highlight:hover {
    background-color: #e0900d;
}

/* --- 4. 메인 콘텐츠 --- */
main {
    padding-top: 0;
    padding-bottom: 4rem; 
}

.hero-section {
    margin-top: 1rem; 
    margin-bottom: 4rem;
    text-align: center;
}

.hero-img {
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
}

.content-area {
    padding-top: 0;
    padding-bottom: 4rem;
    background-color: var(--background-gray);
    border-radius: 20px;
}

.content-box {
    background-color: var(--white-color);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-soft);
    padding: 3rem;
    min-height: 500px;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.5s ease; }
.tab-content img { border-radius: var(--border-radius-medium); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 5. 버튼 --- */
.button-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.btn {
    display: inline-block;
    width: 100%;
    max-width: 450px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn.btn-primary {
    background-image: linear-gradient(45deg, var(--primary-dark-color) 0%, var(--primary-color) 100%);
    color: var(--white-color);
    box-shadow: 0 4px 15px rgba(0, 90, 158, 0.2);
}

.btn.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 90, 158, 0.3);
}

.btn.btn-secondary {
    background-color: var(--white-color);
    color: var(--text-color-light);
    border-color: var(--border-color);
}

.btn.btn-secondary:hover {
    background-color: var(--background-gray);
    color: var(--text-color-dark);
    border-color: #ccc;
}

.btn-register, .btn-secondary {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 16px 20px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}
.btn-register { background-color: var(--primary-color); color: white; border: none; }
.btn-register:hover { background-color: var(--primary-dark-color); transform: translateY(-2px); }
.btn-secondary { background-color: #f0f0f0; color: #333; border: 1px solid #ddd; }
.btn-secondary:hover { background-color: #e0e0e0; border-color: #ccc; transform: translateY(-2px); }

/* --- 6. 푸터 --- */
footer {
    background-color: #1c252c;
    color: #a9b3bb;
    padding: 4rem 0;
    text-align: center;
    font-size: 0.9rem;
}

footer .footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white-color);
    margin-bottom: 1rem;
}

footer p {
    margin-bottom: 0.5rem;
}


/* --- 8. 오시는 길 (Location Tab) --- */
.location-header {
    text-align: center;
    margin-bottom: 2rem;
}

.location-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.location-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 반응형 지도를 위한 래퍼 스타일 */
.map-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 비율 유지를 위함 */
    height: 0;
    overflow: hidden;
    border-radius: 12px; /* 전체적인 디자인 통일성을 위해 둥근 모서리 적용 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); /* 다른 컴포넌트와 동일한 그림자 */
}

/* 지도 iframe 스타일 */
.map-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- 7. 반응형 디자인 --- */
@media (max-width: 992px) {
    .content-box { padding: 2rem; }
    nav .nav-link { padding: 0.5rem 1rem; font-size: 0.9rem; }
}

@media (max-width: 768px) {
    body { font-size: 15px; }

    header { position: static; }
    .header-container { flex-direction: column; height: auto; padding: 1rem 0; gap: 1rem; }
    
    main { padding: 1.5rem 0; }
    .hero-section { margin-bottom: 2rem; }
    .content-area { padding: 2rem 0; }
    .content-box { padding: 1.5rem; }

    .btn { padding: 0.9rem 1.2rem; font-size: 1rem; }
    footer { padding: 3rem 0; }
}

@media (max-width: 400px) {
    body {
        font-size: 14px;
    }

    .logo a {
        font-size: 1.3rem;
    }
    
    nav .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .content-box {
        padding: 1.2rem 1rem;
    }
    
    .btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .location-title {
        font-size: 1.5rem;
    }
    .location-subtitle {
        font-size: 1rem;
    }
}