:root {
    --primary-color: #ff6b35;
    --secondary-color: #4ecdc4;
    --accent-color: #95e1d3;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #0087c1;
    color: white;
    padding: 10px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
}

.logo-img {
    height: 90px;
    width: 90px;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
}

nav.main-nav > ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

nav.main-nav a:hover {
    color: var(--primary-color);
}

nav.main-nav a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

nav.main-nav a:hover::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-toggle i,
.dropdown.hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 10px;
    padding: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.dropdown:hover .dropdown-menu,
.dropdown.hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* 드롭다운 호버 영역 확장 */
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 20px;
    background: transparent;
    z-index: 999;
}

.dropdown-menu li {
    list-style: none;
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: var(--light-color);
    color: var(--primary-color);
    padding-left: 25px;
}

.dropdown-menu li:first-child a {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu li:last-child a {
    border-radius: 0 0 8px 8px;
    border-bottom: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
    padding: 10px;
    z-index: 1001;
}

.hero {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 1s;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s 0.2s both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    animation: fadeInUp 1s 0.4s both;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

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

.section2 {
    padding: 5px 0;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 18px;
    color: #666;
}

.grid {
    display: grid;
    gap: 30px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* 블로그 섹션의 이미지를 정사각형으로 */
.blog .card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.card-text {
    color: #666;
    margin-bottom: 15px;
}

.feature-icon {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px auto;
    font-size: 24px;
    color: white;
    overflow: hidden;
}

@media (max-width: 768px) {
    .feature-icon {
        width: 320px;
        height: 320px;
        border-radius: 15px;
        margin: 0 auto 20px auto;
    }
}

@media (max-width: 480px) {
    .feature-icon {
        width: 280px;
        height: 280px;
        border-radius: 12px;
    }
}

footer {
    background: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
}

.footer-section p,
.footer-section ul {
    line-height: 1.8;
}

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #aaa;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: #999;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb .active {
    color: #666;
}

/* Swiper Pagination Styles */
.swiper-pagination-bullet {
    background: #0087c1 !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: #0087c1 !important;
    opacity: 1;
}

/* 위로가기 버튼 - 화면 하단 고정 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0087C1;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

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

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

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

/* PC 메뉴바 기본 스타일 */
.mobile-menu-toggle {
    display: none;
}

nav.main-nav {
    display: block;
}

nav.main-nav > ul {
    display: flex;
    list-style: none;
    gap: 40px;
    flex-direction: row;
    padding: 0;
    margin: 0;
}

@media (max-width: 768px) {
    /* 전체 페이지 모바일 최적화 */
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 15px;
        max-width: 100%;
    }

    /* 모바일에서 햄버거 버튼 표시 */
    .mobile-menu-toggle {
        display: block !important;
        position: relative;
        z-index: 10001;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: var(--text-color);
        padding: 15px;
        min-width: 50px;
        min-height: 50px;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* 모바일에서 기본 네비게이션 숨김 */
    nav.main-nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        box-shadow: var(--shadow);
        z-index: 10000;
        border: 1px solid #ddd;
        max-width: 100%;
    }

    /* 모바일 메뉴가 열렸을 때만 표시 */
    nav.main-nav.mobile-open {
        display: block !important;
    }

    nav.main-nav ul {
        display: flex !important;
        flex-direction: column !important;
        padding: 15px !important;
        gap: 5px !important;
        margin: 0 !important;
        list-style: none !important;
        width: 100%;
        box-sizing: border-box;
    }

    nav.main-nav li {
        width: 100%;
        display: block;
    }

    nav.main-nav a {
        display: block;
        width: 100%;
        padding: 12px 15px;
        text-align: left;
        color: var(--text-color);
        text-decoration: none;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    nav.main-nav a:hover {
        color: var(--primary-color);
        background: #f8f9fa;
        padding-left: 20px;
    }

    nav.main-nav li:last-child a {
        border-bottom: none;
    }

    /* 모바일 드롭다운 개선 - 기본적으로 숨김 */
    .dropdown-menu {
        position: static !important;
        box-shadow: none !important;
        background: #f8f9fa !important;
        margin: 0 !important;
        border-radius: 4px;
        display: none !important;
        padding: 5px 0;
        width: 100% !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: none !important;
        pointer-events: none !important;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    /* 모바일에서는 클릭만 지원 (호버 비활성화) */
    .dropdown.active .dropdown-menu,
    .dropdown.mobile-open .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        max-height: 500px;
    }

    .dropdown-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .dropdown-menu a {
        display: block !important;
        padding: 8px 20px !important;
        font-size: 14px !important;
        color: #666 !important;
        text-decoration: none !important;
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
        box-sizing: border-box;
    }

    .dropdown-menu a:hover {
        background: #e9ecef !important;
        color: var(--primary-color) !important;
        padding-left: 25px !important;
    }

    .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    /* 드롭다운 토글 아이콘 개선 */
    .dropdown-toggle i {
        transition: transform 0.3s ease;
    }

    .dropdown.active .dropdown-toggle i,
    .dropdown.mobile-open .dropdown-toggle i {
        transform: rotate(180deg);
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

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

    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }
}
