@import url('https://fonts.googleapis.com/css2?family=Istok+Web:wght@400;700&display=swap');

:root {
    --primary-color:   #252525;
    --secondary-color: #987864;
    --light-color:     #DBDBDB;
    --home-bg-color:   #FCFCFC;
}

/* ── Page title ─────────────────────────────────────── */

.contact-header {
    padding-bottom: 0;
}

h2 {
    font-size: 50px;
    font-weight: bold;
    text-transform: uppercase;
}

.top-line {
    height: 3px;
    width: 20em;
    margin: 35px 0;
    background-color: var(--secondary-color);
}

/* ── Contact card wrapper ───────────────────────────── */

.contacts {
    width: 86%;
    margin: 0 auto 80px;
}

.contact-card {
    width: 100%;
    position: relative;

    .image-container {
        width: 100%;

        img {
            width: 100%;
            display: block;
        }
    }

    .contacts-content {
        position: absolute;
        inset: 0;
        display: flex;
        z-index: 2;
        padding: 6%;
    }

    .contacts-content > * {
        flex: 1;
    }

    /* ── Left: details ── */

    h3 {
        font-size: 50px;
        font-weight: bold;
        text-transform: uppercase;
        line-height: 1;
        text-align: left;
        color: inherit;
    }

    h4 {
        font-weight: bold;
        text-transform: uppercase;
        font-size: 24px;
        text-align: left;
    }

    .contacts-info {
        text-align: left;
        margin-top: 50px;
        font-weight: 600;
        line-height: 2;
    }

    .social-links {
        margin-top: 60px;
        display: flex;
        gap: 25px;
        justify-content: flex-start;
        align-items: center;
    }

    /* ── Right: form ── */

    .form {
        display: flex;
        flex-direction: column;
        gap: 20px;
        justify-content: center;
    }

    input,
    textarea {
        background-color: rgba(255, 255, 255, 0.75);
        border-radius: 8px;
        padding: 12px 20px;
        resize: none;
        border: none;
        font-size: 13px;
        color: #555;
        font-family: 'Istok Web', Arial, sans-serif;
        outline: none;
        transition: background-color 0.2s ease;
    }

    input:focus,
    textarea:focus {
        background-color: rgba(255, 255, 255, 0.95);
    }

    textarea {
        min-height: 140px;
    }

    button {
        align-self: flex-end;
        padding: 14px 44px;
        background-color: var(--primary-color);
        color: var(--light-color);
        border: none;
        border-radius: 8px;
        font-family: 'Istok Web', Arial, sans-serif;
        font-size: 14px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 1px;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

    button:hover {
        background-color: var(--secondary-color);
    }
}

/* ══════════════════════════════════════════════════════
   Mobile  (≤ 768 px)
══════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    h2 { font-size: 34px; }

    .top-line { width: min(20em, 80vw); }

    .contacts {
        width: 95%;
        margin-bottom: 48px;
    }

    /* Replace absolute overlay with a dark static block */
    .contact-card {
        background-color: var(--primary-color);
        border-radius: 12px;
        overflow: hidden;
    }

    .contact-card .image-container {
        display: none;
    }

    .contact-card .contacts-content {
        position: static;
        flex-direction: column;
        padding: 40px 24px;
        gap: 40px;
        color: var(--light-color);
    }

    .contact-card h3 {
        font-size: 32px;
        line-height: 1.1;
    }

    .contact-card h4 {
        font-size: 18px;
    }

    .contact-card .contacts-info {
        margin-top: 24px;
        line-height: 2;
    }

    .contact-card .social-links {
        margin-top: 24px;
        justify-content: flex-start;
    }

    .contact-card .form input,
    .contact-card .form textarea {
        background-color: rgba(255, 255, 255, 0.12);
        color: var(--light-color);
    }

    .contact-card .form input::placeholder,
    .contact-card .form textarea::placeholder {
        color: rgba(219, 219, 219, 0.55);
    }

    .contact-card .form button {
        align-self: stretch;
        background-color: var(--secondary-color);
    }
}
