/* ===========================================
   기본 설정 및 변수
   =========================================== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #22c55e;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --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);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===========================================
   헤더
   =========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    max-width: 480px;
    margin: 0 auto;
}

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

.logo-img {
    height: 40px;
    width: auto;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
}

/* 햄버거 메뉴 버튼 */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.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-nav {
    display: block;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin: 0 12px;
    border-radius: 0 0 16px 16px;
}

.mobile-nav.active {
    max-height: 300px;
    transition: max-height 0.4s ease-in;
}

.mobile-nav ul {
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-nav.active ul {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav li {
    border-bottom: 1px solid var(--border-color);
}

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

.mobile-nav li:last-child a {
    border-radius: 0 0 16px 16px;
}

.mobile-nav a {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 15px;
    transition: background 0.2s;
}

.mobile-nav a:hover {
    background: var(--background);
}

.mobile-nav .phone-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* ===========================================
   히어로 섹션
   =========================================== */
.hero {
    padding: 80px 20px 40px;
    margin: 60px auto 0;
    max-width: calc(100% - 24px);
    background: linear-gradient(-45deg, #1e3a8a, #3b82f6, #0ea5e9, #2563eb, #1d4ed8, #0284c7);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    color: white;
    text-align: center;
    border-radius: 20px;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 100%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-content h1 {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 12px;
}

.hero-content h1 strong {
    font-weight: 700;
}

.hero-content p {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.hero .btn {
    margin: 6px 4px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* ===========================================
   버튼
   =========================================== */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-full {
    width: 100%;
    display: block;
}

/* ===========================================
   섹션 공통
   =========================================== */
section {
    padding: 48px 20px;
    max-width: 480px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===========================================
   카테고리 그리드
   =========================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-card p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.category-price {
    display: inline-block;
    background: var(--background);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

/* ===========================================
   이용방법
   =========================================== */
.how-it-works {
    background: var(--surface);
}

.steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
}

.step {
    flex: 0 0 calc(50% - 20px);
    text-align: center;
    padding: 16px 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 12px;
}

.step h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.step p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-arrow {
    display: none;
}

/* ===========================================
   장점 섹션
   =========================================== */
.benefits {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    max-width: none;
    padding: 48px 20px;
}

.benefits .section-header h2 {
    color: white;
}

.benefit-list {
    max-width: 480px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.benefit-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.benefit-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.benefit-content p {
    font-size: 13px;
    opacity: 0.9;
}

/* ===========================================
   문의 폼
   =========================================== */
.inquiry {
    background: var(--surface);
}

.inquiry-form {
    background: var(--background);
    padding: 24px 20px;
    border-radius: var(--radius-lg);
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px; /* iOS 줌 방지 */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group.half {
    flex: 1;
}

/* 이메일 입력 그룹 */
.email-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.email-input-group input[type="text"] {
    flex: 1;
    min-width: 100px;
}

.email-input-group select {
    flex: 0 0 auto;
    width: auto;
    min-width: 100px;
}

.email-at {
    color: var(--text-secondary);
    font-weight: 500;
}

/* 체크박스 스타일 */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    flex: 1;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.privacy-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

/* ===========================================
   푸터
   =========================================== */
.footer {
    background: #1e293b;
    color: white;
    padding: 40px 20px 100px; /* 플로팅 버튼 공간 확보 */
}

.footer-content {
    max-width: 480px;
    margin: 0 auto;
}

.footer-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.footer-info > p {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 16px;
}

.contact-info {
    margin-bottom: 24px;
}

.contact-info p {
    font-size: 14px;
    margin-bottom: 6px;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-business {
    font-size: 12px;
    opacity: 0.6;
    line-height: 1.8;
}

.footer-bottom {
    max-width: 480px;
    margin: 24px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 12px;
    opacity: 0.6;
}

/* ===========================================
   플로팅 버튼
   =========================================== */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-btn.phone {
    background: var(--success-color);
    color: white;
}

.floating-btn.kakao {
    background: #fee500;
    color: #3c1e1e;
}

.floating-btn.kakao .kakao-icon {
    width: 45px;
    height: auto;
}

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

.floating-btn.naver-blog {
    background: #03c75a;
    color: white;
    font-weight: 700;
    font-size: 22px;
}

.floating-btn.naver-blog .blog-icon {
    width: 45px;
    height: auto;
}

/* ===========================================
   모달
   =========================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-content .btn {
    margin: 20px;
    width: calc(100% - 40px);
}

/* 성공 모달 */
.text-center {
    text-align: center;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.small-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 16px;
}

/* ===========================================
   반응형 (태블릿 이상)
   =========================================== */
@media (min-width: 768px) {
    .header-inner {
        max-width: 1200px;
        padding: 16px 40px;
        display: flex;
        align-items: center;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .mobile-nav {
        display: flex !important;
        position: static;
        border: none;
        background: transparent;
        flex: 1;
        justify-content: center;
        max-height: none;
        overflow: visible;
        margin: 0;
        border-radius: 0;
    }
    
    .mobile-nav ul {
        display: flex;
        gap: 32px;
        padding: 0;
        justify-content: center;
        opacity: 1;
        transform: none;
    }
    
    .mobile-nav li {
        border: none;
    }
    
    .mobile-nav a {
        padding: 8px 0;
    }
    
    .hero {
        padding: 120px 40px 60px;
        margin: 80px auto 0;
        max-width: calc(100% - 48px);
        border-radius: 28px;
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    section {
        max-width: 1200px;
        padding: 80px 40px;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .steps {
        flex-wrap: nowrap;
    }
    
    .step {
        flex: 1;
    }
    
    .step-arrow {
        display: flex;
        align-items: center;
        color: var(--text-secondary);
        font-size: 24px;
    }
    
    .benefits {
        padding: 80px 40px;
    }
    
    .benefit-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 800px;
    }
    
    .benefit-item {
        margin-bottom: 0;
    }
    
    .inquiry-form {
        max-width: 600px;
        margin: 0 auto;
        padding: 40px;
    }
    
    .footer-content {
        max-width: 1200px;
        display: grid;
        grid-template-columns: 2fr 1fr 2fr;
        gap: 40px;
    }
    
    .footer {
        padding-bottom: 40px;
    }
    
    .floating-buttons {
        bottom: 40px;
        right: 40px;
    }
}

/* ===========================================
   유틸리티
   =========================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 로딩 상태 */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
