/* ==========================================================================
   CoregenX Contact Page Styles (Compact & Minimal Height Redesign)
   Matching CoregenX logo & website theme: #00c0ff, #2563eb, #13172d
   ========================================================================== */

:root {
    --cgx-primary: #0099e6;
    --cgx-primary-dark: #0077b6;
    --cgx-accent: #2563eb;
    --cgx-accent-indigo: #432d92;
    --cgx-teal: #2ec4a5;
    --cgx-dark: #13172d;
    --cgx-slate: #1e293b;
    --cgx-muted: #64748b;
    --cgx-light-muted: #94a3b8;
    --cgx-border: #e2e8f0;
    --cgx-border-hover: #cbd5e1;
    --cgx-border-focus: #0099e6;
    --cgx-radius-lg: 18px;
    --cgx-radius-md: 12px;
    --cgx-radius-sm: 8px;
    --cgx-shadow-card: 0 10px 30px -8px rgba(19, 23, 45, 0.07);
}

.cgx-contact-section {
    position: relative;
    padding: 40px 0 70px;
    background: radial-gradient(circle at 10% 10%, rgba(0, 192, 255, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 15%, rgba(67, 45, 146, 0.05) 0%, transparent 40%),
                #f8fafc;
    overflow: hidden;
}

/* ─── Hero Header (Compact) ─── */
.cgx-contact-hero {
    position: relative;
    text-align: center;
    max-width: 860px;
    margin: 0 auto 26px;
    padding: 0 15px;
}

.cgx-contact-badge-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cgx-contact-badge-line {
    width: 24px;
    height: 2px;
    background: #00c0ff;
    border-radius: 2px;
}

.cgx-contact-badge-text {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cgx-primary);
}

.cgx-contact-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.22;
    color: var(--cgx-dark);
    margin: 0 0 10px;
    letter-spacing: -0.3px;
}

.cgx-text-gradient {
    background: linear-gradient(135deg, #359fad 0%, #4cdaa0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.cgx-contact-desc {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--cgx-muted);
    margin: 0 auto;
    max-width: 760px;
}

.cgx-contact-desc strong {
    color: var(--cgx-dark);
    font-weight: 600;
}

/* ─── 3 Quick Contact Cards (WhatsApp, Call, Email) ─── */
.cgx-contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1080px;
    margin: 0 auto 26px;
}

.cgx-ccard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--cgx-border);
    border-radius: var(--cgx-radius-md);
    padding: 14px 18px;
    text-decoration: none !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.cgx-ccard:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.cgx-ccard__content {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.cgx-ccard__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}

.cgx-ccard--whatsapp .cgx-ccard__icon {
    background: #dcfce7;
    color: #16a34a;
}
.cgx-ccard--call .cgx-ccard__icon {
    background: #e0f2fe;
    color: #0284c7;
}
.cgx-ccard--email .cgx-ccard__icon {
    background: #ffedd5;
    color: #ea580c;
}

.cgx-ccard__info {
    min-width: 0;
}

.cgx-ccard__title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--cgx-dark);
    margin: 0 0 2px;
    white-space: nowrap;
}

.cgx-ccard__value {
    font-size: 13px;
    font-weight: 600;
    color: var(--cgx-slate);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cgx-ccard--whatsapp .cgx-ccard__value {
    color: #16a34a;
    font-weight: 700;
}

.cgx-ccard__arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.cgx-ccard--whatsapp .cgx-ccard__arrow {
    background: #f0fdf4;
    color: #16a34a;
}
.cgx-ccard--call .cgx-ccard__arrow {
    background: #f0f9ff;
    color: #0284c7;
}
.cgx-ccard--email .cgx-ccard__arrow {
    background: #fff7ed;
    color: #ea580c;
}

.cgx-ccard:hover .cgx-ccard__arrow {
    transform: translateX(3px);
}

/* ─── Main Form Card (Ultra Minimal & Compact Height) ─── */
.cgx-form-card {
    background: #ffffff;
    border: 1px solid var(--cgx-border);
    border-radius: var(--cgx-radius-lg);
    padding: 26px 30px 28px;
    box-shadow: var(--cgx-shadow-card);
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    scroll-margin-top: 110px;
}

.cgx-form-header {
    margin-bottom: 20px;
    text-align: left;
}

.cgx-form-badge-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cgx-form-badge-text {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--cgx-primary);
}

