:root {
    --contact-dark: #173d2b;
    --contact-green: #2f6f49;
    --contact-green-soft: #eaf3ec;
    --contact-white: #ffffff;
    --contact-text: #173d2b;
    --contact-muted: #6d8074;
    --contact-line: rgba(47, 111, 73, 0.24);
}


/* =========================
   PAGE
========================= */

.contact-page,
.contact-page * {
    box-sizing: border-box;
}

.contact-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    background: var(--contact-white);
}

@supports (min-height: 100svh) {
    .contact-page {
        min-height: 100svh;
    }
}

/*
| Tamni gornji gradient omogućava da navigacija zadrži
| isti početni izgled kao na Home stranici.
*/
.contact-page::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 3;
    height: 120px;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(5, 20, 13, 0.58) 0%,
            rgba(5, 20, 13, 0.22) 54%,
            rgba(5, 20, 13, 0) 100%
        );
}


/* =========================
   VISUAL SIDE
========================= */

.contact-page__visual {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: var(--contact-dark);
}

@supports (min-height: 100svh) {
    .contact-page__visual {
        min-height: 100svh;
    }
}

.contact-page__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    user-select: none;
    pointer-events: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.contact-page__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(4, 10, 7, 0.08) 0%,
            rgba(4, 10, 7, 0.10) 42%,
            rgba(10, 29, 20, 0.80) 100%
        );
}

.contact-page__visual-content {
    position: absolute;
    right: 70px;
    bottom: 48px;
    left: 70px;
    z-index: 2;
    color: var(--contact-white);
}

.contact-page__visual-content > span {
    display: block;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.contact-page__visual-content h1 {
    margin: 0;
    color: var(--contact-white);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(70px, 6vw, 115px);
    font-weight: 300;
    line-height: 0.82;
    letter-spacing: -5px;
}

.contact-page__visual-content p {
    max-width: 580px;
    margin: 25px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.75;
}


/* =========================
   FORM SIDE
========================= */

.contact-page__form-side {
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: var(--contact-white);
}

@supports (min-height: 100svh) {
    .contact-page__form-side {
        min-height: 100svh;
    }
}

.contact-panel {
    width: 100%;
    min-height: 100vh;
    padding: 110px 70px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--contact-white);
    color: var(--contact-text);
}

@supports (min-height: 100svh) {
    .contact-panel {
        min-height: 100svh;
    }
}

.contact-panel__header {
    max-width: 650px;
    margin-bottom: 32px;
}

.contact-panel__header > span {
    display: block;
    margin-bottom: 14px;
    color: var(--contact-green);
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.contact-panel__header h2 {
    margin: 0;
    color: var(--contact-text);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(38px, 3vw, 58px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -2.5px;
}

.contact-panel__form {
    width: 100%;
}

.contact-panel__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.contact-panel__field {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.contact-panel__field label {
    margin-bottom: 6px;
    color: var(--contact-green);
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
}

.contact-panel__field input,
.contact-panel__field textarea {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--contact-line);
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--contact-text);
    caret-color: var(--contact-green);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 300;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.contact-panel__field input {
    height: 44px;
}

.contact-panel__field textarea {
    height: 92px;
    min-height: 92px;
    max-height: 180px;
    padding: 12px 0;
    resize: vertical;
}

.contact-panel__field input::placeholder,
.contact-panel__field textarea::placeholder {
    color: #9aa99f;
}

.contact-panel__field input:focus,
.contact-panel__field textarea:focus {
    border-color: var(--contact-green);
    box-shadow: 0 1px 0 var(--contact-green);
}

.contact-panel__field input:focus-visible,
.contact-panel__field textarea:focus-visible {
    outline: 2px solid rgba(47, 111, 73, 0.18);
    outline-offset: 4px;
}

.contact-panel__field input:user-invalid,
.contact-panel__field textarea:user-invalid {
    border-color: #9f3d3d;
}


/* =========================
   BUTTON
========================= */

.contact-panel__button {
    width: 100%;
    min-height: 54px;
    margin-top: 5px;
    padding: 0 10px 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 999px;
    background: var(--contact-dark);
    color: var(--contact-white);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.contact-panel__button:focus-visible {
    outline: 3px solid rgba(47, 111, 73, 0.28);
    outline-offset: 4px;
}

.contact-panel__button-arrow {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--contact-white);
    color: var(--contact-dark);
    font-size: 17px;
    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .contact-panel__button:hover {
        background: var(--contact-green);
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(23, 61, 43, 0.16);
    }

    .contact-panel__button:hover .contact-panel__button-arrow {
        color: var(--contact-green);
        transform: rotate(45deg);
    }
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .contact-page__visual-content {
        right: 40px;
        bottom: 40px;
        left: 40px;
    }

    .contact-panel {
        padding-right: 45px;
        padding-left: 45px;
    }

    .contact-panel__header h2 {
        font-size: 46px;
    }
}

@media (max-width: 900px) {
    .contact-page {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .contact-page::before {
        height: 110px;
    }

    .contact-page__visual {
        min-height: 700px;
    }

    .contact-page__form-side {
        min-height: auto;
        overflow: visible;
    }

    .contact-panel {
        min-height: auto;
        padding: 80px 24px;
    }
}

@media (max-width: 650px) {
    .contact-page__visual {
        min-height: 620px;
    }

    .contact-page__image {
        object-position: 52% center;
    }

    .contact-page__visual-content {
        right: 20px;
        bottom: 35px;
        left: 20px;
    }

    .contact-page__visual-content h1 {
        font-size: 70px;
        letter-spacing: -4px;
    }

    .contact-page__visual-content p {
        font-size: 13px;
    }

    .contact-panel {
        padding: 65px 20px;
    }

    .contact-panel__header {
        margin-bottom: 40px;
    }

    .contact-panel__header h2 {
        font-size: 40px;
        letter-spacing: -1.5px;
    }

    .contact-panel__row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-panel__field {
        margin-bottom: 24px;
    }

    .contact-panel__field input {
        height: 50px;
    }

    .contact-panel__field textarea {
        height: 120px;
        min-height: 120px;
        max-height: 220px;
    }
}

@media (max-width: 420px) {
    .contact-page__visual-content h1 {
        font-size: 61px;
    }

    .contact-panel__header h2 {
        font-size: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-page *,
    .contact-page *::before,
    .contact-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
