/* Basic Clean Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0A192F;
    /* Deep Navy */
    --primary-light: #112240;
    /* Lighter Navy for cards/sections */
    --secondary-color: #64FFDA;
    /* Teal Accent */
    --text-primary: #CCD6F6;
    /* Light Blue-Grey Text */
    --text-secondary: #8892B0;
    /* Muted Text */
    --white: #ffffff;
    --bg-light: #f8f9fa;
    /* Light background for contrast sections */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    word-break: keep-all;
}

/* Typography & Utilities */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--primary-color);
    color: var(--text-primary);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.bg-dark .section-title h2 {
    color: var(--white);
}

.section-title p {
    color: #666;
    font-size: 1.1rem;
}

.bg-dark .section-title p {
    color: var(--text-secondary);
}

.text-white {
    color: var(--white) !important;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 10px;
}

.btn-outline:hover {
    background-color: rgba(10, 25, 47, 0.05);
}

.full-width {
    width: 100%;
    text-align: center;
}

/* Header */
header {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    height: 90px;
    /* Increased height */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
    /* Space between*/
}

/* Logo Brightness Filter - REMOVED per user request */
.logo-img {
    height: 50px;
    width: 50px;
    /* Force square for perfect circle */
    object-fit: cover;
    /* Prevent distortion */
    border-radius: 50%;
    /* Make circular */
    /* filter: brightness(0) invert(1); Removed to show original logo */
}

.logo-text {
    font-size: 32px;
    /* Requested size */
    font-weight: 800;
    /* Requested weight */
    color: #ffffff !important;
    /* Forced White color */
    letter-spacing: -0.5px;
}

/* Remove old span styling if it conflicts, or just reset it */
.logo span {
    color: inherit;
}

.navbar .nav-links {
    display: flex;
}

.navbar .nav-links li {
    margin-left: 40px;
    /* More spacing */
}

.navbar .nav-links a {
    color: #ffffff;
    /* Explicit white */
    font-size: 18px;
    /* Requested size */
    font-weight: 700;
    /* Bold */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    /* Slight shadow for visibility */
}

.navbar .nav-links a:hover {
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
}

/* Branch Dropdown */
.branch-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

.branch-dropdown-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 8px 15px;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.branch-dropdown-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-color);
}

.branch-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1001;
}

.branch-dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.branch-dropdown-content a:hover {
    background-color: #f1f8ff;
    color: var(--primary-color);
}

.branch-dropdown.active .branch-dropdown-content {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
#hero {
    background-color: var(--primary-color);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 90px;
    /* Header height */
    /* Updated background to Linear Gradient per user request */
    background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
    color: var(--white);
    overflow: hidden;
    /* Prevent floating icons from scrolling the page */
}

/* Floating Animation */
.hero-floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind content but above background */
    pointer-events: none;
    /* Let clicks pass through */
}

.floating-icon {
    position: absolute;
    opacity: 0.15;
    /* Subtle visibility */
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(100, 255, 218, 0.5));
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient is already dark, so we use a very light overlay just for uniformity if needed, or remove it. 
       Let's keep a very subtle pattern or just transparent to let the gradient shine. 
       Actually, a subtle mesh or dot pattern could be nice, but user asked for gradient. 
       Let's just make it transparent or very light for text safety. */
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-content {
    z-index: 2;
    padding: 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    /* Even larger */
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.3;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    /* Text shadow for pop */
}

.hero-content .highlight {
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 1.5rem;
    /* Larger subtitle */
    color: #e6e6e6;
    /* Bright grey */
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.hero-buttons .btn-primary {
    background-color: transparent;
}

.hero-buttons .btn-primary:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.hero-buttons .btn-outline {
    border-color: var(--text-primary);
    color: var(--text-primary);
    margin-left: 0;
    /* override earlier .btn-outline margin-left */
}

.hero-buttons .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-kakao {
    background-color: #FEE500;
    color: #191919 !important;
    border: 1px solid #FEE500;
    font-weight: bold;
    margin-left: 0;
    /* consistent with wrap */
}

.btn-kakao:hover {
    background-color: #F4DC00;
    color: #191919 !important;
}

/* Curriculum Section */

.tab-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: var(--transition);
}

