:root {
    --primary-green: #1b4d3e;
    --accent-gold: #d4af37;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

h1,
h2,
h3,
h4 {
    font-family: 'Noto Serif KR', serif;
    color: var(--primary-green);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-green);
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--white);
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-green);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    border: 1px solid var(--primary-green);
}

.btn:hover {
    background: transparent;
    color: var(--primary-green);
}

.btn-gold {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.btn-gold:hover {
    color: var(--accent-gold);
}

/* Section Styling */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

/* Card Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-5px);
}

.card .icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: var(--primary-green);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 {
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.footer p,
.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-link {
    font-size: 0.7rem;
    margin-top: 20px;
    opacity: 0.3;
}

.admin-link:hover {
    opacity: 1;
}

/* Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: 40px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Admin Edit Overlay */
.admin-edit-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

.admin-edit-btn {
    background: rgba(27, 77, 62, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    font-family: 'Noto Sans KR', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-edit-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-green);
    transform: scale(1.05);
}

/* Ensure parents of edit containers are relative */
.hero,
.card,
.img-box,
.slide-img {
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .nav-flex {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero {
        padding: 40px 0 20px;
        min-height: 250px;
        background-size: contain;
        /* Show entire image */
        background-repeat: no-repeat;
        background-position: center top;
        background-color: var(--primary-green);
    }

    .hero h1 {
        font-size: 1.4rem;
        margin-top: 100px;
        /* Offset below contained image top */
    }

    .hero h1,
    .hero p {
        background: rgba(0, 0, 0, 0.4);
        display: inline-block;
        padding: 5px 12px;
        border-radius: 4px;
    }

    .section {
        padding: 40px 0;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }
}