/* Modern Contact Section Styling */
.contact-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    position: relative;
    overflow: hidden;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Add animated background elements */
.contact-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 71, 161, 0.05) 0%, rgba(25, 118, 210, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M30,10L50,30L70,10L90,30L70,50L90,70L70,90L50,70L30,90L10,70L30,50L10,30L30,10Z" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></svg>');
    opacity: 0.5;
    z-index: 0;
}

.contact-section .container {
    max-width: 1400px;
    padding: 0 30px;
    margin: 0 auto;
    width: 100%;
}

.contact-section .row {
    display: flex;
    flex-wrap: nowrap;
    margin: 0 -15px;
    width: 100%;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.contact-section .row:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.contact-section [class*="col-"] {
    padding: 0;
    box-sizing: border-box;
    float: left;
    position: relative;
}

.contact-section .col-lg-5 {
    width: 42%;
    background: linear-gradient(145deg, #0D47A1 0%, #1976D2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.contact-section .col-lg-5::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M30,10L50,30L70,10L90,30L70,50L90,70L70,90L50,70L30,90L10,70L30,50L10,30L30,10Z" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.contact-section .col-lg-5 {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Contact Info Item Styles */
.contact-info-card {
    position: relative;
    z-index: 1;
    color: white;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.contact-info-item:hover .contact-info-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.contact-info-icon i {
    color: white;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.contact-info-content {
    flex: 1;
}

.contact-info-content h4 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-info-content p,
.contact-info-content a {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.25rem 0;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-info-content a:hover {
    color: white;
    text-decoration: underline;
}

/* Social Links Styles */
.contact-info-card .social-links {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info-card .social-links h4 {
    color: white;
    margin-bottom: 1.25rem !important;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-info-card .social-links .d-flex {
    gap: 1rem;
}

.contact-info-card .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.contact-info-card .social-icon:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-section .col-lg-7 {
    width: 58%;
    padding: 3rem 2.5rem;
    background: #fff;
}

.contact-section .col-md-6 {
    width: 50%;
    padding: 0 15px;
}

.contact-section .col-12 {
    width: 100%;
    padding: 0;
}

/* Clearfix */
.contact-section .row:after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .contact-section .container {
        max-width: 100%;
        padding: 0 2rem;
    }
    
    .contact-form-card {
        padding: 2.5rem;
    }
}

/* Animation for form elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    margin-bottom: 1.5rem;
}

/* Add delay to each form group */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

@media (max-width: 991.98px) {
    .contact-section {
        padding: 6rem 0;
    }
    
    .contact-section .row {
        flex-direction: column;
        gap: 2rem;
        border-radius: 12px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    }
    
    .contact-section .col-lg-5,
    .contact-section .col-lg-7 {
        width: 100%;
        padding: 0;
    }
    
    .contact-info-card,
    .contact-form-card {
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }
    
    .contact-section .section-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .d-md-flex .btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .contact-section {
        padding: 4rem 0;
    }
    
    .contact-section .col-lg-5,
    .contact-section .col-lg-7 {
        padding: 2rem 1.5rem;
    }
    
    .contact-section .col-md-6 {
        width: 100%;
        padding: 0;
    }
}

.contact-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-section .section-badge {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.contact-section .section-header .section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0D47A1;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

.contact-section .section-subtitle {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-weight: 400;
    padding: 0 1rem;
}

.contact-section .section-header .divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0D47A1, #1976D2);
    margin: 1.5rem auto 2.5rem;
    border-radius: 2px;
    position: relative;
    transition: all 0.3s ease;
}

/* Contact Info Card */
.contact-info-card {
    background: linear-gradient(145deg, #0D47A1 0%, #1976D2 100%);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 15px 35px rgba(13, 71, 161, 0.15), 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2.5rem;
    padding: 2.5rem;
}

.contact-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    z-index: -1;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-info-card .card-body {
    padding: 3rem 3rem 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-info-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info-card .card-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
}

.contact-info-item {
    display: flex;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    transform: translateX(5px);
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    flex-shrink: 0;
    font-size: 1.25rem;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-info-item:hover .contact-info-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.contact-info-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: 0.3px;
}

.contact-info-content p,
.contact-info-content a {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.7;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    font-weight: 400;
}

.contact-info-content a {
    display: block;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.contact-info-content a:hover {
    color: #fff;
    text-decoration: none;
    transform: translateX(5px);
}

/* Contact Form Styling */
/* Base form card styles */
.contact-form-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1.25rem;
    height: 100%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
}

/* Responsive padding adjustments */
@media (min-width: 576px) {
    .contact-form-card {
        padding: 2.25rem 1.75rem;
    }
}

@media (min-width: 768px) {
    .contact-form-card {
        padding: 2.5rem 2.25rem;
        max-width: 95%;
    }
}

@media (min-width: 992px) {
    .contact-form-card {
        padding: 3rem 2.5rem 2.5rem;
        max-width: 100%;
    }
}

/* Form group spacing */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Input group adjustments */
.input-group {
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.input-group-text {
    padding: 0 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 0.75rem 0 0 0.75rem !important;
    color: #64748b;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 0.75rem 0.75rem 0 !important;
    padding-left: 0.75rem;
}

.input-group .form-control:focus {
    border-left: 1px solid #3b82f6;
    margin-left: -1px;
}

/* Form sections */
.form-section {
    margin-bottom: 2.25rem;
    padding: 1.5rem 0.75rem;
    border-radius: 0.75rem;
    background-color: rgba(241, 245, 249, 0.3);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.form-section:last-child {
    margin-bottom: 1.5rem;
}

.form-section .section-title {
    color: #1e40af;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
}

.form-section .section-title i {
    margin-right: 0.75rem;
    color: #3b82f6;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .form-section {
        padding: 2rem 1.25rem;
    }
    
    .form-section .section-title {
        font-size: 1.15rem;
        margin-bottom: 1.5rem;
    }
}

/* Form labels */
.contact-form-card .form-label {
    display: block;
    margin: 0.5rem 0 0.5rem 0.25rem;
    font-weight: 500;
    color: #334155;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.contact-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #0D47A1, #1976D2);
    opacity: 0.9;
}

.contact-form-card h3 {
    color: #1e293b;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.5px;
}

.contact-form-card h3::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
    opacity: 0.9;
}

.contact-form-card .card-body {
    padding: 1.5rem 1.5rem 0 1.5rem;
    margin-top: 1.5rem;
}

.contact-form-card .form-label {
    display: block;
    margin: 1.25rem 0 0.5rem 0.5rem;
    font-weight: 500;
    color: #334155;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.contact-form-card .form-control,
.contact-form-card .form-select,
.contact-form-card .form-textarea {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #1e293b;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.25s ease-in-out;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Adjust textarea specifically */
.contact-form-card .form-textarea {
    min-height: 150px;
    padding: 1rem 1.25rem;
}

/* Adjust select dropdown arrow */
.contact-form-card .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.contact-form-card .form-control:focus,
.contact-form-card .form-select:focus,
.contact-form-card .form-textarea:focus {
    border-color: #3b82f6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 2px 10px rgba(59, 130, 246, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.contact-form-card .input-group-text {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1rem;
    border-radius: 10px 0 0 10px !important;
    border-right: none !important;
}

.contact-form-card .input-group .form-control {
    border-radius: 0 10px 10px 0;
    border-left: none;
}

.contact-form-card .btn-send {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    cursor: pointer;
}

.contact-form-card .btn-send::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a58ca 0%, #0d6efd 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    border-radius: 50px;
}

.contact-form-card .btn-send:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-form-card .btn-send:hover::before {
    opacity: 1;
}

.contact-form-card .btn-send:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
}

.contact-form-card .btn-send:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.5);
}

.contact-form-card .btn-send i {
    margin-right: 8px;
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.contact-form-card .btn-send:hover i {
    transform: translateX(3px);
}

.contact-form-card .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Form Group Styling */
.form-group {
    margin-bottom: 1.75rem;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Checkbox Styles */
.contact-form-card .form-check {
    position: relative;
    margin-bottom: 1rem;
    min-height: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 0.5rem 0;
    clear: both;
}

.contact-form-card .form-check-input {
    position: relative !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin: 0.2rem 0.5rem 0 0 !important;
    float: left;
    background-color: #fff !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 70% 70% !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 0.25rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
    opacity: 1 !important;
    transition: all 0.2s ease-in-out !important;
    flex-shrink: 0;
}

.contact-form-card .form-check-input:checked {
    background-color: #0D47A1 !important;
    border-color: #0D47A1 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
}

.contact-form-card .form-check-input:focus {
    border-color: #0D47A1 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 71, 161, 0.25) !important;
    outline: none !important;
}

.contact-form-card .form-check-label {
    color: #334155;
    font-size: 0.9375rem;
    line-height: 1.5;
    cursor: pointer;
    transition: color 0.2s ease;
    margin: 0;
    padding: 0;
    width: calc(100% - 2rem);
    display: inline-block;
}

.contact-form-card .form-check:hover .form-check-label {
    color: #0D47A1;
}

.contact-form-card .form-check:hover .form-check-input:not(:checked) {
    border-color: #94a3b8 !important;
}

/* Required field indicator */
.contact-form-card .form-check-label .text-danger {
    color: #dc3545 !important;
}

/* Checkbox container */
.contact-form-card .form-section .row {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
}

.contact-form-card .form-section .col-md-6 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-bottom: 0.75rem !important;
    float: none !important;
    flex: none !important;
    clear: both;
}

/* Ensure proper spacing between checkboxes */
.contact-form-card .form-check {
    margin-bottom: 0.75rem !important;
}

/* Make sure checkboxes don't wrap */
.contact-form-card .form-check-input {
    flex-shrink: 0;
}

/* Ensure label text wraps properly */
.contact-form-card .form-check-label {
    display: inline-block;
    vertical-align: middle;
    margin-top: -0.2rem;
}

/* Make sure the checkbox and label are properly aligned */
.contact-form-card .form-check-input[type="checkbox"] {
    position: relative !important;
    opacity: 1 !important;
    margin: 0.2rem 0.5rem 0 0 !important;
    padding: 0 !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: #fff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 0.25rem !important;
    cursor: pointer !important;
    flex-shrink: 0;
}

/* Ensure label text is vertically centered with checkbox */
.contact-form-card .form-check-label {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
}

/* Form Buttons */
.form-actions {
    margin: 3rem 0 0;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

/* Submit Button */
.btn-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.9rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #0D47A1 0%, #1976D2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
    z-index: 1;
    line-height: 1.5;
    min-width: 200px;
    text-align: center;
    height: auto;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.4);
}

/* Reset Button */
.btn-reset {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #64748b;
    background-color: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 160px;
    text-align: center;
    height: auto;
}

.btn-reset:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .btn-submit,
    .btn-reset {
        width: 100%;
        min-width: 100%;
    }
}

.btn-submit:active {
    transform: translateY(0);
}

/* Button Shine Effect */
.btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    z-index: -1;
    transition: all 0.6s ease;
    opacity: 0;
}

.btn-submit:hover .btn-shine {
    left: 110%;
    opacity: 1;
}

/* Reset Button */
.btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.1rem 2.2rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
    min-width: 180px;
    text-align: center;
}

.btn-reset:hover {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
}

.btn-reset i {
    transition: transform 0.3s ease;
}

.btn-reset:hover i {
    transform: rotate(-30deg);
}

/* Radio Button Group */
.contact-form-card .btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Hide actual radio buttons but keep them accessible */
.contact-form-card .btn-check {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
}

.contact-form-card .btn-outline-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.contact-form-card .btn-outline-primary i {
    font-size: 1.1em;
    margin-right: 0.5rem;
    color: #64748b;
    transition: color 0.2s ease;
}

.contact-form-card .btn-check:checked + .btn-outline-primary,
.contact-form-card .btn-outline-primary:hover {
    background-color: #0D47A1;
    border-color: #0D47A1;
    color: white;
    box-shadow: 0 2px 8px rgba(13, 71, 161, 0.2);
}

.contact-form-card .btn-check:checked + .btn-outline-primary i,
.contact-form-card .btn-outline-primary:hover i {
    color: white;
}

.contact-form-card .btn-check:focus + .btn-outline-primary {
    box-shadow: 0 0 0 0.25rem rgba(13, 71, 161, 0.25);
}

.contact-form-card .btn-check:active + .btn-outline-primary {
    transform: translateY(1px);
}

/* Form Check Styles */
.contact-form-card .form-check {
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.5rem;
}

.contact-form-card .form-check-input {
    width: 1.2em !important;
    height: 1.2em !important;
    margin-top: 0.2em !important;
    margin-left: -1.5em !important;
    background-color: #fff !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.25em !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    transition: all 0.15s ease-in-out !important;
    position: relative !important;
    cursor: pointer !important;
    vertical-align: middle !important;
}

.contact-form-card .form-check-input:checked {
    background-color: #0D47A1 !important;
    border-color: #0D47A1 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.contact-form-card .form-check-input:focus {
    border-color: #93c5fd;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 71, 161, 0.25);
}

.contact-form-card .form-check-label {
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
    color: #334155;
    padding-left: 0.25rem;
}

.contact-form-card .form-check-label a {
    color: #0D47A1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-form-card .form-check-label a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Custom Checkbox Styles */
#contact-form .custom-checkbox, 
.contact-form-card .custom-checkbox {
    display: flex !important;
    align-items: flex-start !important;
    position: relative !important;
    padding-left: 35px !important;
    margin-bottom: 12px !important;
    cursor: pointer !important;
    font-size: 0.9375rem !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    line-height: 1.5 !important;
    min-height: 24px !important;
}

#contact-form .custom-checkbox input,
.contact-form-card .custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

#contact-form .custom-checkbox .checkmark,
.contact-form-card .custom-checkbox .checkmark {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    transform: translateY(-50%) !important;
    height: 20px !important;
    width: 20px !important;
    background-color: #fff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#contact-form .custom-checkbox:hover input ~ .checkmark,
.contact-form-card .custom-checkbox:hover input ~ .checkmark {
    border-color: #93c5fd;
}

#contact-form .custom-checkbox input:checked ~ .checkmark,
.contact-form-card .custom-checkbox input:checked ~ .checkmark {
    background-color: #0D47A1;
    border-color: #0D47A1;
}

#contact-form .custom-checkbox .checkmark:after,
.contact-form-card .custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#contact-form .custom-checkbox input:checked ~ .checkmark:after,
.contact-form-card .custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

#contact-form .custom-checkbox .label-text,
.contact-form-card .custom-checkbox .label-text {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: 10px !important;
    line-height: 1.4 !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}

#contact-form .custom-checkbox a,
.contact-form-card .custom-checkbox a {
    color: #0D47A1;
    text-decoration: none;
    transition: color 0.2s ease;
}

#contact-form .custom-checkbox a:hover,
.contact-form-card .custom-checkbox a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Form Checkbox and Radio Buttons */
.contact-form-card .form-check {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    cursor: pointer;
    min-height: 1.5rem;
}

.contact-form-card .form-check-input {
    position: relative !important;
    left: auto;
    top: auto;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0 0.5rem 0 0 !important;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 75% 75%;
    border: 2px solid #cbd5e1 !important;
    border-radius: 0.25rem;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    vertical-align: middle;
}

.contact-form-card .form-check-input:checked {
    background-color: #0D47A1;
    border-color: #0D47A1;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
}

.contact-form-card .form-check-input:focus {
    border-color: #93c5fd;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 71, 161, 0.25);
}

.contact-form-card .form-check-label {
    color: #334155;
    font-size: 0.9375rem;
    cursor: pointer;
    margin-bottom: 0;
}

.contact-form-card .form-check-input[type="checkbox"] {
    border-radius: 0.25rem;
}

.contact-form-card .form-check-input[type="radio"] {
    border-radius: 50%;
}

.contact-form-card .form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

/* Form Controls */
.contact-form-card .form-control,
.contact-form-card .form-select,
.contact-form-card .form-textarea,
.contact-form-card .form-input {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    width: calc(100% - 1.5rem) !important;
}

/* Adjust form groups to maintain layout */
.contact-form-card .form-group {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

/* Ensure radio button group maintains full width */
.contact-form-card .btn-group {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    width: calc(100% - 1rem);
}

/* Adjust form sections to maintain consistent padding */
.contact-form-card .form-section {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Form Controls */
.form-control,
.form-select {
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    height: auto;
}

.form-control:focus,
.form-select:focus,
.form-control:focus-visible,
.form-select:focus-visible {
    border-color: #0D47A1;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.15);
    outline: none;
    transform: translateY(-1px);
}

/* Floating label effect */
.form-floating > label {
    color: #64748b;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.25rem);
    color: #0D47A1;
    background: #fff;
    padding: 0 0.5rem;
    left: 0.5rem;
    border-radius: 4px;
    z-index: 3;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 2px 10px rgba(59, 130, 246, 0.1);
    outline: none;
    transform: translateY(-1px);
}

/* Animated focus effect */
.form-group {
    position: relative;
    z-index: 1;
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

.form-group:focus-within::after {
    transform: scaleX(1);
}

/* Placeholder text */
.form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* Focus state for select */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='12' height='12' fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6L14 5l-7 7z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
    padding-right: 2.5rem;
}

/* Remove default arrow in IE */
select.form-select::-ms-expand {
    display: none;
}

/* Input Groups */
.input-group-text {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1rem;
    border-radius: 10px 0 0 10px !important;
    border-right: none !important;
}

.input-group:focus-within .input-group-text {
    border-color: #3b82f6;
    background-color: #e0f2fe;
    color: #0369a1;
}

.input-group .form-control:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: none;
}

.input-group:focus-within .form-control {
    border-left: 1px solid #3b82f6;
    padding-left: calc(1.25rem - 1px);
}

/* File Upload Area */
.file-upload-area {
    background-color: rgba(248, 250, 252, 0.8);
    border: 2px dashed #cbd5e1;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

/* Style for the custom browse button */
#browse-files {
    position: relative;
    z-index: 1;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(99, 102, 241, 0.03) 100%);
    z-index: -1;
}

.file-upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e0f2fe;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

.file-upload-area.dragover::after {
    content: 'Drop files here';
}

.file-upload-area:hover {
    border-color: #94a3b8;
    background-color: #f1f5f9;
}

.file-upload-area input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.file-upload-area i {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
    display: block;
    transition: all 0.3s ease;
}

.file-upload-area:hover i {
    transform: scale(1.1);
    color: #2563eb;
}

.file-upload-area h6 {
    font-size: 1.1rem;
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.file-upload-area p {
    color: #64748b;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

#browse-files {
    border: 1px solid #3b82f6;
    color: #3b82f6;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(59, 130, 246, 0.05);
}

#browse-files:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

#browse-files i {
    margin-right: 0.5rem;
    font-size: 1rem;
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.file-item i {
    margin-right: 0.5rem;
    color: #6c757d;
}

.file-item .file-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item .file-remove {
    color: #dc3545;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Form Validation */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #ef4444;
    padding-right: calc(1.5em + 1.25rem);
    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='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.3125rem) center;
    background-size: calc(0.75em + 0.625rem) calc(0.75em + 0.625rem);
}

.was-validated .form-control:invalid:focus,
.was-validated .form-select:invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 0.25rem rgba(239, 68, 68, 0.15);
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: #10b981;
    padding-right: calc(1.5em + 1.25rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.3125rem) center;
    background-size: calc(0.75em + 0.625rem) calc(0.75em + 0.625rem);
}

.was-validated .form-control:valid:focus,
.was-validated .form-select:valid:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.15);
}

.invalid-feedback {
    font-size: 0.8125rem;
    color: #ef4444;
    margin-top: 0.35rem;
    font-weight: 400;
    display: block;
    padding: 0.25rem 0.5rem;
    background: #fef2f2;
    border-radius: 4px;
    border-right: 3px solid #ef4444;
}

.valid-feedback {
    font-size: 0.85rem;
    color: #10b981;
    margin-top: 0.35rem;
    font-weight: 400;
    display: block;
    padding: 0.25rem 0.5rem;
    background: #ecfdf5;
    border-radius: 4px;
    border-right: 3px solid #10b981;
}

/* Loading State */
.btn-loading .button-text {
    visibility: hidden;
    position: relative;
}

.btn-loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Text Muted */
.text-muted {
    color: #6c757d !important;
    font-size: 0.95rem;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .contact-form-card h3 {
        font-size: 1.5rem;
    }
    
    .contact-info-card .card-title {
        font-size: 1.5rem;
    }
    
    .social-links h4 {
        font-size: 1rem;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 991.98px) {
    .contact-section {
        padding: 4rem 0;
    }
    
    .contact-section .section-title {
        font-size: 2rem;
    }
    
    .contact-section .section-subtitle {
        font-size: 1.1rem;
    }
    
    .contact-info-card .card-body {
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    .contact-section {
        padding: 3rem 0;
    }
    
    .contact-info-card {
        margin-bottom: 2rem;
    }
    
    .contact-info-item {
        margin-bottom: 1.25rem;
    }
}
