/* ---- demo page only: delete this block when pasting into the site ---- */
/*#related-websites {
    margin: 0;
    padding: 40px 20px;
    background: #EFE8DC;
    font-family: 'Cairo','Tajawal','Segoe UI',Tahoma,sans-serif;
}*/

.demo-wrap {
    max-width: 1250px;
    margin: 0 auto;
}
/* ---------------------------------------------------------------- */


/* ================================================================
   مواقع صديقة  /  Related websites
   All selectors are prefixed .fdl- to avoid collisions.
   ================================================================ */

.fdl-related {
    /* palette — sampled from the existing site, tweak here only */
    --fdl-blue: #1B79BF;
    --fdl-blue-dark: #0E5486;
    --fdl-blue-tint: #EAF3FA;
    --fdl-gold: #C69C4E;
    --fdl-ink: #123A5C;
    --fdl-body: #4A5560;
    --fdl-panel: #FFFFFF;
    --fdl-card: #FBFAF7;
    --fdl-line: #DED6C7;
    --fdl-gap: 10px;
    --fdl-cols: 7;
    box-sizing: border-box;
    max-width: 1250px;
    margin: 20px auto;
    padding: 14px 18px 16px;
    background: var(--fdl-panel);
    border: 1px solid var(--fdl-line);
    border-radius: 14px;
    font-family: 'Cairo','Tajawal','Segoe UI',Tahoma,sans-serif;
}

.fdl-related[dir="rtl"] {
    text-align: right;
}

.fdl-related[dir="ltr"] {
    text-align: left;
}

    .fdl-related *,
    .fdl-related *::before,
    .fdl-related *::after {
        box-sizing: inherit;
    }

/* ---- heading ---- */
.fdl-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--fdl-blue);
    margin-bottom: 12px;
}

.fdl-head-icon {
    flex: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--fdl-blue-tint);
    color: var(--fdl-blue);
}

    .fdl-head-icon svg {
        width: 17px;
        height: 17px;
        display: block;
    }

.fdl-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--fdl-ink);
    line-height: 1.3;
}

.fdl-title-en {
    margin-inline-start: auto;
    font-size: 13px;
    font-weight: 400;
    color: var(--fdl-gold);
    letter-spacing: .02em;
}

/* ---- tile row ---- */
.fdl-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--fdl-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.fdl-item {
    width: calc((100% - (var(--fdl-cols) - 1) * var(--fdl-gap)) / var(--fdl-cols));
}

.fdl-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    height: 100%;
    padding: 10px 6px 9px;
    background: var(--fdl-card);
    border: 1px solid var(--fdl-line);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, background-color .18s ease;
}

    .fdl-link:hover,
    .fdl-link:focus-visible {
        background: #fff;
        border-color: var(--fdl-blue);
        transform: translateY(-3px);
    }

    .fdl-link:focus-visible {
        outline: 3px solid var(--fdl-gold);
        outline-offset: 2px;
    }

/* logo well — keeps mismatched logo shapes on one optical size */
.fdl-logo {
    position: relative;
    flex: none;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--fdl-line);
    border-radius: 50%;
    overflow: hidden;
    color: var(--fdl-blue);
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

    .fdl-logo svg {
        width: 22px;
        height: 22px;
        display: block;
    }

.fdl-link:hover .fdl-logo,
.fdl-link:focus-visible .fdl-logo {
    background: var(--fdl-blue-tint);
    color: var(--fdl-blue-dark);
}

.fdl-link:hover .fdl-logo {
    border-color: var(--fdl-blue);
}

.fdl-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--fdl-body);
    text-align: center;
    transition: color .18s ease;
    /* clamp to two lines so a long name can't stretch one tile */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fdl-link:hover .fdl-name,
.fdl-link:focus-visible .fdl-name {
    color: var(--fdl-blue-dark);
}
