.page-header {
    position: relative;
    min-height: 220px;
    overflow: hidden;

    background-image: url("/images/galaryheader.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* القناع الغامق */
.page-header__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        linear-gradient(
            90deg,
            rgba(2, 8, 24, 0.88),
            rgba(4, 12, 35, 0.72),
            rgba(2, 8, 24, 0.86)
        );
}

.page-header__container {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 1220px;
    margin-inline: auto;
    padding-inline: 28px;
}

/* العنوان والبحث متقابلان */
.page-header__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: center;
    gap: 50px;

    min-height: 220px;
    padding-block: 24px;
}

.page-header__text {
    width: 100%;
    min-width: 0;
    text-align: start;
}

.page-header__breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;

    margin: 0 0 8px;

    color: rgba(255, 255, 255, 0.67);
    font-size: 13px;
}

.page-header__breadcrumbs a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-header__breadcrumbs a:hover {
    color: #ffffff;
}

.page-header__separator {
    color: rgba(255, 255, 255, 0.4);
}

.page-header__title {
    margin: 0;

    color: #ffffff;
    font-size: clamp(29px, 3vw, 40px);
    font-weight: 800;
    line-height: 1.25;
}

.page-header__description {
    max-width: 670px;
    margin: 7px 0 0;

    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.7;
}

/* مربع البحث */
.page-header__search-wrapper {
    width: 100%;
    max-width: 420px;
    margin-top: 100px;
}

/*
في العربية:
العنوان أول عنصر في HTML ويظهر يميناً
والبحث يظهر يساراً
*/
html[dir="rtl"] .page-header__search-wrapper {
    justify-self: start;
}

/*
في الإنجليزية:
العنوان يظهر يساراً
والبحث يظهر يميناً
*/
html[dir="ltr"] .page-header__search-wrapper {
    justify-self: end;
}

.page-header__search {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 54px;
    padding: 5px;

    background: rgba(3, 11, 30, 0.72);
    border: 1px solid rgba(61, 126, 255, 0.75);
    border-radius: 12px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.025);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-header__search input {
    flex: 1;
    min-width: 0;

    height: 44px;
    padding-inline: 18px;

    color: #ffffff;
    background: transparent;
    border: 0;
    outline: 0;

    font: inherit;
    font-size: 15px;
    text-align: start;
}

.page-header__search input::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.page-header__search button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    background: var(--primary-color, #145dff);
    border: 0;
    border-radius: 9px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.page-header__search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(20, 93, 255, 0.38);
}

.page-header__search button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* التابلت والموبايل */
@media (max-width: 768px) {
    .page-header {
        min-height: auto;
    }

    .page-header__container {
        padding-inline: 18px;
    }

    .page-header__content {
        grid-template-columns: 1fr;
        gap: 20px;

        min-height: auto;
        padding-block: 28px;
    }

    .page-header__search-wrapper {
        max-width: 100%;
        justify-self: stretch;
    }

    .page-header__title {
        font-size: 28px;
    }

    .page-header__description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .page-header__container {
        padding-inline: 13px;
    }

    .page-header__search {
        min-height: 50px;
    }

    .page-header__search input {
        height: 40px;
        padding-inline: 13px;
    }

    .page-header__search button {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }
}