/* ========================================
   CSS Variables - Easy Customization
   ======================================== */
:root {
    /* Colors - Will be overridden by config.json */
    --primary-color: #0066CC;
    --secondary-color: #00A3E0;
    --accent-color: #FF6B35;
    --text-color: #333333;
    --light-text-color: #666666;
    --bg-color: #FFFFFF;
    --dark-bg-color: #1A1A1A;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-fast);
}

.logo img {
    height: 40px;
    width: auto;
    transition: var(--transition-fast);
}

.logo a:hover img {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-menu li a {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-color);
    background: rgba(0, 102, 204, 0.1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition-fast);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    width: 100%;
    display: block;
    margin: 0;
    margin-top: 60px;
    padding: 0 !important;
    line-height: 0;
    text-align: center;
    background-color: #FFFFFF;
    background-image: none !important;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.hero-content {
    position: absolute;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 1s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 1s ease 0.2s both;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid white;
    border-radius: 13px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: var(--spacing-xl) 0;
}

section.hero {
    padding: 0 !important;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.news .section-header {
    margin-top: calc(var(--spacing-xl) * 0.25);
    margin-bottom: calc(var(--spacing-xl) * 0.15);
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
}

.section-description {
    font-size: 1.2rem;
    color: var(--light-text-color);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   About Section
   ======================================== */
/* Page sections for multi-page layout */
.page-section {
    min-height: calc(100vh - 80px);
    padding-top: 100px;
    display: flex;
    align-items: center;
}

.page-section.mission {
    min-height: auto;
    padding-top: 0;
    display: block;
}

.about {
    background: #f8f9fa;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.feature-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.feature-description {
    color: var(--light-text-color);
    line-height: 1.8;
}

/* ========================================
   Mission Section
   ======================================== */
.mission {
    position: relative;
    width: 100%;
    display: block;
    margin: 0;
    margin-top: 60px;
    padding: 0 !important;
    line-height: 0;
    text-align: center;
    background-color: #FFFFFF;
    background-image: none !important;
}

.mission.page-section {
    padding: 0 !important;
    margin: 0;
    margin-top: 60px;
    min-height: auto;
}

.mission-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.mission::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.4)"/></svg>');
    background-size: 50px 50px;
    pointer-events: none;
}

.mission-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.mission .section-title {
    color: #2c3e50;
    margin-bottom: var(--spacing-xl);
    font-size: 2.5rem;
    font-weight: 700;
}

.mission-statement-en {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 400;
    color: #34495e;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.5px;
}

.mission-statement-ko {
    font-size: 1.5rem;
    color: #2c3e50;
    line-height: 1.8;
    font-weight: 400;
}

@media (max-width: 768px) {
    .mission {
        padding: calc(var(--spacing-xl) * 2) 0;
    }

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

    .mission-statement-en {
        font-size: 1.5rem;
    }

    .mission-statement-ko {
        font-size: 1.2rem;
    }
}

/* ========================================
   News Section
   ======================================== */
.news {
    background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 50%, #E0F6FF 100%);
    padding: calc(var(--spacing-xl) * 0.6) 0;
}

.news-filters {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.news-item {
    display: block;
    background: white;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border-left: 3px solid transparent;
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
    border-left-color: var(--primary-color);
    background: #fafbfc;
}

.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: 6px;
}

.news-item-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    flex: 1;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-date {
    font-size: 0.8rem;
    color: #999;
    white-space: nowrap;
    font-weight: 500;
}

.news-item-summary {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Legacy styles for old news cards - kept for compatibility */
.news-card {
    display: block;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: var(--spacing-md);
}

.news-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    gap: var(--spacing-sm);
}

.news-date {
    font-size: 0.85rem;
    color: var(--light-text-color);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.news-category {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 15px;
    font-weight: 600;
}

.news-title {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   News Detail Page
   ======================================== */
.news-detail {
    background: #f8f9fa;
}

.news-detail-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: var(--spacing-xl);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.news-detail-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid #e9ecef;
}

.news-detail-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.news-detail-meta {
    display: flex;
    gap: var(--spacing-md);
    color: var(--light-text-color);
    font-size: 0.95rem;
}

.news-detail-date {
    font-weight: 500;
}

.news-detail-image {
    width: 100%;
    margin-bottom: var(--spacing-lg);
    border-radius: 8px;
    overflow: hidden;
}

.news-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-detail-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: var(--spacing-xl);
}

.news-detail-body p {
    margin-bottom: var(--spacing-md);
}

.news-detail-back {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .news-detail-content {
        padding: var(--spacing-md);
    }

    .news-detail-title {
        font-size: 1.8rem;
    }

    .news-detail-body {
        font-size: 1rem;
    }
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 50%, #E0F6FF 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: #f8f9fa;
    border-radius: 12px;
}

.contact-item.follow-us {
    display: block;
}

.contact-item.follow-us .contact-details {
    width: 100%;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.social-link {
    display: flex !important;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-color) !important;
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
}

.social-link:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

.social-link svg {
    flex-shrink: 0;
    fill: white !important;
}

.contact-icon {
    font-size: 2.5rem;
    transition: var(--transition-fast);
}

.contact-details h3 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

.contact-details p {
    color: var(--light-text-color);
}

.contact-form {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

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

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--dark-bg-color);
    color: white;
    padding: var(--spacing-md) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-primary);
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 8px;
    }
    100% {
        opacity: 0;
        top: 24px;
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
        transition: var(--transition-normal);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .news-item-header {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .news-item-date {
        margin-top: 0;
    }

    .news-item-title {
        font-size: 1.1rem;
    }
}
