/* =============================================
   근영방수 - 공통 CSS
   ============================================= */

/* ========== CSS Variables ========== */
:root {
    /* Primary Colors */
    --primary-blue: #0047AB;
    --primary-blue-dark: #003580;
    --primary-blue-light: #1a5fc9;
    --primary-purple: #6B46C1;
    --primary-green: #059669;
    --primary-black: #000000;
    
    /* Accent */
    --pantone-yellow: #FFD100;
    --pantone-yellow-dark: #e6bc00;
    
    /* Neutrals */
    --white: #FFFFFF;
    --light-gray: #F8F8F8;
    --medium-gray: #E5E5E5;
    --dark-gray: #666666;
    --text-black: #1a1a1a;
    --text-muted: #888888;
    --footer-dark: #1a1a1a;
    --pantone-blue: #0047AB;
    /* Status Colors */
    --success: #059669;
    --warning: #F59E0B;
    --error: #DC2626;
    --info: #3B82F6;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 15px 40px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;
    
    /* Layout */
    --header-height: 80px;
    --header-height-scrolled: 64px;
    --max-width: 1400px;
    --max-width-wide: 1400px;
    
    /* Current Theme (can be changed dynamically) */
    --current-primary: var(--primary-blue);
    --current-primary-dark: var(--primary-blue-dark);
}

/* ========== Reset & Base ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    word-break: keep-all;
    color: var(--text-black);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-black);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--current-primary);
}

strong, b {
    font-weight: 700;
}

/* ========== Lists ========== */
ul, ol {
    list-style: none;
}

/* ========== Images ========== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== Buttons ========== */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

button:focus-visible {
    outline: 2px solid var(--current-primary);
    outline-offset: 2px;
}

/* ========== Form Elements ========== */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--current-primary);
    box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* ========== Accessibility ========== */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--current-primary);
    color: var(--white);
    padding: 1rem 2rem;
    z-index: var(--z-toast);
    font-weight: 600;
    transition: top var(--transition-normal);
}

.skip-nav:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== Progress Bar ========== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: calc(var(--z-fixed) + 10);
    pointer-events: none;
}

.progress-fill {
    height: 100%;
    background: var(--pantone-yellow);
    width: 0%;
    transition: width 0.1s linear;
}

/* ========== Layout Utilities ========== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.container-wide {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========== Section Base ========== */
.section {
    padding: 6rem 2rem;
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-black);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto;
}

.section-divider {
    height: 2px;
    background: var(--medium-gray);
    margin: 4rem 0;
}

/* ========== Button Components ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--pantone-yellow);
    color: var(--text-black);
    border-color: var(--pantone-yellow);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-black);
}

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

.btn-secondary:hover {
    background: var(--current-primary-dark);
    border-color: var(--current-primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--current-primary);
    border-color: var(--current-primary);
}

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

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

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

.btn-lg {
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ========== Card Components ========== */
.card {
    background: var(--white);
    border: 2px solid var(--medium-gray);
    transition: all var(--transition-normal);
}

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

.card-body {
    padding: 2rem;
}

/* ========== Badge Components ========== */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid;
}

.badge-primary {
    background: var(--current-primary);
    color: var(--white);
    border-color: var(--current-primary);
}

.badge-outline {
    background: transparent;
    color: var(--current-primary);
    border-color: var(--current-primary);
}

.badge-yellow {
    background: var(--pantone-yellow);
    color: var(--text-black);
    border-color: var(--pantone-yellow);
}

/* ========== Text Utilities ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--current-primary); }
.text-yellow { color: var(--pantone-yellow); }
.text-muted { color: var(--dark-gray); }
.text-white { color: var(--white); }

.font-gmarket { font-family: 'Gmarket Sans', sans-serif; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

/* ========== Spacing Utilities ========== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* ========== Display Utilities ========== */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-column {
    flex-direction: column;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* ========== Background Utilities ========== */
.bg-white { background-color: var(--white); }
.bg-light { background-color: var(--light-gray); }
.bg-primary { background-color: var(--current-primary); }
.bg-dark { background-color: var(--footer-dark); }

/* ========== Animation Keyframes ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Animation Classes */
.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.5s ease forwards; }
.animate-slideInRight { animation: slideInRight 0.5s ease forwards; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-bounce { animation: bounce 2s ease infinite; }

/* ========== Responsive Breakpoints ========== */
/* Mobile First Approach */

/* Tablet: 768px and up */
@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.75rem; }
    
    .section {
        padding: 5rem 2rem;
    }
}

/* Desktop: 1024px and up */
@media (min-width: 1024px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.75rem; }
    
    .section {
        padding: 6rem 2rem;
    }
}

/* Large Desktop: 1200px and up */
@media (min-width: 1200px) {
    .container,
    .section-container {
        padding: 0;
    }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .section {
        padding: 4rem 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .container,
    .container-wide {
        padding: 0 1rem;
    }
}

/* Small Mobile: 480px and below */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* ========== Print Styles ========== */
@media print {
    .progress-bar,
    .skip-nav,
    .floating-buttons {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
    
    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
}



/* Section 공통 모바일 수정 */
@media (max-width: 768px) {
    .section {
        padding: 3.5rem 1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        line-height: 1.3;
        word-break: keep-all;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 0.75rem;
    }
    
    .section-title {
        font-size: 1.35rem;
    }
}

/* 버튼 터치 영역 확보 */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* =========================================
   Type Link Section (사례→유형 내부 링크)
   ========================================= */
.type-link-section {
    padding: 2rem 1.25rem 3rem;
}

.type-link-container {
    max-width: 880px;
    margin: 0 auto;
}

.type-link-box {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 2rem;
    background: #e6f0ff;
    border: 1px solid rgba(0, 71, 171, 0.12);
    border-radius: 16px;
    transition: box-shadow 0.3s ease;
}

.type-link-box:hover {
    box-shadow: 0 4px 16px rgba(0, 71, 171, 0.1);
}

.type-link-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.type-link-text {
    flex: 1;
    font-size: 0.9375rem;
    color: #1F2937;
    line-height: 1.6;
}

.type-link-text strong {
    color: #0047AB;
}

.type-link-text p {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #4B5563;
}

.type-link-btn {
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    background: #0047AB;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.type-link-btn:hover {
    background: #003380;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.25);
}

.type-link-btn-outline {
    background: transparent;
    color: #0047AB;
    border: 1px solid #0047AB;
}

.type-link-btn-outline:hover {
    background: #0047AB;
    color: #fff;
}

.type-link-methods {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.type-link-method {
    margin-top: 0.75rem;
    background: #F9FAFB;
    border-color: #E5E7EB;
}

.type-link-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .type-link-box {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }

    .type-link-btn {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
    }

    .type-link-methods {
        flex-direction: column;
        width: 100%;
    }
}

/* =========================================
   Method → Cases Link Section
   ========================================= */
.method-cases-link {
    padding: 3rem 0;
}

.method-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.method-case-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-decoration: none;
    color: #1F2937;
    transition: all 0.2s ease;
}

.method-case-card:hover {
    border-color: #0047AB;
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.1);
    transform: translateY(-2px);
}

.method-case-badge {
    flex-shrink: 0;
    padding: 0.25rem 0.625rem;
    background: #e6f0ff;
    color: #0047AB;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

.method-case-card strong {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.method-case-arrow {
    flex-shrink: 0;
    color: #9CA3AF;
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.method-case-card:hover .method-case-arrow {
    color: #0047AB;
    transform: translateX(3px);
}

@media (max-width: 640px) {
    .method-cases-grid {
        grid-template-columns: 1fr;
    }
}
