/*
Theme Name: ITPLab Corporate Theme
Theme URI: https://itplab.kr
Author: ITPLab Development Team
Author URI: https://itplab.kr
Description: IT 매니지드 서비스 전문 기업 아이티플랩의 워드프레스 커스텀 테마
Version: 1.0.0
License: GPL v2 or later
Text Domain: itplab
*/

/* ===================================
   1. CSS Variables & Root
=================================== */
:root {
    /* Brand Colors */
    --primary-color: #1E40AF;
    --secondary-color: #10B981;
    --accent-color: #8B5CF6;
    --dark-color: #111827;
    --light-color: #F9FAFB;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    --gradient-dark: linear-gradient(135deg, #111827 0%, #1F2937 100%);
    --gradient-accent: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);

    /* Typography */
    --font-primary: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --font-code: 'JetBrains Mono', 'Consolas', monospace;

    /* Spacing */
    --section-padding: 100px;
    --container-max: 1480px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
}

/* ===================================
   2. Global Styles
=================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===================================
   3. Header Navigation
=================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1001;
    flex-shrink: 0;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.site-header.scrolled .logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.logo-tag {
    margin-left: 10px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.site-header.scrolled .logo-tag {
    background: var(--gradient-accent);
    border-color: transparent;
}

/* Main Navigation */
.main-navigation {
    flex: 1;
}

.main-navigation .nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation .menu-item {
    position: relative;
}

.main-navigation .menu-item > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.site-header.scrolled .main-navigation .menu-item > a {
    color: var(--dark-color);
    text-shadow: none;
}

.main-navigation .menu-item > a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.site-header.scrolled .main-navigation .menu-item > a:hover {
    background: #EEF2FF;
    color: var(--primary-color);
}

/* Dropdown Arrow */
.menu-item-has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
    list-style: none;
    margin: 8px 0 0 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    margin: 0;
}

.sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sub-menu a:hover {
    background: #EEF2FF;
    color: var(--primary-color);
}

/* Mega Menu for Add-ons */
.mega-menu {
    min-width: 520px;
    padding: 20px;
}

.mega-menu-wrapper {
    display: flex;
    gap: 20px;
}

.sub-menu-section {
    flex: 1;
}

.sub-menu-title {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 8px;
}

.sub-menu-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sub-menu-section li {
    margin-bottom: 4px;
}

.sub-menu-section a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
}

.sub-menu-section a strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
}

.menu-desc {
    font-size: 12px;
    color: #6B7280;
}

.sub-menu-section a:hover strong {
    color: var(--primary-color);
}

/* Header Actions (Login/Signup/Dashboard) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* 데스크탑/모바일 분기 */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

