:root {
    --contact-section-gap: clamp(4rem, 6vw, 7rem);
}

.contact-section-gap {
    width: 100%;
    height: var(--contact-section-gap);
    flex-shrink: 0;
}

.contact-page .final-cta {
    padding-top: clamp(5.25rem, 7vw, 7.5rem);
    padding-bottom: clamp(1rem, 2vw, 2.5rem);
}

/* ============================================================
   GLOBAL PRESENCE SIDE-BY-SIDE LOCATIONS & SPACING
   ============================================================ */
/* Reset GET IN TOUCH heading tag to match global website style */
.cta-visual-side .cta-text-content > .heading-tag {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 4px !important;
    color: var(--purple-light, #a594fd) !important;
    font-weight: 800 !important;
    margin-bottom: 25px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
}

.contact-page .cta-main-title {
    margin-bottom: 16px;
}

.global-presence-wrapper {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-page .contact-form-container {
    padding: clamp(20px, 3.5vw, 36px) clamp(20px, 3.5vw, 40px) clamp(16px, 2.5vw, 24px);
}

.contact-page .final-cta .magnetic-wrap {
    margin-top: 20px;
    padding: 0;
}

.contact-page .form-footer-msg {
    margin-top: 20px;
    margin-bottom: 0;
}

@media (min-width: 1025px) {
    .contact-page .cta-wrapper {
        align-items: stretch;
    }

    .contact-page .cta-visual-side {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding-top: 0;
    }

    .contact-page .global-presence-wrapper {
        margin-top: auto;
        padding-top: 14px;
    }
}

.global-presence-wrapper,
.global-location-card,
.card-location-header,
.location-header-text,
.location-header-text h3,
.location-badge,
.location-details-list,
.location-detail-item {
    text-align: left !important;
}

.global-presence-wrapper .heading-tag {
    margin-bottom: 2px;
    justify-content: flex-start !important;
    margin-left: 0 !important;
}

.location-detail-item {
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.location-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 4px;
}

.global-location-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(165, 148, 253, 0.15);
    border-radius: 18px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.global-location-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--purple-main, #a594fd), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.global-location-card:hover {
    border-color: rgba(165, 148, 253, 0.45);
    transform: translateY(-4px);
    background: rgba(165, 148, 253, 0.04);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.global-location-card:hover::before {
    opacity: 1;
}

.card-location-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.card-location-header .location-flag {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-location-header .location-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.location-header-text h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.25;
}

.location-badge {
    font-size: 11px;
    color: var(--purple-main, #a594fd);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.location-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.location-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.45;
}

.location-detail-item i {
    color: var(--purple-main, #a594fd);
    font-size: 13px;
    margin-top: 3px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.location-detail-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-word;
}

.location-detail-item a:hover {
    color: var(--purple-main, #a594fd);
}

/* ============================================================
   CUSTOM THEME DROPDOWN COMPONENT
   ============================================================ */
.custom-select-group {
    width: 100%;
    margin-bottom: 16px;
    position: relative;
    z-index: 50;
}

.theme-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.dropdown-trigger:hover {
    border-color: rgba(165, 148, 253, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.theme-dropdown.active .dropdown-trigger,
.dropdown-trigger:focus {
    border-color: var(--purple-light, #a594fd);
    background: rgba(165, 148, 253, 0.05);
    box-shadow: 0 0 0 3px rgba(165, 148, 253, 0.2);
}

.dropdown-selected-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    transition: color 0.2s ease;
}

.dropdown-selected-text.has-value {
    color: #ffffff;
    font-weight: 500;
}

.dropdown-icon {
    color: #a594fd;
    /* Bright visible purple chevron icon */
    font-size: 13px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 10px;
    flex-shrink: 0;
}

.theme-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

/* Custom Theme Glassmorphic Menu (Opens Downward with High Stacking Context) */
.custom-select-group {
    width: 100%;
    margin-bottom: 14px;
    position: relative;
    z-index: 50;
}

.custom-select-group:has(.theme-dropdown.active),
.custom-select-group.is-open {
    z-index: 99999;
}

.theme-dropdown {
    position: relative;
    width: 100%;
}

.theme-dropdown.active {
    z-index: 100000;
}

.dropdown-trigger {
    width: 100%;
    min-height: 48px;
    padding: 13px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.dropdown-trigger:hover {
    border-color: rgba(165, 148, 253, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.theme-dropdown.active .dropdown-trigger,
.dropdown-trigger:focus-visible {
    border-color: var(--purple-light, #a594fd);
    background: rgba(165, 148, 253, 0.05);
    box-shadow: 0 0 0 3px rgba(165, 148, 253, 0.2);
}

.dropdown-selected-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    transition: color 0.2s ease;
}

.dropdown-selected-text.has-value {
    color: #ffffff;
    font-weight: 500;
}

.dropdown-icon {
    color: #a594fd;
    font-size: 13px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 10px;
    flex-shrink: 0;
}

.theme-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    bottom: auto;
    left: 0;
    width: 100%;
    background: #0d0a14;
    border: 1.5px solid rgba(165, 148, 253, 0.65);
    border-radius: 12px;
    padding: 6px;
    margin: 0;
    list-style: none;
    z-index: 100000;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 25px rgba(165, 148, 253, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.theme-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.dropdown-option {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.dropdown-option:hover,
.dropdown-option:active {
    background: rgba(165, 148, 253, 0.18);
    color: #ffffff;
}

.dropdown-option.selected {
    background: rgba(165, 148, 253, 0.25);
    color: #a594fd;
    font-weight: 600;
}

.option-check {
    font-size: 12px;
    color: #a594fd;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dropdown-option.selected .option-check {
    opacity: 1;
}

.dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(165, 148, 253, 0.4);
    border-radius: 10px;
}

/* Ensure no parent clips the dropdown menu popup */
.contact-page .final-cta,
.contact-page .cta-wrapper,
.contact-page .cta-form-side,
.contact-page .contact-form-container,
.contact-page .stagger-form {
    overflow: visible !important;
}

/* ============================================================
   RESPONSIVE ALIGNMENT & FORM WIDTH HARMONIZATION
   ============================================================ */
@media (min-width: 1025px) {
    .contact-page .cta-wrapper {
        display: flex;
        align-items: stretch !important;
        justify-content: space-between;
        gap: clamp(35px, 4vw, 55px);
    }

    .contact-page .cta-visual-side {
        width: 48%;
        padding-top: 0;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .contact-page .cta-text-content {
        display: flex;
        flex-direction: column;
        height: 100%;
        flex: 1;
    }

    .contact-page .global-presence-wrapper {
        margin-top: auto !important;
    }

    .contact-page .location-cards-grid {
        align-items: stretch;
    }

    .contact-page .global-location-card {
        height: 100%;
    }

    .contact-page .cta-form-side {
        width: 50%;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .contact-page .contact-form-container {
        padding: 34px 34px 44px;
        border-radius: 20px;
        position: relative;
        z-index: 20;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .contact-page .form-heading {
        font-size: clamp(1.6rem, 2.5vw, 2.2rem);
        font-weight: 800;
        line-height: 1.2;
        letter-spacing: -1px;
        margin-bottom: 22px;
    }

    .contact-page .form-row {
        gap: 16px;
        margin-bottom: 14px;
    }

    .contact-page .form-full {
        margin-bottom: 14px;
    }

    .contact-page .custom-select-group {
        margin-bottom: 14px;
    }

    .contact-page .stagger-form input,
    .contact-page .stagger-form textarea {
        padding: 13px 18px;
        font-size: 14px;
    }

    .contact-page .magnetic-wrap {
        position: relative;
        z-index: 1;
        margin-top: 22px;
    }

    .contact-page .form-footer-msg {
        margin-top: 14px;
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .location-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-page .global-presence-wrapper {
        margin-top: clamp(2.5rem, 5vw, 4rem);
    }
}

@media (max-width: 768px) {
    .location-cards-grid {
        grid-template-columns: 1fr;
    }


    .contact-page .final-cta {
        padding-top: var(--hero-padding-top-tablet, clamp(5.5rem, 8.5vw, 7.5rem));
        padding-bottom: 0;
    }

}

@media (max-width: 480px) {
    .contact-page .final-cta {
        padding-top: var(--hero-padding-top-mobile, clamp(5rem, 8vw, 6.5rem));
        padding-bottom: 0;
    }
}
