﻿/* 페이지 전체 컨테이너 */
.contact-page {
    font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    width: 800px;
    margin: 40px auto;
    padding: 40px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 3;
}

/* 페이지 헤더 */
.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

    .contact-header .contact-title {
        font-size: 32px;
        color: #13547a;
        font-weight: 650;
        margin: 10px 0;
    }

        .contact-header .contact-title .text-yellow {
            color: #FFD966;
        }

.contact-description {
    font-size: 15px;
    font-weight: 700;
    color: #202020;
    line-height: 1.5em;
    text-align: left;
}

/* 폼 레이아웃 */
.contact-form .form-main-content {
    display: flex;
    flex-direction: column;
}

.contact-form .form-sections {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
    max-width: 1100px;
}

/* 폼 요소 */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.form-control {
    width: calc(100% - 30px);
    padding: 12px 15px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .form-control:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    }

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* 커스텀 체크박스 스타일 */
.form-check {
    position: relative;
    margin-top: 15px;
}

.form-check-label {
    display: inline-block;
    position: relative;
    cursor: pointer;
    padding-left: 30px; /* 커스텀 체크박스 공간 확보 */
    font-weight: 600;
    color: #555;
    line-height: 1.5;
    user-select: none; /* 텍스트 선택 방지 */
}

    .form-check-label b {
        font-weight: 700;
        color: #333;
    }

/* 기존 input 숨기기 (접근성을 위해 display:none 대신 사용) */
.form-check-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* 커스텀 체크박스 박스 (::before) */
.form-check-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s;
}

/* 체크했을 때 박스 스타일 변경 */
.form-check-input:checked + .form-check-label::before {
    background-color: #13547a;
    border-color: #13547a;
}

/* 체크마크 아이콘 (::after) */
.form-check-label::after {
    content: '';
    position: absolute;
    display: none; /* 기본 상태에서는 숨김 */
}

/* 체크했을 때 체크마크 보여주기 */
.form-check-input:checked + .form-check-label::after {
    display: block;
    left: 6px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.form-check a {
    text-decoration: none;
    color: #13547a;
}

    .form-check a:hover {
        text-decoration: underline;
        color: #002e52;
    }

/* 제출 버튼 */
.submit-button-container {
    text-align: center;
    margin-top: 30px;
}

.btn-submit {
    width: 100%;
    max-width: 130px;
    padding: 10px;
    font-size: 22px;
    font-weight: 500;
    color: #fff;
    background-color: #13547a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-submit:hover {
        background-color: #002e52;
    }

    .btn-submit:active {
        transform: translateY(1px);
    }

/* 유효성 검사 에러 스타일 */
.form-control.input-validation-error {
    border-color: #e74a3b;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.field-validation-error {
    color: #e74a3b;
    font-size: 0.875rem;
    display: block;
    padding-top: 4px;
}

@media (max-width: 768px) {
    /* ============================================= */
    /* 페이지 전체 컨테이너 (모바일)                   */
    /* ============================================= */
    .contact-page {
        width: 100%;
        margin: 20px 0;
        padding: 20px;
        border: none;
        box-shadow: none;
        box-sizing: border-box;
    }

    /* ============================================= */
    /* 페이지 헤더 (모바일)                            */
    /* ============================================= */
    .contact-header {
        margin-bottom: 30px;
    }

        .contact-header .contact-title {
            font-size: 26px;
        }

    .contact-description {
        font-size: 14px;
    }

    /* ============================================= */
    /* 폼 레이아웃 및 요소 (모바일)                    */
    /* ============================================= */
    .form-section {
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 1.25rem; /* 20px */
        margin-bottom: 15px;
        padding-bottom: 8px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-control {
        width: 100%;
        padding: 12px;
        box-sizing: border-box; /* 패딩을 너비에 포함 */
    }

    textarea.form-control {
        min-height: 150px;
    }

    /* ============================================= */
    /* 커스텀 체크박스 (모바일)                        */
    /* ============================================= */
    .form-check-label {
        font-size: 14px;
        padding-left: 28px;
    }

        .form-check-label::before {
            width: 16px;
            height: 16px;
        }

        .form-check-label::after {
            left: 5px;
            top: 4px;
            width: 4px;
            height: 8px;
            border-width: 0 2px 2px 0;
        }

    /* ============================================= */
    /* 제출 버튼 및 모달 (모바일)                      */
    /* ============================================= */
    .btn-submit {
        width: 100%;
        max-width: 100px;
        font-size: 18px;
    }

    .modal-content {
        width: 90%;
        padding: 20px;
    }

    .modal-header h4 {
        font-size: 20px;
    }

    .modal-body p {
        font-size: 14px;
    }

    .btn-close-modal {
        padding: 10px 20px;
        font-size: 16px;
    }
}