/**
 * Trang liên hệ — một file nguồn (chỉ được include từ templates/contact.php).
 */

/* --- Section & layout --- */
.contact-section {
    padding: 20px 0 20px;
    background-color: #f8f9fa;
}

.contact-section .hl-container,
.contact-section .hlh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.contact-section .page-title {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* --- Cards --- */
.contact-form-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 35px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    margin-bottom: 0;
}

.contact-form-wrapper:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.contact-info-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 35px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: box-shadow 0.3s ease;
}

.contact-info-wrapper:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.contact-form-wrapper h2,
.contact-info-wrapper h2 {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Form (#contactForm) --- */
#contactForm {
    margin-top: 20px;
}

#contactForm .mb-3 {
    margin-bottom: 25px !important;
}

#contactForm .form-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.3px;
}

#contactForm .form-label .text-danger {
    color: #dc3545;
    font-weight: 700;
    margin-left: 3px;
}

#contactForm .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#contactForm .form-control:focus {
    color: #333;
    background-color: #fff;
    border-color: #1d3557;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(29, 53, 87, 0.25);
}

#contactForm .form-control::placeholder {
    color: #999;
    opacity: 1;
    font-style: italic;
    transition: opacity 0.3s ease;
}

#contactForm .form-control:focus::placeholder {
    opacity: 0.6;
}

#contactForm textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

#contactForm .form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6 .4.4.4-.4m0 4.8-.4-.4-.4.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#contactForm .form-control.is-valid {
    border-color: #28a745;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.98-.98-.98-.98-.98.98.98.98zm1.98-1.98L4.3 4.73l.02-.02L4.3 4.73l-.02.02z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#contactForm .invalid-feedback {
    display: block !important;
    width: 100%;
    margin-top: 6px;
    font-size: 13px;
    color: #dc3545;
    padding: 0;
}

#contactForm .form-control.is-invalid + .invalid-feedback {
    display: block !important;
}

#contactForm .btn-primary {
    display: block;
    margin-top: 10px;
    margin-left: auto;
    margin-right: 0;
    width: fit-content;
    max-width: 100%;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background-color: #1d3557;
    border-color: #1d3557;
    box-shadow: 0 3px 8px rgba(29, 53, 87, 0.2);
}

#contactForm .btn-primary:hover {
    transform: translateY(-2px);
    background-color: #152a45;
    border-color: #152a45;
    box-shadow: 0 5px 15px rgba(29, 53, 87, 0.3);
}

#contactForm .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(29, 53, 87, 0.2);
}

#contactForm .btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(29, 53, 87, 0.5);
}

#contactForm .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- Cột thông tin liên hệ --- */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.contact-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contact-info-item .contact-info-item__heading {
    flex-shrink: 0;
    margin: 0;
    padding-top: 2px;
    line-height: 1;
    font-size: 0;
}

.contact-info-item .contact-info-item__heading i {
    font-size: 1.25rem;
    color: #1d3557;
    vertical-align: middle;
}

.contact-info-item__body {
    flex: 1;
    min-width: 0;
}

.contact-info-item__body p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 0;
}

.contact-info-item__body p + p {
    margin-top: 6px;
}

.contact-info-item a {
    color: #1d3557;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.contact-info-item a:hover {
    color: #152a45;
    text-decoration: underline;
}

/* --- Thông báo sau khi gửi form --- */
.contact-message-alert {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 15px;
    line-height: 1.5;
    animation: contactSlideDown 0.3s ease-out;
}

.contact-message-alert i {
    margin-right: 8px;
    font-size: 16px;
}

.contact-message-alert.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.contact-message-alert.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.contact-message-alert .btn-close {
    padding: 0.5rem 0.5rem;
    margin-left: auto;
    opacity: 0.5;
}

.contact-message-alert .btn-close:hover {
    opacity: 1;
}

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

/* --- Responsive --- */
@media (max-width: 991px) {
    .contact-section {
        padding: 30px 0 50px;
    }

    .contact-form-wrapper,
    .contact-info-wrapper {
        padding: 25px;
        margin-bottom: 25px;
    }

    .contact-form-wrapper h2,
    .contact-info-wrapper h2 {
        font-size: 22px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    #contactForm .mb-3 {
        margin-bottom: 20px !important;
    }
}

@media (max-width: 767px) {
    .contact-section {
        padding: 20px 0 40px;
    }

    .contact-form-wrapper,
    .contact-info-wrapper {
        padding: 20px;
        margin-bottom: 20px;
    }

    .contact-form-wrapper h2,
    .contact-info-wrapper h2 {
        font-size: 20px;
        margin-bottom: 18px;
        padding-bottom: 10px;
    }

    .contact-section .page-title {
        font-size: 24px;
    }

    #contactForm .form-label {
        font-size: 14px;
    }

    #contactForm .form-control {
        padding: 10px 14px;
        font-size: 14px;
    }

    #contactForm textarea.form-control {
        min-height: 100px;
    }

    #contactForm .btn-primary {
        margin-left: auto;
        margin-right: 0;
        width: auto;
        max-width: 100%;
        padding: 12px 25px;
        font-size: 15px;
    }

    .contact-info-item {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .contact-info-item .contact-info-item__heading i {
        font-size: 1.125rem;
    }

    .contact-info-item__body p {
        font-size: 14px;
    }

    .contact-message-alert {
        padding: 12px 15px;
        font-size: 14px;
    }
}
