/* ═══════════════════════════════════════════════════════════════
   contact.css — Contact Section
   ═══════════════════════════════════════════════════════════════ */

/* Slow fade-in animation for Contact section heading */
@keyframes slowContactFadeIn {
    from {
        opacity: 0;
        transform: translateY(35px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation classes for Contact header */
.contact-header-animate .mb-\[10px\],
.contact-header-animate h2 {
    opacity: 0;
    transform: translateY(35px);
    transition: none;
}

/* Before animation state - hidden */
#contact.before-animation .contact-header-animate .mb-\[10px\],
#contact.before-animation .contact-header-animate h2 {
    opacity: 0;
    transform: translateY(35px);
}

/* Animate in state - trigger animations */
#contact.animate-in .contact-header-animate .mb-\[10px\] {
    animation: slowContactFadeIn 1.4s ease-out forwards;
    animation-delay: 0.3s;
}

#contact.animate-in .contact-header-animate h2 {
    animation: slowContactFadeIn 1.6s ease-out forwards;
    animation-delay: 0.5s;
}

/* ── Get In Touch Section Responsive Styles ── */
#contact {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: white;
}

/* Background container with image - Responsive height and padding */
#contact > div {
    position: relative;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Desktop - maintain height */
@media (min-width: 1024px) {
    #contact > div {
        min-height: 1011px;
        padding: 4rem;
    }
}

/* Tablet landscape (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    #contact > div {
        min-height: 900px;
        padding: 3rem 2.5rem;
        border-radius: 18px;
        background-size: cover;
    }
}

/* Tablet portrait (640px - 767px) */
@media (max-width: 767px) and (min-width: 640px) {
    #contact > div {
        min-height: 800px;
        padding: 2.5rem 2rem;
        border-radius: 16px;
        background-size: cover;
    }
}

/* Mobile landscape (480px - 639px) */
@media (max-width: 639px) and (min-width: 480px) {
    #contact > div {
        min-height: 750px;
        padding: 2rem 1.5rem;
        border-radius: 14px;
        background-size: cover;
    }
}

/* Mobile portrait (< 480px) */
@media (max-width: 479px) {
    #contact > div {
        min-height: 700px;
        padding: 1.5rem 1rem;
        border-radius: 12px;
        background-size: cover;
    }
}

/* Extra small mobile (< 375px) */
@media (max-width: 374px) {
    #contact > div {
        min-height: 650px;
        padding: 1.25rem 0.75rem;
        border-radius: 10px;
    }
}

/* ── Contact Form Heading Responsive ── */
.contact-heading-label {
    font-size: 18px;
}

.contact-main-heading {
    font-size: 40px;
    line-height: 60px;
}

@media (max-width: 1023px) {
    .contact-heading-label {
        font-size: 16px;
    }
    
    .contact-main-heading {
        font-size: 32px;
        line-height: 1.5;
    }
}

@media (max-width: 767px) {
    .contact-heading-label {
        font-size: 15px;
    }
    
    .contact-main-heading {
        font-size: 28px;
        line-height: 1.4;
    }
}

@media (max-width: 479px) {
    .contact-heading-label {
        font-size: 14px;
    }
    
    .contact-main-heading {
        font-size: 24px;
        line-height: 1.3;
    }
}

/* ── Form Container Responsive ── */
#contact form > div > div {
    max-width: 700px;
}

/* Form white container padding */
@media (max-width: 1023px) {
    #contact form > div > div {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 767px) {
    #contact form > div > div {
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }
}

@media (max-width: 479px) {
    #contact form > div > div {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }
}

/* ── Form Labels Responsive ── */
#contact label {
    font-size: 16px;
}

@media (max-width: 767px) {
    #contact label {
        font-size: 15px;
        margin-bottom: 0.375rem;
    }
}

@media (max-width: 479px) {
    #contact label {
        font-size: 14px;
        margin-bottom: 0.25rem;
    }
}

/* ── Form Inputs Responsive ── */
#contact input,
#contact textarea {
    font-size: 16px;
    height: 50px;
    padding: 0 1rem;
}

#contact textarea {
    height: auto;
    padding: 0.75rem 1rem;
}

@media (max-width: 767px) {
    #contact input {
        font-size: 15px;
        height: 48px;
        padding: 0 0.875rem;
    }
    
    #contact textarea {
        font-size: 15px;
        padding: 0.625rem 0.875rem;
    }
}

@media (max-width: 479px) {
    #contact input {
        font-size: 14px;
        height: 46px;
        padding: 0 0.75rem;
        border-radius: 8px;
    }
    
    #contact textarea {
        font-size: 14px;
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
    }
}

/* ── Submit Button Responsive ── */
#contact button[type="submit"] {
    font-size: 18px;
    padding: 1.125rem 1rem;
}

@media (max-width: 1023px) {
    #contact button[type="submit"] {
        font-size: 17px;
        padding: 1rem 0.875rem;
    }
}

@media (max-width: 767px) {
    #contact button[type="submit"] {
        font-size: 16px;
        padding: 0.875rem 0.75rem;
    }
}

@media (max-width: 479px) {
    #contact button[type="submit"] {
        font-size: 15px;
        padding: 0.75rem 0.625rem;
        border-radius: 8px;
    }
}

/* ── Header Spacing Responsive ── */
.contact-header-spacing {
    margin-bottom: 60px;
}

@media (max-width: 1023px) {
    .contact-header-spacing {
        margin-bottom: 50px;
    }
}

@media (max-width: 767px) {
    .contact-header-spacing {
        margin-bottom: 40px;
    }
}

@media (max-width: 479px) {
    .contact-header-spacing {
        margin-bottom: 30px;
    }
}

/* ── Form Gap Responsive ── */
#contact form {
    gap: 1.125rem;
}

