/* ===================== CONTACT PAGE ===================== */

/* Hero */
.contact-hero {
    padding: 80px 24px 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-white) 100%);
}

/* Layout: 2 columns */
.contact-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 48px;
    align-items: start;
}

/* ===================== LEFT INFO ===================== */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: calc(var(--nav-height) + 24px);
}

.info-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.35s ease forwards;
}

.info-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-bg);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-list li {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.check-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--primary);
}

.contact-channels {
    background: var(--primary-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid rgba(255, 122, 89, 0.15);
}

.contact-channels h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
    margin-bottom: 6px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
}

.channel-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(4px);
}

.channel-link:last-child {
    margin-bottom: 0;
}

.channel-icon {
    font-size: 18px;
}

/* ===================== RIGHT FORM ===================== */
.contact-form-wrap {
    min-width: 0;
}

.contact-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 44px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.form-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.form-section-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.65;
}

/* ===================== TYPE TABS ===================== */
.type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--bg);
    padding: 6px;
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}

.type-tab {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.type-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.6);
}

.type-tab.active {
    background: var(--bg-white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ===================== FORM ELEMENTS ===================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}

.required {
    color: var(--primary);
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: all 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-white);
}

.form-input.is-error {
    border-color: #e53e3e;
}

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

textarea.form-input {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

.field-error {
    display: block;
    font-size: 12px;
    color: #e53e3e;
    margin-top: 5px;
}

/* ===================== CONDITIONAL FIELDS ===================== */
.conditional-fields {
    overflow: hidden;
    animation: fadeUp 0.3s ease;
}

/* ===================== SUBMIT BUTTON ===================== */
.form-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    margin-top: 4px;
    gap: 10px;
    position: relative;
}

.form-submit .btn-arrow {
    transition: transform 0.25s ease;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.form-submit:hover .btn-arrow {
    transform: translateX(5px);
}

/* ===================== ALERT ===================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-fail {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: 320px 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-info {
        position: static;
        /* 手機版把 info 放到表單下面，或直接隱藏，這裡選擇放在 form 下 */
        order: 2;
    }

    .contact-form-wrap {
        order: 1;
    }

    .contact-card {
        padding: 28px 20px;
    }

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

    .type-tabs {
        gap: 6px;
    }

    .type-tab {
        padding: 9px 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .type-tabs {
        flex-direction: column;
    }

    .type-tab {
        flex: none;
        text-align: left;
    }
}
