/* ====================================
   VanTele Contact Page CSS
   Brand: Blue (#2A4B7C) & Green (#00A86B)
   Requires: custom.css loaded first (provides CSS variables)
   ==================================== */

.contact-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* --- 1. Security Banner --- */
.security-banner {
    background: var(--accent-light);
    padding: 1.25rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    border: 1px solid var(--secondary-color);
}

.security-banner i {
    font-size: 1.4rem;
    color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.security-banner p {
    margin: 0;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.5;
}

/* --- 2. Contact Grid --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: #fff;
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-color);
    /* FIX 1: Reduced lift from 8px to 4px — info cards should not
       jump dramatically; subtle lift is enough */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.contact-card h2 {
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.contact-card dl dt {
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.contact-card dl dt:first-child {
    margin-top: 0;
}

.contact-card dl dd {
    margin: 0.2rem 0 0;
    font-size: 1rem;
    color: var(--dark-color);
}

/* --- 3. Contact Form Card --- */
.contact-form {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
}

/* FIX 2: Bootstrap 5 removed .form-group — .form-group label selectors
   never matched anything, so label colours were never applied.
   Target labels directly inside the contact form instead. */
.contact-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    display: block;
}

/* Focus styles for contact form inputs.
   Bootstrap 5 uses .form-control — target that directly. */
.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 168, 107, 0.18) !important;
    outline: none;
}

/* --- 4. Submit Button --- */
.submit-btn {
    background: var(--primary-color);
    color: #fff;
    padding: 0.85rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.9rem;
    transition: background 0.25s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.submit-btn:hover:not(:disabled) {
    background: #1a365f;
    transform: scale(1.02);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading spinner */
.submit-btn .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: contact-spin 0.75s linear infinite;
}

@keyframes contact-spin {
    to { transform: rotate(360deg); }
}

.submit-btn.loading .spinner {
    display: inline-block;
}

.submit-btn.loading .btn-text {
    opacity: 0.8;
}

/* --- 5. Validation States --- */
.contact-form .form-control.is-valid {
    border-color: var(--secondary-color);
}

.contact-form .form-control.is-invalid {
    border-color: #dc3545;
}

.contact-form .valid-feedback {
    color: var(--secondary-color);
}

/* --- 6. Map --- */
.map-container {
    margin-top: 3rem;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

#smart-map {
    height: 420px;
    width: 100%;
    background: #e9ecef;
    display: block;
}

/* --- 7. Contact info icons --- */
.contact-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.contact-icon i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* --- 8. Success message banner --- */
.contact-success {
    background: var(--accent-light);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem 1.5rem;
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-success i {
    color: var(--secondary-color);
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* --- 9. Mobile --- */
@media (max-width: 767.98px) {
    .contact-container {
        margin: 1.5rem 0;
        padding: 0 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    #smart-map {
        height: 280px;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}
