/* Songdo Archive Styles */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-tertiary: #999;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.98);
    --primary-color: #2196F3;
    --secondary-color: #9C27B0;
    --success-color: #4CAF50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196F3;
    --info-bg: #e3f2fd;
    --hover-bg: #f5f5f5;
    --input-bg: #ffffff;
}

body.dark-mode {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #161b22;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --border-color: rgba(240, 246, 252, 0.1);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(13, 17, 23, 0.95);
    --primary-color: #58a6ff;
    --secondary-color: #bc6ff1;
    --success-color: #3fb950;
    --error-color: #f85149;
    --warning-color: #d29922;
    --info-color: #58a6ff;
    --info-bg: rgba(56, 139, 253, 0.15);
    --hover-bg: #21262d;
    --input-bg: #0d1117;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
    transition: background 0.3s ease, color 0.3s ease;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.7;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 72px;
    padding-bottom: 80px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
        padding-top: 68px;
        max-width: 100%;
    }
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
}

/* Loading & Error */
.loading, .error {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}

.error {
    color: var(--accent-color);
    background-color: #ffe6e6;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
}

/* Archives Grid */
.archives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .archives-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.archive-card {
    background: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.archive-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.archive-card:active {
    transform: scale(0.98);
}

.archive-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ddd;
}

.archive-card-content {
    padding: 18px;
}

@media (max-width: 768px) {
    .archive-card-content {
        padding: 16px;
    }
}

.archive-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4;
}

.archive-card .year {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 10px;
}

.archive-card .description {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-card .media-count {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .archive-card h2 {
        font-size: 17px;
    }

    .archive-card .description {
        font-size: 14px;
        line-height: 1.65;
    }
}

/* Gallery Grid */
.gallery-header {
    margin-bottom: 2rem;
}

.gallery-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.gallery-header .meta {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .gallery-header h2 {
        font-size: 1.75rem;
    }

    .gallery-header .meta {
        font-size: 1rem;
    }
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.1rem;
}

.back-link:hover {
    text-decoration: underline;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item-info {
    padding: 0.8rem;
    font-size: 0.9rem;
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover {
    color: #ccc;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-nav:hover {
    background-color: rgba(255,255,255,0.4);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .archives-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .modal-nav {
        padding: 0.5rem;
        font-size: 1.5rem;
    }

    .modal-close {
        font-size: 30px;
        top: 10px;
        right: 20px;
    }
}

.modal-description {
    color: white;
    background-color: rgba(0,0,0,0.7);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    max-width: 90vw;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.5;
}

.tags {
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-right: 0.3rem;
    margin-top: 0.3rem;
}

/* Dashboard Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: background 0.3s ease;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.action-card {
    background: var(--bg-card);
    padding: 24px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.action-card:active {
    transform: scale(0.98);
}

.action-card i {
    font-size: 32px;
    color: var(--text-secondary);
}

.action-card span {
    font-size: 14px;
    font-weight: 500;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.category-card:active {
    transform: scale(0.98);
}

.category-card .category-icon {
    font-size: 32px;
    width: 50px;
    text-align: center;
}

.category-card .category-info {
    flex: 1;
}

.category-card .category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-card .category-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.category-card .category-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.category-card .category-arrow {
    font-size: 24px;
    color: var(--text-tertiary);
}

.activities-list {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 16px;
    transition: background 0.3s ease;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item i {
    font-size: 20px;
    color: var(--text-tertiary);
}

/* Main Sections Grid */
.main-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.section-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    transition: background 0.3s ease;
}

.section-header {
    margin-bottom: 16px;
}

.section-card .section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.sales-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.mini-stat {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: background 0.3s ease;
}

.mini-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.mini-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-card .quick-actions {
    grid-template-columns: repeat(2, 1fr);
}

.section-card .action-card {
    padding: 16px 12px;
}

.section-card .action-card i {
    font-size: 24px;
}

.section-card .action-card span {
    font-size: 13px;
}

/* Front Page Styles */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    border-radius: 12px;
    margin-bottom: 32px;
    text-align: center;
}

.hero-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
}

.quick-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.quick-menu-card {
    background: var(--bg-card);
    padding: 32px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.quick-menu-card:active {
    transform: scale(0.98);
}

.quick-menu-card i {
    font-size: 36px;
    color: var(--text-secondary);
}

.quick-menu-card span {
    font-size: 15px;
    font-weight: 500;
}

.info-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.info-preview-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: background 0.3s ease;
}

.info-preview-card i {
    font-size: 32px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.info-preview-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.info-preview-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-preview-sub {
    font-size: 11px;
    color: var(--text-secondary);
}

.view-more-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.view-more-btn:active {
    background: var(--border-color);
}

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

.about-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.about-text:last-child {
    margin-bottom: 0;
}

.news-list {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: background 0.3s ease;
}

.news-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:active {
    background: var(--bg-secondary);
}

.news-date {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.news-title {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-sections {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .info-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* Minimal Header */
.minimal-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    padding: 1.25rem 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 4px 0 0 0;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 20px;
}

.header-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Button Styles */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    border: none;
}
