/* wased.net — مكوّنات الواجهة (هيدر، فوتر، تنبيهات) */

.wased-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--wased-header-bg, #0a0a0a);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.2s ease;
}

.wased-header.h-fixed {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* إلغاء قواعد style.css القديمة لـ #header-scroll */
#header-scroll.wased-header,
#header-scroll.wased-header.h-fixed {
    height: auto !important;
    line-height: normal !important;
}

.wased-header__bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.5rem 0;
    min-height: var(--wased-header-h, 68px);
}

.wased-header__tools {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-inline-start: auto;
}

.wased-header__search {
    margin-inline-start: 0;
}

.wased-header__logo img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.wased-header__search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--wased-accent, #fede8a);
    border-radius: 50%;
    background: #fff;
    color: #111;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(149, 140, 0, 0.2);
    font-size: 1rem;
}

.wased-header__search:hover {
    background: var(--wased-accent, #fede8a);
}

.wased-header__toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--wased-accent, #fede8a);
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
}

.wased-header__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    flex: 1;
}

.wased-header__nav a {
    color: var(--wased-accent, #fede8a);
    text-decoration: none;
    font-size: 16px;
    white-space: nowrap;
    padding: 0.4rem 0.15rem;
}

.wased-header__nav a:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.wased-header__nav-cta {
    display: none;
}

.wased-header__nav-cta .wased-header__btn {
    width: 100%;
    justify-content: center;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
}

.wased-header__cta {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 901px) {
    .wased-header__bar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 1rem;
    }

    .wased-header__logo {
        grid-column: 1;
    }

    .wased-header__nav {
        grid-column: 2;
        display: flex !important;
        position: static;
        padding: 0;
        box-shadow: none;
        border: none;
        max-height: none;
        overflow: visible;
    }

    .wased-header__tools {
        display: none !important;
    }

    .wased-header__cta--desktop {
        grid-column: 3;
        display: flex !important;
    }

    .wased-header__toggle {
        display: none !important;
    }
}

.wased-header__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 1.1rem;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1 !important;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    align-self: center;
    flex-shrink: 0;
}

