/* Enterprise-Grade Contact Page Styles */

.contact-section {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 600px;
}

/* Contact Method Cards */
.contact-method-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.contact-method-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2767C5 0%, #1e4fa0 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.contact-method-card:hover::before {
    transform: scaleX(1);
}

.contact-method-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(39, 103, 197, 0.2);
    border-color: #2767C5;
}

.contact-method-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #2767C5 0%, #1e4fa0 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(39, 103, 197, 0.3);
    transition: all 0.4s ease;
    position: relative;
}

.contact-method-card:hover .contact-method-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(39, 103, 197, 0.4);
}

.contact-method-icon i {
    font-size: 2rem;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.contact-method-card:hover .contact-method-icon i {
    transform: scale(1.1);
}

.contact-method-card h4 {
    color: #212529;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.contact-method-card p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.contact-link {
    color: #2767C5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    color: #1e4fa0;
    text-decoration: underline;
}

.contact-highlight {
    color: #2767C5;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* Contact Form Wrapper */
.contact-form-wrapper {
    background: #ffffff;
    border-radius: 20px;
    padding: 3.5rem;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.12);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2767C5 0%, #1e4fa0 100%);
}

.form-header {
    margin-bottom: 3rem;
    padding-bottom: 1.75rem;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #2767C5 0%, #1e4fa0 100%);
}

.form-header h2 {
    color: #212529;
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.form-header p {
    color: #6c757d;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.6;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.95rem;
    padding-left: 0.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.input-icon-top {
    top: 1.25rem;
    transform: none;
    align-self: flex-start;
}

.form-control,
.form-select {
    padding-left: 3.5rem;
    padding-right: 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
    width: 100%;
    line-height: 1.5;
}

.form-control:focus,
.form-select:focus {
    border-color: #2767C5;
    box-shadow: 0 0 0 0.25rem rgba(39, 103, 197, 0.15);
    background-color: #ffffff;
    outline: none;
}

.form-control:focus + .input-icon,
.form-select:focus + .input-icon {
    color: #2767C5;
}

.input-wrapper:focus-within .input-icon {
    color: #2767C5;
    transition: color 0.3s ease;
}

.form-control::placeholder {
    color: #adb5bd;
}

textarea.form-control {
    padding-top: 1.5rem;
    padding-left: 3.5rem;
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

textarea.form-control .input-icon-top {
    top: 1.5rem;
}

.form-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Show invalid feedback only when validation fails */
/* Using :has() selector for modern browsers */
.was-validated .form-group:has(.form-control:invalid) .invalid-feedback,
.was-validated .form-group:has(.form-select:invalid) .invalid-feedback,
.form-group:has(.form-control.is-invalid) .invalid-feedback,
.form-group:has(.form-select.is-invalid) .invalid-feedback {
    display: block;
}

/* Fallback for older browsers - target sibling of input-wrapper */
.was-validated .input-wrapper:has(.form-control:invalid) + .invalid-feedback,
.was-validated .input-wrapper:has(.form-select:invalid) + .invalid-feedback {
    display: block;
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545;
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: #198754;
}

/* Submit Button */
.submit-btn {
    padding: 1.125rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #2767C5 0%, #1e4fa0 100%);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(39, 103, 197, 0.5);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn .btn-content,
.submit-btn .btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Contact Info Sidebar */
.contact-info-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-header {
    background: linear-gradient(135deg, #2767C5 0%, #1e4fa0 100%);
    color: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(39, 103, 197, 0.2);
}

.sidebar-header h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.sidebar-header p,
.sidebar-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    line-height: 1.6;
}

.info-item {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #2767C5 0%, #1e4fa0 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.info-item:hover::before {
    transform: scaleY(1);
}

.info-item:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(39, 103, 197, 0.15);
    border-color: #2767C5;
}

.info-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, #2767C5 0%, #1e4fa0 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.info-icon i {
    color: #ffffff;
    font-size: 1.2rem;
}

.info-content h5 {
    color: #212529;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.info-content p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

.contact-details-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.contact-details-card:hover {
    box-shadow: 0 6px 25px rgba(39, 103, 197, 0.1);
    border-color: #2767C5;
    transform: translateY(-2px);
}

.contact-details-card h5 {
    color: #212529;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.contact-details-card p {
    color: #495057;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-email {
    color: #2767C5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-email:hover {
    color: #1e4fa0;
    text-decoration: underline;
}

/* Form Message */
#formMessage {
    border-radius: 12px;
    padding: 1.25rem;
    font-size: 0.95rem;
}

#formMessage.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

#formMessage.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

#formMessage.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .contact-info-sidebar {
        position: static;
        margin-top: 3rem;
    }
    
    .contact-form-wrapper {
        padding: 2rem;
    }
    
    .form-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .contact-method-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .form-header {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    
    .form-header h2 {
        font-size: 1.75rem;
    }
    
    .input-icon {
        left: 1rem;
        font-size: 1rem;
        width: 18px;
        height: 18px;
    }
    
    .form-control,
    .form-select {
        padding-left: 2.75rem;
        font-size: 0.95rem;
    }
    
    textarea.form-control {
        padding-left: 2.75rem;
        padding-top: 1.25rem;
    }
    
    .input-icon-top {
        top: 1.25rem;
    }
    
    .sidebar-header {
        padding: 1.5rem;
    }
    
    .info-item {
        padding: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .contact-method-icon {
        width: 70px;
        height: 70px;
    }
    
    .contact-method-icon i {
        font-size: 1.75rem;
    }
    
    .contact-form-wrapper {
        padding: 1.25rem;
    }
    
    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading State */
.contact-form-wrapper.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-method-card,
.contact-form-wrapper,
.contact-info-sidebar {
    animation: fadeInUp 0.6s ease-out;
}

.contact-method-card:nth-child(2) {
    animation-delay: 0.1s;
}

.contact-method-card:nth-child(3) {
    animation-delay: 0.2s;
}

