/* Marslia Hero Header — Mawdoo3-inspired RTL layout */

.marslia-hero-header,
.marslia-hero-header * {
    font-family: 'Cairo', sans-serif;
}

.marslia-hero-header {
    position: relative;
    width: 100%;
    min-height: var(--marslia-hero-height, 460px);
    background-color: #0a3d47;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    overflow: hidden;
    margin: 0 0 2rem;
}

.marslia-hero-header--compact {
    min-height: auto;
}

.marslia-hero-header--compact .marslia-hero-header__inner {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.marslia-hero-header__overlay {
    position: absolute;
    inset: 0;
    background: var(--marslia-overlay, rgba(13, 79, 92, 0.78));
    pointer-events: none;
}

.marslia-hero-header__inner {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    min-height: var(--marslia-hero-height, 460px);
}

.marslia-hero-header--compact .marslia-hero-header__inner {
    min-height: auto;
}

.marslia-hero-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.marslia-hero-header__brand {
    flex-shrink: 0;
}

.marslia-hero-header__logo img,
.marslia-hero-header__logo .custom-logo,
.marslia-hero-header__logo .marslia-site-logo {
    max-height: 52px;
    width: auto;
    height: auto;
    display: block;
}

.marslia-hero-header__site-title {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.marslia-hero-header__nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.marslia-hero-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.35rem;
}

.marslia-hero-menu li {
    margin: 0;
}

.marslia-hero-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 600;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

.marslia-hero-menu a:hover,
.marslia-hero-menu a:focus {
    opacity: 1;
    text-decoration: underline;
}

.marslia-hero-header__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 0 0;
    gap: 0.35rem;
}

.marslia-hero-header__title {
    margin: 0;
    line-height: 1.25;
    font-weight: 800;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.marslia-hero-header__title--line1 {
    font-size: clamp(1.75rem, 4vw, 2.65rem);
}

.marslia-hero-header__title--line2 {
    font-size: clamp(1.75rem, 4vw, 2.65rem);
    margin-bottom: 1.35rem;
}

/* Search bar */
.marslia-hero-search {
    display: flex;
    align-items: stretch;
    direction: rtl;
    width: min(100%, 720px);
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    margin-top: 0.25rem;
}

.marslia-hero-search__btn {
    flex: 0 0 108px;
    border: 0;
    background: #0d7a8c;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.marslia-hero-search__btn:hover,
.marslia-hero-search__btn:focus {
    background: #0a6675;
}

.marslia-hero-search__field {
    flex: 1;
    display: flex;
    align-items: center;
    direction: rtl;
    gap: 0.5rem;
    padding: 0 1rem;
    min-height: 52px;
}

.marslia-hero-search__icon {
    color: #c53030;
    display: inline-flex;
    flex-shrink: 0;
}

.marslia-hero-search__field input[type="search"] {
    width: 100%;
    border: 0;
    outline: none;
    font-size: 1rem;
    color: #1f2937;
    background: transparent;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

.marslia-hero-search__field input[type="search"]::placeholder {
    color: #9ca3af;
}

/* Hide default block theme header spacing duplication */
header.marslia-hero-header + main,
.marslia-hero-header ~ main {
    margin-top: 0 !important;
}

@media (max-width: 768px) {
    .marslia-hero-header__top {
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.75rem;
    }

    .marslia-hero-header__brand {
        flex: 1;
        min-width: 0;
    }

    .marslia-hero-header__nav {
        display: none !important;
    }

    .marslia-hero-header__menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        cursor: pointer;
        flex-shrink: 0;
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .marslia-hero-header__menu-toggle:hover,
    .marslia-hero-header__menu-toggle:focus {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.55);
        outline: none;
    }

    .marslia-hero-header__menu-icon--close {
        display: none;
    }

    .marslia-hero-header--nav-open .marslia-hero-header__menu-icon--open {
        display: none;
    }

    .marslia-hero-header--nav-open .marslia-hero-header__menu-icon--close {
        display: block;
    }

    .marslia-hero-search {
        flex-direction: column-reverse;
        width: 100%;
    }

    .marslia-hero-search__btn {
        flex: 0 0 auto;
        min-height: 48px;
        width: 100%;
    }

    .marslia-hero-search__field {
        min-height: 48px;
    }
}

.marslia-hero-header__menu-toggle {
    display: none;
}

/* Mobile slide-out sidebar */
html.marslia-sidebar-open {
    overflow: hidden;
}

.marslia-mobile-sidebar {
    position: fixed;
    inset: 0;
    z-index: 100000;
    pointer-events: none;
    visibility: hidden;
}

.marslia-mobile-sidebar.is-open {
    pointer-events: auto;
    visibility: visible;
}

.marslia-mobile-sidebar__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.marslia-mobile-sidebar.is-open .marslia-mobile-sidebar__overlay {
    opacity: 1;
}

.marslia-mobile-sidebar__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(340px, 88vw);
    height: 100%;
    background: #fff;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.marslia-mobile-sidebar.is-open .marslia-mobile-sidebar__panel {
    transform: translateX(0);
}

.marslia-mobile-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
}

.marslia-mobile-sidebar__logo img,
.marslia-mobile-sidebar__logo .marslia-site-logo {
    max-height: 44px;
    width: auto;
}

.marslia-mobile-sidebar__site-title {
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    font-size: 1.05rem;
}

.marslia-mobile-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
}

.marslia-mobile-sidebar__close:hover,
.marslia-mobile-sidebar__close:focus {
    background: #f8fafc;
    color: #0d7a8c;
    outline: none;
}

.marslia-mobile-sidebar__search {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.marslia-mobile-sidebar__search form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
}

.marslia-mobile-sidebar__search input[type="search"] {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    color: #0f172a;
}

.marslia-mobile-sidebar__search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #0d7a8c;
    color: #fff;
    cursor: pointer;
}

.marslia-mobile-sidebar__section {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.marslia-mobile-sidebar__section--links {
    margin-top: auto;
    padding-bottom: 1.25rem;
}

.marslia-mobile-sidebar__heading {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.marslia-mobile-sidebar__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.marslia-mobile-sidebar__menu a {
    display: block;
    padding: 0.65rem 0.5rem;
    border-radius: 10px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.marslia-mobile-sidebar__menu a:hover,
.marslia-mobile-sidebar__menu a:focus {
    background: rgba(13, 122, 140, 0.08);
    color: #0d7a8c;
}

.marslia-mobile-sidebar__menu--cats a {
    font-weight: 500;
    font-size: 0.95rem;
    color: #334155;
}

