:root {
    --primary-color: #1a365d;
    /* Deep Navy */
    --accent-color: #c5a059;
    /* Gold */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --font-main: 'Noto Sans KR', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    height: 80px;
    align-items: center;
}

.nav-menu>li {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-menu>li>a {
    font-weight: 500;
    font-size: 16px;
    position: relative;
    padding: 0 5px;
}

.nav-menu>li:hover>a,
.nav-menu>li>a.active {
    color: var(--accent-color);
}

/* Auth Menu */
.auth-menu {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: 20px;
}

.auth-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link i {
    font-size: 13px;
}

.auth-link.login {
    color: var(--text-dark);
    background: #f0f2f5;
    border: 1px solid transparent;
}

.auth-link.login:hover {
    background: #e4e6e9;
    color: var(--primary-color);
}

.auth-link.signup {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.2);
}

.auth-link.signup:hover {
    background: #152c4e;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 54, 93, 0.3);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 10px 0;
    z-index: 1100;
    border-top: 3px solid var(--accent-color);
}

.nav-menu>li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    font-size: 14px;
    text-align: center;
    transition: all 0.2s;
    font-weight: 400;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--accent-color);
    padding-left: 25px;
    /* Subtle movement effect */
}

.dropdown-menu a.is-disabled {
    color: #999;
    cursor: default;
    pointer-events: none;
}

.dropdown-menu a.is-disabled:hover {
    background: transparent;
    color: #999;
    padding-left: 20px;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 600px;
    background: linear-gradient(rgba(26, 54, 93, 0.3), rgba(26, 54, 93, 0.15)), url('/logo/배경.png') center/cover;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hero-text {
    color: var(--white);
    max-width: 600px;
}

.hero-text h1 {
    font-family: var(--font-serif);
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* Application Card (Floating) */
.apply-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    width: 350px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    backdrop-filter: blur(10px);
}

.apply-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.apply-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.btn-apply {
    display: block;
    background: var(--accent-color);
    color: var(--white);
    padding: 15px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.4);
}

.btn-apply:hover {
    background: #b08d45;
    transform: translateY(-2px);
}

.btn-outline {
    display: block;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Quick Links Grid */
.section-links {
    padding: 80px 0;
    background: var(--bg-light);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: -120px;
    /* Overlap Hero */
    position: relative;
    z-index: 10;
}

.links-grid.links-grid-five {
    grid-template-columns: repeat(5, 1fr);
}

.link-item {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    border-top: 4px solid transparent;
}

.link-item:hover {
    transform: translateY(-10px);
    border-top-color: var(--accent-color);
}

.link-item.link-item-live {
    border-top-color: rgba(197, 160, 89, 0.5);
}

.link-item.link-item-disabled {
    border-top-style: dashed;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
}

.link-item.link-item-disabled:hover {
    transform: translateY(-6px);
    border-top-color: #d9b98a;
}

.link-icon {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.link-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
}

.link-state-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.link-state-chip.is-live {
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary-color);
}

.link-state-chip.is-pending {
    background: rgba(197, 160, 89, 0.16);
    color: #8a6220;
}

.link-desc {
    font-size: 13px;
    color: var(--text-light);
}

/* Boards Section */
.section-boards {
    padding: 80px 0;
}

.boards-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
}

.board-header h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.board-more {
    font-size: 14px;
    color: var(--text-light);
}

.board-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.board-list li a {
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-date {
    color: #999;
    font-size: 14px;
}

/* Gallery Section */
.section-gallery {
    padding: 80px 0;
    background: #f0f2f5;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-family: var(--font-serif);
    margin-bottom: 50px;
    color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gallery-img {
    height: 200px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.gallery-info {
    padding: 20px;
}

.prize-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.prize-gold {
    background: var(--accent-color);
}

/* Info Buttons Section */
.section-info {
    padding: 60px 0;
}

.info-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.btn-info:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(26, 54, 93, 0.05);
}

/* Footer */
footer {
    background: #222;
    color: #999;
    padding: 60px 0;
    font-size: 14px;
}

.footer-top {
    border-bottom: 1px solid #333;
    padding-bottom: 30px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
}

.footer-top a {
    color: #ccc;
}

.footer-top a:hover {
    color: var(--white);
}

.footer-info p {
    margin-bottom: 8px;
}

.admin-link {
    display: inline-block;
    margin-top: 20px;
    border: 1px solid #444;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        height: auto;
        padding: 120px 0 80px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .links-grid {
        grid-template-columns: 1fr 1fr;
        margin-top: 40px;
    }

    .boards-wrapper {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile Menu - Side Drawer */
    .mobile-menu-btn {
        display: block;
        z-index: 2001;
        /* Above menu */
        position: relative;
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        padding: 100px 30px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 2000;
        overflow-y: auto;
        gap: 0;
        align-items: flex-start;
        height: auto !important;
        /* Override explicit height from desktop if any */
        min-height: 100vh;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu>li {
        width: 100%;
        height: auto;
        padding: 0;
        display: block;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu>li>a {
        display: block;
        padding: 15px 0;
        font-size: 18px;
        font-weight: 600;
        text-align: left;
    }

    /* Mobile Dropdown */
    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        padding: 0 0 15px 15px;
        background: transparent;
        border-top: none;
        display: none;
        /* JS could toggle this, but let's show all or use hover logic differently */
        min-width: 100%;
        transition: none;
    }

    .nav-menu>li:hover .dropdown-menu {
        display: block;
        /* Show on hover/click in mobile for simplicity */
        transform: none;
    }

    .dropdown-menu a {
        padding: 10px 0;
        text-align: left;
        color: var(--text-light);
        font-size: 15px;
    }

    .dropdown-menu a:hover {
        background: transparent;
        color: var(--accent-color);
        padding-left: 10px;
    }

    .dropdown-menu a.is-disabled:hover {
        color: #999;
        padding-left: 0;
    }

    /* Adjust Auth Menu for Mobile */
    .auth-menu {
        margin-left: auto;
        margin-right: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .header-inner .logo img {
        height: 38px;
        /* 모바일 화면에서 로고 크기 축소 */
    }
}
