/* Contact Form Component Styles */
.contact-form-layout {
    display: flex;
    flex-direction: row;
    min-height: auto;
}

/* Honeypot field - hidden from humans, visible in HTML for bots */
.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.contact-form-text {
    flex: 0 0 40%;
    background-color: white;
    color: #333;
    padding: 34px 26px 26px 26px;
    border-radius: 12px 0 0 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Blue styling only when inside modal */
.contact-modal .contact-form-text {
    background-color: #040D81;
    color: white;
}

.contact-form-text h3 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 600;
    margin-bottom: 17px;
    line-height: 1.3;
}

.contact-form-text p {
    font-size: clamp(0.8rem, 1.76vw, 1.0rem);
    line-height: 1.6;
    margin: 0;
}

.contact-form-text a {
    color: #040D81;
    text-decoration: none;
}

.contact-form-text a:hover {
    color: #3feb21;
    text-decoration: none;
}

.contact-form-avatar {
    width: 250px;
    height: 250px;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.contact-form-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6.4px;
    border: 2.4px solid rgba(255, 255, 255, 0.3);
}

/* White links only when inside modal */
.contact-modal .contact-form-text a {
    color: #ffffff;
}

.contact-form-content {
    flex: 1;
    padding: 26px;
    padding-bottom: 52px;
}

.contact-form-content form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-row {
    display: flex;
    gap: 17px;
}

.form-field {
    flex: 1;
    margin-bottom: 17px;
}

.form-row .form-field {
    margin-bottom: 0;
}

.form-row:last-of-type {
    margin-bottom: 17px;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 8px 17px;
    border: 2px solid #a5a5a5;
    border-radius: 8px;
    font-size: 0.68rem;
    transition: border-color 0.3s ease;
    background-color: #f4f4f4;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #040D81;
    background-color: white;
}

.form-field textarea {
    resize: vertical;
    min-height: 85px;
}

.checkbox-field {
    margin: 26px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.648rem;
    line-height: 1.4;
    color: #000000;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    border: 2px solid #a5a5a5;
    border-radius: 3px;
    margin-right: 10px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #040D81;
    border-color: #040D81;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.field-error {
    display: block;
    color: #ff0000;
    font-size: 0.592rem;
    margin-top: 4px;
    min-height: 17px;
}

.field-error.show {
    display: block;
}

.contact-submit-button {
    margin-top: 8px;
}

.contact-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Standalone contact form styling */
.contact-form-standalone {
    margin-top: 60px;
}

.contact-form-standalone .contact-form-layout {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.contact-form-standalone .contact-form-text {
    background-color: #28a745;
    color: white;
    border-radius: 0;
}

.contact-form-standalone .contact-form-text a {
    color: #ffffff;
}

.contact-form-standalone .contact-form-content {
    border-radius: 0;
}

/* Mobile contact form styling */
.contact-form-mobile {
    display: none;
    margin: 40px 60px 0 60px;
    order: 3; /* Ensure it appears after content */
}

.contact-form-mobile .contact-form-layout {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 0 60px 0 60px;
}

.contact-form-mobile .contact-form-text {
    background-color: #28a745;
    color: white;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 34px;
}

.contact-form-mobile .contact-form-avatar {
    flex-shrink: 0;
    width: 80%;
    max-width: 350px;
    height: auto;
}

.contact-form-mobile .contact-form-avatar img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6.4px;
    border: 2.4px solid rgba(255, 255, 255, 0.3);
}

.contact-form-mobile .contact-form-text-content {
    width: 100%;
    text-align: center;
}

.contact-form-mobile .contact-form-text a {
    color: #ffffff;
}

.contact-form-mobile .contact-form-content {
    border-radius: 0;
}

/* Vertical layout for screens < 1024px */
@media (max-width: 1023px) {
    .contact-form-layout {
        flex-direction: column;
    }

    .contact-form-text {
        flex: none;
        border-radius: 12px 12px 0 0;
    }

    .contact-form-content {
        flex: none;
    }
}

/* Responsive layout for screens < 768px */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-field input,
    .form-field textarea,
    .form-field select {
        padding: 10px 14px;
    }

    .contact-form-standalone {
        padding: 0 16px;
        margin-top: 40px;
    }

    .contact-form-avatar {
        width: 80%;
        max-width: 350px;
        height: auto;
    }

    .contact-form-avatar img {
        aspect-ratio: 1;
    }

    .contact-form-mobile .contact-form-text {
        padding: 26px;
    }
}

/* Hide contact box and show mobile contact form on narrow screens */
@media (max-width: 1199px) {
    .contact-form-standalone {
        display: none;
    }

    .contact-form-mobile {
        display: block;
    }
}