.btn-login,
.btn-signup,
.btn-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-login {
    color: white;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.site-header.scrolled .btn-login {
    color: var(--dark-color);
    border-color: #E5E7EB;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
}

.site-header.scrolled .btn-login:hover {
    background: #F9FAFB;
}

.btn-signup {
    background: white;
    color: var(--primary-color);
    border: none;
}

.site-header.scrolled .btn-signup {
    background: var(--gradient-primary);
    color: white;
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-dashboard {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.site-header.scrolled .btn-dashboard {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.btn-dashboard svg {
    width: 16px;
    height: 16px;
}

/* User Menu (Logged in) */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.site-header.scrolled .user-menu-toggle {
    background: white;
    border-color: #E5E7EB;
    color: var(--dark-color);
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.site-header.scrolled .user-menu-toggle:hover {
    background: #F9FAFB;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    list-style: none;
    margin: 8px 0 0 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown li {
    margin: 0;
}

.user-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.user-dropdown a:hover {
    background: #EEF2FF;
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.active span {
    background: black;
}

.site-header.scrolled .menu-toggle span {
    background: var(--dark-color);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ===================================
   4. Hero Section
=================================== */
.hero-section {
    margin-top: 80px;
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, #F9FAFB 0%, #EEF2FF 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    background: var(--gradient-dark);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text .tagline {
    font-size: 20px;
    color: #6B7280;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* ===================================
   5. Service Cards
=================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 60px 0;
}

.service-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.service-card p {
    color: #6B7280;
    line-height: 1.6;
}

/* ===================================
   6. Footer
=================================== */
.site-footer {
    background: var(--gradient-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-column p {
    color: #9CA3AF;
    line-height: 1.8;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #9CA3AF;
}

/* ===================================
   7. Mobile Responsive
=================================== */
@media (max-width: 1400px) {
    .container {
        padding: 0 40px;
    }

    .header-container {
        padding: 20px 40px;
    }
}

@media (max-width: 1024px) {
    .header-container {
        padding: 20px 30px;
        gap: 20px;
    }

    .main-navigation .nav-menu {
        gap: 4px;
    }

    .main-navigation .menu-item > a {
        padding: 10px 12px;
        font-size: 14px;
    }

    .mega-menu {
        min-width: 400px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .header-container {
        padding: 15px 20px;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
    }

    /* 모바일에서 desktop-only 숨기고 mobile-only 표시 */
    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }

    .site-header.scrolled .btn-signup {
        color: var(--dark-color);
        border-color: #E5E7EB;
        background: none;
    }

    /* Mobile Navigation - 기본 상태: 화면 밖 */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        padding: 0 0 20px;
        overflow-y: auto;
        z-index: 1001;
    }

    /* Mobile Navigation - 활성화 상태: 화면에 표시 */
    .main-navigation.active {
        right: 0;
    }

    /* Mobile Header Actions inside navigation */
    .main-navigation .header-actions {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 30px 30px 15px 30px;
        background: #F9FAFB;
        border-bottom: 2px solid #E5E7EB;
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .main-navigation .nav-menu {
        flex-direction: column;
        padding: 0;
        gap: 0;
        align-items: stretch;
    }

    .main-navigation .menu-item {
        border-bottom: 1px solid #E5E7EB;
    }

    .main-navigation .menu-item > a {
        color: var(--dark-color) !important;
        text-shadow: none !important;
        padding: 15px 30px;
        border-radius: 0;
        justify-content: space-between;
    }

    /* Mobile Dropdown */
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background: #F9FAFB;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }
    .menu-item-has-children:not(.no-mobile-dropdown) > .sub-menu {
        overflow: visible;
    }
    .menu-item-has-children.active > .sub-menu {
        max-height: 800px;
        padding: 8px 0;
    }

    .sub-menu a {
        padding: 12px 30px 12px 50px;
        font-size: 13px;
    }

    .mega-menu {
        min-width: auto;
        padding: 0;
    }

    .mega-menu-wrapper {
        flex-direction: column;
        gap: 0;
    }

    .sub-menu-section {
        border-bottom: 1px solid #E5E7EB;
        padding: 10px 0;
    }

    .sub-menu-section:last-child {
        border-bottom: none;
    }

    .sub-menu-section a {
        padding: 12px 30px 12px 50px;
    }

    .menu-item-has-children > a::after {
        margin-left: auto;
    }

    /* 모바일에서 부가서비스는 드롭다운 화살표 숨김 */
    .no-mobile-dropdown > a::after {
        display: none;
    }

    /* Mobile 버튼 스타일 */
    .btn-login,
    .btn-signup {
        padding: 0;
        background: none;
        border: none;
        color: #6B7280;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
    }

    .btn-login:hover,
    .btn-signup:hover {
        color: var(--primary-color);
        transform: none;
        box-shadow: none;
    }

    .btn-dashboard {
        padding: 0;
        background: none;
        border: none;
        color: #6B7280;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
    }

    .btn-dashboard:hover {
        color: var(--primary-color);
    }

    .btn-dashboard svg {
        display: none;
    }

    .user-menu {
        display: flex;
        gap: 16px;
        align-items: center;
    }

    .user-menu-toggle {
        padding: 0;
        background: none;
        border: none;
        color: #6B7280;
        font-size: 14px;
        font-weight: 500;
    }

    .user-menu-toggle svg {
        display: none;
    }

    .user-menu-toggle:hover {
        color: var(--primary-color);
    }

    .user-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        border-radius: 0;
        margin: 0;
        padding: 0;
        display: flex;
        gap: 16px;
    }

    .user-dropdown li {
        margin: 0;
    }

    .user-dropdown a {
        padding: 0;
        background: none;
        color: #6B7280;
        font-size: 14px;
        font-weight: 500;
    }

    .user-dropdown a:hover {
        background: none;
        color: var(--primary-color);
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 32px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* ===================================
   8. Utility Classes
=================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }