/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #2c3e50;
    --accent-color: #1abc9c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.85)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 2rem;
    margin-top: 60px;
    position: relative;
}

.hero-slider {
    position: relative;
    width: 100%;
    max-width: 900px;
    min-height: 200px;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.hero-slider .slide.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hero-slider .slide .slide-title-en {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    animation: fadeInUp 0.8s ease;
    color: #fff;
}

.hero-slider .slide .slide-title-ko {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    animation: fadeInUp 0.8s ease 0.1s both;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.hero-slider .slide .slide-desc-en {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 850px;
    margin: 0 auto 0.8rem;
    animation: fadeInUp 0.8s ease 0.2s both;
    color: rgba(255, 255, 255, 0.85);
}

.hero-slider .slide .slide-desc-ko {
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 850px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.3s both;
    color: rgba(255, 255, 255, 0.75);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-indicators {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
}

.hero-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

.hero-indicators .indicator.active {
    background: var(--white);
    transform: scale(1.2);
}

.hero-btn {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #0056b3;
}

/* Section Styles */
section {
    padding: 4rem 2rem;
}

/* About Section */
.about-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.about-intro {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-image {
    flex: 0 0 250px;
    text-align: center;
}

.about-image img {
    max-width: 250px;
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.about-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.about-card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.about-card.full-width {
    grid-column: 1 / -1;
}

.about-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.about-card h3 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.about-card ul {
    list-style: none;
}

.about-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.about-card ul li:last-child {
    border-bottom: none;
}

.history-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
}

.history-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.history-list .year {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 80px;
}

@media (max-width: 768px) {
    .about-intro {
        flex-direction: column;
        text-align: center;
    }
    
    .about-details {
        grid-template-columns: 1fr;
    }
    
    .history-list {
        grid-template-columns: 1fr;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

/* Services */
.services-grid, .portfolio-grid, .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 1.5rem;
    text-align: center;
}

.service-content h3 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.service-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* Contact */
.contact {
    background: var(--light-bg);
    text-align: center;
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
}

/* Content with Attachments */
.post-content {
    line-height: 1.8;
}

.content-image {
    margin: 1rem 0;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-download {
    margin: 1rem 0;
}

.download-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #0056b3;
}

.download-btn i {
    margin-right: 0.5rem;
}

/* Page Header for Sub Pages */
.page-header {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    padding: 8rem 2rem 4rem;
    text-align: center;
    color: var(--white);
    margin-top: 60px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.page-header .category-badge {
    display: inline-block;
    background: var(--primary-color);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Page Content */
.page-content {
    padding: 4rem 2rem;
    min-height: 50vh;
}

/* List Pages */
.list-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.list-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.list-card a {
    display: block;
    color: inherit;
}

.list-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.list-card:hover .list-thumbnail img {
    transform: scale(1.05);
}

.list-thumbnail.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 3rem;
}

.list-info {
    padding: 1.5rem;
}

.list-info h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.list-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.list-date {
    color: #999;
    font-size: 0.85rem;
}

/* News List Style */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s;
}

.news-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.news-item a {
    display: flex;
    color: inherit;
}

.news-thumbnail {
    flex: 0 0 200px;
    height: 150px;
    overflow: hidden;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-info {
    flex: 1;
    padding: 1.5rem;
}

.news-date {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.news-info h3 {
    color: var(--secondary-color);
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.news-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* View Page */
.view-container {
    max-width: 900px;
    margin: 0 auto;
}

.post-article {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.post-body {
    line-height: 1.8;
    color: var(--text-color);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-attachments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.post-attachments h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.post-attachments ul {
    list-style: none;
}

.post-attachments li {
    margin-bottom: 0.5rem;
}

.post-attachments a {
    color: var(--primary-color);
    transition: color 0.3s;
}

.post-attachments a:hover {
    color: #0056b3;
}

.post-navigation {
    margin-top: 2rem;
    text-align: center;
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Empty Message */
.empty-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Active Navigation */
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 6rem 1rem 3rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .news-item a {
        flex-direction: column;
    }
    
    .news-thumbnail {
        flex: none;
        width: 100%;
        height: 200px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }
}
