/*
01. Page and photo heading
02. Layout and cards
03. Existing Contact Form 7 fields
04. Shared buttons
05. Form messages
06. Responsive layout
07. Reduced motion
*/

/* 01. Page and photo heading */
.share-page {
    --share-red: #a50022;
    --share-green: #117333;
    color: #293b36;
    background: #fff;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.9;
}

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

.share-page p {
    margin: 0;
}

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

.share-head {
    position: relative;
    display: grid;
    min-height: 230px;
    padding: 28px 0;
    overflow: hidden;
    isolation: isolate;
    place-items: center;
    background: #f6f7fb;
}

.share-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%;
}

.share-head::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.94) 31%, #fff 50%, rgba(255, 255, 255, 0.94) 69%, rgba(255, 255, 255, 0.18));
    content: "";
}

.share-intro {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.share-page h1 {
    margin: 0;
    color: #173831;
    font-size: clamp(32px, 3.4vw, 48px);
    font-weight: 900;
    line-height: 1.55;
}

.share-page h1 span,
.share-title span {
    color: var(--share-red);
}

.share-label {
    display: grid;
    justify-items: center;
    gap: 4px;
    color: #384c43;
    font-size: 13px;
    font-weight: 600;
}

.share-intro > p {
    color: #384c43;
}

.share-page .share-note {
    color: #68716e;
    font-size: 13px;
}

/* 02. Layout and cards */
.share-body {
    padding: 36px 0 56px;
}

.share-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 304px;
    align-items: start;
    gap: 32px;
}

.share-card {
    min-width: 0;
    padding: 28px;
    border: 1px solid #e9eeeb;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(25, 54, 36, 0.024);
}

.share-title {
    margin: 0 0 18px;
    color: #07512c;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.5;
}

.share-title::after {
    display: block;
    width: 52px;
    height: 4px;
    margin: 12px 0 0;
    border-radius: 4px;
    background: #528b24;
    content: "";
}

.share-form .share-title {
    font-size: 28px;
}

.share-aside {
    display: grid;
    min-width: 0;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
    background: #f6f7fb;
}

.share-aside .share-card {
    padding: 25px;
}

.share-codal .share-note {
    margin-bottom: 8px;
    color: var(--share-red);
    font-weight: 750;
}

.share-codal > p {
    font-size: 14px;
}

.share-codal .share-btn {
    margin-top: 22px;
}

.share-guide ul {
    margin: 0;
    padding: 0 18px 0 0;
    color: #68716e;
    font-size: 14px;
}

.share-guide li {
    margin-top: 10px;
    list-style: disc;
}

.share-guide li::marker {
    color: var(--share-green);
}

/* 03. Existing Contact Form 7 fields */
.share-form .wpcf7 {
    margin: 28px 0 0;
}

.share-form .wpcf7-form {
    margin: 0;
}

.share-form h3 {
    margin: 24px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9eeeb;
    color: #173831;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.7;
}

.share-form h3:first-of-type {
    margin-top: 0;
}

/* The current form groups its labels inside paragraphs. */
.share-form .wpcf7-form > p {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.share-form .wpcf7-form > p > br {
    display: none;
}

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

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

.share-form input[type="text"],
.share-form input[type="email"],
.share-form input[type="tel"] {
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid #dde5df;
    border-radius: 12px;
    color: #173831;
    background: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    box-shadow: none;
}

.share-form input:focus-visible {
    outline: 2px solid var(--share-green);
    outline-offset: 2px;
}

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

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

/* The final paragraph contains the native submit button and spinner. */
.share-form .wpcf7-form > p:last-of-type {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.share-form .wpcf7-spinner {
    flex-shrink: 0;
    margin: 0;
}

/* 04. Shared buttons */
.share-page .share-btn,
.share-form .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-height: 48px;
    padding: 10px 24px 10px 56px;
    border: 1px solid transparent;
    border-radius: 30px;
    color: #352610;
    background-color: var(--accent-orange, #ffa628);
    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;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.7;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .share-page .share-btn:hover,
    .share-form .wpcf7-submit:hover {
        color: #352610;
        background-color: #ffb749;
        box-shadow: 0 5px 14px rgba(116, 69, 0, 0.12);
    }
}

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

.share-form .wpcf7-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* 05. Form messages */
.share-form .wpcf7-not-valid-tip {
    margin-top: 6px;
    color: var(--share-red);
    font-size: 12px;
    font-weight: 400;
}

.share-form .wpcf7 form .wpcf7-response-output {
    margin: 22px 0 0;
    padding: 12px 16px;
    border-width: 1px;
    border-radius: 12px;
    font-size: 14px;
}

/* 06. Responsive layout */
@media (max-width: 991px) {
    .share-wrap {
        width: calc(100% - 44px);
    }

    .share-head {
        min-height: 200px;
    }

    .share-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .share-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

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

    .share-head {
        min-height: 160px;
        padding: 22px 0;
    }

    .share-head::after {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.96) 35%, rgba(255, 255, 255, 0.96) 65%, rgba(255, 255, 255, 0.65));
    }

    .share-label {
        display: none;
    }

    .share-page h1 {
        font-size: 32px;
    }

    .share-intro > p {
        max-width: 290px;
        font-size: 13px;
    }

    .share-body {
        padding: 24px 0 36px;
    }

    .share-aside {
        padding: 14px;
    }

    .share-form .share-title {
        font-size: 25px;
    }

    .share-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .share-aside,
    .share-form .wpcf7-form > p {
        grid-template-columns: minmax(0, 1fr);
    }

    .share-form .wpcf7-submit {
        width: 100%;
    }
}

/* 07. Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .share-page .share-btn,
    .share-form .wpcf7-submit {
        transition: none;
    }
}