.cgx-form-badge-line {
    width: 28px;
    height: 2px;
    background: #bfdbfe;
    border-radius: 2px;
}

.cgx-form-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--cgx-dark);
    margin: 0 0 4px;
    letter-spacing: -0.2px;
}

.cgx-form-desc {
    font-size: 13.5px;
    color: var(--cgx-muted);
    margin: 0;
    line-height: 1.45;
}

/* ─── 3-Column Responsive Form Grid ─── */
.cgx-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 16px;
}

.cgx-col-full {
    grid-column: 1 / -1;
}

.cgx-field-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--cgx-border);
    border-radius: var(--cgx-radius-sm);
    transition: all 0.2s ease;
    height: 44px;
}

.cgx-field-group:focus-within {
    border-color: var(--cgx-border-focus);
    box-shadow: 0 0 0 3px rgba(0, 153, 230, 0.12);
}

.cgx-field-icon {
    position: absolute;
    left: 14px;
    color: var(--cgx-light-muted);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.cgx-field-group:focus-within .cgx-field-icon {
    color: var(--cgx-primary);
}

.cgx-field-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 14px 0 38px;
    font-size: 13.5px;
    color: var(--cgx-dark);
    border-radius: var(--cgx-radius-sm);
    outline: none;
    font-family: inherit;
}

.cgx-field-input::placeholder,
.cgx-field-textarea::placeholder,
.cgx-dialcode-input::placeholder {
    font-size: 13.5px;
    font-weight: 400;
    color: #94a3b8;
    opacity: 1;
}

/* Phone input with Editable Dial Code */
.cgx-phone-group {
    padding-left: 0;
    min-width: 0;
}

.cgx-dialcode-box {
    display: flex;
    align-items: center;
    height: 100%;
    border-right: 1.5px solid var(--cgx-border);
    background: #f8fafc;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    padding: 0 6px 0 10px;
    gap: 4px;
    flex-shrink: 0;
}

.cgx-dialcode-icon {
    color: #94a3b8;
    font-size: 12px;
}

.cgx-dialcode-input {
    width: 58px;
    height: 100%;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: var(--cgx-dark);
    outline: none;
    font-family: inherit;
    padding: 0 2px;
    text-align: center;
}

.cgx-phone-input {
    padding-left: 12px;
    flex: 1;
    min-width: 0;
    width: auto;
}

/* ─── Styled Native Select ─── */
.cgx-field-select {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 34px 0 38px;
    font-size: 13.5px;
    color: var(--cgx-dark);
    border-radius: var(--cgx-radius-sm);
    outline: none;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.cgx-field-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.cgx-field-group:focus-within .cgx-field-select-arrow {
    color: var(--cgx-primary);
}

/* ─── Searchable Dropdown Component ─── */
.cgx-searchable-select {
    position: relative;
    width: 100%;
    height: 100%;
}

.cgx-searchable-select .cgx-field-input {
    cursor: pointer;
    padding-right: 32px;
}

.cgx-searchable-arrow {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.cgx-searchable-select.is-open .cgx-searchable-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: var(--cgx-primary);
}

.cgx-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--cgx-border);
    border-radius: var(--cgx-radius-sm);
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    padding: 4px;
}

.cgx-searchable-select.is-open .cgx-dropdown-menu {
    display: block;
}

.cgx-dropdown-item {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--cgx-slate);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease;
}

.cgx-dropdown-item:hover,
.cgx-dropdown-item.is-active {
    background: #f0f9ff;
    color: var(--cgx-primary-dark);
    font-weight: 600;
}

.cgx-dropdown-empty {
    padding: 10px 12px;
    font-size: 12.5px;
    color: var(--cgx-light-muted);
    text-align: center;
}

/* ─── Compact Textarea ─── */
.cgx-field-textarea-group {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
}

.cgx-field-textarea-group .cgx-field-icon {
    top: 13px;
}

.cgx-field-textarea {
    width: 100%;
    min-height: 68px;
    height: 68px;
    border: none;
    background: transparent;
    padding: 10px 14px 22px 38px;
    font-size: 13.5px;
    color: var(--cgx-dark);
    outline: none;
    font-family: inherit;
    resize: vertical;
    border-radius: var(--cgx-radius-sm);
}

.cgx-char-counter {
    position: absolute;
    bottom: 6px;
    right: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    pointer-events: none;
}

/* ─── Dynamic Other Requirement Field (Animated) ─── */
#cgx_other_service_col {
    display: none;
    transition: all 0.25s ease;
}