.tab-btn:hover {
    background-color: #f1f1f1;
    color: var(--primary-color);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(10, 25, 47, 0.2);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-top: 3px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card p {
    color: #666;
    font-size: 0.95rem;
}

/* Notice Section */
.notice-list {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.notice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Date and Title split */
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
    cursor: pointer;
    /* Clickable feel */
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item:hover {
    background-color: #f1f8ff;
    /* Light hover color */
    transform: translateX(5px);
    /* Subtle movement */
}

.notice-item .date {
    color: #888;
    font-size: 0.9rem;
    min-width: 100px;
    text-align: right;
}

.notice-item .title {
    color: #333;
    font-weight: 500;
    font-size: 1.05rem;
    flex-grow: 1;
    margin-right: 20px;
}

.notice-item:hover .title {
    color: var(--primary-color);
    font-weight: 600;
}

.delete-btn {
    background: transparent;
    border: none;
    color: #ff6b6b;
    /* Soft Red */
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px 10px;
    margin-left: 15px;
    transition: var(--transition);
    border-radius: 50%;
    /* Circular hover effect */
}

.delete-btn:hover {
    background-color: rgba(255, 107, 107, 0.1);
    color: #c62828;
    transform: scale(1.1);
}

/* Schedule Section */
.schedule-list {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    /* Reuse notice container style */
}

.schedule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-item:hover {
    background-color: #fafafa;
}

.schedule-info {
    display: flex;
    flex-direction: column;
}

.schedule-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.schedule-date {
    font-size: 0.9rem;
    color: #888;
}

.schedule-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status.open {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status.closing {
    background-color: #fff3e0;
    color: #f57c00;
}

.status.full {
    background-color: #ffebee;
    color: #c62828;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info .info-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-info .info-item i {
    width: 40px;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.contact-info .info-item p {
    color: var(--text-secondary);
}

.contact-form {
    background-color: var(--primary-light);
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #0d213f;
    /* Slightly lighter than primary-light for input bg */
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: #020c1b;
    /* Darkest Navy */
    color: var(--text-secondary);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #112240;
    padding-bottom: 20px;
}

.footer-logo {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.footer-logo span {
    color: var(--white);
}

.footer-links a {
    margin: 0 15px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.social-links a {
    margin-left: 15px;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Modal Styling */
.modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Dark semi-transparent background */
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    width: 60%;
    min-width: 320px;
    max-height: 80vh;
    margin: 10vh auto;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.close-modal-btn {
    display: block;
    width: 100%;
    margin-top: 30px;
    padding: 15px 20px;
    background-color: #444;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background-color 0.2s;
}

.close-modal-btn:hover {
    background-color: #222;
}

/* 게시판 제목 영역 강제 쪼개짐 방지 (Global) */
.board-item .title,
.notice-item .title,
.schedule-item .schedule-title {
    width: 100%;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: sticky;
    top: 0;
    float: right;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    margin-right: -10px;
    margin-top: -10px;
}

.close-btn:hover {
    color: var(--primary-color);
}

.modal-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-right: 20px;
}

.modal-date {
    display: block;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.modal-body {
    line-height: 1.8;
    color: #444;
    white-space: pre-line;
    /* Respect line breaks in text */
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Text & Layout Consistency */
    * {
        box-sizing: border-box;
    }

    body {
        word-break: keep-all;
    }

    .container {
        padding: 0 20px;
    }

    #hero {
        padding-top: 140px; /* 상단 여백 확보: 헤더에 가려지지 않도록 */
    }

    .hero-content {
        padding: 0 20px;
        width: 100%;
        margin-top: 20px;
    }

    .section-title h2 {
        font-size: 1.5rem; /* 폰트 크기 조정 */
        line-height: 1.4; /* 줄 간격 조정 */
        word-break: keep-all; /* 단어 줄바꿈 유지 */
    }

    .hero-content h1 {
        font-size: 1.6rem; /* 폰트 크기 조정 */
        line-height: 1.4; /* 줄 간격 조정 */
        word-break: keep-all; /* 단어 줄바꿈 처리 */
    }
    
    .hero-content p {
        font-size: 1.1rem;
        line-height: 1.5;
        word-break: keep-all;
    }

    /* Board List Mobile Optimization */
    .notice-item, .schedule-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }

    .notice-item .title, .schedule-item .schedule-title {
        width: 100%;
        margin-bottom: 8px;
        margin-right: 0;
    }

    .notice-item .date, .notice-item .views {
        text-align: left !important;
        margin: 0 10px 0 0 !important;
        font-size: 0.85rem;
        display: inline-block;
    }

    .schedule-info {
        width: 100%;
        margin-bottom: 8px;
    }

    .schedule-meta {
        justify-content: flex-start;
        width: 100%;
    }

    .schedule-meta .views {
        margin: 0 15px 0 0 !important;
    }

    /* Modal Height and Scroll Optimization */
    .modal-content {
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        margin: auto;
    }

    /* Header / Navbar Rearrangement */
    header .container {
        padding: 0 15px;
        gap: 10px;
    }

    .logo-img {
        width: 35px;
        height: 35px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo a {
        gap: 8px;
    }

    .hamburger {
        display: block;
        font-size: 1.5rem;
    }

    .navbar .nav-links {
        position: fixed;
        right: -100%;
        top: 90px;
        flex-direction: column;
        background-color: var(--primary-light);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding-bottom: 20px;
    }

    .navbar .nav-links.active {
        right: 0;
    }

    .navbar .nav-links li {
        margin: 20px 0;
    }

    .branch-dropdown {
        margin-left: 0;
        margin-right: 10px;
    }

    .branch-dropdown-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* Hero Section Buttons -> Flex Column */
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .hero-buttons .btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Footer Info -> Flex Column */
    .footer-top { 
        flex-direction: column !important; 
        gap: 15px; 
        text-align: center; 
    }

    .footer-info { 
        text-align: left; 
        font-size: 0.9rem;
        padding: 0 15px;
    }

    .footer-bottom { 
        flex-direction: column !important; 
        gap: 15px; 
        text-align: center; 
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .footer-links a {
        margin: 0;
    }

    .social-links {
        margin-top: 15px;
    }

    .social-links a {
        margin: 0 10px !important;
    }

    /* Remove padding override here to let global rules apply securely */
}

/* Write Modal Specifics */
/* .write-close inherits from close-btn */

/* Ensure form elements in modal look good */
#writeModal textarea {
    resize: vertical;
    font-size: 1rem;
    line-height: 1.6;
}

/* Screen Reader Only for SEO */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}