/* ==========================================================================
   Contact Form 7 - Contact Us Page Stylesheet (contact-us.css)
   ========================================================================== */

/* Main Container */
.td-contact-form-wrapper {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: #FFFFFF;
    box-sizing: border-box;
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
}

/* Header Section */
.td-contact-form-header {
    margin-bottom: 32px;
}

.td-contact-form-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.td-contact-form-desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(26, 26, 26, 1);
    margin: 0;
}

.socials-title {
    font-size: 18px !important;
}

.td-contact-link-highlight {
    color: #F97316 !important;
    text-decoration: underline !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.td-contact-link-highlight:hover {
    color: #EA580C !important;
}

/* Grid Layout */
.td-contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
}

.td-form-group {
    display: flex;
    flex-direction: column;
}

.td-form-group.td-full-width {
    grid-column: 1 / -1;
}

/* Labels (Desktop: 16px) */
.td-form-label {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #111827;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.td-form-label .required {
    color: #EF4444;
    margin-left: 3px;
    font-weight: 700;
}

/* Fix Contact Form 7 Paragraph & Global Wrappers */
.td-contact-form-wrapper p {
    margin: 0 !important;
    padding: 0 !important;
}

.td-contact-form-wrapper .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    position: relative;
}

/* Input & Textarea Fields (Desktop: 16px) */
.td-contact-form-wrapper input[type="text"],
.td-contact-form-wrapper input[type="email"],
.td-contact-form-wrapper input[type="tel"],
.td-contact-form-wrapper textarea {
    width: 100% !important;
    height: 50px;
    border: 1px solid #E5E7EB !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 16px !important;
    color: #111827 !important;
    background-color: #FFFFFF !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    box-shadow: none !important;
    margin: 0 !important;
    font-family: inherit !important;
}

.td-contact-form-wrapper input[type="text"]::placeholder,
.td-contact-form-wrapper input[type="email"]::placeholder,
.td-contact-form-wrapper input[type="tel"]::placeholder,
.td-contact-form-wrapper textarea::placeholder {
    color: #9CA3AF !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

.td-contact-form-wrapper input[type="text"]:focus,
.td-contact-form-wrapper input[type="email"]:focus,
.td-contact-form-wrapper input[type="tel"]:focus,
.td-contact-form-wrapper textarea:focus {
    border-color: #F97316 !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12) !important;
    outline: none !important;
}

.td-contact-form-wrapper textarea {
    height: 135px !important;
    resize: vertical !important;
    line-height: 1.5 !important;
}

/* Custom Select Dropdown UI (Desktop: 16px) */
.td-contact-form-wrapper .custom-select {
    position: relative;
    width: 100%;
}

.td-contact-form-wrapper .custom-select-trigger {
    width: 100%;
    height: 50px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 16px !important;
    color: #111827;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.td-contact-form-wrapper .custom-select-trigger.is-placeholder .custom-select-text {
    color: #9CA3AF;
}

.td-contact-form-wrapper .custom-select-arrow {
    color: #6B7280;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.td-contact-form-wrapper .custom-select.is-open .custom-select-trigger {
    border-color: #F97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.td-contact-form-wrapper .custom-select.is-open .custom-select-arrow {
    transform: rotate(180deg);
}

.td-contact-form-wrapper .custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 0;
}

.td-contact-form-wrapper .custom-select.is-open .custom-select-options {
    display: block;
}

