/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
input,
textarea {
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background: url("/img/conatct/map.webp");
    background-size: cover;
}

.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form {
    width: 100%;
    max-width: 820px;
    background-color: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.1);
    /* z-index: 1000; 🔴 این خط رو بردار یا مقدارش رو کم کن */
    z-index: 1; /* ✅ این مقدار رو بذار */
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}


.contact-form {
    background-color: rgba(249, 201, 0, 0.45);
    position: relative;
}

.contact-form:before {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    background-color: rgb(249, 201, 0);
    transform: rotate(45deg);
    top: 50px;
    left: -13px;
}

form {
    padding: 2.3rem 2.2rem;
    z-index: 10;
    overflow: hidden;
    position: relative;
}

.title {
    color: #fff;
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.7rem;
}

.input-container {
    position: relative;
    margin: 1rem 0;
}

.input {
    width: 100%;
    outline: none;
    border: 2px solid #fafafa;
    background: none;
    padding: 0.6rem 1.2rem;
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border-radius: 25px;
    transition: 0.3s;
}

textarea.input {
    padding: 0.8rem 1.2rem;
    min-height: 150px;
    border-radius: 22px;
    resize: none;
    overflow-y: auto;
}

.input-container label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    padding: 0 0.4rem;
    color: #fafafa;
    font-size: 0.9rem;
    font-weight: 400;
    pointer-events: none;
    z-index: 1000;
    transition: 0.5s;
}

.input-container.textarea label {
    top: 1rem;
    transform: translateY(0);
}

.btn {
    padding: 0.6rem 1.3rem;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid #fafafa;
    font-size: 0.95rem;
    color: rgb(249, 201, 0);
    line-height: 1;
    border-radius: 25px;
    outline: none;
    cursor: pointer;
    transition: 0.3s;
    margin: 0;
}

.btn:hover {
    background-color: transparent;
    color: #fff;
}

.input-container span {
    position: absolute;
    top: 0;
    left: 25px;
    transform: translateY(-50%);
    font-size: 0.8rem;
    padding: 0 0.4rem;
    color: transparent;
    pointer-events: none;
    z-index: 500;
}

.input-container span:before,
.input-container span:after {
    content: "";
    position: absolute;
    width: 10%;
    opacity: 0;
    transition: 0.3s;
    height: 5px;
    background-color: rgb(249, 201, 0);
    top: 50%;
    transform: translateY(-50%);
}

.input-container span:before {
    left: 50%;
}

.input-container span:after {
    right: 50%;
}

.input-container.focus label {
    top: 0;
    transform: translateY(-50%);
    left: 25px;
    font-size: 0.8rem;
}

.input-container.focus span:before,
.input-container.focus span:after {
    width: 50%;
    opacity: 1;
}

.contact-info {
    direction: rtl;
    text-align: right;
    padding: 2.3rem 2.2rem;
    position: relative;
}

.contact-info .title {
    color: rgb(40, 44, 86);
}

.text {
    color: rgb(40, 44, 86);
    margin: 1.5rem 0 2rem 0;
    font-size: 1.1rem;
}

.information {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 1.1rem;
    color: rgb(40, 44, 86);
    margin: 0.7rem 0;
    flex-direction: row;
}

.icon {
    width: 28px;
    margin-right: 0.7rem;
    margin-left: 0.4rem;
}

.icon-placeholder {
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 0.7rem;
    margin-left: 0.4rem;
}

.social-media {
    padding: 2rem 0 0 0;
}

/* متن هم‌راستا با بقیه اطلاعات تماس */
.social-media p {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: rgb(40, 44, 86);
    margin: 0.7rem 0;
    flex-direction: row;
    padding-right: 28px;
}

/* آیکون‌ها افقی و ساده */
.social-icons.custom-icons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 0.3rem;
    padding-right: 28px;
}

.social-icons.custom-icons a {
    background: none;
    width: auto;
    height: auto;
    margin: 0;
}

.social-icons.custom-icons img {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.social-icons.custom-icons img:hover {
    transform: scale(1.1);
}

.contact-info:before {
    content: "";
    position: absolute;
    width: 110px;
    height: 100px;
    bottom: -77px;
    right: 50px;
    opacity: 0.3;
}

.square {
    position: absolute;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(181%, 11%);
    opacity: 0.2;
}


@media (max-width: 480px) {

    /* ۱. هدر رو همیشه روی فرم نگه می‌داریم */
    header {
        position: relative;
        /* یا اگر fixed هست که نیازی نیست تغییر کنه */
        z-index: 1100;
        /* بالاتر از z-index فرم (1000) */
    }

    /* ۲. فاصله از بالا برابر ارتفاع هدر */
    .container {
        padding: 1rem;
        overflow-x: hidden;
        margin-top: 60px;
        /* فرض کردیم هدر حدود 60px ارتفاع داره */
    }

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

    .contact-info,
    form {
        padding: 1.2rem 1rem;
    }

    .title {
        font-size: 1.1rem;
    }

    .text,
    .information,
    .social-media p {
        font-size: 0.85rem;
    }

    .input {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    textarea.input {
        min-height: 120px;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    .icon,
    .icon-placeholder {
        width: 20px;
        height: 20px;
        margin-right: 0.5rem;
        margin-left: 0.3rem;
    }

    .social-media {
        padding: 1rem 0 0 0;
    }

    .social-media p {
        display: flex;
        justify-content: center;
        padding-right: 0;
        text-align: center;
    }

    .social-icons.custom-icons {
        justify-content: center;
        gap: 8px;
        padding-right: 0;
    }

    .social-icons.custom-icons img {
        width: 22px;
        height: 22px;
        transition: transform 0.3s ease;
    }

    .social-icons.custom-icons img:hover {
        transform: scale(1.1);
    }

    .square,
    .contact-info:before {
        display: none;
    }
}