/*
Theme Name: Egthad Education
Theme URI: https://egthad.com/
Author: OpenAI
Description: قالب عربي تعليمي عصري لمنصة إجتهاد، RTL، سريع، ومتوافق مع محرر ووردبريس الافتراضي دون Page Builder.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: egthad
*/
:root{--navy:#142b4a;--blue:#2463eb;--cyan:#eaf3ff;--ink:#1c2b3d;--muted:#718096;--line:#e7edf4;--paper:#fff;--soft:#f6f9fd;--radius:20px;--shadow:0 12px 36px rgba(24,49,83,.08)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:Tahoma,Arial,sans-serif;font-size:16px;line-height:1.85}a{color:var(--blue);text-decoration:none}a:hover{color:var(--navy)}img{max-width:100%;height:auto;display:block}button,input{font:inherit}.container{width:min(1160px,calc(100% - 40px));margin-inline:auto}.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}.header-inner{min-height:82px;display:flex;align-items:center;gap:30px}.site-brand{display:flex;align-items:center;gap:10px;flex-shrink:0}.custom-logo{max-height:52px;width:auto}.brand-mark{width:43px;height:43px;border-radius:14px;background:linear-gradient(135deg,#2463eb,#57a3ff);color:#fff;display:grid;place-items:center;font-size:23px;font-weight:800}.brand-name{font-size:25px;font-weight:900;color:var(--navy);letter-spacing:-1px}.brand-name small{display:block;font-size:10px;line-height:1;color:var(--muted);font-weight:600;letter-spacing:1.5px}.main-navigation{flex:1}.main-navigation ul{display:flex;align-items:center;gap:25px;list-style:none;padding:0;margin:0}.main-navigation a{color:#42536a;font-weight:700;font-size:14px}.main-navigation a:hover,.main-navigation .current-menu-item>a{color:var(--blue)}.header-actions{display:flex;align-items:center;gap:12px}.search-form{display:flex;align-items:center;background:var(--soft);border:1px solid var(--line);border-radius:30px;padding:4px 13px;min-width:210px}.search-form input{border:0;outline:0;background:transparent;width:100%;font-size:13px;color:var(--ink)}.search-form button{border:0;background:none;color:var(--blue);cursor:pointer;padding:4px}.menu-toggle{display:none;border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 12px;color:var(--navy)}
.hero{padding:70px 0 58px;background:radial-gradient(circle at 12% 20%,rgba(74,144,255,.15),transparent 30%),linear-gradient(135deg,#f4f8ff 0%,#fff 65%);overflow:hidden}.hero-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:45px;align-items:center}.eyebrow{display:inline-flex;align-items:center;gap:8px;background:#e7f0ff;color:#2058c9;padding:6px 14px;border-radius:30px;font-size:13px;font-weight:800}.hero h1{font-size:clamp(34px,4.4vw,56px);line-height:1.35;letter-spacing:-1.8px;color:var(--navy);margin:18px 0}.hero h1 span{color:var(--blue)}.hero-copy{font-size:18px;color:#64748b;max-width:590px;margin:0 0 27px}.hero-search{max-width:570px;display:flex;background:#fff;border:1px solid #e0e9f5;border-radius:16px;padding:7px;box-shadow:var(--shadow)}.hero-search input{flex:1;min-width:0;border:0;outline:0;padding:10px 14px;background:transparent}.hero-search button,.button-primary{border:0;background:var(--blue);color:white;padding:11px 23px;border-radius:12px;font-weight:800;cursor:pointer}.hero-search button:hover,.button-primary:hover{background:var(--navy);color:#fff}.hero-visual{position:relative;min-height:330px;display:grid;place-items:center}.hero-orbit{width:290px;height:290px;border-radius:50%;background:linear-gradient(145deg,#dceaff,#f4f8ff);display:grid;place-items:center;position:relative}.hero-book{width:190px;height:220px;background:#fff;border-radius:14px;box-shadow:0 25px 50px rgba(34,82,150,.18);transform:rotate(-7deg);padding:25px 20px;position:relative}.hero-book:before{content:"";position:absolute;right:0;top:0;bottom:0;width:9px;background:#d8e7ff;border-radius:0 14px 14px 0}.hero-book strong{font-size:27px;line-height:1.4;color:var(--navy);display:block;margin-top:30px}.hero-book span{color:var(--blue);font-size:12px;font-weight:800}.float-card{position:absolute;background:#fff;border:1px solid var(--line);border-radius:15px;padding:12px 17px;box-shadow:var(--shadow);font-weight:800;color:var(--navy);font-size:13px}.float-one{top:22px;right:0}.float-two{bottom:28px;left:0}.float-card b{color:var(--blue);font-size:19px;margin-left:7px}
.section{padding:58px 0}.section-soft{background:var(--soft)}.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:26px}.section-kicker{color:var(--blue);font-weight:800;font-size:12px;letter-spacing:.5px}.section-title{font-size:29px;color:var(--navy);line-height:1.4;margin:4px 0 0;font-weight:900}.section-desc{color:var(--muted);margin:6px 0 0;font-size:14px}.text-link{font-weight:800;font-size:14px;white-space:nowrap}.category-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.category-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;display:flex;align-items:center;gap:15px;transition:.2s;min-height:105px}.category-card:hover{transform:translateY(-4px);box-shadow:var(--shadow);border-color:#c9dcff}.category-icon{width:52px;height:52px;flex:0 0 52px;border-radius:16px;background:var(--cyan);display:grid;place-items:center;font-size:23px}.category-card strong{display:block;color:var(--navy);font-size:15px}.category-card small{color:var(--muted);font-size:12px}
.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.post-card{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;transition:.2s;min-width:0}.post-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.post-thumb{aspect-ratio:16/10;background:linear-gradient(135deg,#eaf2ff,#f7faff);overflow:hidden;display:block}.post-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .35s}.post-card:hover .post-thumb img{transform:scale(1.04)}.post-thumb-placeholder{height:100%;display:grid;place-items:center;color:#8baee8;font-size:48px}.post-content{padding:19px 20px 21px}.post-meta{display:flex;align-items:center;gap:10px;color:#8a98aa;font-size:11px;margin-bottom:8px}.post-category{color:var(--blue);font-weight:800}.post-title{font-size:18px;line-height:1.55;margin:0 0 9px;font-weight:900}.post-title a{color:var(--navy)}.post-excerpt{font-size:13px;color:var(--muted);margin:0 0 14px;line-height:1.8}.read-more{font-size:13px;font-weight:800}.feature-band{background:var(--navy);color:#fff;border-radius:24px;padding:34px 40px;display:flex;align-items:center;justify-content:space-between;gap:20px}.feature-band h2{font-size:25px;margin:0 0 5px}.feature-band p{color:#c4d2e5;margin:0;font-size:14px}.feature-band .button-primary{background:#fff;color:var(--navy);white-space:nowrap}.feature-band .button-primary:hover{background:#dceaff}
.content-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:35px;padding:45px 0 70px}.content-main{min-width:0}.sidebar{min-width:0}.widget{border:1px solid var(--line);border-radius:17px;padding:20px;margin-bottom:20px;background:#fff}.widget-title{font-size:17px;color:var(--navy);margin:0 0 14px}.widget ul{list-style:none;margin:0;padding:0}.widget li{padding:8px 0;border-bottom:1px solid var(--line);font-size:13px}.widget li:last-child{border:0}.page-heading{padding:42px 0;background:var(--soft);border-bottom:1px solid var(--line)}.page-heading h1{margin:0;color:var(--navy);font-size:34px}.breadcrumbs{font-size:12px;color:var(--muted);margin-bottom:9px}.archive-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}.single-article{max-width:850px;margin-inline:auto}.single-title{font-size:clamp(29px,4vw,43px);line-height:1.5;color:var(--navy);margin:10px 0 18px}.single-featured{width:100%;border-radius:20px;margin:24px 0;max-height:480px;object-fit:cover}.entry-content{font-size:17px;line-height:2.1;color:#34445a}.entry-content h2,.entry-content h3,.entry-content h4{color:var(--navy);line-height:1.5;margin-top:1.7em}.entry-content img{border-radius:14px}.entry-content blockquote{margin:25px 0;padding:18px 24px;border-right:4px solid var(--blue);background:var(--soft);border-radius:0 12px 12px 0}.entry-content table{width:100%;border-collapse:collapse}.entry-content td,.entry-content th{border:1px solid var(--line);padding:10px}.post-tags{margin-top:30px}.post-tags a{display:inline-block;background:var(--soft);padding:5px 12px;border-radius:20px;margin:4px;font-size:12px}.pagination{display:flex;gap:8px;justify-content:center;margin-top:35px}.pagination .page-numbers{padding:8px 14px;border:1px solid var(--line);border-radius:10px;font-weight:700}.pagination .current{background:var(--blue);color:#fff;border-color:var(--blue)}
.site-footer{background:#10243e;color:#d9e4f2;padding:52px 0 20px}.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:45px}.footer-brand{color:#fff;font-size:25px;font-weight:900}.footer-about{color:#b6c6d9;font-size:13px;max-width:360px}.footer-title{font-size:15px;color:#fff;margin:0 0 15px}.footer-menu{list-style:none;padding:0;margin:0}.footer-menu li{margin:7px 0;font-size:13px}.footer-menu a{color:#b6c6d9}.footer-bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:35px;padding-top:17px;color:#8fa4bd;font-size:12px;display:flex;justify-content:space-between;gap:15px}.mobile-nav{display:none}.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);height:1px;width:1px;overflow:hidden}.alignwide{max-width:1100px;margin-inline:auto}.alignfull{width:100vw;max-width:100vw;margin-inline:calc(50% - 50vw)}
@media(max-width:980px){.header-inner{gap:15px}.main-navigation ul{gap:13px}.main-navigation a{font-size:12px}.search-form{min-width:160px}.category-grid{grid-template-columns:repeat(2,1fr)}.hero-grid{gap:15px}.content-layout{grid-template-columns:minmax(0,1fr) 260px}}
@media(max-width:760px){.container{width:min(100% - 28px,600px)}.header-inner{min-height:70px;justify-content:space-between}.menu-toggle{display:block}.main-navigation{display:none;position:absolute;top:70px;right:14px;left:14px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px;box-shadow:var(--shadow)}.main-navigation.is-open{display:block}.main-navigation ul{display:block}.main-navigation li{padding:9px 4px;border-bottom:1px solid var(--line)}.main-navigation li:last-child{border:0}.header-actions .search-form{display:none}.hero{padding:48px 0 35px}.hero-grid{grid-template-columns:1fr}.hero h1{font-size:35px}.hero-copy{font-size:15px}.hero-visual{min-height:260px}.hero-orbit{width:225px;height:225px}.hero-book{width:150px;height:175px}.hero-book strong{font-size:22px;margin-top:18px}.float-one{right:3%}.float-two{left:3%}.section{padding:42px 0}.section-title{font-size:24px}.section-head{align-items:start}.posts-grid{grid-template-columns:1fr 1fr;gap:13px}.post-content{padding:14px}.post-title{font-size:15px}.post-excerpt{font-size:12px}.content-layout{display:block;padding:28px 0 45px}.sidebar{margin-top:35px}.archive-grid{grid-template-columns:1fr 1fr}.feature-band{padding:25px;display:block}.feature-band .button-primary{display:inline-block;margin-top:18px}.footer-grid{grid-template-columns:1fr 1fr;gap:25px}.footer-grid>div:first-child{grid-column:1/-1}}
@media(max-width:480px){.brand-name{font-size:21px}.category-grid{gap:10px}.category-card{padding:13px;gap:10px;min-height:85px}.category-icon{width:42px;height:42px;flex-basis:42px;font-size:19px}.category-card strong{font-size:13px}.category-card small{font-size:10px}.posts-grid,.archive-grid{grid-template-columns:1fr}.post-card{display:grid;grid-template-columns:115px 1fr}.post-thumb{height:100%;aspect-ratio:auto;min-height:130px}.post-content{padding:12px}.post-title{font-size:14px}.post-excerpt{display:none}.post-meta{font-size:10px}.footer-grid{grid-template-columns:1fr}.footer-grid>div:first-child{grid-column:auto}.footer-bottom{display:block}.footer-bottom span{display:block;margin:5px 0}}

/* Accessibility and performance refinements */
.skip-link{position:absolute;top:8px;right:8px;z-index:9999;padding:10px 16px;background:#142b4a;color:#fff;border-radius:8px;transform:translateY(-160%)}
.skip-link:focus{transform:translateY(0);color:#fff}
:focus-visible{outline:3px solid #2463eb;outline-offset:3px}
.book-line{height:5px;background:#eaf1fc;border-radius:8px;margin-top:17px}
.book-line-short{width:70%;margin-top:8px}
.related-posts{margin-top:42px}
.related-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:18px}
@media(max-width:760px){.related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.related-grid{grid-template-columns:1fr}}


/* Egthad v1.2: Tajawal typography and full-width article layout */
html, body, button, input, select, textarea {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif;
}
body, body * {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif;
}
.single-container {
    width: min(100% - 48px, 1120px);
    margin-inline: auto;
    padding: 42px 0 72px;
}
.single-article {
    width: 100%;
    max-width: none;
    margin: 0;
    min-width: 0;
}
.single-page .content-layout,
.single-page .single-container {
    display: block;
}
.single-page .single-title {
    max-width: 100%;
}
.single-page .entry-content {
    width: 100%;
    max-width: none;
}
.article-header {
    margin-bottom: 8px;
}
.article-meta-heading {
    color: var(--navy);
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 13px;
}
.article-share {
    border-top: 1px solid var(--line);
    margin-top: 36px;
    padding-top: 22px;
}
.share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.share-button {
    width: 43px;
    height: 43px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.share-button:hover {
    transform: translateY(-2px);
    border-color: #c9dcff;
    box-shadow: var(--shadow);
}
.share-button svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}
.share-facebook { color: #1877f2; }
.share-x { color: #111827; }
.share-whatsapp { color: #16a34a; }
.share-telegram { color: #229ed9; }
.share-copy { color: #53657b; }
.share-copy-status {
    display: block;
    min-height: 22px;
    margin-top: 6px;
    color: #16834a;
    font-size: 12px;
}
.post-tags {
    border-top: 1px solid var(--line);
    margin-top: 22px;
    padding-top: 22px;
}
.post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-tags-list a {
    display: inline-flex;
    align-items: center;
    background: var(--soft);
    border: 1px solid var(--line);
    color: #42536a;
    padding: 6px 13px;
    border-radius: 30px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}
.post-tags-list a:hover {
    background: var(--cyan);
    color: var(--blue);
    border-color: #c9dcff;
}
.related-posts {
    margin-top: 42px;
}
@media (max-width: 760px) {
    .single-container {
        width: min(100% - 28px, 640px);
        padding: 28px 0 48px;
    }
    .single-title {
        font-size: clamp(27px, 7vw, 36px);
    }
    .entry-content {
        font-size: 16px;
    }
    .share-button {
        width: 41px;
        height: 41px;
    }
}


/* Egthad v1.3: Ad placement containers */
.egthad-ad-unit {
    clear: both;
    width: 100%;
    max-width: 100%;
    margin: 24px auto;
    text-align: center;
    overflow: hidden;
}
.egthad-ad-label {
    display: block;
    margin: 0 auto 7px;
    color: #8a98aa;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}
.egthad-ad-unit ins,
.egthad-ad-unit iframe {
    max-width: 100%;
}
