/* ===== CONSULTATION PAGE STYLES =====
   Extends styles.css — do NOT duplicate base variables or font-faces.
   All new rules follow the same visual language:
   dark navy background · gold-accent borders/focus · white-primary text · gray-secondary placeholders
   ================================================================= */


/* ===== MAIN LAYOUT ===== */
.consultation-section {
    padding: 7rem 0 6rem;
}

.consultation-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 0 4rem;
    /* give the grid a fixed viewport-relative height so the form column can overflow */
    align-items: start;
}

/* ===== LEFT COLUMN — intro ===== */
.consultation-intro {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    margin-top: 3.5rem;
    /* Sticky via JS-free approach: fix its position relative to the viewport */
    position: -webkit-sticky;
    position: sticky;
    top: 6.5rem; /* sits just below the fixed navbar */
}

/* ===== RIGHT COLUMN — form card ===== */
.consult-form-card {
    grid-column: 2;
    grid-row: 1;
}

.consult-info-headline {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    color: var(--white-primary);
}

.consult-info-headline .gold {
    background: linear-gradient(135deg, var(--gold-accent), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.consult-info-body {
    color: var(--gray-secondary);
    line-height: 1.75;
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.consult-info-contact-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-accent);
    margin-bottom: 1.5rem;
    letter-spacing: 0.03em;
}

/* ===== RIGHT COLUMN — FORM CARD ===== */
.consult-form-card {
    background: rgba(0, 0, 34, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 3rem;
}

/* ===== FORM LAYOUT HELPERS ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0; /* individual items carry their own margin-bottom */
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-secondary);
    margin-bottom: 0.45rem;
    letter-spacing: 0.03em;
}

.form-group label .req {
    color: var(--gold-accent);
    margin-left: 0.2rem;
}

/* Shared input/select/textarea appearance */
.form-input,
.form-select,
.consult-form-card .contact-form input,
.consult-form-card .contact-form textarea {
    width: 100%;
    padding: 0.875rem 1.1rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(139, 147, 168, 0.3);
    border-radius: 8px;
    color: var(--white-primary);
    font-family: inherit;
    font-size: 0.975rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder,
.form-select::placeholder {
    color: var(--gray-secondary);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

/* Select arrow */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B93A8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select option {
    background: #000022;
    color: var(--white-primary);
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 0.875rem 1.1rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(139, 147, 168, 0.3);
    border-radius: 8px;
    color: var(--white-primary);
    font-family: inherit;
    font-size: 0.975rem;
    resize: vertical;
    min-height: 130px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea::placeholder {
    color: var(--gray-secondary);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

/* ===== PHONE ROW: country code + number ===== */
.phone-row {
    display: flex;
    gap: 0;
    border: 1px solid rgba(139, 147, 168, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: rgba(0, 0, 0, 0.45);
}

.phone-row:focus-within {
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.phone-code-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.85rem;
    background: rgba(0, 0, 34, 0.6);
    border: none;
    border-right: 1px solid rgba(139, 147, 168, 0.25);
    color: var(--white-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease;
    min-width: 96px;
    justify-content: center;
}

.phone-code-btn:hover,
.phone-code-btn[aria-expanded="true"] {
    background: rgba(212, 175, 55, 0.08);
}

.phone-code-btn .flag {
    font-size: 1.1rem;
    line-height: 1;
}

.phone-code-btn .caret {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-left: 0.15rem;
}

.phone-number-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    color: var(--white-primary);
    font-family: inherit;
    font-size: 0.975rem;
    min-width: 0;
}

.phone-number-input::placeholder {
    color: var(--gray-secondary);
}

.phone-number-input:focus {
    outline: none;
}

/* Phone code dropdown */
.phone-code-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 200;
    background: #000422;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    max-height: 260px;
    overflow-y: auto;
    min-width: 240px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: none;
}

.phone-code-dropdown.open {
    display: block;
}

.phone-code-search {
    padding: 0.65rem 0.9rem;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-bottom: 1px solid rgba(139, 147, 168, 0.2);
    color: var(--white-primary);
    font-family: inherit;
    font-size: 0.875rem;
    width: 100%;
}

.phone-code-search:focus {
    outline: none;
}

.phone-code-search::placeholder {
    color: var(--gray-secondary);
}

.phone-code-list {
    list-style: none;
    padding: 0.4rem 0;
}

.phone-code-list li {
    padding: 0.55rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--white-primary);
    transition: background 0.15s ease;
}

.phone-code-list li:hover,
.phone-code-list li.selected {
    background: rgba(212, 175, 55, 0.1);
}

.phone-code-list li .dial {
    color: var(--gold-accent);
    font-weight: 600;
    margin-left: auto;
    font-size: 0.8rem;
}

.phone-wrapper {
    position: relative;
}

/* ===== MULTI-SELECT SPECIALTY FIELD ===== */
.multiselect-wrapper {
    position: relative;
}

.multiselect-trigger {
    width: 100%;
    min-height: 46px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(139, 147, 168, 0.3);
    border-radius: 8px;
    color: var(--white-primary);
    font-family: inherit;
    font-size: 0.975rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    position: relative;
}

.multiselect-trigger:focus,
.multiselect-trigger[aria-expanded="true"] {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.multiselect-trigger .ms-placeholder {
    color: var(--gray-secondary);
    font-size: 0.975rem;
    pointer-events: none;
}

.multiselect-trigger .ms-caret {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    opacity: 0.6;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.multiselect-trigger[aria-expanded="true"] .ms-caret {
    transform: translateY(-50%) rotate(180deg);
}

/* Selected tag chips */
.ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold-light);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem 0.2rem 0.65rem;
    line-height: 1;
    white-space: nowrap;
}

.ms-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gold-light);
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.ms-tag-remove:hover {
    opacity: 1;
}

/* Dropdown panel */
.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 200;
    background: #000422;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 0.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: none;
    max-height: 280px;
    overflow-y: auto;
}

.multiselect-dropdown.open {
    display: block;
}

.ms-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.ms-option:hover {
    background: rgba(212, 175, 55, 0.08);
}

.ms-option input[type="checkbox"] {
    accent-color: var(--gold-accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.ms-option label {
    color: var(--white-primary);
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.ms-option.checked label {
    color: var(--gold-light);
    font-weight: 600;
}

/* ===== COUNTRY COMBOBOX ===== */
.country-combobox-wrapper {
    position: relative;
}

.country-input {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 1.1rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(139, 147, 168, 0.3);
    border-radius: 8px;
    color: var(--white-primary);
    font-family: inherit;
    font-size: 0.975rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.country-input::placeholder {
    color: var(--gray-secondary);
}

.country-input:focus {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.country-input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gray-secondary);
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.country-combobox-wrapper.open .country-input-icon {
    transform: translateY(-50%) rotate(180deg);
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 200;
    background: #000422;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: none;
    padding: 0.3rem 0;
}

.country-dropdown.open {
    display: block;
}

.country-option {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--white-primary);
    transition: background 0.15s ease;
}

.country-option:hover,
.country-option.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-light);
}

.country-option.no-results {
    color: var(--gray-secondary);
    cursor: default;
    font-style: italic;
}

.country-option.no-results:hover {
    background: transparent;
    color: var(--gray-secondary);
}

/* ===== SUBMIT BUTTON (full-width) ===== */
.consult-submit-btn {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 1.05rem;
    padding: 1.1rem 2rem;
}

/* ===== FORM DIVIDER ===== */
.form-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    margin: 1.5rem 0;
}

/* ===== FORM SECTION LABEL ===== */
.form-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-accent);
    margin-bottom: 1rem;
    display: block;
    opacity: 0.8;
}