#cgx_other_service_col.is-visible {
    display: block;
    animation: cgxSlideDown 0.25s ease forwards;
}

@keyframes cgxSlideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Compact Submit Button ─── */
.cgx-submit-btn {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #0099e6 0%, #2563eb 50%, #432d92 100%);
    color: #ffffff;
    padding: 13px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px -3px rgba(0, 153, 230, 0.4);
    transition: all 0.25s ease;
    font-family: inherit;
    margin-top: 4px;
}

.cgx-submit-btn:hover {
    background: linear-gradient(135deg, #0088cc 0%, #1d4ed8 50%, #352179 100%);
    box-shadow: 0 10px 24px -3px rgba(0, 153, 230, 0.55);
    transform: translateY(-1px);
}

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

.cgx-submit-btn i {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.cgx-submit-btn:hover i {
    transform: translateX(3px);
}

.cgx-captcha-legal {
    text-align: center;
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 8px;
    line-height: 1.4;
}

.cgx-captcha-legal a {
    color: var(--cgx-muted);
    text-decoration: underline;
}

/* ─── Office Locations (Address on Top, Map Under It) ─── */
.cgx-map-section {
    margin-top: 50px;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
}

.cgx-office-card {
    background: #ffffff;
    border: 1px solid var(--cgx-border);
    border-radius: var(--cgx-radius-md);
    overflow: hidden;
    box-shadow: var(--cgx-shadow-card);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cgx-office-header {
    padding: 20px 22px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--cgx-border);
}

.cgx-office-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cgx-office-badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e0f2fe;
    color: var(--cgx-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.cgx-office-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--cgx-dark);
    margin: 0;
}

.cgx-office-address {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--cgx-slate);
    margin: 0 0 10px;
}

.cgx-office-contact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: var(--cgx-muted);
    border-top: 1px dashed var(--cgx-border);
    padding-top: 10px;
}

.cgx-office-contact-meta a {
    color: var(--cgx-primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cgx-office-contact-meta a:hover {
    text-decoration: underline;
}

.cgx-office-map-frame {
    flex-grow: 1;
    min-height: 280px;
    background: #f1f5f9;
}

.cgx-office-map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 280px;
    border: 0;
    display: block;
}

/* ─── Comprehensive Responsive Design System ─── */

/* 1. Large Tablets & Small Laptops (769px - 1024px) */
@media (max-width: 1024px) {
    .cgx-contact-hero {
        max-width: 760px;
        margin-bottom: 22px;
    }
    .cgx-contact-title {
        font-size: 30px;
    }
    .cgx-contact-cards {
        gap: 14px;
        margin-bottom: 22px;
    }
    .cgx-ccard {
        padding: 12px 14px;
    }
    .cgx-ccard__icon {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
    .cgx-ccard__title {
        font-size: 13px;
    }
    .cgx-ccard__value {
        font-size: 12.5px;
    }
    .cgx-form-card {
        padding: 24px 24px 26px;
    }
}

/* 2. Tablets (641px - 991px) */
@media (max-width: 991px) {
    .cgx-contact-section {
        padding: 34px 0 60px;
    }
    .cgx-contact-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .cgx-form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 13px 14px;
    }
    .cgx-map-section {
        margin-top: 36px;
    }
    .cgx-office-card {
        margin-bottom: 22px;
    }
    .cgx-office-map-frame,
    .cgx-office-map-frame iframe {
        min-height: 260px;
        height: 260px;
    }
}

/* 3. Phablets & Small Tablets (481px - 768px) */
@media (max-width: 768px) {
    /* Page banner: uses the sitewide compact banner in css/theme.css */

    .cgx-contact-hero {
        padding: 0 10px;
    }
    .cgx-contact-title {
        font-size: 26px;
        line-height: 1.25;
    }
    .cgx-contact-desc {
        font-size: 13.8px;
    }
    .cgx-contact-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .cgx-ccard {
        padding: 13px 16px;
    }
}

/* 4. Standard Mobile Devices (<= 640px) */
@media (max-width: 640px) {
    .cgx-contact-section {
        padding: 26px 0 46px;
    }
    .cgx-contact-hero {
        margin-bottom: 18px;
    }
    .cgx-contact-title {
        font-size: 23px;
        margin-bottom: 8px;
    }
    .cgx-contact-desc {
        font-size: 13px;
        line-height: 1.48;
    }
    .cgx-form-card {
        padding: 20px 16px 22px;
        border-radius: var(--cgx-radius-md);
    }
    .cgx-form-header {
        margin-bottom: 16px;
    }
    .cgx-form-title {
        font-size: 19px;
    }
    .cgx-form-desc {
        font-size: 12.5px;
    }
    .cgx-form-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }
    .cgx-field-group {
        height: 44px;
    }
    .cgx-dialcode-input {
        width: 50px;
        font-size: 12.5px;
    }
    .cgx-phone-input {
        padding-left: 8px;
    }
    .cgx-field-textarea {
        font-size: 13px;
    }
    .cgx-submit-btn {
        padding: 12px 20px;
        font-size: 14.5px;
    }
    .cgx-map-section {
        margin-top: 30px;
    }
    .cgx-office-header {
        padding: 16px 16px 14px;
    }
    .cgx-office-title {
        font-size: 16px;
    }
    .cgx-office-address {
        font-size: 12.8px;
        margin-bottom: 6px;
    }
    .cgx-office-map-frame,
    .cgx-office-map-frame iframe {
        min-height: 220px;
        height: 220px;
    }
}

