/**
 * IT Platform 테마 - 메인 스타일시트
 * 라이트 미니멀 디자인
 *
 * @package it-hp
 */

/* ========================================
   CSS 변수 정의
   ======================================== */
:root {
    /* 색상 팔레트 */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #1e293b;
    --accent-color: #10b981;

    /* 배경색 */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;

    /* 텍스트 색상 */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* 보더 */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* 그림자 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* 간격 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* 폰트 */
    --font-sans: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* 둥근 모서리 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* 트랜지션 */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

/* ========================================
   기본 리셋 및 타이포그래피
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   헤더 / 네비게이션
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-white);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    padding: var(--spacing-sm) 0;
}

.navbar-brand {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.navbar-brand i {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm) !important;
    transition: color var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--spacing-sm);
    right: var(--spacing-sm);
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

.navbar-toggler {
    border: none;
    padding: var(--spacing-xs);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ========================================
   Hero 섹션
   ======================================== */
.hero {
    padding: 140px 0 80px;
    background-color: var(--bg-light);
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    margin-bottom: var(--spacing-md);
}

.hero h1 span {
    color: var(--primary-color);
}

.hero p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ========================================
   버튼 스타일
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 12px 24px;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================================
   섹션 공통
   ======================================== */
.section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    margin-bottom: var(--spacing-xl);
}

.section-header h2 {
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    font-size: var(--font-size-lg);
    max-width: 600px;
    margin: 0 auto;
}

.section-alt {
    background-color: var(--bg-light);
}

/* ========================================
   서비스 카드
   ======================================== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.service-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.service-card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-xs);
}

.service-card p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.service-card .learn-more {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.service-card .learn-more:hover {
    gap: 8px;
}

/* ========================================
   특징/장점 섹션
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.feature-item {
    text-align: center;
    padding: var(--spacing-md);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto var(--spacing-md);
}

.feature-item h4 {
    margin-bottom: var(--spacing-xs);
}

.feature-item p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ========================================
   문의 폼 섹션
   ======================================== */
.section-contact {
    background-color: var(--bg-light);
}

.contact-form-wrapper {
    background-color: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.form-label i {
    color: var(--primary-color);
    margin-right: 4px;
}

.form-label .required {
    color: #ef4444;
}

.form-control,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-white);
    transition: border-color var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   푸터
   ======================================== */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer h3 {
    color: white;
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
}

.footer h4 {
    color: white;
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-sm);
}

.footer p {
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.footer-brand p {
    font-size: var(--font-size-sm);
}

.footer-contact p i {
    color: var(--primary-light);
    margin-right: 8px;
    width: 20px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: var(--spacing-lg) 0;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-sm);
    margin: 0;
}

/* ========================================
   CTA 버튼 (고정)
   ======================================== */
.cta-buttons {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    color: white;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.cta-btn span {
    display: none;
}

.cta-btn:hover {
    transform: scale(1.1);
    color: white;
}

.cta-btn.apply {
    background-color: var(--primary-color);
}

.cta-btn.kakao {
    background-color: #fee500;
    color: #3c1e1e;
}

.cta-btn.kakao:hover {
    color: #3c1e1e;
}

.cta-btn.tel {
    background-color: var(--accent-color);
}

/* Back to Top */
.btn-back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--text-muted);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    z-index: 998;
}

.btn-back-to-top:hover {
    background-color: var(--primary-color);
}

/* ========================================
   페이지 헤더 (서브페이지)
   ======================================== */
.page-header {
    padding: 120px 0 60px;
    background-color: var(--bg-light);
    text-align: center;
}

.page-header h1 {
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    font-size: var(--font-size-lg);
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: var(--spacing-sm) 0;
    margin: 0;
    font-size: var(--font-size-sm);
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li + li::before {
    content: '/';
    margin: 0 var(--spacing-xs);
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* ========================================
   애니메이션
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   반응형 - 태블릿
   ======================================== */
@media (max-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   반응형 - 모바일
   ======================================== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }

    .footer .row > div {
        margin-bottom: var(--spacing-lg);
    }

    .cta-buttons {
        bottom: 80px;
    }

    .cta-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: var(--spacing-xl) 0;
    }

    .contact-form-wrapper {
        padding: var(--spacing-md);
    }

    .cta-buttons {
        right: 10px;
    }
}

/* ========================================
   기술 스택 뱃지
   ======================================== */
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.tech-badge:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.tech-badge i {
    font-size: 1rem;
    color: var(--primary-color);
}

.tech-badge:hover i {
    color: #fff;
}

/* ========================================
   체크박스 그룹
   ======================================== */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkbox-label:hover {
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + span,
.checkbox-label:has(input:checked) {
    color: var(--primary-color);
    font-weight: 600;
}

/* ========================================
   견적 계산기 스타일
   ======================================== */
.calculator-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.calculator-section h4 {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-primary);
}

.calc-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.calc-row:last-child {
    border-bottom: none;
}

.calc-label {
    flex: 0 0 150px;
    font-weight: 500;
    color: var(--text-secondary);
}

.calc-input {
    flex: 1;
}

.calc-input input,
.calc-input select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.calc-price {
    flex: 0 0 120px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

.calc-total {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
}

.calc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

.calc-total-row.final {
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    border-top: 2px solid var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.calc-total-row.final .price {
    color: var(--primary-color);
}

/* 부품 선택 카드 */
.part-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.part-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.part-card.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.part-card .part-name {
    font-weight: 600;
    color: var(--text-primary);
}

.part-card .part-spec {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.part-card .part-price {
    font-weight: 600;
    color: var(--primary-color);
}

/* 수량 입력 */
.qty-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-input button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.qty-input button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.qty-input input {
    width: 60px;
    text-align: center;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
    .calc-row {
        flex-wrap: wrap;
    }

    .calc-label {
        flex: 0 0 100%;
        margin-bottom: var(--spacing-xs);
    }

    .calc-input {
        flex: 1 1 60%;
    }

    .calc-price {
        flex: 0 0 35%;
    }
}