/* ===== SCROLLBAR (dropdowns) ===== */
.phone-code-dropdown::-webkit-scrollbar,
.multiselect-dropdown::-webkit-scrollbar,
.country-dropdown::-webkit-scrollbar {
    width: 5px;
}

.phone-code-dropdown::-webkit-scrollbar-track,
.multiselect-dropdown::-webkit-scrollbar-track,
.country-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.phone-code-dropdown::-webkit-scrollbar-thumb,
.multiselect-dropdown::-webkit-scrollbar-thumb,
.country-dropdown::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
}

/* ===== OPTIONAL BADGE ===== */
.optional-badge {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gray-secondary);
    margin-left: 0.35rem;
    opacity: 0.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .consultation-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* children expand to full container width */
        width: 100%;
        box-sizing: border-box;
        gap: 3rem;
    }

    .consultation-intro {
        position: static;
        order: 1; /* headline + description first */
        width: 100%;
        box-sizing: border-box;
    }

    .consult-form-card {
        order: 2; /* form second */
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
        /* Clear any grid placement from the desktop two-column rule */
        grid-column: unset;
        grid-row: unset;
    }
}

@media (max-width: 768px) {
    .consultation-section {
        padding: 5rem 0 4rem;
    }

    /* Tighten the container's side padding so the form card can reach near the screen edges */
    .consultation-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }

    .consultation-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* children expand to full container width */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        gap: 2.5rem;
    }

    /* ── Intro: center-align and scale up text ── */
    .consultation-intro {
        order: 1;
        text-align: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .consult-info-headline {
        font-size: 1.85rem;
    }

    .consult-info-body {
        font-size: 1.025rem;
        line-height: 1.6;
    }

    /* ── Form card: explicitly fill the full container width ── */
    .consult-form-card {
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
        padding: 2rem 1.25rem;
        border-radius: 14px;
        /* Negate any grid-column placement from the desktop rule */
        grid-column: unset;
        grid-row: unset;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .phone-code-dropdown {
        min-width: 200px;
    }

    /* Submit button: full width and centered inside the form card */
    .consult-submit-btn {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
}

/* ===== RTL ADJUSTMENTS ===== */
[dir="rtl"] .form-select {
    background-position: left 1rem center;
    padding-right: 1.1rem;
    padding-left: 2.5rem;
}

[dir="rtl"] .phone-code-btn {
    border-right: none;
    border-left: 1px solid rgba(139, 147, 168, 0.25);
}

[dir="rtl"] .phone-code-dropdown {
    left: auto;
    right: 0;
}

[dir="rtl"] .multiselect-trigger {
    text-align: right;
    padding-left: 2.5rem;
    padding-right: 1rem;
}

[dir="rtl"] .multiselect-trigger .ms-caret {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .country-input {
    padding-left: 2.5rem;
    padding-right: 1.1rem;
}

[dir="rtl"] .country-input-icon {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .form-group label .req {
    margin-left: 0;
    margin-right: 0.2rem;
}

[dir="rtl"] .consult-info-contact-heading,
[dir="rtl"] .consult-info-headline,
[dir="rtl"] .consult-info-body {
    text-align: right;
}

[dir="rtl"] .phone-code-list li .dial {
    margin-left: 0;
    margin-right: auto;
}