.wased-header__btn--register {
    background: var(--wased-accent, #fede8a);
    color: #111;
    min-width: 108px;
}

.wased-header__btn--login,
.wased-header__btn--logout {
    border: 1px solid var(--wased-accent, #fede8a);
    color: var(--wased-accent, #fede8a);
    background: transparent;
    min-width: 100px;
}

.wased-header__btn i {
    font-size: 0.95rem;
    line-height: 1;
}

.wased-footer--sitemap {
    padding: 1.25rem 0 1.5rem;
}

.wased-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
    max-width: 1100px;
    margin: 0 auto;
}

.wased-footer__tabs {
    display: none;
}

.wased-footer__panels {
    display: contents;
}

.wased-footer__panel {
    display: block;
    text-align: center;
    padding: 0.85rem 0.5rem;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wased-footer__panel:last-child {
    border-bottom: none;
}

.wased-footer__block-title {
    color: var(--wased-accent, #fede8a);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 0.55rem;
    text-align: center;
}

.wased-footer__inline {
    margin: 0;
    line-height: 1.9;
    font-size: 14px;
    color: #c8c8c8;
}

.wased-footer__inline a {
    color: #d7d7d7;
    text-decoration: none;
    white-space: nowrap;
}

.wased-footer__inline a:hover {
    color: var(--wased-accent, #fede8a);
    text-decoration: underline;
}

.wased-footer__sep {
    color: rgba(255, 255, 255, 0.28);
    margin: 0 0.35rem;
    user-select: none;
}

.wased-footer__utility {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wased-footer__inline--center {
    text-align: center;
}

.wased-footer__backlinks {
    margin: 1.35rem auto 0;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.wased-footer__backlinks-inner {
    width: min(100%, 960px);
    margin: 0 auto;
    padding: 0 0.75rem;
}

.wased-footer__backlinks-title {
    color: #888;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.7;
    margin: 0 0 0.5rem;
    text-align: center;
    letter-spacing: 0;
}

.wased-footer__backlinks-links {
    margin: 0;
    line-height: 1.9;
    font-size: 14px;
}

.wased-footer__backlinks-links a {
    color: #4ec5b5;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.wased-footer__backlinks-links a:hover {
    color: #7dd9cc;
    text-decoration: underline;
}

.wased-footer__backlinks .wased-footer__inline a {
    color: #4ec5b5;
    font-weight: 600;
}

.wased-footer__backlinks .wased-footer__inline a:hover {
    color: #7dd9cc;
}

@media (min-width: 768px) {
    .wased-footer--sitemap {
        padding: 1.75rem 0 1.5rem;
    }

    .wased-footer__grid {
        grid-template-columns: 1fr;
        gap: 1.35rem;
        text-align: center;
    }

    .wased-footer__panel {
        padding: 1rem 0.5rem;
    }

    .wased-footer__block-title {
        font-size: 18px;
        text-align: center;
    }

    .wased-footer__inline {
        font-size: 15px;
        text-align: center;
    }
}

.wased-footer {
    background: var(--wased-footer-bg, #0a0a0a);
    color: #ddd;
    padding: 1.25rem 0 1rem;
    margin-top: 0.75rem;
    direction: rtl;
}

.wased-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 1rem;
}

.wased-footer__section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wased-footer__section:last-of-type {
    border-bottom: none;
}

.wased-footer__section summary {
    list-style: none;
    cursor: pointer;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wased-footer__section summary::-webkit-details-marker {
    display: none;
}

.wased-footer__section summary::after {
    content: "▼";
    font-size: 0.6rem;
    opacity: 0.55;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.wased-footer__section[open] summary::after {
    transform: rotate(180deg);
}

.wased-footer__title {
    color: var(--wased-accent, #fede8a);
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.wased-footer__section .wased-footer__list {
    padding-bottom: 0.65rem;
}

.wased-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wased-footer__list li {
    margin-bottom: 0.5rem;
}

.wased-footer__list a {
    color: #ccc;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.55;
}

.wased-footer__list a:hover {
    color: var(--wased-accent, #fede8a);
}

.wased-footer__list--cols {
    columns: 2;
    column-gap: 1.5rem;
}

.wased-footer__utility .wased-footer__inline a {
    color: #d7d7d7;
    font-weight: 600;
}

.wased-footer__copy {
    text-align: center;
    font-size: 13px;
    line-height: 1.7;
    color: #888;
    margin: 0 auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 560px;
    width: 100%;
}

@media (min-width: 768px) {
    .wased-footer {
        padding: 1.75rem 0 1.25rem;
        margin-top: 1.25rem;
    }

    .wased-footer__grid {
        grid-template-columns: 1fr;
        gap: 1.35rem;
        margin-bottom: 1.5rem;
    }

    .wased-footer__section {
        border-bottom: none;
    }

    .wased-footer__section summary {
        pointer-events: none;
        cursor: default;
        padding: 0;
    }

    .wased-footer__section summary::after {
        display: none;
    }

    .wased-footer__title {
        font-size: 18px;
        margin: 0 0 0.85rem;
    }

    .wased-footer__section .wased-footer__list {
        display: block !important;
        padding-bottom: 0;
    }

    .wased-footer__list--cols {
        columns: 2;
    }
}

@media (max-width: 900px) {
    .wased-header__tools {
        margin-inline-start: auto;
    }

    .wased-header__nav-cta {
        display: flex;
    }

    .wased-header__toggle {
        display: block;
    }

    .wased-header__nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--wased-header-bg, #0a0a0a);
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .wased-header__nav.is-open {
        display: flex;
    }

    .wased-header__cta {
        display: none;
    }

    .wased-footer__list--cols {
        columns: 1;
    }
}

/* Breadcrumb */
.wased-breadcrumb {
    margin: 0.75rem 0 1rem;
    font-size: 0.85rem;
    direction: rtl;
}

.wased-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    color: #888;
}

.wased-breadcrumb__item:not(:last-child)::after {
    content: "›";
    margin-inline-start: 0.5rem;
    color: #bbb;
}

.wased-breadcrumb__item a {
    color: #03a588;
    text-decoration: none;
}

.wased-breadcrumb__item a:hover {
    text-decoration: underline;
}

.wased-breadcrumb__item span[aria-current="page"] {
    color: var(--wased-text) !important;
    font-weight: 600;
}

.wased-breadcrumb__list {
    color: #b8c0cc;
}

/* Listing SEO intro */
.wased-listing-intro {
    color: #b8c0cc;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 1.25rem;
    max-width: 72ch;
}

.wased-section-title h2 {
    font-size: 1.15rem;
    margin: 0;
}

/* Profile rich SEO block */
.profile-seo-content {
    margin: 1.25rem 0;
    padding: 1rem 1.1rem;
    background: var(--wased-surface-2, #1f1f1f);
    border-radius: var(--wased-radius, 12px);
    border: 1px solid var(--wased-border, rgba(255, 255, 255, 0.1));
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--wased-text-muted, #b8c0cc);
}

.profile-seo-content .profile-intro {
    margin: 0 0 0.5rem;
}

.profile-seo-content .profile-platforms {
    margin: 0;
    color: #666;
}

/* Alerts */
.wased-alert {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.wased-alert--success {
    background: #e8f8f3;
    border: 1px solid #b8e6d8;
    color: #0d5c47;
}

.wased-alert--error {
    background: #fdecea;
    border: 1px solid #f5c6c0;
    color: #8a1f11;
}

.wased-main {
    min-height: 0;
}

/* ─── شريط التنقل السفلي (موبايل) ─── */
.wased-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--wased-bar-bg, #000) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

.wased-mobile-bar__inner {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    max-width: 420px;
    margin: 0 auto;
}

.wased-mobile-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.6rem 0.4rem 0.55rem;
    color: var(--wased-bar-fg, #fffc01) !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-family: var(--wased-font, inherit);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s;
}

.wased-mobile-bar__item:hover,
.wased-mobile-bar__item:focus {
    opacity: 0.85;
    color: var(--wased-bar-fg, #fffc01) !important;
}

.wased-mobile-bar__item i {
    font-size: 1.4rem;
    line-height: 1;
}

.wased-mobile-bar__item span {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    opacity: 0.9;
}

.wased-mobile-bar__item--active i {
    filter: brightness(1.15);
}

@media (max-width: 767px) {
    body.html {
        padding-bottom: calc(58px + env(safe-area-inset-bottom, 0)) !important;
    }
}

@media (min-width: 768px) {
    .wased-mobile-bar {
        display: none !important;
    }
}
