:root {
    --color-primary: #1a4b8c;
    --color-accent:  #e8501a;
    --color-text:    #222;
    --color-muted:   #666;
    --color-border:  #ddd;
    --color-bg:      #f8f8f8;
    --radius:        6px;
    --shadow:        0 2px 8px rgba(0,0,0,.08);
    --header-height: 70px;
    --sidebar-width: 220px;
    --container-max: 1200px;
}

/* 리셋 / 박스모델 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
    color: inherit;
}

table {
    border-collapse: collapse;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

/* 반응형 컨테이너 */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Flexbox 유틸리티 */
.flex            { display: flex; }
.flex-col        { display: flex; flex-direction: column; }
.items-center    { align-items: center; }
.items-start     { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap       { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 32px; }

/* Grid 유틸리티 */
.grid   { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background-color: #143c70;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}
.btn-outline:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* 섹션 공통 타이틀 */
.section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 12px;
}

.section-desc {
    text-align: center;
    color: var(--color-muted);
    margin-bottom: 40px;
}

/* 표시/숨김 헬퍼 */
.hide-mobile { display: block; }
.show-mobile { display: none; }

/* 스크롤 애니메이션 대상 (common.js IntersectionObserver 사용)
   JS가 실행 중일 때(html.js)만 숨긴다 → JS가 늦거나 실패해도 콘텐츠가 빈 화면으로 남지 않는다 */
.js .anim-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
.js .anim-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .js .anim-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ================= 서브페이지 공통 (회사소개 등) ================= */
.page-heading {
    font-size: 1.6rem;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-text);
}

/* 회사소개 - About UTECH */
.about-page-body {
    max-width: 760px;
    margin-bottom: 48px;
}
.about-page-body p {
    color: var(--color-muted);
    line-height: 1.9;
    margin-bottom: 18px;
}
.about-page-body .about-page-closing {
    margin-top: 28px;
    padding-left: 18px;
    border-left: 3px solid var(--color-primary);
    color: var(--color-text);
    font-weight: 700;
}
.about-page-keywords-label {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 12px;
}
.about-page-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}
.about-page-keywords li {
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: .85rem;
    color: var(--color-primary);
    font-weight: 600;
}

/* 사업연혁 - 세로 타임라인 */
.timeline {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding-left: 32px;
    border-left: 2px solid var(--color-border);
}
.timeline-item {
    position: relative;
    padding-bottom: 48px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-primary);
}
.timeline-year {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 12px;
}
.timeline-events li {
    position: relative;
    padding-left: 16px;
    color: var(--color-muted);
    line-height: 1.9;
}
.timeline-events li::before {
    content: '-';
    position: absolute;
    left: 0;
}

/* 오시는 길 - 지도 / 정보 테이블 */
.map-view {
    width: 100%;
    height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
    background-color: var(--color-bg);
}
.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--color-muted);
    text-align: center;
    padding: 20px;
}

.map-address {
    font-weight: 600;
    color: var(--color-text);
}
.map-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.info-table {
    width: 100%;
}
.info-table th,
.info-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    font-size: .92rem;
}
.info-table th {
    width: 120px;
    background-color: var(--color-bg);
    color: var(--color-muted);
    font-weight: 600;
}

/* 문의하기 폼 */
.contact-form {
    max-width: 720px;
    margin: 0 auto;
}
.form-success-message {
    padding: 16px 20px;
    border-radius: var(--radius);
    background-color: #eaf3ff;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 24px;
}
.form-error-message {
    padding: 16px 20px;
    border-radius: var(--radius);
    background-color: #fdecea;
    color: #c0392b;
    font-weight: 600;
    margin-bottom: 24px;
}
.form-group {
    margin-bottom: 24px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: .92rem;
}
.form-label .required {
    color: var(--color-accent);
}
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;   /* 16px 미만이면 iOS Safari가 입력창 포커스 때 화면을 자동 확대하고 되돌리지 않는다 */
    transition: border-color .2s ease;
}
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}
.form-textarea {
    resize: vertical;
    min-height: 160px;
}
.form-error {
    margin-top: 6px;
    color: #c0392b;
    font-size: .82rem;
}
.form-checkbox-group {
    padding: 16px;
    background-color: var(--color-bg);
    border-radius: var(--radius);
}
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    cursor: pointer;
}
.form-checkbox input {
    width: 18px;
    height: 18px;
}
.form-submit {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
}
.form-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* 브레이크포인트: PC 1200px+, 태블릿 768~1199px, 모바일 767px 이하 */
@media (min-width: 768px) and (max-width: 1199px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 16px;
    }

    .timeline {
        padding-left: 24px;
    }
    .timeline-item::before {
        left: -29px;
    }
    .map-view {
        height: 280px;
    }
    /* 오시는 길 표: 고정 120px 라벨 + 긴 주소가 좁은 폰(글자 확대 포함)에서 레이아웃 폭을 화면보다 키우지 않게 */
    .info-table th {
        width: 30%;
    }
    .info-table td {
        overflow-wrap: anywhere;
    }
}
