:root {
    --primary-gradient: linear-gradient(135deg, #5e72e4 0%, #825ee4 100%);
    --accent: #ff6b6b;
    --muted: #6c757d;
    --card-radius: 16px;
    --shadow-lg: 0 12px 30px rgba(50, 50, 93, 0.12);
}

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #172b4d;
    background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding-bottom: 0;
}

/* Contact Hero */
.contact-hero {
    background: var(--primary-gradient);
    color: white;
    padding: 5rem 1rem;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.app-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 999px;
    font-weight: 600;
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    box-shadow: 0 6px 18px rgba(120, 80, 200, 0.08);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 3.2vw, 3rem);
    margin: 0 0 1rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

.hero-sub {
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn-contact {
    border-radius: 12px;
    padding: 1rem 2.5rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    border: none;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    color: #5e72e4;
}

.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
}

/* Contact Content */
.contact-content {
    max-width: 1000px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.section-title {
    font-size: clamp(1.5rem, 2vw, 1.8rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(20, 20, 40, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-align: center;
}

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

.contact-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f0f4ff, #e6ebff);
    box-shadow: 0 8px 20px rgba(94, 114, 228, 0.15);
    font-size: 2rem;
    color: #5e72e4;
}

.contact-card h4 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.contact-details {
    margin-top: 1rem;
}

.contact-details a {
    color: #5e72e4;
    text-decoration: none;
    transition: all 0.2s;
}

.contact-details a:hover {
    color: #4a5bd0;
    text-decoration: underline;
}

/* Offcanvas Styling */
.offcanvas.offcanvas-bottom {
    height: 90vh;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
}

.offcanvas-header {
    background: var(--primary-gradient);
    color: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 1.5rem;
}

.offcanvas-title {
    font-weight: 700;
    font-size: 1.5rem;
}

.btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

.offcanvas-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-label {
    font-weight: 600;
    color: #343a40;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: #5e72e4;
    box-shadow: 0 0 0 0.25rem rgba(94, 114, 228, 0.25);
}

.btn-submit {
    background: var(--primary-gradient);
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s;
    box-shadow: 0 6px 15px rgba(94, 114, 228, 0.3);
    color: white;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(94, 114, 228, 0.4);
}

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

.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5e72e4, #825ee4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.success-icon .bi {
    font-size: 3rem;
    color: white;
}

.success-message {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #5e72e4;
}

.char-count {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
}

.form-icon {
    font-size: 1.25rem;
    color: #5e72e4;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

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

.contact-method-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4ff, #e6ebff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #5e72e4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-hero {
        padding: 3rem 1rem;
    }

    .offcanvas.offcanvas-bottom {
        height: 85vh;
    }
}

.validation-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Enhanced error styling */
.was-validated .form-control:invalid,
.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.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%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);
}

.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Animation for error messages */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    15%, 45%, 75% {
        transform: translateX(-10px);
    }
    30%, 60%, 90% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.6s ease-in-out;
}