.contact-hero {
    background: linear-gradient(rgba(26,31,56,0.8), rgba(26,31,56,0.8)), url('../sketches/balanced_nutrition_diabetes_management_stock_1.webp');
    background-size: cover;
    background-position: center center;
    padding: 150px 0 100px;
    color: #fff;
    text-align: center;
}

.contact-hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.contact-hero-content p {
    font-size: 20px;
    margin-bottom: 0;
    color: #fff;
    opacity: 0.9;
}

.contact-wrapper {
    padding: 140px 0 110px;
}

.contact-header {
    font-size: 29px;
    font-weight: 620;
    margin-bottom: 22px;
    color: #2C2C2C;
}

.form-contact .form-group {
    margin-bottom: 32px;
}

.form-contact .form-control {
    border: 1px solid #e3e4e7;
    border-radius: 0px;
    height: 50px;
    padding-left: 20px;
    font-size: 14px;
    background: transparent;
    transition: all 0.3s ease;
}

.form-contact .form-control:focus {
    outline: 0;
    box-shadow: none;
    border-color: #28AE60;
}

.form-contact textarea {
    border-radius: 0px;
    height: 100% !important;
    min-height: 120px;
    padding-top: 15px;
    resize: vertical;
}

.button-contactForm {
    background: #28AE60;
    color: #fff;
    border-color: #28AE60;
    padding: 14px 27px;
    font-size: 17px;
    font-weight: 620;
    border: 0;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.button-contactForm:hover {
    background: transparent;
    color: #28AE60;
    border: 1px solid #28AE60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40,174,96,0.3);
}

.contact-details {
    margin-bottom: 27px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.contact-details__icon {
    margin-right: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #28AE60;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-details__icon img {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

.contact-details .media-body h3 {
    font-size: 17px;
    margin-bottom: 8px;
    color: #2c2c2c;
    font-weight: 600;
}

.contact-details .media-body p {
    color: #8c8c8c;
    margin-bottom: 5px;
    line-height: 24px;
}

.contact-details .media-body small {
    color: #666;
    font-size: 12px;
}

.media {
    display: flex;
    align-items: flex-start;
}

.media-body {
    flex: 1;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-control.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-control.success {
    border-color: #28AE60;
    background-color: #f0fff4;
}

.faq-preview {
    padding: 100px 0;
    background: #f8f9fa;
}

.faq-preview h2 {
    font-size: 36px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 20px;
}

.faq-preview p {
    color: #666;
    line-height: 28px;
    margin-bottom: 30px;
}

.faq-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-question {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.faq-question img {
    filter: brightness(0) saturate(100%) invert(56%) sepia(73%) saturate(432%) hue-rotate(95deg) brightness(95%) contrast(86%);
    margin-right: 12px;
}

.faq-question span {
    font-weight: 600;
    color: #2C2C2C;
    font-size: 16px;
}

.faq-item p {
    margin: 0;
    color: #666;
    line-height: 24px;
    padding-left: 32px;
}

.faq-link {
    display: inline-block;
    background: #28AE60;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.faq-link:hover {
    background: #27AE5F;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40,174,96,0.3);
    color: #fff;
}

.faq-image {
    padding-left: 40px;
}

.faq-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.popup-overlay.show .popup-content {
    transform: scale(1);
}

.popup-header {
    margin-bottom: 25px;
}

.popup-header img {
    filter: brightness(0) saturate(100%) invert(56%) sepia(73%) saturate(432%) hue-rotate(95deg) brightness(95%) contrast(86%);
    margin-bottom: 15px;
}

.popup-header h3 {
    font-size: 28px;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0;
}

.popup-body p {
    color: #666;
    line-height: 26px;
    margin-bottom: 15px;
}

.popup-footer {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.popup-btn {
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.popup-btn:not(.secondary) {
    background: #28AE60;
    color: #fff;
}

.popup-btn:not(.secondary):hover {
    background: #27AE5F;
    transform: translateY(-2px);
}

.popup-btn.secondary {
    background: transparent;
    color: #28AE60;
    border: 2px solid #28AE60;
}

.popup-btn.secondary:hover {
    background: #28AE60;
    color: #fff;
}

.nav-link.active {
    color: #28AE60 !important;
}

.nav-link.active:after {
    width: 100%;
}

@media (max-width: 991px) {
    .contact-wrapper {
        padding: 75px 0 45px;
    }

    .contact-hero-content h1 {
        font-size: 36px;
    }

    .contact-hero-content p {
        font-size: 18px;
    }

    .faq-image {
        padding-left: 0;
        margin-top: 40px;
    }

    .faq-preview h2 {
        font-size: 28px;
    }

    .contact-info {
        margin-top: 50px;
    }
}

@media (max-width: 767px) {
    .contact-hero {
        padding: 120px 0 70px;
    }

    .contact-hero-content h1 {
        font-size: 28px;
    }

    .contact-hero-content p {
        font-size: 16px;
    }

    .contact-header {
        font-size: 24px;
    }

    .faq-preview {
        padding: 60px 0;
    }

    .faq-preview h2 {
        font-size: 24px;
    }

    .popup-content {
        padding: 30px 20px;
    }

    .popup-header h3 {
        font-size: 24px;
    }

    .popup-footer {
        flex-direction: column;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1200px) {
    .contact-wrapper {
        padding: 85px 0 55px;
    }
}

/* Improved Contact Form Styling */

.contact-wrapper {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.contact-header {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2C2C2C;
    text-align: center;
    position: relative;
}

.contact-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #28AE60, #27AE5F);
    border-radius: 2px;
}

/* Form Container */
.form-contact {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.form-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28AE60, #27AE5F);
}

/* Form Groups */
.form-contact .form-group {
    margin-bottom: 25px;
    position: relative;
}

/* Form Controls */
.form-contact .form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e8ecf0;
    border-radius: 8px;
    font-size: 16px;
    font-family: "Poppins", sans-serif;
    background: #fafbfc;
    transition: all 0.3s ease;
    outline: none;
}

.form-contact .form-control:focus {
    border-color: #28AE60;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(40,174,96,0.1);
    transform: translateY(-2px);
}

.form-contact .form-control:hover {
    border-color: #d1d9e0;
    background: #fff;
}

/* Textarea Specific */
.form-contact textarea.form-control {
    min-height: 120px;
    resize: vertical;
    padding-top: 15px;
    line-height: 1.6;
}

/* Placeholder Styling */
.form-control::placeholder {
    color: #8a92a5;
    font-weight: 400;
    transition: all 0.3s ease;
}

.form-control:focus::placeholder {
    color: #bdc3d0;
    transform: translateY(-2px);
}

/* Success and Error States */
.form-control.success {
    border-color: #28AE60;
    background: linear-gradient(135deg, #f0fff4 0%, #e6ffed 100%);
}

.form-control.error {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
    display: none;
    font-weight: 500;
    padding-left: 20px;
    position: relative;
}

.error-message::before {
    content: '⚠';
    position: absolute;
    left: 0;
    top: 0;
    color: #dc3545;
}

.error-message.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Submit Button */
.button-contactForm {
    background: linear-gradient(135deg, #28AE60 0%, #27AE5F 100%);
    color: #fff;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.button-contactForm::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.6s ease;
}

.button-contactForm:hover::before {
    left: 100%;
}

.button-contactForm:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(40,174,96,0.3);
    background: linear-gradient(135deg, #27AE5F 0%, #26A05B 100%);
}

.button-contactForm:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(40,174,96,0.4);
}

.button-contactForm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Contact Info Sidebar */
.contact-info {
    padding-left: 30px;
}

.contact-details {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #28AE60;
}

.contact-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.contact-details__icon {
    background: linear-gradient(135deg, #28AE60 0%, #27AE5F 100%);
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(40,174,96,0.3);
}

.contact-details__icon img {
    filter: brightness(0) saturate(100%) invert(100%);
    width: 28px;
    height: 28px;
}

.contact-details .media-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 10px;
}

.contact-details .media-body p {
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 15px;
}

.contact-details .media-body small {
    color: #adb5bd;
    font-size: 13px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 991px) {
    .contact-info {
        padding-left: 0;
        margin-top: 40px;
    }

    .form-contact {
        padding: 30px 25px;
    }

    .contact-header {
        font-size: 28px;
        text-align: left;
    }

    .contact-header::after {
        left: 0;
        transform: none;
    }
}

@media (max-width: 767px) {
    .contact-wrapper {
        padding: 60px 0;
    }

    .form-contact {
        padding: 25px 20px;
        border-radius: 10px;
    }

    .contact-header {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .form-contact .form-control {
        padding: 12px 16px;
        font-size: 15px;
    }

    .button-contactForm {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .contact-details {
        padding: 20px;
        margin-bottom: 15px;
    }

    .contact-details__icon {
        width: 45px;
        height: 45px;
        margin-right: 15px;
    }

    .contact-details__icon img {
        width: 22px;
        height: 22px;
    }
}

/* Loading State */
.button-contactForm.loading {
    position: relative;
    color: transparent;
}

.button-contactForm.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Focus Indicators for Accessibility */
.form-control:focus-visible {
    outline: 2px solid #28AE60;
    outline-offset: 2px;
}

.button-contactForm:focus-visible {
    outline: 2px solid #28AE60;
    outline-offset: 2px;
}

/* Success Animation */
.form-submitted {
    animation: formSuccess 0.6s ease;
}

@keyframes formSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}