/* ==============================================
   CONTACT PAGE — contact.css
   Max border-radius: 8px everywhere
   ============================================== */

/* ==============================================
   SECTION 1 — CONTACT CARDS
   ============================================== */
.contact-cards {
    background: #F0F4FA;
    padding: 60px 0;
}

.contact-cards__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

.contact-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 32px 28px;
    border: 1px solid rgba(28, 53, 87, 0.07);
    box-shadow: 0 2px 12px rgba(28, 53, 87, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.contact-card--office::before { background: #3C78B4; }
.contact-card--email::before  { background: #00783C; }
.contact-card--phone::before  { background: #E85D04; }

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(28, 53, 87, 0.12);
}

.contact-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.contact-card--office .contact-card__icon { background: rgba(60, 120, 180, 0.10); }
.contact-card--email  .contact-card__icon { background: rgba(0, 120, 60, 0.10); }
.contact-card--phone  .contact-card__icon { background: rgba(232, 93, 4, 0.10); }

.contact-card__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-card--office .contact-card__icon svg { stroke: #3C78B4; }
.contact-card--email  .contact-card__icon svg { stroke: #00783C; }
.contact-card--phone  .contact-card__icon svg { stroke: #E85D04; }

.contact-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #1D3557;
    margin: 0 0 12px;
}

.contact-card__details {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.7;
}

.contact-card__details p {
    margin: 0 0 8px;
}

.contact-card__details p:last-child {
    margin-bottom: 0;
}

.contact-card__details a {
    color: #3C78B4;
    text-decoration: none;
}

.contact-card__details a:hover {
    text-decoration: underline;
}

.contact-card__details strong {
    color: #1D3557;
    font-weight: 600;
}

/* ==============================================
   SECTION 2 — MAP + FLOATING FORM
   ============================================== */
.contact-main {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.contact-map {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.contact-map #contact-leaflet-map {
    width: 100%;
    height: 100%;
}

.contact-form-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 32px;
    display: flex;
    justify-content: flex-end;
}

.contact-form-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 40px 36px;
    width: 480px;
    box-shadow: 0 8px 40px rgba(28, 53, 87, 0.18);
}

.contact-form__title {
    font-size: 22px;
    font-weight: 700;
    color: #1D3557;
    margin: 0 0 24px;
}

/* ── Status messages ── */
.contact-form__success {
    background: rgba(0, 120, 60, 0.08);
    border: 1px solid rgba(0, 120, 60, 0.20);
    border-radius: 8px;
    padding: 12px 16px;
    color: #00783C;
    font-size: 14px;
    margin-bottom: 16px;
}

.contact-form__error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.20);
    border-radius: 8px;
    padding: 12px 16px;
    color: #DC2626;
    font-size: 14px;
    margin-bottom: 16px;
}

/* ── Form rows & groups ── */
.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.contact-form__label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.contact-form__label span {
    color: #E85D04;
}

.contact-form__input,
.contact-form__select,
.contact-form__textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(28, 53, 87, 0.15);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1D3557;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.contact-form__input:focus,
.contact-form__select:focus,
.contact-form__textarea:focus {
    border-color: #3C78B4;
    box-shadow: 0 0 0 3px rgba(60, 120, 180, 0.10);
}

.contact-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='%234A6A8A' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.contact-form__textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form__submit {
    width: 100%;
    padding: 12px;
    background: #3C78B4;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 8px;
}

.contact-form__submit:hover {
    background: #2B6CB0;
}

/* ==============================================
   RTL
   ============================================== */
[dir="rtl"] .contact-form-wrap {
    justify-content: flex-start;
}

[dir="rtl"] .contact-form__label,
[dir="rtl"] .contact-card__title,
[dir="rtl"] .contact-card__details {
    text-align: right;
}

[dir="rtl"] .contact-card::before {
    right: 0;
}

[dir="rtl"] .contact-form__select {
    background-position: left 14px center;
    padding-right: 14px;
    padding-left: 40px;
}

[dir="rtl"] .contact-cards__grid {
    direction: rtl;
}

/* ==============================================
   RESPONSIVE — Portrait ≤1024px
   ============================================== */
@media (max-width: 1024px) {

    .contact-cards__grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 16px;
    }

    .contact-main {
        flex-direction: column;
        min-height: auto;
        align-items: stretch;
    }

    .contact-map {
        position: relative;
        height: 300px;
        inset: auto;
        width: 100%;
    }

    .contact-form-wrap {
        position: relative;
        padding: 20px 0;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .contact-form-card {
        width: calc(100% - 32px);
        max-width: 100%;
        margin: 0 16px;
        padding: 24px 16px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .contact-form__row {
        grid-template-columns: 1fr;
    }

    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: left top;
    }

    [dir="rtl"] .g-recaptcha {
        transform-origin: right top;
    }
}

/* ==============================================
   RESPONSIVE — Landscape ≤1024px
   ============================================== */
@media (max-width: 1024px) and (orientation: landscape) {

    .contact-cards__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        padding: 0 20px;
    }

    .contact-form-card {
        width: 420px;
    }
}
