@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #f8f9fa;
    --container-bg: #ffffff;
    --primary-color: #2e7d32;
    --primary-hover: #1b5e20;
    --secondary-color: #ffd600;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --input-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --header-height: 80px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.2s ease-in-out;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Nav */
header {
    background: #fff;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Main Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

/* Hero Section with Background Image */
.apply-info.hero-section {
    position: relative;
    background-image: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), 
                      url('https://store.img11.co.kr/40472673/1f45129e-d64a-4cb9-bb7d-94b006469054_1771985963033.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    padding: 100px 60px;
    margin-bottom: 40px;
    border-radius: 0 0 40px 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hero-content {
    max-width: 1000px; /* 너비를 900px에서 1000px로 확대 */
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8); /* 그림자 강화 */
}

.mobile-br {
    display: none;
}

.hero-content .sub-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7); /* 서브타이틀 그림자 추가 */
}

.description-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.highlight {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
}

.schedule-list {
    display: flex;
    justify-content: center;
    gap: 20px; /* 간격을 40px에서 20px로 줄여 공간 확보 */
    list-style: none;
    margin-bottom: 40px;
    flex-wrap: wrap; /* 공간 부족 시 박스 자체가 다음 줄로 넘어가게 함 */
}

.schedule-list li {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 15px 25px; /* 패딩을 살짝 줄임 */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    white-space: normal;
    word-break: keep-all;
    flex: 0 1 auto; /* 내용에 맞게 너비 조절 */
}

.keep-together {
    display: inline-block;
    white-space: nowrap;
    vertical-align: top;
}

/* Keywords Card Layout */
.keywords {
    margin: 60px 0;
}

.keywords h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.keywords ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* 최소 너비를 320px로 확대 */
    gap: 20px;
    list-style: none;
}

.keywords ul li {
    background: #fff;
    padding: 25px 20px; /* 패딩을 좌우로 더 줄여 공간 확보 */
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid #eee;
    text-align: center; /* 텍스트 가운데 정렬 */
}

.keywords ul li h3 {
    color: var(--primary-color);
    display: block;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.keywords ul li p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    white-space: nowrap; /* 절대 줄바꿈 금지 */
}

/* Form Styling */
.apply-form {
    background: #fff;
    padding: 60px;
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    margin-bottom: 60px;
    border: 1px solid #f0f0f0;
}

.apply-form h3 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: center;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.input-hint {
    font-size: 0.85rem;
    color: #c62828;
    margin-top: 8px;
    font-weight: 500;
}

.radio-group {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-item label {
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="file"] {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    background: #fdfdfd;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

.agreement {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 15px;
    margin: 35px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.privacy-agreement-container {
    margin: 35px 0;
}

.privacy-terms-box {
    height: 150px;
    overflow-y: auto;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #666;
    white-space: pre-wrap;
    margin-bottom: 15px;
}

.privacy-terms-box::-webkit-scrollbar {
    width: 6px;
}

.privacy-terms-box::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.agreement {
    margin: 0;
    background: #f9f9f9;
    padding: 15px 20px;
}

button[type="submit"] {
    width: 100%;
    padding: 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.2);
}

button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
}

/* Form Status Messages */
.form-status {
    margin-top: 25px;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    display: none;
    font-size: 1rem;
    line-height: 1.5;
}

.form-status.success {
    display: block;
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.form-status.error {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    white-space: pre-line;
}

.form-status.loading {
    display: block;
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* Footer */
footer {
    background: #222;
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    header {
        padding: 0 5%;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }

    header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
        position: relative; /* Sticky sometimes behaves weirdly with auto height on mobile */
    }

    header h2 {
        font-size: 1rem;
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li a {
        font-size: 0.85rem;
    }

    .apply-info.hero-section {
        padding: 60px 20px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        left: 0;
        right: 0;
        border-radius: 0 0 25px 25px;
        background-attachment: scroll; /* 아이폰 확대 버그 해결 */
    }

    .hero-content h1 {
        font-size: 2rem;
        word-break: keep-all;
    }

    .mobile-br {
        display: block;
    }

    .hero-content .sub-title {
        font-size: 1rem;
    }

    .description-box {
        padding: 20px;
        font-size: 0.95rem;
    }

    .schedule-list {
        flex-direction: column;
        gap: 12px;
    }

    .schedule-list li {
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    .keywords h3 {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .keywords ul {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .keywords ul li {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .keywords ul li h3 {
        white-space: normal;
    }

    .apply-form {
        padding: 40px 20px;
        border-radius: 20px;
    }

    .apply-form h3 {
        font-size: 1.8rem;
    }

    button[type="submit"] {
        padding: 18px;
        font-size: 1.1rem;
    }

    footer {
        padding: 50px 20px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.7rem;
    }

    .highlight {
        font-size: 0.8rem;
        padding: 6px 15px;
    }

    .apply-form h3 {
        font-size: 1.5rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input {
        font-size: 0.9rem;
        padding: 12px;
    }
}
