/* Page layout */
.contact-page {
    --contact-green: #07512c;
    --contact-red: var(--brand-red, #a50022);
    --contact-line: #e4ebe6;
    color: #293b36;
    background: #fff;
    font-size: 16px;
    line-height: 1.9;
}

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

.contact-wrap {
    width: calc(100% - 64px);
    max-width: 1140px;
    margin: 0 auto;
}

.contact-head {
    position: relative;
    display: grid;
    min-height: 230px;
    padding: 40px 0;
    overflow: hidden;
    isolation: isolate;
    place-items: center;
    background: #f5f1e8;
    text-align: center;
}

.contact-cover {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    object-position: center 44%;
}

.contact-head::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(249, 247, 240, .16), rgba(249, 247, 240, .95) 31%, #f9f7f0 50%, rgba(249, 247, 240, .95) 69%, rgba(249, 247, 240, .16));
    content: "";
}

.contact-heading {
    margin: 0 0 12px;
    color: var(--contact-green);
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 900;
    line-height: 1.5;
}

.contact-head p {
    margin: 0;
    color: #596b60;
    font-size: 14px;
    text-align: center;
}

.contact-body {
    padding-top: 40px;
    padding-bottom: 56px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px;
}

.contact-card {
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--contact-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(25, 54, 36, .035);
}

.contact-title {
    margin: 0 0 24px;
    color: var(--contact-green);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.6;
}

.contact-title span {
    color: var(--contact-red);
}

.contact-title::after {
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 10px;
    border-radius: 3px;
    background: #528b24;
    content: "";
}

/* Map */
.contact-map {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.contact-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 28px;
}

.contact-map-head .contact-title {
    margin: 0;
    font-size: 20px;
}

.contact-map-view {
    position: relative;
    flex: 1;
    min-height: 400px;
    background: #eef2ed;
}

.contact-map-view iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Contact details */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    margin-top: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
}

.contact-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    place-items: center;
    color: var(--contact-green);
    background: #f0f6ef;
}

.contact-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.contact-info {
    min-width: 0;
}

.contact-info h2 {
    margin: 0 0 6px;
    color: var(--contact-green);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
}

.contact-value {
    color: #4c5e53;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.contact-value p {
    margin: 0;
    text-align: start;
}

.contact-page .contact-value a {
    color: var(--contact-green);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.contact-page a:focus-visible {
    outline: 2px solid var(--contact-green);
    outline-offset: 4px;
}

/* Existing Contact Form 7 fields */
.contact-form .wpcf7-form,
.contact-form .wpcf7-form > p:last-of-type {
    margin: 0;
}

.contact-form .wpcf7-form > p {
    margin: 0 0 18px;
}

.contact-form label {
    display: block;
    margin: 0;
    color: #34463d;
    font-size: 14px;
    font-weight: 600;
}

.contact-form .wpcf7-form-control-wrap {
    display: block;
    margin-top: 7px;
}

.contact-form .wpcf7-text,
.contact-form .wpcf7-textarea,
.contact-form .wpcf7-select,
.contact-form .wpcf7-number,
.contact-form .wpcf7-date {
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 10px 13px;
    border: 1px solid #d8e2db;
    border-radius: 11px;
    color: #293b36;
    background: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    box-shadow: none;
}

.contact-form .wpcf7-textarea {
    height: 148px;
    min-height: 120px;
    resize: vertical;
}

.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="url"] {
    direction: ltr;
    text-align: left;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-form select:focus-visible {
    outline: 2px solid var(--contact-green);
    outline-offset: 2px;
}

.contact-form [aria-invalid="true"] {
    border-color: var(--contact-red);
}

.contact-form .wpcf7-not-valid-tip {
    margin-top: 6px;
    color: var(--contact-red);
    font-size: 13px;
}

/* Same button values as the home Kitchen section. */
.contact-page .home-btn,
.contact-form .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 48px;
    margin: 0;
    padding: 10px 24px;
    border: 1px solid transparent;
    border-radius: 30px;
    color: #352610;
    background: var(--accent-orange, #ffa628);
    font: inherit;
    font-size: .9rem;
    font-weight: 750;
    line-height: 1.7;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, box-shadow .2s;
}

.contact-page .home-btn svg {
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Native CF7 input keeps its behavior; the arrow needs no script. */
.contact-form .wpcf7-submit {
    min-width: 160px;
    padding-left: 56px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23352610' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5m6-6-6 6 6 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 24px center;
    background-size: 20px 20px;
}

.contact-page .home-btn:focus-visible,
.contact-form .wpcf7-submit:focus-visible {
    outline: 3px solid var(--contact-green);
    outline-offset: 4px;
}

.contact-form .wpcf7-submit:disabled {
    opacity: .65;
    cursor: wait;
}

.contact-form .wpcf7-spinner {
    margin: 0 12px;
    vertical-align: middle;
}

.contact-form .wpcf7-form .wpcf7-response-output {
    margin: 20px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.8;
}

/* Responsive layout */
@media (hover: hover) and (pointer: fine) {
    .contact-page .home-btn:hover,
    .contact-form .wpcf7-submit:hover {
        color: #352610;
        background-color: #ffb749;
        transform: none;
        box-shadow: 0 5px 14px rgba(116, 69, 0, .12);
    }

    .contact-page .contact-value a:hover {
        color: var(--contact-red);
    }
}

@media (max-width: 991.98px) {
    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-map-view {
        min-height: 360px;
    }
}

@media (max-width: 575.98px) {
    .contact-wrap {
        width: calc(100% - 32px);
    }

    .contact-head {
        min-height: 180px;
        padding: 32px 0;
    }

    .contact-body {
        padding-top: 24px;
        padding-bottom: 36px;
    }

    .contact-card,
    .contact-map-head {
        padding: 20px;
    }

    .contact-map {
        padding: 0;
    }

    .contact-map-view {
        min-height: 300px;
    }

    .contact-details {
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-page .home-btn,
    .contact-form .wpcf7-submit {
        transition: none;
    }
}
