/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #268646;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-menu a:hover {
    color: #2563eb;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 70vh;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-dot.active {
    background: white;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

/* Contact Buttons */
.contact-section {
    padding: 2rem 0;
    background: #eff6ff;
}

.contact-buttons {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
}

.btn-pink {
    background: #dc2626;
    color: white;
}

.btn-pink:hover {
    background: #b91c1c;
}

.btn-purple {
    background: #7c3aed;
    color: white;
}

.btn-purple:hover {
    background: #6d28d9;
}

.btn-orange {
    background: #ea580c;
    color: white;
}

.btn-orange:hover {
    background: #c2410c;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1f2937;
}

.section-content {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* YouTube 비디오 반응형 컨테이너 */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.card-blue .card-title { color: #2563eb; }
.card-green .card-title { color: #059669; }
.card-purple .card-title { color: #7c3aed; }

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.subject-item {
    background: #eff6ff;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
    color: #1e40af;
}

.club-item {
    border-left: 4px solid;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.club-item.blue { border-color: #3b82f6; }
.club-item.green { border-color: #10b981; }

.club-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.club-desc {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Career Cards */
.career-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 2rem;
    border-radius: 0.5rem;
}

.career-card.green {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.career-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.career-title.blue { color: #1d4ed8; }
.career-title.green { color: #059669; }

.career-item {
    background: white;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* CTA Section */
.cta-section {
    background: #1f2937;
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: #d1d5db;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: #111827;
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: #9ca3af;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: #9ca3af;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

.privacy-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: white;
    text-decoration: underline;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.modal h2 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.modal p {
    margin-bottom: 1.5rem;
    color: #4b5563;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group input {
    margin-top: 0.25rem;
}

.checkbox-group label {
    font-weight: normal;
    font-size: 0.9rem;
}

.checkbox-group a {
    color: #2563eb;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.subscribe-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    text-align: center;
    display: none;
}

.subscribe-message.success {
    background-color: #d1fae5;
    color: #065f46;
    display: block;
}

.subscribe-message.error {
    background-color: #fee2e2;
    color: #b91c1c;
    display: block;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

/* 기본 반응형 이미지 설정 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 고해상도 디스플레이 대응 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 터치 친화적 요소 크기 */
.btn, .slider-nav, .slider-dot, .nav-menu a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 모바일 전용 스타일 */
@media (max-width: 768px) {
    /* 컨테이너 패딩 조정 */
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }

    /* 히어로 섹션 모바일 최적화 */
    .hero {
        height: 50vh;
        min-height: 300px;
    }

    .hero img {
        object-position: center center;
        width: 100%;
        height: 100%;
    }

    /* 슬라이더 컨트롤 모바일 최적화 */
    .slider-nav {
        padding: 0.75rem;
        font-size: 1.5rem;
        border-radius: 50%;
        width: 50px;
        height: 50px;
    }

    .slider-nav.prev {
        left: 10px;
    }

    .slider-nav.next {
        right: 10px;
    }

    .slider-controls {
        bottom: 10px;
    }

    .slider-dot {
        width: 10px;
        height: 10px;
    }

    /* 네비게이션 모바일 최적화 */
    .logo {
        font-size: 1.2rem;
        line-height: 1.2;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-menu {
        gap: 0;
        padding: 1rem;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f3f4f6;
    }

    .nav-menu a {
        padding: 1rem;
        width: 100%;
        font-size: 1.1rem;
    }

    /* 연락처 버튼 모바일 최적화 */
    .contact-buttons {
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .btn {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .btn i {
        margin-right: 0.5rem;
    }

    /* 섹션 패딩 모바일 조정 */
    .section {
        padding: 2rem 0;
    }

    .contact-section {
        padding: 1.5rem 0;
    }

    /* 제목 크기 모바일 조정 */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        line-height: 1.3;
        padding: 0 1rem;
    }

    .cta-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .cta-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* 카드 레이아웃 모바일 최적화 */
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    /* 교과목 그리드 모바일 최적화 */
    .subject-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
        margin: 0 1rem 2rem 1rem;
    }

    .subject-item {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    /* 진로 카드 모바일 최적화 */
    .career-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .career-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .career-item {
        padding: 0.75rem;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    /* 동아리 섹션 모바일 최적화 */
    .club-item {
        padding-left: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .club-title {
        font-size: 1rem;
    }

    .club-desc {
        font-size: 0.85rem;
    }

    /* 푸터 모바일 최적화 */
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-info h3 {
        font-size: 1.1rem;
    }

    .footer-info p {
        font-size: 0.9rem;
    }

    .footer-social {
        gap: 1.5rem;
    }

    .footer-social a {
        font-size: 1.8rem;
        padding: 0.5rem;
    }

    /* 텍스트 가독성 향상 */
    .section-content {
        padding: 1.5rem;
        font-size: 1rem;
        line-height: 1.7;
        margin: 0 1rem;
    }

    /* 리스트 아이템 모바일 최적화 */
    .card ul li {
        padding: 0.5rem 0;
        font-size: 0.95rem;
    }
}

/* 작은 모바일 디바이스 (320px 이하) */
@media (max-width: 480px) {
    .hero {
        height: 40vh;
        min-height: 250px;
    }

    .logo {
        font-size: 1rem;
        max-width: 150px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.85rem;
    }

    .card {
        padding: 1.25rem;
    }

    .subject-grid {
        grid-template-columns: 1fr 1fr;
    }

    .subject-item {
        font-size: 0.85rem;
        padding: 0.625rem 0.375rem;
    }

    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        padding: 0.5rem;
    }

    .contact-buttons {
        gap: 0.5rem;
    }
}

/* 큰 모바일/작은 태블릿 (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        height: 60vh;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .subject-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-buttons {
        max-width: 800px;
        margin: 0 auto;
    }

    .btn {
        max-width: 200px;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .btn:hover, .nav-menu a:hover, .slider-nav:hover {
        transform: scale(1.05);
        transition: transform 0.2s ease;
    }

    .btn:active, .nav-menu a:active, .slider-nav:active {
        transform: scale(0.95);
    }

    /* 터치 피드백 */
    .btn, .slider-nav, .slider-dot {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* 가로 모드 모바일 최적화 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 70vh;
    }

    .nav-menu {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .section {
        padding: 1.5rem 0;
    }
}

/* 접근성 향상 */
@media (prefers-reduced-motion: reduce) {
    .slide, .slider-nav, .btn, .nav-menu a {
        transition: none;
    }

    .slider-controls {
        animation: none;
    }
}

/* 로딩 성능 최적화 */
.hero img {
    content-visibility: auto;
    contain-intrinsic-size: 1200px 600px;
}

/* 포커스 표시 개선 */
.btn:focus, .nav-menu a:focus, .slider-nav:focus, .slider-dot:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* 텍스트 선택 방지 (UI 요소) */
.slider-nav, .slider-dot, .btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}