/* 문의하기 서브페이지 풀-위드 트렌디 오픈 그룹 레이아웃 (문체부 & KBS 프로젝트 규격) */

.page-contact {
    min-height: 100%;
    padding-bottom: 140px;
    background-color: var(--sub-white);
    color: var(--sub-black);
}

/* about/forum과 같은 패턴 — 히어로 자체 하단 여백은 0으로 두고,
   바로 이어지는 안내 문구 쪽에서 간격을 관리한다. */
.page-contact .sub-hero.sub-pad--hero {
    padding-bottom: 0;
}

/* 다른 서브페이지와 동일하게 위/아래 고정 40px로 통일. */
.page-contact .sub-hero__rule {
    margin: 40px 0;
}

.contact-intro {
    padding: 0 0 40px;
    position: relative;
}

/* =========================================================
    OPEN GROUP-BASED FORM SECTION
========================================================= */

.contact-layout {
    width: 100%;
}

.contact-form-section {
    width: 100%;
}

.form-group-block {
    width: 100%;
}

.form-group-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 2px solid #111827;
}

.form-group-block__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.form-group-block__required-note {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.form-group-block__required-note span {
    color: #2563eb;
    font-weight: 700;
}

.form-group-block__body {
    display: flex;
    flex-direction: column;
}

/* =========================================================
    UNDERLINE LINE-BASED FORM INPUT (박스 형태 파괴 -> 하단 라인 스타일)
========================================================= */

.contact-form {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid #f3f4f6;
}

.form-row--top {
    align-items: start;
}

.form-label {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    letter-spacing: -0.01em;
}

.form-label .required-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #2563eb;
}

.form-field {
    width: 100%;
}

/* 박스 상자 형태가 아닌 세련된 하단 언더라인 입력 필드 */
.form-control {
    font-family: inherit;
    width: 100%;
    padding: 12px 4px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #111827;
    background-color: transparent;
    border: none;
    border-bottom: 1.5px solid #d1d5db;
    border-radius: 0;
    transition: all 0.25s ease;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control::placeholder {
    font-family: inherit;
    font-size: 15px;
    color: #9ca3af;
    font-weight: 400;
    opacity: 1;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* 자동완성(Autofill) 시 배경색 및 폰트 유지 */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #111827;
    -webkit-box-shadow: 0 0 0px 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
}

.form-control:hover {
    border-bottom-color: #6b7280;
    background-color: transparent;
}

.form-control:focus {
    background-color: transparent;
    border-bottom: 2px solid #2563eb;
    box-shadow: none;
}

textarea.form-control {
    font-family: inherit;
    resize: none;
    min-height: 160px;
    line-height: 1.75;
    padding-top: 8px;
    border-bottom: 1.5px solid #d1d5db;
}

textarea.form-control::placeholder {
    font-family: inherit;
    opacity: 1;
}

textarea.form-control:focus {
    border-bottom: 2px solid #2563eb;
}

/* =========================================================
    ACTION & ALERT AREA
========================================================= */

.form-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 48px;
    padding-top: 20px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 52px;
    background-color: #111827;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: 1px solid #111827;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.12);
}

.btn-submit:hover {
    background-color: #1f2937;
    border-color: #1f2937;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.22);
    transform: translateY(-2px);
}

.btn-submit i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.btn-submit:hover i {
    transform: translateX(4px);
}

.form-alert {
    padding: 18px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 36px;
    display: none;
}

.form-alert--success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-alert--error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* 스팸 방지용 honeypot 필드 — 실사용자에게는 보이지 않고 탭 이동에서도 제외한다 */
.form-field--trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* =========================================================
    RESPONSIVE RULES
========================================================= */

/* 320px 및 극소형 모바일 기기 (Fold 등) 대응 */

/* 태블릿 (~1320px) */
@media (max-width: 1320px) {
    .contact-intro {
        padding: 0 0 30px;
    }

    .form-row {
        grid-template-columns: 180px 1fr;
    }

    .form-group-block__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 20px 0;
    }

    .form-control {
        font-size: 15px;
        padding: 10px 2px;
    }

    .form-control::placeholder {
        font-size: 14px;
    }

    .btn-submit {
        width: 100%;
    }
}

/* 모바일 (~500px) */
@media (max-width: 500px) {
    .form-control {
        font-size: 14px;
    }

    .form-control::placeholder {
        font-size: 13px;
    }
}