@media (max-width: 767px) {
    #contact form {
        gap: 1rem;
    }
}

@media (max-width: 479px) {
    #contact form {
        gap: 0.875rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Original Contact Section Styles (for other contact sections if any)
   ═══════════════════════════════════════════════════════════════ */

.contact-section {
    padding: var(--space-section-py) var(--space-section-px);
    background: var(--color-bg-section);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* ── Card container ── */
.contact-card {
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl) 3.5rem;
    width: 100%;
    max-width: 800px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

/* ── Label ── */
.contact-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: var(--space-md);
}

.contact-label img {
    width: 28px;
}

.contact-label span {
    color: var(--color-primary);

    font-size: var(--label-span-font-size);
    font-weight: var(--label-span-font-weight);
    letter-spacing: var(--label-span-letter-spacing);
    text-transform: uppercase;
}

/* ── Heading ── */
.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 2.5rem;
}

/* ── Form ── */
.contact-form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-field label {
    font-family: var(--font-inter);
    font-weight: 500;
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--color-text-label);
    letter-spacing: 0.01em;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    padding: 0.85rem var(--space-md);
    border: 1.5px solid var(--color-border-input);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--color-dark);
    background: var(--color-bg-input);
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    resize: none;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: var(--color-placeholder);
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 111, 232, 0.1);
    background: var(--color-white);
}

.contact-field textarea {
    min-height: 100px;
}

/* ── Error state (moved from JS inline styles) ── */
.field-error {
    display: block;
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
}

.input-error,
input.input-error,
textarea.input-error {
    border-color: #ef4444 !important;
}

/* ── Budget selector ── */
.budget-label {
    font-family: var(--font-inter);
    font-weight: 500;
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--color-text-label);
    letter-spacing: 0.01em;
    margin-bottom: 0.6rem;
    text-align: left;
    display: block;
}

.budget-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.budget-pill {
    font-family: var(--font-inter);
    font-size: 16px;
    font-weight: 400;

    padding: 0.4rem 1.4rem;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--color-border-pill);
    background: var(--color-white);
    color: #898989;

    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.budget-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.budget-pill.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-blue-sm);
}

/* ── Submit button ── */
.contact-submit {
    margin-top: var(--space-sm);
    display: flex;
    justify-content: center;
}

/* ── Thank you / error modal ── */
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.contact-modal[hidden] {
    display: none;
}

.contact-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(21, 21, 21, 0.62);
    backdrop-filter: blur(6px);
}

.contact-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid #0000001a;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    padding: 2.25rem 1.75rem 1.75rem;
    text-align: center;
    animation: contactModalIn 0.28s ease;
}

@keyframes contactModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    color: #151515;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.contact-modal-close:hover {
    opacity: 1;
}

.contact-modal-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e6f3fb;
    color: #0083cf;
    font-size: 28px;
}

.contact-modal.is-error .contact-modal-icon {
    background: #fdecec;
    color: #ef4444;
}

.contact-modal-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.contact-modal-diamond {
    width: 8px;
    height: 8px;
    background: #0083cf;
    transform: rotate(45deg);
    display: inline-block;
}

.contact-modal.is-error .contact-modal-diamond {
    background: #ef4444;
}

.contact-modal-label span:last-child {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #151515;
    letter-spacing: 0.02em;
}

.contact-modal-dialog h3 {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #161616;
    line-height: 1.2;
}

.contact-modal-dialog p {
    margin: 0 auto 1.5rem;
    max-width: 340px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    color: #151515b2;
}

.contact-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    border: none;
    border-radius: 10px;
    background: #151515;
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.9rem 1.5rem;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.contact-modal-btn:hover {
    background: #0083cf;
    transform: scale(1.03);
}

body.contact-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .contact-modal-dialog {
        padding: 2rem 1.25rem 1.5rem;
    }

    .contact-modal-dialog h3 {
        font-size: 26px;
    }

    .contact-modal-dialog p {
        font-size: 14px;
    }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

@media (max-width: 1024px) {
    .contact-label span {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .contact-card {
        padding: var(--space-xl) var(--space-lg);
    }

    .contact-form-row {
        grid-template-columns: 1fr;
    }

    .budget-options {
        gap: var(--space-sm);
    }
}


/* ══════════════════════════════════════════════════════════════
   CONTACT US SECTION ANIMATIONS - Scroll reveal
══════════════════════════════════════════════════════════════ */

/* Only hide elements BEFORE animation starts (controlled by JS) */
#contact.before-animation .mb-\[40px\],
#contact.before-animation > div > div:last-child {
    opacity: 0;
}

#contact.before-animation .mb-\[40px\] {
    transform: translateY(30px);
}

#contact.before-animation > div > div:last-child {
    transform: translateY(40px) scale(0.97);
}

/* Transitions - always applied */
#contact .mb-\[40px\] {
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

#contact > div > div:last-child {
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.15s;
}

/* Animated state - elements return to normal */
#contact.animate-in .mb-\[40px\],
#contact.animate-in > div > div:last-child {
    opacity: 1;
    transform: none;
}

/* Individual form fields stagger animation */
#contact.before-animation form > div {
    opacity: 0;
    transform: translateY(15px);
}

#contact form > div {
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#contact.animate-in form > div:nth-child(1) {
    transition-delay: 0.25s;
}

#contact.animate-in form > div:nth-child(2) {
    transition-delay: 0.3s;
}

#contact.animate-in form > div:nth-child(3) {
    transition-delay: 0.35s;
}

#contact.animate-in form > div:nth-child(4) {
    transition-delay: 0.4s;
}

#contact.animate-in form > div:nth-child(5) {
    transition-delay: 0.45s;
}

#contact.animate-in form > div {
    opacity: 1;
    transform: none;
}
