:root {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --header-bg: #003366;
    --header-text: #fff;
    --section-border: #ddd;
    --hero-overlay: rgba(0, 51, 102, 0.7);
    --map-bg: #e0e0e0;
    --accent-color: #00a8ff;
    --card-bg: #fff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #f4f4f4;
    --header-bg: #111;
    --header-text: #e0e0e0;
    --section-border: #333;
    --hero-overlay: rgba(0, 0, 0, 0.8);
    --map-bg: #333;
    --accent-color: #00a8ff;
    --card-bg: #222;
}

/* Basic Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Nanum Gothic', sans-serif;
    margin: 0;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout Utilities */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--header-bg);
    margin-bottom: 0.5rem;
}

body.dark-mode .section-title h2 {
    color: #aaccff;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto;
}

/* Header & Nav */
header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 0.8rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

nav .logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -1px;
}

nav ul.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav ul.nav-links li {
    margin-left: 1.5rem;
}

nav ul.nav-links li a {
    font-size: 1rem;
    font-weight: 400;
    color: #fff !important; /* Force white text */
    text-decoration: none !important; /* Force no underline */
    transition: color 0.3s;
}

nav ul.nav-links li a:hover {
    color: var(--accent-color) !important;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--header-text);
    color: var(--header-text);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: var(--header-text);
    color: var(--header-bg);
}

/* Hero Section */
#hero {
    background-image: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('images/school.png');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    margin-top: 60px;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#hero p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    transition: transform 0.3s, background 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    background: #008cd4;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.about-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card h3 {
    color: var(--accent-color);
    margin-bottom: 1.2rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

/* AI Section */
.highlight-section {
    background-color: var(--card-bg);
    border-radius: 20px;
    margin: 4rem auto;
    padding: 3rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.feature-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--section-border);
    display: flex;
    align-items: center;
}

.feature-list li::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 1rem;
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.activity-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: block;
    color: inherit;
    transition: transform 0.3s;
}

.activity-item:hover {
    transform: translateY(-5px);
}

.placeholder-img {
    height: 180px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-weight: 700;
}

.activity-item h4 {
    padding: 1.5rem 1.5rem 0.5rem;
    margin: 0;
    color: var(--accent-color);
}

.activity-item p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    font-size: 0.95rem;
}

/* Notice List */
.notice-list {
    list-style: none;
    padding: 0;
}

.notice-list li {
    margin-bottom: 1rem;
}

.notice-list li a {
    background: var(--card-bg);
    padding: 1.2rem 2rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.notice-list li a:hover {
    transform: scale(1.01);
}

.notice-list li span {
    font-weight: 700;
    color: #e67e22;
    margin-right: 1rem;
}

.notice-list li small {
    color: #999;
}

/* Contact Section Layout */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: start;
}

.contact-form {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-form h3, .contact-info h3 {
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--section-border);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.submit-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.form-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 1rem;
    text-align: center;
}

/* Updated Contact Styles */
.contact-info {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: left;
}

#map-container {
    height: 350px;
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 100%;
}

#map-container iframe {
    width: 100%;
    height: 100%;
}

/* Sections */
section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Comments */
#comments {
    padding: 5rem 1.5rem;
}

/* Footer */
footer {
    background-color: var(--header-bg);
    color: var(--header-text);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }

    nav ul.nav-links {
        margin: 1rem 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul.nav-links li {
        margin: 0.5rem;
    }

    .header-actions {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #hero h1 {
        font-size: 2.2rem;
    }

    #hero p {
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .about-card, .contact-form, .contact-info {
        padding: 1.5rem;
    }

    .notice-list li a {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.2rem;
    }

    .notice-list li small {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    nav .logo {
        font-size: 1.4rem;
    }
    
    #hero {
        height: 60vh;
    }
    
    #hero h1 {
        font-size: 1.8rem;
    }
}
