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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'GmarketSansMedium', 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    padding: 0;
    margin: 0 !important;
}

/* 폼 요소 폰트 상속 */
input, textarea, select, button {
    font-family: inherit;
}

/* 폰트 웨이트별 GmarketSans 설정 */
h1, h2, h3, h4, h5, h6,
strong, b,
.font-bold, .fw-bold {
    font-family: 'GmarketSansBold', 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', sans-serif !important;
    font-weight: normal;
}

.font-light, .fw-light {
    font-family: 'GmarketSansLight', 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', sans-serif !important;
    font-weight: normal;
}

.font-medium, .fw-medium {
    font-family: 'GmarketSansMedium', 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', sans-serif !important;
    font-weight: normal;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.btn-primary {
    background: #333;
    color: white;
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #333;
    border: 1px solid #333;
}

.btn-outline:hover {
    background: #333;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-actions .btn {
    min-width: 120px;
}

/* Content Section */
.content-section {
    padding: 60px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.main-content {
    background: white;
    border-radius: 8px;
    padding: 0 0 50px 0;
}

.widgets-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widgets {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar .widget {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar .widget h3 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

/* Widget Styles */
.widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.widget-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,.25);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 200px;
    }
    
    .content-section {
        padding: 40px 0;
    }
    
    .widgets-area {
        gap: 20px;
    }
    
    .sidebar-widgets {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .content-section {
        padding: 30px 0;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-up {
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.6s ease-out forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dark Mode Support - 비활성화 */
/*
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e0e0e0;
    }

    .widget,
    .main-content,
    .sidebar .widget {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .form-control {
        background: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }

    .form-control:focus {
        border-color: #007bff;
    }
}
*/

/* Print Styles */
@media print {
    .hero-section,
    .sidebar,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Animation Styles */
.js-loaded .card,
.js-loaded .post-item,
.js-loaded .gallery-item,
.js-loaded .content-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.card.animate-in,
.post-item.animate-in,
.gallery-item.animate-in,
.content-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation */
.card:nth-child(1) { transition-delay: 0.1s; }
.card:nth-child(2) { transition-delay: 0.2s; }
.card:nth-child(3) { transition-delay: 0.3s; }
.card:nth-child(4) { transition-delay: 0.4s; }
.card:nth-child(5) { transition-delay: 0.5s; }

.gallery-item:nth-child(1) { transition-delay: 0.1s; }
.gallery-item:nth-child(2) { transition-delay: 0.15s; }
.gallery-item:nth-child(3) { transition-delay: 0.2s; }
.gallery-item:nth-child(4) { transition-delay: 0.25s; }
.gallery-item:nth-child(5) { transition-delay: 0.3s; }
.gallery-item:nth-child(6) { transition-delay: 0.35s; }

/* Hover Animations */
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .card,
    .post-item,
    .gallery-item,
    .content-section,
    .animate-on-scroll {
        transition: none;
        animation: none;
        opacity: 1;
        transform: none;
    }
}