/* ===== نقشه نمایندگان (Iran location map) ===== */

.section--map {
    --map-bg: #0a0a0a;
    --map-card: #141414;
    --map-card-hover: #1a1a1a;
    --map-ink: #f4f4f5;
    --map-muted: rgba(255, 255, 255, 0.55);
    --map-line: rgba(255, 255, 255, 0.1);
    --map-accent-soft: rgba(255, 77, 0, 0.18);
    color: var(--map-ink);
}

.map-layout {
    display: grid;
    grid-template-columns: 1fr min(360px, 38%);
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: stretch;
}

.map-stage {
    position: relative;
    background: var(--map-card);
    border: 1px solid var(--map-line);
    border-radius: 24px;
    padding: clamp(0.75rem, 2vw, 1.25rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.map-svg {
    width: 100%;
    height: auto;
    max-height: 560px;
    display: block;
    user-select: none;
}

/* استان‌ها */
.map-province {
    fill: #242424;
    stroke: #353535;
    stroke-width: 1.2;
    transition: fill 0.25s ease, stroke 0.25s ease, opacity 0.25s ease;
    cursor: default;
}

.map-province.is-active {
    fill: rgba(255, 77, 0, 0.32) !important;
    stroke: #ff6a20 !important;
    stroke-width: 2;
}

.section--map .map-sea {
    fill: #152535;
    stroke: #243548;
}

.section--map .map-island {
    fill: #242424;
    stroke: #353535;
}

.map-sea {
    pointer-events: none;
}

.map-island {
    stroke-width: 1;
    pointer-events: none;
}

.map-cities {
    pointer-events: none;
}

.map-cities .map-city {
    pointer-events: auto;
}

/* شهرها */
.map-city {
    cursor: pointer;
    outline: none;
}

.map-city__ring {
    fill: rgba(255, 77, 0, 0.14);
    stroke: rgba(255, 120, 60, 0.45);
    stroke-width: 2;
    transition: r 0.25s ease, fill 0.25s ease, stroke 0.25s ease;
    r: 14;
}

.map-city__dot {
    fill: #ff5a14;
    stroke: #1a1a1a;
    stroke-width: 2;
    transition: fill 0.25s ease, r 0.25s ease;
    r: 6;
}

.map-city__label {
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    fill: rgba(255, 255, 255, 0.92);
    stroke: rgba(10, 10, 10, 0.75);
    stroke-width: 3px;
    paint-order: stroke fill;
    pointer-events: none;
    opacity: 0;
    transition: fill 0.25s ease, opacity 0.2s ease;
}

.map-city:hover .map-city__label,
.map-city:focus-visible .map-city__label,
.map-city.is-active .map-city__label {
    opacity: 1;
}

.map-city:hover .map-city__ring,
.map-city:focus-visible .map-city__ring {
    r: 22;
    fill: rgba(255, 77, 0, 0.24);
    stroke: #ff6a20;
}

.map-city:hover .map-city__dot,
.map-city:focus-visible .map-city__dot {
    r: 10;
    fill: #ff4d00;
}

.map-city.is-active .map-city__ring {
    r: 24;
    fill: rgba(255, 77, 0, 0.3);
    stroke: #ff6a20;
    stroke-width: 2.5;
}

.map-city.is-active .map-city__dot {
    r: 11;
    fill: #ff4d00;
}

.map-city.is-active .map-city__label {
    font-weight: 700;
}

/* پنل اطلاعات */
.map-panel {
    background: var(--map-card);
    border: 1px solid var(--map-line);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* انتخاب استان */
.map-picker {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.map-picker__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--map-ink);
}

.map-select {
    position: relative;
}

.map-select__field {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    padding: 0.85rem 2.5rem 0.85rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--map-ink);
    background: var(--map-card-hover);
    border: 1.5px solid var(--map-line);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.map-select__field:hover {
    border-color: rgba(255, 120, 60, 0.4);
}

.map-select__field:focus {
    outline: none;
    border-color: #ff6a20;
    box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.18);
}

.map-select__field option {
    font-weight: 500;
}

.map-select__chevron {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #ff6a20;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-select__chevron svg {
    width: 20px;
    height: 20px;
}

.map-panel__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.map-panel__empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 0.5rem;
    color: var(--map-muted);
}

.map-panel__empty-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--map-accent-soft);
    border-radius: 50%;
    color: #ff6a20;
    margin-bottom: 1rem;
}

.map-panel__empty-icon svg {
    width: 28px;
    height: 28px;
}

.map-panel__empty p {
    font-size: 0.88rem;
    line-height: 1.75;
    max-width: 260px;
}

.map-panel__content {
    flex: 1;
    animation: mapPanelIn 0.35s ease both;
}

@keyframes mapPanelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.map-panel__head {
    position: relative;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: none;
}

.map-panel__head::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 32px;
    background: radial-gradient(
        ellipse 80% 100% at 50% 100%,
        rgba(255, 77, 0, 0.1) 0%,
        transparent 72%
    );
    pointer-events: none;
}

.map-panel__badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--map-accent-soft);
    color: #ff8a4d;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.map-panel__head h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--map-ink);
}

.map-panel__city {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--map-muted);
    font-weight: 500;
}

.map-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.map-contact-form__honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.map-contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.map-contact-form__field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--map-ink);
}

.map-contact-form__optional {
    font-weight: 500;
    color: var(--map-muted);
    font-size: 0.75rem;
}

.map-contact-form__field input,
.map-contact-form__field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--map-ink);
    background: var(--map-card-hover);
    border: 1.5px solid var(--map-line);
    border-radius: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

.map-contact-form__field input::placeholder,
.map-contact-form__field textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.map-contact-form__field input:focus,
.map-contact-form__field textarea:focus {
    outline: none;
    border-color: #ff6a20;
    box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.18);
}

.map-contact-form__field input:invalid:not(:placeholder-shown),
.map-contact-form__field textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(239, 68, 68, 0.55);
}

.map-contact-form__feedback {
    font-size: 0.82rem;
    line-height: 1.6;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    margin: 0;
}

.map-contact-form__feedback.is-success {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.map-contact-form__feedback.is-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.map-contact-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 0.25rem;
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: #ff4d00;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.map-contact-form__submit:hover:not(:disabled) {
    background: #e64500;
    transform: translateY(-1px);
}

.map-contact-form__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .map-layout {
        grid-template-columns: 1fr;
    }

    .map-stage {
        min-height: 360px;
    }

    .map-panel {
        min-height: auto;
    }

    .map-city__label {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .map-stage {
        min-height: 320px;
        border-radius: 14px;
    }

    .map-panel {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .map-panel__head h3 {
        font-size: clamp(1.1rem, 4vw, 1.35rem);
    }

    .map-contact-form__submit {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .map-stage {
        padding: 0.5rem;
        min-height: 260px;
    }

    .map-svg {
        max-height: 340px;
    }

    .map-city__label {
        font-size: 12px;
    }

    .map-panel {
        padding: 1rem;
    }

    .map-select__field {
        font-size: 0.88rem;
        padding: 0.75rem 2.25rem 0.75rem 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .map-panel__content { animation: none; }
    .map-province { transition: none; }
}
