.tdg-glossary{
    font-family:Cairo,Tahoma,Arial,sans-serif;
    color:#1e293b;
    margin:30px auto;
    max-width:1200px;
}
.tdg-front-hero{
    background:radial-gradient(circle at top right,rgba(212,175,55,.24),transparent 35%),linear-gradient(135deg,#08111f,#111827 65%,#32250c);
    border:1px solid rgba(212,175,55,.35);
    box-shadow:0 28px 80px rgba(2,6,23,.18);
    border-radius:30px;
    padding:34px 24px;
    text-align:center;
    color:#fff;
    margin-bottom:24px;
}
.tdg-front-hero span:not(.tdg-search-icon){
    display:inline-flex;
    background:rgba(212,175,55,.16);
    border:1px solid rgba(212,175,55,.35);
    color:#f7dfa3;
    border-radius:999px;
    padding:7px 14px;
    font-weight:800;
    font-size:18px;
}
.tdg-front-hero h1{
    font-size:28px;
    line-height:1.5;
    color:#fff;
    margin:12px 0;
}
.tdg-front-hero p{
    max-width:780px;
    margin:0 auto 22px;
    color:#dbe3ef;
    line-height:1.9;
    font-size:18px;
}
/* حقل البحث الفاخر */
.tdg-front-search{
    max-width:740px;
    margin:auto;
    position:relative;
}
.tdg-search-luxury{
    position:relative;
    direction:rtl;
    display:block;
    width:100%;
    box-sizing:border-box;
    background:linear-gradient(135deg,#fffefa 0%,#fff7df 46%,#ffffff 100%);
    border:1px solid rgba(212,175,55,.82);
    box-shadow:
        0 18px 50px rgba(2,6,23,.20),
        0 0 0 6px rgba(212,175,55,.08),
        inset 0 1px 0 rgba(255,255,255,.95);
    border-radius:28px;
    padding:10px 96px 10px 18px;
    overflow:hidden;
}
.tdg-search-luxury::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    border-radius:24px;
    background:linear-gradient(90deg,transparent 0%,rgba(212,175,55,.16) 45%,transparent 100%);
    opacity:.75;
}
.tdg-search-luxury::after{
    content:"";
    position:absolute;
    inset:4px;
    border-radius:20px;
    border:1px solid rgba(255,255,255,.70);
    pointer-events:none;
}
.tdg-search-icon{
    position:absolute;
    top:50%;
    right:13px;
    transform:translateY(-50%);
    width:58px;
    height:58px;
    border-radius:22px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:
        radial-gradient(circle at 30% 22%,rgba(255,255,255,.65),transparent 36%),
        linear-gradient(135deg,#f9e59f 0%,#d4af37 42%,#b88618 100%);
    border:1px solid rgba(115,78,15,.38);
    box-shadow:
        0 14px 26px rgba(2,6,23,.14),
        0 10px 20px rgba(212,175,55,.28),
        inset 0 1px 0 rgba(255,255,255,.72),
        inset 0 -10px 18px rgba(133,88,10,.12);
    z-index:4;
    pointer-events:none;
}
.tdg-search-icon::before{
    content:"";
    width:30px;
    height:30px;
    display:block;
    background:#08111f;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.8 3.5a6.3 6.3 0 0 1 4.96 10.18l4.04 4.04a1.35 1.35 0 0 1-1.91 1.91l-4.04-4.04A6.3 6.3 0 1 1 9.8 3.5Zm0 2.7a3.6 3.6 0 1 0 0 7.2a3.6 3.6 0 0 0 0-7.2Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.8 3.5a6.3 6.3 0 0 1 4.96 10.18l4.04 4.04a1.35 1.35 0 0 1-1.91 1.91l-4.04-4.04A6.3 6.3 0 1 1 9.8 3.5Zm0 2.7a3.6 3.6 0 1 0 0 7.2a3.6 3.6 0 0 0 0-7.2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.tdg-search-icon::after{
    display:none;
}
.tdg-search-input{
    position:relative;
    z-index:2;
    display:block !important;
    width:100% !important;
    min-height:50px !important;
    box-sizing:border-box !important;
    border:0 !important;
    outline:0 !important;
    background:transparent !important;
    color:#111827 !important;
    border-radius:0 !important;
    padding:0 !important;
    margin:0 !important;
    font-size:18px !important;
    line-height:50px !important;
    box-shadow:none !important;
    text-align:right !important;
    -webkit-appearance:none !important;
    appearance:none !important;
}
.tdg-search-input:focus{
    border:0 !important;
    outline:0 !important;
    box-shadow:none !important;
    background:transparent !important;
}
.tdg-search-input::placeholder{
    color:#6b7280;
    opacity:1;
}
.tdg-search-input::-webkit-search-decoration,
.tdg-search-input::-webkit-search-cancel-button,
.tdg-search-input::-webkit-search-results-button,
.tdg-search-input::-webkit-search-results-decoration{
    -webkit-appearance:none;
}
.tdg-search-luxury:focus-within{
    border-color:#e4bd45;
    box-shadow:0 22px 62px rgba(2,6,23,.24),0 0 0 7px rgba(212,175,55,.16),inset 0 1px 0 rgba(255,255,255,.98);
}
.tdg-front-layout{
    display:grid;
    grid-template-columns:280px minmax(0,1fr);
    gap:22px;
    align-items:start;
}
.tdg-front-sidebar{position:sticky;top:24px}
.tdg-filter-box,.tdg-front-content{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:24px;
    box-shadow:0 18px 45px rgba(15,23,42,.06);
}
.tdg-filter-box{padding:20px}
.tdg-filter-box h2,.tdg-front-bottom-search h2,.tdg-letter-section h2{
    font-size:20px;
    line-height:1.5;
    margin:0 0 14px;
    color:#111827;
}
.tdg-filter,.tdg-letter-filter{cursor:pointer}
.tdg-filter{
    display:block;
    width:100%;
    text-align:right;
    border:1px solid #e5e7eb;
    background:#f8fafc;
    color:#334155;
    border-radius:14px;
    padding:12px;
    margin-bottom:9px;
    font-weight:800;
    font-size:16px;
}
.tdg-filter.active,.tdg-filter:hover{
    background:linear-gradient(135deg,#d4af37,#f6dd89);
    color:#111827;
    border-color:#d4af37;
}
.tdg-front-content{padding:22px}
.tdg-letters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:22px}
.tdg-letter-filter{
    border:1px solid #e2e8f0;
    background:#f8fafc;
    border-radius:12px;
    padding:9px 13px;
    font-weight:900;
    color:#475569;
    font-size:16px;
}
.tdg-letter-filter.active,.tdg-letter-filter:hover{
    background:#111827;
    color:#fff;
    border-color:#111827;
}
.tdg-letter-section{margin-bottom:34px}
.tdg-letter-title{
    display:flex;
    align-items:center;
    gap:14px;
    margin:0 0 20px !important;
    padding:0 !important;
    border:0 !important;
}
.tdg-letter-badge{
    width:48px;
    height:48px;
    min-width:48px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    background:linear-gradient(135deg,#b38728,#d4af37 52%,#f3dc8f);
    border:1px solid rgba(146,100,20,.35);
    border-radius:12px;
    font-size:24px;
    font-weight:900;
    line-height:1;
    box-shadow:0 12px 25px rgba(212,175,55,.22),inset 0 1px 0 rgba(255,255,255,.35);
}
.tdg-letter-line{
    height:6px;
    flex:1;
    border-radius:999px;
    background:linear-gradient(to left,#b38728 0%,#d4af37 12%,rgba(212,175,55,.50) 45%,rgba(212,175,55,.12) 70%,rgba(212,175,55,0) 100%);
    box-shadow:0 8px 18px rgba(212,175,55,.10);
}
.tdg-term-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.tdg-term-card{
    background:linear-gradient(180deg,#fff,#fffdf7);
    border:1px solid #eee4c4;
    border-radius:22px;
    padding:20px;
    box-shadow:0 14px 35px rgba(15,23,42,.06);
    scroll-margin-top:110px;
    transition:.25s;
    display:flex;
    flex-direction:column;
    min-height:100%;
}
.tdg-term-card:target{
    box-shadow:0 0 0 3px rgba(212,175,55,.28),0 18px 42px rgba(212,175,55,.18);
    transform:translateY(-2px);
}
.tdg-card-top{display:flex;justify-content:flex-start;gap:12px;align-items:flex-start;margin-bottom:10px}
.tdg-card-top h3{
    font-size:20px;
    line-height:1.6;
    margin:0;
    color:#111827;
}
.tdg-card-top span{display:none !important;}
.tdg-card-top span{
    background:#fffbeb;
    color:#92400e;
    border:1px solid #fde68a;
    border-radius:999px;
    padding:5px 10px;
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
}
.tdg-definition{
    line-height:1.95;
    color:#334155;
    font-size:18px;
    flex:1 1 auto;
}
.tdg-definition p{margin:.35em 0}
.tdg-definition a{
    color:var(--theme-link-initial-color,#0057ff);
    text-decoration:none;
    font-weight:inherit;
}
.tdg-definition a:hover,.tdg-definition a:focus{
    color:var(--theme-link-hover-color,#003fbd);
    text-decoration:underline;
    text-underline-offset:3px;
}
.tdg-card-links{
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:flex-start;
    border-top:1px solid #f1ead2;
    padding-top:12px;
    margin-top:auto;
}
.tdg-front-copy{
    cursor:pointer;
    appearance:none;
    -webkit-appearance:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    white-space:nowrap;
    border:1px solid rgba(212,175,55,.42);
    background:linear-gradient(135deg,#0f172a,#111827);
    color:#fff;
    border-radius:999px;
    padding:8px 16px;
    min-width:108px;
    min-height:38px;
    font-weight:800;
    font-size:14px;
    line-height:1.35;
    box-shadow:0 10px 22px rgba(15,23,42,.16),0 0 0 3px rgba(212,175,55,.06);
    transition:transform .22s ease,box-shadow .22s ease,background .22s ease,border-color .22s ease;
}
.tdg-front-copy::before{
    content:"";
    width:14px;
    height:14px;
    display:inline-block;
    border:2px solid currentColor;
    border-radius:3px;
    box-shadow:4px -4px 0 -1px #0f172a,4px -4px 0 1px currentColor;
    opacity:.95;
}
.tdg-front-copy:hover,.tdg-front-copy:focus{
    transform:translateY(-2px);
    background:linear-gradient(135deg,#111827,#243045);
    border-color:rgba(212,175,55,.72);
    box-shadow:0 14px 28px rgba(15,23,42,.22),0 0 0 4px rgba(212,175,55,.10);
}
.tdg-no-results{
    background:#fff7ed;
    color:#9a3412;
    border:1px solid #fed7aa;
    border-radius:16px;
    padding:16px;
    margin-bottom:18px;
    font-weight:800;
    font-size:18px;
}
.tdg-load-more-wrap{
    display:flex;
    justify-content:center;
    margin:20px 0 28px;
}
.tdg-load-more{
    cursor:pointer;
    border:1px solid rgba(212,175,55,.52);
    background:linear-gradient(135deg,#d4af37,#f5dd90);
    color:#111827;
    border-radius:999px;
    padding:12px 34px;
    font-size:18px;
    font-weight:900;
    box-shadow:0 16px 32px rgba(212,175,55,.20);
    transition:.25s ease;
}
.tdg-load-more:hover,.tdg-load-more:focus{
    transform:translateY(-2px);
    box-shadow:0 20px 40px rgba(212,175,55,.30);
}
.tdg-front-bottom-search{
    background:linear-gradient(180deg,#f8fafc,#fff);
    border:1px solid #e2e8f0;
    border-radius:22px;
    padding:20px;
    margin-top:26px;
}
.tdg-bottom-search-box{max-width:none}
@media(max-width:900px){
    .tdg-front-layout{grid-template-columns:1fr}
    .tdg-front-sidebar{position:static}
    .tdg-term-grid{grid-template-columns:1fr}
    .tdg-front-hero h1{font-size:24px}
    .tdg-front-content{padding:16px}
    .tdg-front-hero p,.tdg-definition,.tdg-search-input{font-size:16px}
}


@media(max-width:900px){
    .tdg-search-luxury{border-radius:20px;padding:8px 72px 8px 12px}
    .tdg-search-icon{width:46px;height:46px;right:10px;border-radius:16px}
    .tdg-search-icon::before{width:24px;height:24px}
    .tdg-letter-badge{width:42px;height:42px;min-width:42px;font-size:22px}
    .tdg-front-copy{min-width:104px;min-height:36px;font-size:13px;padding:7px 14px}
}

/* روابط المصطلحات التلقائية: مثل روابط الموقع، مع خط عند التمرير */
.entry-content a.tdg-auto-term-link,
.single-post .entry-content a.tdg-auto-term-link,
.page .entry-content a.tdg-auto-term-link,
a.tdg-auto-term-link{
    color:var(--theme-link-initial-color,#0057ff) !important;
    font-weight:inherit !important;
    text-decoration:none !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    padding:0 !important;
    border-radius:0 !important;
}
.entry-content a.tdg-auto-term-link:hover,
.entry-content a.tdg-auto-term-link:focus,
.single-post .entry-content a.tdg-auto-term-link:hover,
.single-post .entry-content a.tdg-auto-term-link:focus,
.page .entry-content a.tdg-auto-term-link:hover,
.page .entry-content a.tdg-auto-term-link:focus,
a.tdg-auto-term-link:hover,
a.tdg-auto-term-link:focus{
    color:var(--theme-link-hover-color,#003fbd) !important;
    text-decoration:underline !important;
    text-underline-offset:3px !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
}