/* 5. Mobile Phones (<= 480px) */
@media (max-width: 480px) {
    .cgx-contact-title {
        font-size: 21.5px;
    }
    .cgx-form-card {
        padding: 18px 13px 20px;
    }
    .cgx-field-group {
        height: 43px;
    }
    .cgx-field-input,
    .cgx-field-select {
        font-size: 13px;
    }
}

/* 6. Ultra-Small Phones (<= 380px, e.g., iPhone SE / Galaxy Fold) */
@media (max-width: 380px) {
    .cgx-contact-hero {
        padding: 0 4px;
    }
    .cgx-contact-title {
        font-size: 20px;
    }
    .cgx-contact-desc {
        font-size: 12px;
    }
    .cgx-ccard {
        padding: 10px 12px;
    }
    .cgx-ccard__icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
    .cgx-ccard__title {
        font-size: 12.5px;
    }
    .cgx-ccard__value {
        font-size: 11.5px;
    }
    .cgx-ccard__arrow {
        width: 24px;
        height: 24px;
        font-size: 10px;
        margin-left: 4px;
    }
    .cgx-form-card {
        padding: 15px 10px 17px;
        border-radius: 12px;
    }
    .cgx-form-title {
        font-size: 17px;
    }
    .cgx-form-desc {
        font-size: 11.5px;
    }
    .cgx-field-input,
    .cgx-field-select {
        font-size: 12px;
        padding-left: 32px;
    }
    .cgx-field-icon {
        left: 10px;
        font-size: 13px;
    }
    .cgx-dialcode-box {
        padding: 0 4px 0 6px;
    }
    .cgx-dialcode-icon {
        display: none; /* Save space on <= 380px */
    }
    .cgx-dialcode-input {
        width: 44px;
        font-size: 12px;
    }
    .cgx-phone-input {
        padding-left: 6px;
        font-size: 12px;
    }
    .cgx-field-textarea {
        padding-left: 32px;
        font-size: 12px;
    }
    .cgx-submit-btn {
        padding: 11px 16px;
        font-size: 13.5px;
    }
    .cgx-office-header {
        padding: 14px 12px 12px;
    }
    .cgx-office-title {
        font-size: 15px;
    }
    .cgx-office-address {
        font-size: 12px;
    }
    .cgx-office-map-frame,
    .cgx-office-map-frame iframe {
        min-height: 200px;
        height: 200px;
    }
}

/* --- File Upload & Extended Form Styling for Career & Internship --- */
.cgx-file-upload {
    position: relative;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--cgx-radius-sm, 10px);
    background: #f8fafc;
    padding: 16px 20px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
}

.cgx-file-upload:hover,
.cgx-file-upload:focus-within {
    border-color: #5b3fd0;
    background: #f5f3ff;
}

.cgx-file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.cgx-file-upload__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.cgx-file-upload__icon {
    font-size: 22px;
    color: #5b3fd0;
}

.cgx-file-upload__text {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.cgx-file-upload__hint {
    font-size: 12px;
    color: #64748b;
}

.cgx-file-upload__selected {
    font-size: 13px;
    font-weight: 600;
    color: #0c8a72;
    margin-top: 6px;
    display: none;
}

.cgx-intern-form-wrapper {
    max-width: 860px;
    margin: 0 auto;
}