.td-contact-form-wrapper .custom-select-option {
    padding: 10px 16px;
    font-size: 16px !important;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.td-contact-form-wrapper .custom-select-option:hover {
    background-color: #F9FAFB;
    color: #111827;
}

.td-contact-form-wrapper .custom-select-option.is-selected {
    font-weight: 600;
    color: #20764D;
    background-color: #F0FDF4;
}

.td-contact-form-wrapper .custom-select-option .check-icon {
    display: none;
}

.td-contact-form-wrapper .custom-select-option.is-selected .check-icon {
    display: block;
}

/* Privacy Checkbox (Row 5 - Checkbox next to text, Gap 12px, Desktop: 14px) */
.td-privacy-group {
    margin-top: 4px;
}

.td-privacy-group .td-checkbox-label {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    cursor: pointer;
    user-select: none;
    margin: 0 !important;
    width: 100%;
}

/* Force CF7 wrapper inside checkbox label to render inline side-by-side */
.td-privacy-group .wpcf7-form-control-wrap {
    display: inline-flex !important;
    width: auto !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.td-privacy-group .wpcf7-form-control,
.td-privacy-group .wpcf7-list-item,
.td-privacy-group .wpcf7-list-item label {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.td-privacy-group .checkbox-text {
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #111827 !important;
    flex: 1;
}

.td-privacy-group .checkbox-text a {
    color: #111827 !important;
    text-decoration: underline !important;
    font-weight: 600;
}

/* Styling native Contact Form 7 acceptance checkbox */
.td-contact-form-wrapper input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px;
    min-height: 22px;
    border-radius: 6px !important;
    background-color: #1B5E39 !important;
    /* Dark Green matching image */
    border: none !important;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    flex-shrink: 0 !important;
    transition: background-color 0.2s;
}

.td-contact-form-wrapper input[type="checkbox"]:checked {
    background-color: #1B5E39 !important;
}

.td-contact-form-wrapper input[type="checkbox"]:checked::after {
    content: "";
    width: 6px;
    height: 11px;
    border: solid #FFFFFF;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

/* Submit Button (Row 6) */
.td-btn-submit {
    width: 100% !important;
    height: 52px !important;
    background: #F97316 !important;
    /* Orange */
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2) !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
    margin-top: 6px !important;
}

.td-btn-submit:hover {
    background-color: #EA580C !important;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35) !important;
    transform: translateY(-1px);
}

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

.td-btn-submit svg {
    transition: transform 0.2s ease;
}

.td-btn-submit:hover svg {
    transform: translate(2px, -2px);
}

/* Contact Form 7 Response Output */
.td-contact-form-wrapper .wpcf7-response-output {
    border-radius: 10px !important;
    font-size: 14px !important;
    padding: 12px 16px !important;
    margin: 16px 0 0 0 !important;
    grid-column: 1 / -1;
}

.td-contact-form-wrapper .wpcf7-not-valid-tip {
    font-size: 13px;
    color: #EF4444;
    margin-top: 4px;
}

/* ==========================================================================
   Contact Us Page Section Layout Wrapper
   ========================================================================== */
.section-content .row.contact-us-wrapper {
    box-shadow: 0px 4px 20px 0px #1A1A1A0D;
    margin-top: -166px !important;
    margin-bottom: 96px !important;
    border-radius: 16px;
    background: #FFFFFF;
    overflow: hidden;
}

.contact-us-wrapper>div:first-of-type {
    padding: 48px;
    background: #F8F7F4;
    border-radius: 16px;
}

.contact-us-wrapper>div:first-of-type .icon-box {
    margin-bottom: 16px;
}

.contact-us-wrapper>div:first-of-type h3 {
    font-weight: 600;
    font-size: 32px;
    line-height: 120%;
    letter-spacing: -3%;
}

.contact-us-wrapper>div:first-of-type .icon-box-text h3 {
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: -3%;
}

.contact-us-wrapper>div:first-of-type p {
    margin-bottom: 0;
}

.contact-us-wrapper>div:first-of-type .icon-box-text p {
    font-size: 14px;
    line-height: 150%;
    letter-spacing: -3%;
}

.contact-us-wrapper>div:last-of-type {
    background: #FFFFFF;
    padding: 48px;
}

/* ==========================================================================
   Mobile Responsive Adjustments (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .td-contact-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .td-contact-form-title {
        font-size: 20px;
    }

    .td-contact-form-desc {
        font-size: 14px;
    }

    .socials-title {
        font-size: 16px !important;
    }

    .td-contact-form-header {
        margin-bottom: 18px;
    }

    /* Labels Mobile: 12px */
    .td-form-label {
        font-size: 12px !important;
        margin-bottom: 6px;
    }

    /* Inputs, Textarea, Custom Select Mobile: 12px */
    .td-contact-form-wrapper input[type="text"],
    .td-contact-form-wrapper input[type="email"],
    .td-contact-form-wrapper input[type="tel"],
    .td-contact-form-wrapper textarea,
    .td-contact-form-wrapper .custom-select-trigger,
    .td-contact-form-wrapper .custom-select-option {
        font-size: 12px !important;
        height: 44px;
        padding: 10px 14px !important;
    }

    .td-contact-form-wrapper textarea {
        height: 110px !important;
    }

    /* Checkbox & Privacy Text Mobile: 12px, Gap 12px */
    .td-privacy-group .td-checkbox-label {
        gap: 12px !important;
    }

    .td-privacy-group .checkbox-text {
        font-size: 12px !important;
    }

    .td-contact-form-wrapper input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px;
        min-height: 20px;
    }

    .td-btn-submit {
        height: 48px !important;
        font-size: 14px !important;
    }

    /* Contact Us Page Section Layout Wrapper Mobile */
    .section-content .row.contact-us-wrapper {
        flex-direction: column-reverse;
    }

    .contact-us-wrapper>div:first-of-type {
        border-radius: 0;
    }

    .contact-us-wrapper>div:first-of-type,
    .contact-us-wrapper>div:last-of-type {
        padding: 16px;
    }

    .contact-us-wrapper>div:first-of-type h3 {
        font-size: 20px;
    }

    .contact-us-wrapper>div:first-of-type p {
        font-size: 14px;
    }

    .contact-us-wrapper>div:first-of-type .icon-box-text h3 {
        font-size: 14px;
    }

    .contact-us-wrapper>div:first-of-type .icon-box-text p {
        font-size: 12px;
    }

    .contact-us-wrapper>div:first-of-type .icon-box-text {
        padding-left: 12px;
    }
}