/* ===== ColorFlow 컴포넌트 공통 스타일 ===== */

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* ===== PC Menu ===== */
.pc-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 28px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-link,
.nav-link.active {
    color: #667eea;
}

.nav-item:hover .nav-link i {
    transform: rotate(180deg);
}

/* ===== Mega Menu ===== */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    background: #fff;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu-inner {
    display: flex;
    padding: 30px;
    gap: 30px;
}

.mega-column {
    flex: 1;
    min-width: 150px;
}

.mega-column h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-column h3 i {
    font-size: 0.9rem;
}

.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-column ul li {
    margin-bottom: 8px;
}

.mega-column ul li a {
    display: block;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #666;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mega-column ul li a:hover {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    color: #667eea;
    transform: translateX(5px);
}

/* Mega Menu Featured */
.mega-featured {
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    border-radius: 15px;
    padding: 20px !important;
}

.mega-featured-card {
    text-align: center;
}

.mega-featured-card .featured-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.mega-featured-card p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.mega-featured-card span {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
}

/* ===== Mobile Menu Toggle ===== */
.nav-toggle {
    display: flex;  /* 테스트용: 모든 화면에서 보이게 */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    z-index: 10000;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 5px;
    position: relative;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: #667eea;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: #ffffff;
    z-index: 9999;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-top: 3px solid #667eea;
    /* 테스트: 항상 보이게 */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-menu.active {
    display: block !important;
}

.mobile-menu-inner {
    padding: 20px;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav > li {
    border-bottom: 1px solid #eee;
}

.mobile-nav > li > a,
.mobile-sub-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 15px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
}

.mobile-sub-toggle i {
    transition: transform 0.3s ease;
}

.mobile-sub-toggle.active i {
    transform: rotate(180deg);
}

.mobile-nav > li > a:hover,
.mobile-sub-toggle:hover {
    color: #667eea;
    background: #f8f9fa;
}

/* Mobile Sub Menu */
.mobile-sub-menu {
    display: none;
    background: #f8f9fa;
    padding: 10px 0;
    list-style: none;
}

.mobile-sub-menu.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-sub-category {
    padding: 10px 20px;
}

.mobile-sub-category > span {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

.mobile-sub-category > span i {
    margin-right: 8px;
}

.mobile-sub-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sub-category ul li a {
    display: block;
    padding: 10px 15px;
    font-size: 0.95rem;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-sub-category ul li a:hover {
    background: #fff;
    color: #667eea;
    padding-left: 20px;
}

/* ===== Footer ===== */
.footer {
    background: #1a1a2e;
    color: #fff;
    padding: 60px 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-desc {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
    padding-left: 5px;
}

.footer-bottom {
    padding: 25px 0;
    text-align: center;
}

.footer-bottom p {
    color: #666;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .mega-menu {
        width: 750px;
    }
}

@media (max-width: 1024px) {
    .pc-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 0 20px;
        height: 70px;
    }

    .mobile-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }

    .footer {
        padding: 40px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links a:hover {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .nav-logo a {
        font-size: 1.5rem;
    }
}
