/* Tajawal — @font-face in partials/fonts.blade.php (public/fonts/*.woff2) */
:root{
--c-bg: #EFF3F8;
--c-white: #ffffff;
--c-border: #e2e8f0;
--c-text: #0f172a;
--c-text-2: #334155;
--c-text-3: #64748b;
--c-blue-50: #eff6ff;
--c-blue-100: #dbeafe;
--c-blue-600: #2563eb;
--c-blue-700: #1d4ed8;
--c-yellow: #facc15;
--c-dark: #1a1a2e;
--s-card: 0 1px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
--s-card-hover: 0 10px 28px rgba(0, 0, 0, 0.10);
--radius: 14px;
--radius-sm: 8px;
--radius-full: 9999px;
--ease: 0.25s ease;
}
*,
*::before,
*::after{
box-sizing: border-box;
margin: 0;
padding: 0;
}
*{
font-family: 'Tajawal', sans-serif;
}
a{
text-decoration: none;
color: inherit;
}
img{
display: block;
max-width: 100%;
}
button{
cursor: pointer;
border: none;
background: transparent;
font-family: 'Tajawal', sans-serif;
}
body{
background-color: var(--c-bg);
background-image: repeating-linear-gradient(-45deg,
transparent,
transparent 150px,
rgba(0, 0, 0, 0.015) 150px,
rgba(0, 0, 0, 0.015) 152px,
transparent 152px,
transparent 160px,
rgba(0, 0, 0, 0.01) 160px,
rgba(0, 0, 0, 0.01) 161px);
color: var(--c-text);
min-height: 100vh;
-webkit-font-smoothing: antialiased;
font-size: 13px;
font-weight: 400;
line-height: 1.6;
direction: rtl;
overflow-x: clip;
}
html{
overflow-x: clip;
}
.container{
max-width: 1280px;
margin: 0 auto;
padding: 0 20px;
}
.site-header{
--hdr-height: 60px;
background: var(--c-white);
border-bottom: 1px solid var(--c-border);
position: sticky;
top: 0;
z-index: 1100;
transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled{
box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.site-header-inner{
max-width: 1280px;
margin: auto;
padding: 0 20px;
height: var(--hdr-height);
display: grid;
grid-template-columns: auto 1fr auto auto;
grid-template-areas: "logo search nav actions";
align-items: center;
gap: 12px 16px;
transition: height 0.2s ease, padding 0.2s ease;
}
.site-header.is-scrolled{
--hdr-height: 52px;
}
.site-header.is-scrolled .header-logo-img{
height: 34px;
transition: height 0.2s ease;
}
.site-header.is-scrolled .hdr-search{
height: 34px;
}
.site-logo{
grid-area: logo;
display: flex;
align-items: center;
gap: 8px;
padding-inline-end: 0;
border-inline-end: none;
height: auto;
flex-shrink: 0;
}
.header-logo-img{
height: 40px;
width: auto;
max-width: 160px;
transition: height 0.2s ease;
}
.logo-text{
font-weight: 800;
font-size: 20px;
color: var(--c-text);
line-height: 1;
}
.logo-text span{
color: var(--c-blue-600);
}
.hdr-search-wrap {
  grid-area: search;
  position: relative;
  flex: 1;
  max-width: 540px;
  min-width: 0;
  width: 100%;
  justify-self: center;
}
.live-search-wrap { position: relative; }
.hdr-search{
display: flex;
align-items: center;
gap: 8px;
background: var(--c-bg);
border: 1px solid var(--c-border);
border-radius: 10px;
padding: 0 14px;
height: 38px;
min-width: 0;
max-width: 540px;
width: 100%;
justify-self: center;
margin: 0;
transition: border-color 0.2s, height 0.2s ease;
}
.hdr-search:focus-within{
border-color: var(--c-blue-600);
}
.hdr-search svg{
color: var(--c-text-3);
flex-shrink: 0;
}
.hdr-search input{
border: none;
background: transparent;
outline: none;
font-family: inherit;
font-size: 13px;
color: var(--c-text);
width: 100%;
padding: 0;
min-width: 0;
}
.hdr-search input::placeholder{
color: var(--c-text-3);
}
.site-nav{
grid-area: nav;
display: flex;
align-items: center;
height: auto;
margin-inline-start: 0;
gap: 12px;
position: static;
opacity: 1;
pointer-events: auto;
transform: none;
background: transparent;
border: none;
box-shadow: none;
padding: 0;
min-width: auto;
flex-direction: row;
flex-shrink: 0;
}
.site-nav a{
font-size: 12px;
font-weight: 600;
color: var(--c-text-2);
transition: color var(--ease), background var(--ease);
display: flex;
align-items: center;
gap: 5px;
padding: 0;
border-radius: 0;
white-space: nowrap;
}
.site-nav__drawer{
display: none;
}
.site-nav__bar{
display: flex;
align-items: center;
gap: 12px;
}
.site-nav-head--sub{
margin-top: 4px;
border-top: 1px solid var(--c-border);
border-bottom: none;
padding-top: 12px;
}
.site-nav-links--sub a::after{
display: none;
}
.hdr-dropdown{
position: relative;
}
.hdr-dropdown__btn{
display: inline-flex;
align-items: center;
gap: 4px;
padding: 6px 10px;
font-size: 12px;
font-weight: 600;
font-family: inherit;
color: var(--c-text-2);
background: var(--c-bg);
border: 1px solid var(--c-border);
border-radius: 10px;
cursor: pointer;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
white-space: nowrap;
}
.hdr-dropdown__btn:hover,
.hdr-dropdown.is-open .hdr-dropdown__btn{
color: var(--c-blue-600);
border-color: color-mix(in srgb, var(--c-blue-600) 25%, var(--c-border));
background: var(--c-blue-50);
}
.hdr-dropdown__chev{
transition: transform 0.2s ease;
}
.hdr-dropdown.is-open .hdr-dropdown__chev{
transform: rotate(180deg);
}
.hdr-dropdown__panel{
position: absolute;
top: calc(100% + 8px);
inset-inline-end: 0;
min-width: 210px;
background: var(--c-white);
border: 1px solid var(--c-border);
border-radius: 12px;
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
padding: 6px;
opacity: 0;
visibility: hidden;
pointer-events: none;
transform: translateY(-6px);
transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
z-index: 1300;
}
.hdr-dropdown.is-open .hdr-dropdown__panel{
opacity: 1;
visibility: visible;
pointer-events: auto;
transform: translateY(0);
}
.hdr-dropdown__panel a{
display: block;
padding: 9px 12px;
font-size: 12px;
font-weight: 600;
color: var(--c-text-2);
border-radius: 8px;
text-decoration: none;
transition: background 0.15s ease, color 0.15s ease;
}
.hdr-dropdown__panel a:hover{
background: var(--c-blue-50);
color: var(--c-blue-600);
}
html.dark .hdr-dropdown__btn{
background: #0f172a;
border-color: #334155;
color: #cbd5e1;
}
html.dark .hdr-dropdown__btn:hover,
html.dark .hdr-dropdown.is-open .hdr-dropdown__btn{
background: rgba(59, 130, 246, 0.12);
color: #93c5fd;
}
html.dark .hdr-dropdown__panel{
background: #1e293b;
border-color: #334155;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
html.dark .hdr-dropdown__panel a{
color: #cbd5e1;
}
html.dark .hdr-dropdown__panel a:hover{
background: rgba(59, 130, 246, 0.12);
color: #93c5fd;
}
.site-nav a svg{
flex-shrink: 0;
transition: transform var(--ease);
}
.site-nav a:hover{
background: transparent;
color: var(--c-blue-600);
}
.site-nav a:hover svg{
transform: scale(1.15);
}
.site-nav a.active{
background: transparent;
color: var(--c-blue-600);
}
.hdr-actions{
grid-area: actions;
display: flex;
align-items: center;
gap: 8px;
margin-inline-start: 0;
flex-shrink: 0;
position: relative;
z-index: 3;
}
.menu-toggle{
grid-area: menu;
display: none;
width: 38px;
height: 38px;
border-radius: 10px;
background: var(--c-blue-50);
border: 1px solid rgba(37, 99, 235, 0.1);
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
color: var(--c-blue-600);
flex-shrink: 0;
position: relative;
z-index: 3;
}
.menu-toggle:hover{
background: var(--c-blue-600);
color: #fff;
}
.hdr-btn{
display: none;
}
.dark-toggle{
width: 34px;
height: 34px;
border-radius: 10px;
background: var(--c-bg);
border: 1px solid var(--c-border);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
color: var(--c-text-2);
flex-shrink: 0;
}
.dark-toggle:hover{
background: var(--c-blue-50);
color: var(--c-blue-600);
border-color: var(--c-blue-600);
}
.dark-toggle .icon-moon{
display: none;
}
html.dark .dark-toggle .icon-sun{
display: none;
}
html.dark .dark-toggle .icon-moon{
display: block;
}
html.dark .menu-toggle{
background: rgba(59, 130, 246, 0.15);
color: #60a5fa;
border-color: transparent;
}
html.dark .menu-toggle:hover{
background: var(--c-blue-600);
color: #fff;
}
.page-body{
padding: 16px 0 24px;
display: flex;
flex-direction: column;
gap: 6px;
}
.card-section{
background: var(--c-white);
border: 1px solid var(--c-border);
border-radius: 16px;
box-shadow: var(--s-card);
padding: 14px 20px;
max-width: 1280px;
width: calc(100% - 40px);
margin: 0 auto;
position: relative;
overflow: hidden;
}
.card-section::before{
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px),
linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px);
background-size: 24px 24px;
mask-image: radial-gradient(ellipse at top right, black 0%, transparent 60%);
-webkit-mask-image: radial-gradient(ellipse at top right, black 0%, transparent 60%);
pointer-events: none;
z-index: 0;
}
.section-header{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
padding-bottom: 14px;
border-bottom: 1px solid var(--c-border);
position: relative;
z-index: 1;
}
.section-title{
font-size: 15px;
font-weight: 600;
color: var(--c-text);
display: flex;
align-items: center;
gap: 10px;
}
.section-title-dot{
width: 4px;
height: 22px;
border-radius: 4px;
background: var(--c-blue-600);
flex-shrink: 0;
}
.section-link{
font-size: 13px;
font-weight: 600;
color: var(--c-blue-600);
display: flex;
align-items: center;
gap: 4px;
white-space: nowrap;
transition: gap 0.15s;
}
.section-link:hover{
gap: 8px;
}
.semester-cards{
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
position: relative;
z-index: 1;
}
.sem-card{
border: 1px solid var(--c-border);
border-radius: 16px;
background: var(--c-white);
overflow: hidden;
transition: background 0.2s;
text-decoration: none;
}
.sem-card:hover{
background: #f8faff;
box-shadow: 0 4px 16px rgba(37,99,235,0.08);
}
.sem-visual{
background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
padding: 24px 20px;
display: flex;
align-items: center;
gap: 16px;
min-height: 110px;
}
.sem-num{
font-size: 54px;
font-weight: 900;
color: rgba(255, 255, 255, 0.25);
line-height: 1;
flex-shrink: 0;
}
.sem-label{
font-size: 14px;
font-weight: 600;
color: #fff;
line-height: 1.5;
}
.sem-title{
font-size: 13px;
font-weight: 600;
color: var(--c-text);
padding: 12px 16px 8px;
}
.sem-grades{
display: flex;
flex-wrap: wrap;
gap: 6px;
padding: 0 16px 16px;
}
.grade-pill{
background: #3b82f6;
color: #fff;
font-size: 12px;
font-weight: 600;
padding: 4px 10px;
border-radius: 20px;
white-space: nowrap;
}
.grades-grid{
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 20px;
position: relative;
z-index: 1;
}
@media(max-width: 1024px){
.grades-grid{
grid-template-columns: repeat(4, 1fr);
}
}
@media(max-width: 768px){
.grades-grid{
grid-template-columns: repeat(3, 1fr);
}
}
@media(max-width: 640px){
.grades-grid{
grid-template-columns: repeat(2, 1fr);
}
}
.grade-card{
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
}
.grade-visual{
width: 100%;
aspect-ratio: 4/3;
background: var(--c-white);
border: 1px solid var(--c-border);
border-radius: 12px;
box-shadow: var(--s-card);
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
transition: background 0.2s;
}
.grade-card:hover .grade-visual{
background: #f0f4ff;
box-shadow: 0 4px 16px rgba(37,99,235,0.10);
}
.grade-visual::before{
content: '';
position: absolute;
width: 90px;
height: 90px;
background: #fdf2a9;
border-radius: 50%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
opacity: 0.8;
}
.decor{
position: absolute;
fill: transparent;
stroke: #1e293b;
stroke-width: 2px;
}
.d1{
top: 15%;
right: 15%;
width: 10px;
height: 10px;
transform: rotate(15deg);
}
.d2{
bottom: 15%;
left: 15%;
width: 12px;
height: 12px;
transform: rotate(-25deg);
}
.d3{
top: 25%;
left: 20%;
width: 6px;
height: 6px;
border-radius: 50%;
border: 2px solid #1e293b;
}
.gv-content{
position: relative;
z-index: 2;
display: flex;
align-items: center;
gap: 8px;
flex-direction: row-reverse;
}
.gv-text{
font-size: 22px;
font-weight: 800;
color: #1e293b;
line-height: 1.1;
text-align: center;
}
.gv-text.centered{
text-align: center;
color: var(--c-blue-600);
font-size: 18px;
}
.gv-num{
font-size: 64px;
font-weight: 800;
color: var(--c-blue-600);
line-height: 1;
}
.grade-name{
font-size: 13px;
font-weight: 600;
color: var(--c-text-2);
text-align: center;
transition: var(--ease);
}
.grade-card:hover .grade-name{
color: var(--c-blue-600);
}
.hero-section{
background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
border: 1px solid #c7d2fe;
border-radius: 20px;
padding: 20px 16px;
text-align: center;
position: relative;
overflow: visible;
z-index: 20;
margin: 0 auto 0;
max-width: 1280px;
width: calc(100% - 40px);
}
.hero-section::after{
content: "📚 📐 🎓 🧪 📝";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 10rem;
opacity: 0.04;
pointer-events: none;
white-space: nowrap;
letter-spacing: 30px;
z-index: 0;
max-width: 100%;
overflow: hidden;
}
.hero-content{
position: relative;
z-index: 1;
}
.hero-title{
font-size: 28px;
font-weight: 800;
color: #1e1b4b;
margin: 0 0 6px;
line-height: 1.35;
}
.hero-title span{
color: var(--c-blue-600);
white-space: nowrap;
}
.hero-subtitle{
font-size: 14px;
color: #4338ca;
margin: 0 0 12px;
font-weight: 500;
}
.hero-search-wrap{
position: relative;
max-width: 650px;
margin: 0 auto;
width: 100%;
z-index: 2;
}
.hero-search-wrap .live-search-dropdown{
z-index: 1300;
box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}
.hero-search-box{
display: flex;
max-width: none;
margin: 0;
background: #fff;
padding: 5px;
border-radius: 12px;
box-shadow: 0 10px 25px rgba(67, 56, 202, 0.1);
border: 1px solid rgba(67, 56, 202, 0.1);
}
.hero-search-box input{
flex: 1;
padding: 10px 16px;
border: none;
font-family: inherit;
font-size: 14px;
outline: none;
background: transparent;
color: #1e1b4b;
}
.hero-search-box button{
background: var(--c-blue-600);
color: #fff;
padding: 0 32px;
border: none;
border-radius: 8px;
font-weight: 600;
font-size: 14px;
display: flex;
align-items: center;
gap: 8px;
transition: background 0.2s;
cursor: pointer;
}
.hero-search-box button:hover{
background: var(--c-blue-700);
}
.legal-disclaimer-wrap{
padding-top: 0;
padding-bottom: 0;
margin-top: 4px;
margin-bottom: 0;
}
.legal-disclaimer-box{
background: color-mix(in srgb, var(--c-primary, #2563eb) 6%, var(--c-white, #fff));
border: 1px solid color-mix(in srgb, var(--c-primary, #2563eb) 20%, transparent);
border-radius: 16px;
padding: 1.25rem 1.5rem;
display: flex;
align-items: flex-start;
gap: 1rem;
width: calc(100% - 40px);
max-width: 1280px;
margin: 0 auto;
}
.legal-disclaimer-icon{
flex-shrink: 0;
color: var(--c-primary, #2563eb);
margin-top: 3px;
}
.legal-disclaimer-text{
font-size: 0.85rem;
line-height: 1.7;
color: var(--c-text-2);
}
.legal-disclaimer-text strong{
color: var(--c-text);
display: block;
margin-bottom: 4px;
font-size: 0.9rem;
}
.legal-disclaimer-text a{
color: var(--c-primary);
font-weight: 700;
text-decoration: underline;
}
.hero-tags{
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
}
.hero-tags span{
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
font-weight: 600;
color: #4f46e5;
background: rgba(255, 255, 255, 0.6);
padding: 4px 12px;
border-radius: 20px;
}
.hero-tags span svg{
width: 14px;
height: 14px;
}
@media (max-width: 992px){
.hero-section::after{
display: none;
}
}
@media (max-width: 768px){
.hero-section{
padding: 16px 14px;
}
.hero-title{
font-size: 22px;
}
.hero-subtitle{
font-size: 13px;
margin-bottom: 10px;
}
.hero-search-wrap{
max-width: none;
}
.hero-search-box{
flex-direction: column;
background: transparent;
box-shadow: none;
border: none;
gap: 8px;
}
.hero-search-box input{
background: #fff;
border-radius: 8px;
padding: 12px 14px;
border: 1px solid #c7d2fe;
}
.hero-search-box button{
padding: 12px;
justify-content: center;
}
}
.simple-grades-grid{
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 20px;
padding: 15px 0;
}
@media (max-width: 992px){
.simple-grades-grid{
grid-template-columns: repeat(5, 1fr);
}
}
@media (max-width: 768px){
.simple-grades-grid{
grid-template-columns: repeat(4, 1fr);
}
}
@media (max-width: 640px){
.simple-grades-grid{
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
}
.sg-card{
background: transparent;
border: none;
border-radius: 0;
overflow: visible;
text-decoration: none;
display: flex;
flex-direction: column;
align-items: stretch;
}
.sg-card-img{
aspect-ratio: 4/3;
background: var(--c-white);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
border: 1px solid var(--c-border);
border-radius: 12px;
box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.03);
transition: background 0.2s;
}
.sg-card:hover .sg-card-img{
background: #f0f4ff;
box-shadow: 0 4px 16px rgba(37,99,235,0.10);
}
.sg-card-img::before{
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
background-size: 20px 20px;
pointer-events: none;
}
.sg-card-img img{
height: 100%;
width: 100%;
object-fit: cover;
position: relative;
z-index: 1;
}
.ribbon{
position: absolute;
top: 14px;
left: -44px;
width: 155px;
padding: 6px 0;
text-align: center;
font-size: 12px;
font-weight: 800;
color: #fff;
white-space: nowrap;
transform: rotate(-45deg);
transform-origin: center;
z-index: 10;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
line-height: 1.25;
letter-spacing: 0.01em;
pointer-events: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}
/* شريط أصغر للبطاقات المضغوطة */
.ribbon--sm{
top: 11px;
left: -38px;
width: 128px;
padding: 5px 0;
font-size: 10px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}
.ribbon-green{
background: #84cc16;
}
.ribbon-orange{
background: #f97316;
}
.ribbon-pink{
background: #ec4899;
}
.ribbon-blue{
background: #3b82f6;
}
.sg-card-body{
padding: 12px 0 0 0;
display: flex;
flex-direction: column;
align-items: center;
}
.sg-body{
display: none;
}
.sg-name{
font-size: 14px;
font-weight: 600;
color: var(--c-text);
text-align: center;
transition: color 0.2s;
line-height: 1.4;
}
.sg-card:hover .sg-name{
color: var(--c-blue-600);
}
.recent-grid{
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
position: relative;
z-index: 1;
}
@media(max-width: 768px){
.recent-grid{
grid-template-columns: 1fr;
}
}
.home-news-grid{
grid-template-columns: repeat(2, 1fr);
}
@media(max-width: 768px){
.home-news-grid{
grid-template-columns: 1fr;
}
}

.recent-card{
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
border: 1px solid var(--c-border);
border-radius: 10px;
transition: background 0.2s;
background: var(--c-white);
}
.recent-card:hover{
background: #f0f4ff;
box-shadow: 0 4px 14px rgba(37,99,235,0.08);
}
.recent-grid{
position: relative;
z-index: 1;
}
.recent-icon{
width: 52px;
height: 52px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
flex-shrink: 0;
overflow: hidden;
padding: 0;
}
.featured-file-thumb:not(.recent-icon){
flex-shrink: 0;
width: var(--fft-size, 90px);
height: var(--fft-size, 90px);
border-radius: 10px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.featured-file-thumb:not(.recent-icon) img,
.featured-file-thumb:not(.recent-icon) picture{
width: 100%;
height: 100%;
display: block;
object-fit: contain;
}
.featured-file-thumb__fallback{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
font-size: calc(var(--fft-size, 90px) * 0.44);
line-height: 1;
}
.recent-info{
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.recent-title{
font-size: 13px;
font-weight: 600;
color: var(--c-text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.recent-meta{
font-size: 11px;
color: var(--c-text-3);
font-weight: 500;
}

/* â”€â”€ Related Subjects Grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rel-subj-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media(max-width:900px){ .rel-subj-grid{ grid-template-columns: repeat(4,1fr); } }
@media(max-width:640px){ .rel-subj-grid{ grid-template-columns: repeat(2,1fr); gap:10px; } }

.rel-subj-card {
  display: flex; flex-direction: column;
  text-decoration: none;
  background: #fff;
  border: 1.5px solid #e8edf3;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.rel-subj-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.09);
  transform: translateY(-2px);
}
.rel-subj-thumb {
  width: 100%; aspect-ratio: 3/2;
  overflow: hidden; flex-shrink: 0;
}
.rel-subj-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.rel-subj-info {
  padding: 7px 8px 6px;
}
.rel-subj-name {
  font-size: .75rem; font-weight: 600; color: #1e293b;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.units-grid{
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
padding-top: 10px;
}
@media(max-width: 992px){
.units-grid{
grid-template-columns: repeat(3, 1fr);
}
}
@media(max-width: 768px){
.units-grid{
grid-template-columns: repeat(2, 1fr);
}
}
.unit-card{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
gap: 16px;
padding: 24px 16px;
background: var(--c-white);
border: 1px solid var(--c-border);
border-radius: 16px;
text-decoration: none;
transition: background 0.2s;
}
.unit-card:hover{
background: #f0f4ff;
box-shadow: 0 4px 16px rgba(37,99,235,0.08);
}
.unit-icon{
width: 56px;
height: 56px;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3), 0 4px 8px rgba(0, 0, 0, 0.02);
}
.unit-icon svg{
width: 24px;
height: 24px;
}
.unit-title{
font-size: 14px;
font-weight: 800;
color: var(--c-text);
line-height: 1.5;
transition: color 0.2s;
}
.unit-card:hover .unit-title{
color: var(--c-blue-600);
}
#faq .section-header{
border-bottom: 1px solid var(--c-border);
padding-bottom: 20px;
margin-bottom: 0px;
}
.about-section{
border-right: 4px solid #0ea5e9;
}
.about-content{
position: relative;
z-index: 1;
}
.about-content p{
font-size: 13px;
line-height: 1.9;
color: var(--c-text-2);
margin-bottom: 12px;
text-align: justify;
}
.about-content p:last-child{
margin-bottom: 0;
}
.app-article-content h2{
font-size: 1.05rem;
font-weight: 800;
color: var(--c-text);
margin: 0 0 14px;
line-height: 1.5;
}
.app-article-content h3{
font-size: 0.95rem;
font-weight: 700;
color: var(--c-text);
margin: 16px 0 10px;
}
.app-article-content strong{
color: var(--c-text);
font-weight: 700;
}
.page-body--home{
padding-bottom: 8px;
}
.page-body--home .card-section{
position: relative;
z-index: 1;
}
.site-footer{
background: var(--c-dark);
color: #fff;
padding: 28px 0 16px;
margin-top: 12px;
}
.footer-inner{
max-width: 1280px;
margin: 0 auto;
padding: 0 20px;
display: grid;
grid-template-columns: 1.5fr 3fr;
gap: 28px;
}
.foot-brand{
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
border-left: 1px solid rgba(255, 255, 255, 0.1);
padding-left: 32px;
}
.footer-logo-img{
max-width: 120px;
height: auto;
display: block;
}
.foot-brand-desc{
font-size: 10.5px;
color: rgba(255, 255, 255, 0.6);
line-height: 1.45;
text-align: center;
width: 100%;
max-width: 290px;
display: block;
margin: 0 auto;
}
.foot-brand-desc span{
display: block;
margin-bottom: 2px;
}
.foot-links-wrap{
flex: 1;
display: flex;
justify-content: space-around;
}
.foot-title{
font-size: 14px;
font-weight: 600;
color: #fff;
margin-bottom: 16px;
text-align: right;
}
.foot-links a{
display: block;
font-size: 12px;
color: rgba(255, 255, 255, 0.7);
margin-bottom: 10px;
transition: var(--ease);
text-align: right;
}
.foot-links a:hover{
color: #fff;
transform: translateX(-4px);
}
.footer-bot{
max-width: 1280px;
margin: 20px auto 0;
padding: 12px 20px 0;
border-top: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
justify-content: space-between;
font-size: 12px;
color: rgba(255, 255, 255, 0.5);
}
@media(max-width: 992px){
.site-nav a{
font-size: 12px;
gap: 4px;
}
.site-nav{
gap: 10px;
}
.hdr-search{
max-width: 420px;
}
}
@media(max-width: 768px){
.site-header{
--hdr-height: auto;
position: sticky;
overflow: visible;
}
.site-header-inner{
grid-template-columns: 40px 1fr 40px;
grid-template-rows: 44px 40px;
grid-template-areas:
"menu logo actions"
"search search search";
height: auto;
min-height: 92px;
padding: 8px 16px 0;
gap: 8px;
position: relative;
z-index: 2;
overflow: visible;
}
.site-header.is-scrolled{
--hdr-height: auto;
}
.site-header.is-scrolled .site-header-inner{
min-height: 84px;
padding: 6px 16px 0;
gap: 6px;
}
.site-header.is-scrolled .header-logo-img{
height: 30px;
}
.site-logo{
justify-self: center;
}
.header-logo-img{
height: 32px;
}
.menu-toggle{
display: flex;
}
.hdr-search-wrap {
  max-width: none;
  margin-bottom: 8px;
}
.hdr-search{
max-width: none;
height: 38px;
padding: 0 12px;
margin-bottom: 8px;
}
.site-header.is-scrolled .hdr-search{
height: 36px;
}
.hdr-search input{
font-size: 13px;
}
.hdr-search input::placeholder{
font-size: 12px;
}
.hdr-actions{
justify-self: end;
}
.dark-toggle,
.menu-toggle{
width: 34px;
height: 34px;
}
.site-nav{
grid-area: unset;
display: block;
position: absolute;
top: 100%;
left: 0;
right: 0;
margin: 0;
background: var(--c-white);
border-top: 1px solid var(--c-border);
border-bottom: 1px solid var(--c-border);
border-radius: 0 0 16px 16px;
box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
padding: 0;
z-index: 1200;
opacity: 0;
pointer-events: none;
visibility: hidden;
transform: translateY(-6px);
transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
height: auto;
}
.site-nav.active{
opacity: 1;
pointer-events: auto;
visibility: visible;
transform: translateY(0);
}
.site-nav__bar{
display: none;
}
.site-nav__drawer{
display: block;
}
.site-nav-head{
display: block;
margin: 0;
padding: 10px 16px 6px;
font-size: 11px;
font-weight: 700;
color: var(--c-text-3);
letter-spacing: 0.02em;
border-bottom: 1px solid var(--c-border);
}
.site-nav-links{
display: flex;
flex-direction: column;
gap: 0;
padding: 6px 10px 10px;
}
.site-nav a{
display: flex;
align-items: center;
gap: 10px;
font-size: 13px;
font-weight: 600;
padding: 10px 12px;
border-radius: 10px;
white-space: normal;
color: var(--c-text);
border: 1px solid transparent;
}
.site-nav a svg{
flex-shrink: 0;
width: 17px;
height: 17px;
padding: 7px;
background: var(--c-bg);
border-radius: 9px;
box-sizing: content-box;
}
.site-nav a::after{
content: "";
flex-shrink: 0;
width: 7px;
height: 7px;
margin-inline-start: auto;
border-top: 1.5px solid var(--c-text-3);
border-inline-start: 1.5px solid var(--c-text-3);
transform: rotate(-45deg);
opacity: 0.55;
}
.site-nav a:hover,
.site-nav a.active{
background: var(--c-blue-50);
border-color: color-mix(in srgb, var(--c-blue-600) 12%, transparent);
color: var(--c-blue-600);
}
.site-nav a:hover svg,
.site-nav a.active svg{
transform: none;
}
html.dark .site-nav{
background: #1e293b;
border-color: #334155;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}
html.dark .site-nav-head{
color: #94a3b8;
border-bottom-color: #334155;
}
html.dark .site-nav a{
color: #e2e8f0;
}
html.dark .site-nav a svg{
background: #0f172a;
}
html.dark .site-nav a:hover,
html.dark .site-nav a.active{
background: rgba(59, 130, 246, 0.12);
border-color: rgba(59, 130, 246, 0.2);
color: #93c5fd;
}
.semester-cards{
grid-template-columns: 1fr;
}
.hero-section{
padding: 18px 14px;
}
.hero-title{
font-size: 24px;
}
.hero-subtitle{
font-size: 14px;
}
.footer-inner{
grid-template-columns: 1fr;
gap: 24px;
}
.foot-brand{
border-left: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
padding-left: 0;
padding-bottom: 24px;
align-items: center;
}
.foot-brand-desc{
text-align: center;
max-width: 340px;
}
.foot-brand-desc span{
white-space: normal;
overflow: visible;
text-overflow: clip;
}
.foot-links-wrap{
flex-direction: column;
gap: 24px;
text-align: center;
}
.foot-title{
text-align: center;
}
.foot-links a{
text-align: center;
}
.footer-bot{
flex-direction: column;
gap: 12px;
align-items: center;
text-align: center;
}
}
@media(max-width: 480px){
.breadcrumbs ol{
padding: 10px 16px;
margin: 0;
width: 100%;
}
.breadcrumbs li{
display: inline-flex;
}
}
/* â”€â”€ Promo Box â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.promo-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(130deg, #0f172a 0%, #1e3a5f 50%, #1d4ed8 100%);
  border-radius: 20px;
  padding: 32px 40px;
  margin: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37,99,235,0.3);
  box-shadow: 0 8px 32px rgba(29,78,216,0.25);
}
.promo-box::before {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
  top: -100px; left: -80px;
  pointer-events: none;
}
.promo-box::after {
  content: 'ðŸ“±';
  position: absolute;
  font-size: 120px;
  opacity: 0.06;
  right: 160px;
  top: -20px;
  pointer-events: none;
  line-height: 1;
}
.promo-box h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.promo-box p {
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  margin: 0;
  line-height: 1.6;
}
.promo-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.promo-btns a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}
.promo-btns a:first-child {
  background: #2563eb;
  border-color: #3b82f6;
}
.promo-btns a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.promo-btns a:first-child:hover {
  background: #1d4ed8;
}
@media (max-width: 700px) {
.promo-box{
padding: 20px;
flex-direction: column;
text-align: center;
justify-content: center;
}
.promo-btns{
justify-content: center;
width: 100%;
}
.promo-btns a{
width: 100%;
text-align: center;
}
.subject-hero{
flex-direction: column;
align-items: center;
text-align: center;
}
.subject-meta{
justify-content: center;
}
.subject-actions{
width: 100%;
}
.subject-actions button{
width: 100%;
justify-content: center;
}
}
html.dark{
--c-bg: #0f172a;
--c-white: #1e293b;
--c-border: #334155;
--c-text: #f1f5f9;
--c-text-2: #cbd5e1;
--c-text-3: #94a3b8;
--c-blue-50: rgba(37, 99, 235, 0.1);
--c-blue-100: rgba(37, 99, 235, 0.15);
--c-dark: #0b1120;
}
html.dark body{
background-color: var(--c-bg);
background-image: none;
}
html.dark .site-header{
background: #1e293b;
border-bottom-color: #334155;
}
html.dark .site-header.is-scrolled{
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}
html.dark .hero-section{
background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
border-color: #4338ca;
}
html.dark .hero-section::after{
opacity: 0.06;
}
html.dark .hero-title{
color: #f1f5f9;
}
html.dark .hero-title span{
color: #818cf8;
}
html.dark .hero-subtitle{
color: #a5b4fc;
}
html.dark .hero-search-box{
background: #1e293b;
border-color: #4338ca;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
html.dark .hero-search-box input{
color: #f1f5f9;
}
html.dark .hero-tags span{
background: rgba(255, 255, 255, 0.08);
color: #a5b4fc;
}
html.dark .card-section{
background: #1e293b;
border-color: #334155;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
html.dark .card-section::before{
background-image:
linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px),
linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px);
}
html.dark .grade-visual{
background: #0f172a;
border-color: #334155;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
html.dark .grade-visual::before{
background: rgba(250, 204, 21, 0.15);
}
html.dark .gv-text{
color: #e2e8f0;
}
html.dark .decor{
stroke: #94a3b8;
}
html.dark .d3{
border-color: #94a3b8;
}
html.dark .recent-card{
background: #0f172a;
border-color: #334155;
}
html.dark .recent-card:hover{
border-color: #6366f1;
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
html.dark .sg-card{
background: #0f172a;
border-color: #334155;
}
html.dark .sg-card:hover{
border-color: var(--c-blue-500);
background: #1e293b;
box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}
.breadcrumbs{
max-width: 1280px;
width: calc(100% - 40px);
margin: 0 auto;
}
.breadcrumbs ol{
display: flex;
align-items: center;
justify-content: flex-start;
gap: 6px;
list-style: none;
font-size: 13px;
font-weight: 400;
flex-wrap: wrap;
background: transparent;
padding: 10px 0;
border-radius: 0;
border: none;
box-shadow: none;
width: 100%;
color: #9ca3af;
}
.breadcrumbs li{
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
.breadcrumbs li+li::before{
content: '\203A';
color: #9ca3af;
font-size: 11px;
margin: 0;
}
.breadcrumbs a{
color: #2563eb;
font-weight: 600;
text-decoration: none;
transition: var(--ease);
}
.breadcrumbs a:hover{
color: #1d4ed8;
text-decoration: underline;
}
.breadcrumbs [aria-current='page']{
color: #6b7280;
font-weight: 400;
}
html.dark .breadcrumbs ol{
background: transparent;
border: none;
box-shadow: none;
}
html.dark .breadcrumbs a{
color: #60a5fa;
}
html.dark .breadcrumbs [aria-current='page']{
color: #cbd5e1;
}
html.dark .faq-item{
background: #0f172a;
border-color: #334155;
}
html.dark .promo-box{
background: rgba(37, 99, 235, 0.1);
border-color: rgba(37, 99, 235, 0.2);
}
html.dark .about-section{
border-right-color: #0ea5e9;
}
html.dark .dark-toggle{
background: #334155;
border-color: #475569;
color: #fbbf24;
}
html.dark .dark-toggle:hover{
background: #475569;
border-color: #fbbf24;
}
html.dark .header-logo-img{
filter: brightness(0) invert(1);
}
/* â”€â”€ FOOTER ACCORDION MOBILE â”€â”€ */
@media(max-width:768px){
.footer-inner{gap:0;}
.foot-brand{padding-bottom:20px;border-bottom:1px solid rgba(255,255,255,0.12);}
.foot-links-wrap{gap:0;text-align:right;}
.foot-links-wrap>div{border-bottom:1px solid rgba(255,255,255,0.1);}
.foot-title{cursor:pointer;padding:14px 0;display:flex;justify-content:space-between;align-items:center;text-align:right;margin-bottom:0;user-select:none;}
.foot-title::after{content:'+';font-size:20px;font-weight:300;opacity:0.55;transition:transform 0.25s ease;flex-shrink:0;line-height:1;}
.foot-title.open::after{transform:rotate(45deg);}
.foot-links{max-height:0;overflow:hidden;transition:max-height 0.3s ease,padding-bottom 0.3s ease;display:flex;flex-direction:column;padding-bottom:0;gap:0;}
.foot-links.open{max-height:220px;padding-bottom:14px;}
.foot-links a{text-align:right;padding:7px 0;font-size:13px;border-bottom:none;}
}
/* â”€â”€ Breadcrumb â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 900px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.breadcrumb-nav a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb-nav a:hover { text-decoration: underline; }
.breadcrumb-nav span:not(:last-child) { opacity: 0.5; }

/* â”€â”€ Grade Image Cards (kottby.net style) â”€â”€â”€â”€â”€â”€ */
.grade-img-card {
  padding: 8px !important;
  background: var(--c-white) !important;
}
.grade-img-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

/* â”€â”€ Ø¥Ø®ÙØ§Ø¡ Ø§Ù„Ø¯Ø§Ø¦Ø±Ø© Ø§Ù„ØµÙØ±Ø§Ø¡ Ø¹Ù„Ù‰ ÙƒØ±ÙˆØª Ø§Ù„ØµÙˆØ± â”€â”€ */
.grade-img-card::before {
  display: none !important;
}

/* â”€â”€ FAQ SEO Tags (Ù…Ø®ÙÙŠØ© Ù„Ù„Ù…Ø³ØªØ®Ø¯Ù…ØŒ Ù…Ø±Ø¦ÙŠØ© Ù„Ù„Ù€ crawlers) â”€â”€â”€ */
.faq-seo-tags {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Term Picker â€” Ø§Ø®ØªÙŠØ§Ø± Ø§Ù„ÙØµÙ„ Ø§Ù„Ø¯Ø±Ø§Ø³ÙŠ
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.term-picker-section {
  text-align: center;
}
.term-picker-header {
  margin-bottom: 32px;
}
.term-picker-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}
.term-picker-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-text);
  margin: 0 0 10px;
}
.term-picker-sub {
  font-size: 1rem;
  color: var(--c-text-2);
  margin: 0;
}

/* â”€â”€ Ø¨Ø·Ø§Ù‚Ø§Øª Ø§Ù„ÙØµÙˆÙ„ â”€â”€ */
.term-picker-cards {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.term-pick-card {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform .25s ease;
  padding: 0;
}
.term-pick-card:hover { transform: translateY(-6px); }
.term-pick-card:hover .tpc-name { color: var(--c-blue-600); }

.tpc-visual {
  width: 220px;
  height: 180px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px;
  position: relative;
  box-shadow: 0 12px 32px -6px rgba(0,0,0,.18);
  overflow: hidden;
  transition: box-shadow .25s;
}
.term-pick-card:hover .tpc-visual {
  opacity: 0.92;
}

.tpc-num {
  font-size: 4rem;
  font-weight: 900;
  color: rgba(255,255,255,.25);
  line-height: 1;
  position: absolute;
  top: 10px;
  left: 16px;
}
.tpc-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  text-align: right;
  position: relative;
  z-index: 1;
  margin-top: auto;
}
.tpc-arrow {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.term-pick-card:hover .tpc-arrow {
  background: rgba(255,255,255,.3);
}

.tpc-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text-2);
  transition: color .2s;
}

/* â”€â”€ Subject Panel Header â”€â”€ */
.subject-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.back-to-terms {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: 30px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.back-to-terms:hover {
  border-color: var(--c-blue-600);
  color: var(--c-blue-600);
  background: var(--c-blue-50);
}

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 600px) {
  .term-picker-title { font-size: 1.5rem; }
  .tpc-visual { width: 160px; height: 140px; padding: 16px; }
  .tpc-label { font-size: 1rem; }
  .tpc-num { font-size: 3rem; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Term Chooser Cards â€” ØµÙØ­Ø© Ø§Ø®ØªÙŠØ§Ø± Ø§Ù„ÙØµÙ„
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.chooser-hint {
  text-align: center;
  color: var(--c-text-2);
  font-size: .95rem;
  margin: -8px 0 28px;
}
.term-chooser-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.term-chooser-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  width: 280px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 28px -6px rgba(0,0,0,.14);
  transition: opacity .2s;
}
.term-chooser-card:hover {
  opacity: 0.92;
}

/* Ø§Ù„Ø¬Ø²Ø¡ Ø§Ù„Ø¨ØµØ±ÙŠ Ø§Ù„Ù…Ù„ÙˆÙ‘Ù† */
.tc-visual {
  position: relative;
  height: 190px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 22px;
}
.tc-bg-num {
  position: absolute;
  top: -14px; right: 12px;
  font-size: 8rem;
  font-weight: 900;
  color: rgba(255,255,255,.15);
  line-height: 1;
  user-select: none;
  font-family: Arial, sans-serif;
}
.tc-body {
  position: relative;
  z-index: 2;
  flex: 1;
}
.tc-label {
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tc-num-word {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}
.tc-arrow {
  position: relative;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
  flex-shrink: 0;
}
.term-chooser-card:hover .tc-arrow {
  background: rgba(255,255,255,.4);
}
.tc-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  width: 100%; height: 60px;
}

/* Ø§Ù„ÙÙˆØªØ± */
.tc-footer {
  background: var(--c-white);
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--c-border);
}
.tc-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
}
.tc-count {
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-text-3);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  padding: 3px 10px;
}

@media (max-width: 600px) {
  .term-chooser-card { width: 100%; max-width: 340px; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Term Select Cards â€” ÙƒØ±ÙˆØª Ø§Ø®ØªÙŠØ§Ø± Ø§Ù„ÙØµÙ„
   (Ù†Ù…Ø· kottby.net Ø§Ù„Ø£ØµÙŠÙ„)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.term-select-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 0 16px;
}
.term-select-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: opacity .2s;
}
.term-select-card:hover { opacity: 0.88; }

/* Ø§Ù„ÙƒØ§Ø±Øª Ø§Ù„Ø¯Ø§Ø®Ù„ÙŠ */
.tsc-inner {
  width: 190px;
  height: 170px;
  background: #0f1c40;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 8px 28px -6px rgba(15,28,64,.45);
}

/* Ù†Ø¬ÙˆÙ… Ø²Ø®Ø±ÙÙŠØ© */
.tsc-star {
  position: absolute;
  font-size: 14px;
  color: #facc15;
  opacity: .85;
}
.tsc-star.s1 { top: 16px;  right: 18px; font-size: 18px; }
.tsc-star.s2 { top: 22px;  left:  22px; font-size: 11px; color: #2dd4bf; }
.tsc-star.s3 { bottom: 44px; right: 28px; font-size: 10px; }

/* Ø§Ù„Ù†Øµ Ø§Ù„ÙØ±Ø¹ÙŠ */
.tsc-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  letter-spacing: .3px;
  position: relative;
  z-index: 1;
}

/* Ø§Ù„Ø¹Ù†ÙˆØ§Ù† Ø§Ù„Ø±Ø¦ÙŠØ³ÙŠ â€” Ù†ÙØ³ ØªØ£Ø«ÙŠØ± Ø§Ù„ØµÙˆØ±Ø© */
.tsc-title {
  font-size: 2.6rem;
  font-weight: 900;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--c1, #38bdf8) 0%, var(--c2, #a5f3fc) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* Ø£ÙŠÙ‚ÙˆÙ†Ø© Ø§Ù„ÙƒØªØ§Ø¨ ÙÙŠ Ø§Ù„Ø£Ø³ÙÙ„ */
.tsc-icon {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  opacity: .9;
  z-index: 1;
}

/* Ø§Ù„Ø¯Ø§Ø¦Ø±Ø© Ø§Ù„Ø²Ø®Ø±ÙÙŠØ© Ø§Ù„Ø®Ù„ÙÙŠØ© */
.tsc-inner::before {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  top: -30px; left: -30px;
}
.tsc-inner::after {
  content: '';
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -20px; right: -20px;
}

/* Ø§Ù„Ø§Ø³Ù… ØªØ­Øª Ø§Ù„ÙƒØ§Ø±Øª */
.tsc-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-text-2);
  text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
  .tsc-inner { width: 150px; height: 140px; }
  .tsc-title { font-size: 2rem; }
}

/* â”€â”€ sem-card full layout fix â”€â”€ */
.semester-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.sem-card {
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: var(--c-white);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
}
.sem-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.sem-visual {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
}
.sem-info { flex: 1; }
.sem-small {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  margin-bottom: 4px;
}
.sem-main {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
}
.sem-num {
  font-size: 64px;
  font-weight: 900;
  color: rgba(255,255,255,.2);
  line-height: 1;
  flex-shrink: 0;
}
.sem-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  padding: 14px 20px;
  text-align: center;
}
html.dark .sem-card {
  background: #1e293b;
  border-color: #334155;
}
@media (max-width: 600px) {
  .semester-cards { grid-template-columns: 1fr; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Semester Cards - Educational Redesign
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.semester-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.sem-card {
  text-decoration: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transition: transform .22s ease, box-shadow .22s ease;
  border: 1px solid var(--c-border);
}
.sem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}

/* Ø§Ù„Ø¬Ø²Ø¡ Ø§Ù„Ù…Ù„ÙˆÙ‘Ù† */
.sem-visual {
  position: relative;
  padding: 28px 24px 24px;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

/* Ø¯Ø§Ø¦Ø±Ø© Ø²Ø®Ø±ÙÙŠØ© Ø®Ù„ÙÙŠØ© */
.sem-circle {
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  top: -50px; left: -40px;
  pointer-events: none;
}
.sem-circle::after {
  content: '';
  position: absolute;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  bottom: -30px; right: -30px;
}

.sem-info { flex: 1; position: relative; z-index: 1; }

.sem-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  margin-bottom: 10px;
  letter-spacing: .3px;
}

.sem-main {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}

.sem-sub {
  font-size: .78rem;
  color: rgba(255,255,255,.7);
  font-weight: 600;
}

/* Ø£ÙŠÙ‚ÙˆÙ†Ø© Ø§Ù„ÙƒØªØ§Ø¨ */
.sem-icon-wrap {
  font-size: 3rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
  flex-shrink: 0;
  margin-right: 8px;
  transition: transform .3s ease;
}
.sem-card:hover .sem-icon-wrap {
  transform: rotate(-8deg) scale(1.1);
}

/* ÙÙˆØªØ± Ø§Ù„Ø¨Ø·Ø§Ù‚Ø© */
.sem-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--c-white);
}
.sem-footer-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-text);
}
.sem-footer-arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-3);
  transition: background .2s, color .2s;
}
.sem-card:hover .sem-footer-arrow {
  background: var(--c-blue-50);
  color: var(--c-blue-600);
  border-color: var(--c-blue-500);
}

/* Dark mode */
html.dark .sem-card  { background: #1e293b; border-color: #334155; }
html.dark .sem-footer { background: #1e293b; }
html.dark .sem-footer-arrow { background: #0f172a; border-color: #334155; }

@media (max-width: 600px) {
  .semester-cards { grid-template-columns: 1fr; }
  .sem-visual { min-height: 110px; padding: 20px; }
  .sem-icon-wrap { font-size: 2.2rem; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Term Chooser Cards â€” Final Clean v4
   Ø§Ø³Ù… Ø§Ù„ÙØµÙ„ â†’ Ø¹Ø¯Ø¯ Ø§Ù„Ù…ÙˆØ§Ø¯ â†’ Ø§Ù„Ù…ÙˆØ§Ø¯ â†’ Ø¯Ø®ÙˆÙ„ Ø§Ù„ÙØµÙ„
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.semester-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* â”€â”€ Ø§Ù„ÙƒØ§Ø±Øª Ø§Ù„ÙƒØ§Ù…Ù„ Ù‚Ø§Ø¨Ù„ Ù„Ù„Ø¶ØºØ· â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tc-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 18px;
  background: color-mix(in srgb, var(--tc-accent, #1d4ed8) 7%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--tc-accent, #1d4ed8) 20%, transparent);
  border-radius: 15px;
  box-shadow: 0 1px 5px rgba(0,0,0,.05);
  text-decoration: none;
  color: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  cursor: pointer;
}
.tc-card:hover {
  border-color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 55%, transparent);
  box-shadow: 0 5px 18px rgba(0,0,0,.09);
  transform: translateY(-2px);
}
.tc-card:focus-visible {
  outline: 2.5px solid var(--tc-accent, #1d4ed8);
  outline-offset: 3px;
}

/* â”€â”€ Ø£ÙŠÙ‚ÙˆÙ†Ø© â€” Ø£ØµØºØ± Ø¨Ù€ 15% â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tc-icon {
  flex-shrink: 0;
  margin-top: 2px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tc-accent, #1d4ed8) 13%, #fff);
  border: 1px solid color-mix(in srgb, var(--tc-accent, #1d4ed8) 18%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-icon-num {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: var(--tc-accent, #1d4ed8);
  font-family: Arial, sans-serif;
  user-select: none;
}

/* â”€â”€ Ø§Ù„Ù…Ø­ØªÙˆÙ‰ â€” ØªØ³Ù„Ø³Ù„ Ø¨ØµØ±ÙŠ ÙˆØ§Ø¶Ø­ â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* 1 â€” Ø§Ø³Ù… Ø§Ù„ÙØµÙ„ */
.tc-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 82%, #111);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -.01em;
}

/* 2 â€” Ø¹Ø¯Ø¯ Ø§Ù„Ù…ÙˆØ§Ø¯ */
.tc-count {
  font-size: .82rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 70%, #333);
  margin: 0;
}

/* 3 â€” Ø£Ø³Ù…Ø§Ø¡ Ø§Ù„Ù…ÙˆØ§Ø¯ */
.tc-subjects {
  font-size: .8rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 50%, #555);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4 â€” Ø¯Ø®ÙˆÙ„ Ø§Ù„ÙØµÙ„ (Ø±Ø§Ø¨Ø· Ù†ØµÙŠ ÙˆØ§Ø¶Ø­) */
.tc-cta {
  display: inline-block;
  margin-top: 4px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--tc-accent, #1d4ed8);
}
.tc-card:hover .tc-cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* â”€â”€ Dark mode â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
html.dark .tc-card {
  background: color-mix(in srgb, var(--tc-accent, #1d4ed8) 11%, #1e293b);
  border-color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 26%, transparent);
}
html.dark .tc-card:hover {
  border-color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 52%, transparent);
}
html.dark .tc-title    { color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 55%, #fff); }
html.dark .tc-count    { color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 65%, #ccc); }
html.dark .tc-subjects { color: rgba(255,255,255,.40); }
html.dark .tc-cta      { color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 55%, #fff); }
html.dark .tc-icon {
  background: color-mix(in srgb, var(--tc-accent, #1d4ed8) 17%, #0f172a);
  border-color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 20%, transparent);
}
html.dark .tc-icon-num {
  color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 65%, #fff);
}

/* â”€â”€ Mobile â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 600px) {
  .semester-cards  { grid-template-columns: 1fr; gap: 10px; }
  .tc-card         { padding: 15px 14px; border-radius: 13px; align-items: center; }
  .tc-icon         { width: 36px; height: 36px; border-radius: 9px; margin-top: 0; }
  .tc-icon-num     { font-size: 1.2rem; }
  .tc-title        { font-size: 1rem; }
  .tc-count        { font-size: .78rem; }
  .tc-subjects     { display: none; }
  .tc-cta          { font-size: .78rem; margin-top: 2px; }
}

/* â”€â”€ Latest Solutions & Popular Files Grid (ls-grid) â”€â”€ */
.ls-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; position: relative; z-index: 1; }
.ls-card { display: flex; align-items: center; gap: 12px; background: var(--c-bg-card, #f8fafc); border: 1px solid var(--c-border, #e5e7eb); border-radius: 14px; padding: 12px; text-decoration: none; transition: box-shadow .2s, border-color .2s; }
.ls-card:hover { box-shadow: 0 4px 18px rgba(37, 99, 235, .1); border-color: #93c5fd; }
.ls-thumb {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--c-border, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.ls-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.ls-thumb span { font-size: 2rem; line-height: 1; }
.ls-img { flex-shrink: 0; width: 90px; height: 90px; border-radius: 10px; overflow: hidden; border: 1px solid var(--c-border, #e5e7eb); background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.ls-img .card-img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.ls-body { flex: 1; min-width: 0; }
.ls-title { font-size: .9rem; font-weight: 600; color: var(--c-text, #111827); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ls-meta { font-size: .78rem; color: var(--c-text-2, #6b7280); margin-top: 3px; }
@media(max-width: 768px) {
  .ls-grid { grid-template-columns: 1fr !important; }
  .ls-thumb, .ls-img { width: 72px; height: 72px; }
  .ls-title { font-size: .88rem; }
}

/* ═══════════════════════════════════════════════════
   Page share bar (grade / term / subject / home)
   ═══════════════════════════════════════════════════ */
.page-share-bar{
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px 10px;
margin-top: 14px;
padding-top: 12px;
border-top: 1px solid color-mix(in srgb, #c7d2fe 75%, transparent);
max-width: 100%;
}
.page-share-bar__label{
font-size: 0.72rem;
font-weight: 600;
color: #64748b;
white-space: nowrap;
}
.page-share-bar__social{
display: flex;
flex-wrap: wrap;
align-items: stretch;
gap: 6px;
flex: 1;
min-width: 0;
}
.page-share-bar__social .page-share-btn{
flex: 1 1 0;
min-width: 0;
padding: 7px 6px;
}
.page-share-bar__social .page-share-btn--copy{
flex: 1 1 100%;
width: 100%;
}
.page-share-btn{
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
padding: 5px 10px;
font-size: 0.72rem;
font-weight: 600;
font-family: inherit;
border-radius: 8px;
border: 1px solid transparent;
text-decoration: none;
cursor: pointer;
line-height: 1.2;
transition: opacity 0.15s ease, transform 0.15s ease;
background: #fff;
white-space: nowrap;
}
.page-share-bar--light{
border-top-color: rgba(255, 255, 255, 0.22);
}
.page-share-bar--light .page-share-bar__label{
color: rgba(255, 255, 255, 0.88);
}
.page-share-bar--light .page-share-btn{
background: rgba(255, 255, 255, 0.14);
border-color: rgba(255, 255, 255, 0.22);
color: #fff;
backdrop-filter: blur(4px);
}
.page-share-bar--light .page-share-btn--wa    { background: rgba(220, 252, 231, 0.95); color: #15803d; border-color: #bbf7d0; }
.page-share-bar--light .page-share-btn--msgr  { background: rgba(237, 233, 254, 0.95); color: #6d28d9; border-color: #ddd6fe; }
.page-share-bar--light .page-share-btn--tg    { background: rgba(224, 242, 254, 0.95); color: #0369a1; border-color: #bae6fd; }
.page-share-bar--light .page-share-btn--x     { background: rgba(241, 245, 249, 0.95); color: #0f172a; border-color: #e2e8f0; }
.page-share-bar--light .page-share-btn--fb     { background: rgba(219, 234, 254, 0.95); color: #1d4ed8; border-color: #bfdbfe; }
.page-share-bar--light .page-share-btn--pin    { background: rgba(254, 226, 226, 0.95); color: #b91c1c; border-color: #fecaca; }
.page-share-bar--light .page-share-btn--reddit { background: rgba(255, 237, 213, 0.95); color: #c2410c; border-color: #fed7aa; }
.page-share-bar--light .page-share-btn--copy   { background: rgba(255, 255, 255, 0.2); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.page-share-bar--hero{
flex-wrap: nowrap;
justify-content: center;
align-items: center;
gap: 8px;
}
.page-share-bar--hero .page-share-bar__label{
flex-shrink: 0;
}
.page-share-bar--hero .page-share-bar__social{
flex: 1 1 auto;
min-width: 0;
gap: 6px;
}
html.dark .page-share-bar{
border-top-color: #4338ca;
}
html.dark .page-share-bar__label{ color: #94a3b8; }
html.dark .page-share-btn--copy,
html.dark .file-share-btn--copy{ background: #1e293b; color: #cbd5e1; border-color: #334155; }

/* ── File page share bar (inside actions card) ───── */
.file-share-bar{
width: 100%;
padding: 12px 0 0;
border-top: 1px solid var(--c-border);
display: flex;
flex-direction: column;
align-items: stretch;
gap: 8px;
}
.file-share-bar__label{
font-size: 0.78rem;
font-weight: 700;
color: var(--c-text-2);
text-align: right;
width: 100%;
}
.file-share-bar__social{
display: flex;
flex-wrap: wrap;
gap: 7px;
align-items: stretch;
width: 100%;
}
.file-share-bar__social .file-share-btn{
flex: 1 1 0;
min-width: 0;
padding: 7px 6px;
}
.file-share-bar__social .file-share-btn--copy{
flex: 1 1 100%;
width: 100%;
}
.file-share-btn{
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
padding: 7px 12px;
border-radius: 8px;
font-size: 0.74rem;
font-weight: 600;
text-decoration: none;
border: 1px solid transparent;
cursor: pointer;
transition: opacity 0.15s, transform 0.15s;
font-family: inherit;
line-height: 1.2;
white-space: nowrap;
}
.file-share-btn:hover,
.page-share-btn:hover{
opacity: 0.88;
transform: translateY(-1px);
}
.page-share-btn--wa,
.file-share-btn--wa    { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.page-share-btn--msgr,
.file-share-btn--msgr  { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.page-share-btn--tg,
.file-share-btn--tg    { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.page-share-btn--x,
.file-share-btn--x     { background: #f1f5f9; color: #0f172a; border-color: #e2e8f0; }
.page-share-btn--fb,
.file-share-btn--fb     { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.page-share-btn--pin,
.file-share-btn--pin    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.page-share-btn--reddit,
.file-share-btn--reddit { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
.page-share-btn--copy,
.file-share-btn--copy   { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.page-share-btn--copy.is-copied,
.file-share-btn--copy.is-copied { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
html.dark .file-share-bar { border-top-color: #334155; }

@media (max-width: 640px){
.page-share-bar,
.file-share-bar{ gap: 7px; padding-top: 10px; margin-top: 10px; }
.page-share-bar__label,
.file-share-bar__label{ display: none; }
.page-share-bar__social,
.file-share-bar__social{
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 5px;
align-items: stretch;
width: 100%;
flex: unset;
flex-wrap: unset;
overflow-x: visible;
}
.page-share-bar__social .page-share-btn--x,
.page-share-bar__social .page-share-btn--fb,
.page-share-bar__social .page-share-btn--pin,
.page-share-bar__social .page-share-btn--reddit,
.file-share-bar__social .file-share-btn--x,
.file-share-bar__social .file-share-btn--fb,
.file-share-bar__social .file-share-btn--pin,
.file-share-bar__social .file-share-btn--reddit{
display: none !important;
}
.page-share-bar__social .page-share-btn,
.file-share-bar__social .file-share-btn{
flex-direction: column;
gap: 3px;
padding: 7px 2px;
min-height: 44px;
font-size: 0.62rem;
border-radius: 8px;
flex: unset;
white-space: normal;
}
.page-share-bar__social .page-share-btn svg,
.file-share-bar__social .file-share-btn svg{ flex-shrink: 0; }
.page-share-bar__social .page-share-btn__txt,
.page-share-bar__social .page-share-btn span,
.file-share-bar__social .file-share-btn__txt,
.file-share-bar__social .file-share-btn span{
display: inline;
line-height: 1.15;
text-align: center;
white-space: normal;
}
.page-share-bar__social .page-share-btn--copy,
.file-share-bar__social .file-share-btn--copy{
flex: unset;
width: auto;
flex-direction: column;
min-height: 44px;
padding: 7px 2px;
font-size: 0.62rem;
}
.page-share-bar--hero{
flex-wrap: wrap;
justify-content: center;
}
.page-share-bar--hero .page-share-bar__label{ display: none; }
.page-share-bar--hero .page-share-bar__social{
flex-wrap: unset;
overflow-x: visible;
justify-content: stretch;
}
.page-share-bar--hero .page-share-btn{
padding: 7px 2px;
font-size: 0.62rem;
flex-shrink: unset;
white-space: normal;
}
.page-share-bar--hero .page-share-btn span{
display: inline;
font-size: 0.62rem;
}
.card-section,
.hero-section,
.legal-disclaimer-box{
width: calc(100% - 24px);
padding-left: 14px;
padding-right: 14px;
}
}

/* ═══════════════════════════════════════════════════
   Grade Page — Hero Banner
   ═══════════════════════════════════════════════════ */
.grade-hero {
  position: relative;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 60%, #ede9fe 100%);
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  max-width: 1280px;
  width: calc(100% - 40px);
  margin-left: auto;
  margin-right: auto;
}
.grade-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 80%, #818cf822 0%, transparent 50%),
    radial-gradient(circle at 90% 20%, #a78bfa22 0%, transparent 50%);
  pointer-events: none;
}
.grade-hero-content {
  position: relative;
  z-index: 1;
  padding: 28px 32px 24px;
}
.grade-hero-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1e1b4b;
  margin: 0 0 18px;
  line-height: 1.3;
}
.grade-hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
}
.grade-stat {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e0e7ff;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.07);
}
.grade-stat-num {
  font-size: 0.88rem;
  font-weight: 700;
  color: #4338ca;
  line-height: 1;
}
.grade-stat-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  line-height: 1.2;
}
.grade-stat-sep {
  display: none;
}
.grade-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.grade-hero-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4338ca;
  background: #e0e7ff;
  border-radius: 20px;
  padding: 3px 12px;
  border: 1px solid #c7d2fe;
}
.grade-hero-desc {
  font-size: 0.85rem;
  line-height: 1.85;
  color: #374151;
  margin: 0;
  max-width: 780px;
}
.grade-hero-desc strong { color: #1e1b4b; }

/* dark mode */
html.dark .grade-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e293b 100%);
  border-color: #312e81;
}
html.dark .grade-stat {
  background: rgba(15, 23, 42, 0.75);
  border-color: #312e81;
}
html.dark .grade-stat-num { color: #818cf8; }
html.dark .grade-stat-lbl { color: #94a3b8; }
html.dark .grade-hero-tag { background: #312e81; color: #a5b4fc; border-color: #4338ca; }
html.dark .grade-hero-title { color: #e0e7ff; }
html.dark .grade-hero-desc { color: #cbd5e1; }

/* mobile */
@media(max-width: 640px) {
  .grade-hero { border-radius: 12px; margin-bottom: 14px; }
  .grade-hero-content { padding: 14px 14px 12px; }
  .grade-hero-title { font-size: 0.95rem; margin-bottom: 10px; gap: 7px; }
  .grade-hero-title svg { width: 16px; height: 16px; }
  .grade-hero-stats {
    gap: 6px;
    margin-bottom: 8px;
  }
  .grade-stat { padding: 4px 10px; gap: 5px; }
  .grade-stat-num { font-size: 0.8rem; }
  .grade-stat-lbl { font-size: 0.62rem; }
  .grade-hero-tags { gap: 4px; margin-bottom: 10px; }
  .grade-hero-tag { font-size: 0.68rem; padding: 2px 9px; }
  .grade-hero-desc { font-size: 0.88rem; line-height: 1.85; }
}

/* ═══════════════════════════════════════════════════
   Grade Page — Intro (legacy)
   ═══════════════════════════════════════════════════ */
.grade-intro-text {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--c-text-2, #4b5563);
  background: var(--c-white, #fff);
  border: 1px solid var(--c-border, #e5e7eb);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 4px;
}
.grade-intro-text strong { color: var(--c-text, #111827); }

/* ═══════════════════════════════════════════════════
   Grade Page — Subjects Grid
   ═══════════════════════════════════════════════════ */
.grade-subj-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
@media(max-width:992px){ .grade-subj-grid{ grid-template-columns: repeat(4,1fr); } }
@media(max-width:640px){ .grade-subj-grid{ grid-template-columns: repeat(2,1fr); gap:10px; } }

.grade-subj-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--c-white, #fff);
  border: 1px solid var(--c-border, #e5e7eb);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s;
}
.grade-subj-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.grade-subj-img {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.grade-subj-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.grade-subj-info {
  padding: 8px 10px;
}
.grade-subj-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text, #111827);
  line-height: 1.3;
  text-align: center;
}
.grade-subj-term {
  font-size: 0.68rem;
  color: var(--c-text-3, #9ca3af);
  text-align: center;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════
   Grade Page — FAQ
   ═══════════════════════════════════════════════════ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  border: 1px solid var(--c-border, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
  background: var(--c-white, #fff);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text, #111827);
  text-align: right;
  direction: rtl;
  transition: background 0.15s;
}
.faq-q:hover { background: var(--c-bg-2, #f9fafb); }
.faq-arrow { flex-shrink: 0; transition: transform 0.2s; color: #9ca3af; }
.faq-a {
  padding: 0 16px 14px;
  font-size: 0.84rem;
  line-height: 1.8;
  color: var(--c-text-2, #4b5563);
}
.faq-a p { margin: 0; }
html.dark .faq-item { background: var(--c-card-dark, #1e293b); border-color: #334155; }
html.dark .faq-q { color: #e2e8f0; }
html.dark .faq-q:hover { background: #0f172a; }
html.dark .faq-a { color: #94a3b8; }

/* ═══════════════════════════════════════════════════
   Grade Page — SEO box (about + FAQ)
   ═══════════════════════════════════════════════════ */
.grade-seo-box{
max-width: 1280px;
width: calc(100% - 40px);
margin: 10px auto 0;
padding: 13px 17px 11px;
background: var(--c-white);
border: 1px solid var(--c-border);
border-radius: 12px;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.grade-seo-box__divider{
height: 1px;
margin: 11px 0 9px;
background: color-mix(in srgb, var(--c-border) 80%, transparent);
}
.grade-muted-title{
margin: 0 0 8px;
font-size: 0.82rem;
font-weight: 600;
color: var(--c-text-3);
}
.grade-about-muted{
padding: 0;
margin: 0;
background: transparent;
border: none;
box-shadow: none;
}
.grade-about-muted__content{
font-size: 0.85rem;
line-height: 1.85;
color: #374151;
text-align: right;
}
.grade-about-muted__content p{
font-size: inherit;
line-height: inherit;
color: inherit;
margin-bottom: 8px;
text-align: right;
}
.grade-about-muted__content p:last-child{
margin-bottom: 0;
}
.grade-about-muted__content strong,
.grade-about-muted__content b{
font-weight: 600;
color: #1e1b4b;
}
.grade-about-muted__content h2,
.grade-about-muted__content h3,
.grade-about-muted__content h4{
font-size: inherit;
font-weight: 600;
color: inherit;
margin: 0 0 6px;
line-height: inherit;
}
.grade-about-muted__content ul,
.grade-about-muted__content ol{
margin: 0 0 10px;
padding-right: 1.25rem;
}
.grade-about-muted__content li{
margin-bottom: 4px;
}
.grade-about-muted__content a{
color: var(--c-primary, #2563eb);
font-weight: 600;
}
.grade-faq-compact{
padding: 0;
margin: 0;
background: transparent;
border: none;
box-shadow: none;
}
.grade-faq-compact .faq-list--compact{
gap: 0;
}
.grade-faq-compact .faq-item{
border: none;
border-bottom: 1px solid color-mix(in srgb, var(--c-border) 65%, transparent);
border-radius: 0;
background: transparent;
}
.grade-faq-compact .faq-item:last-child{
border-bottom: none;
}
.grade-faq-compact .faq-q{
padding: 8px 0;
font-size: 0.77rem;
font-weight: 600;
color: var(--c-text-2);
}
.grade-faq-compact .faq-q:hover{
background: transparent;
color: var(--c-text);
}
.grade-faq-compact .faq-a{
padding: 0 0 8px;
font-size: 0.74rem;
line-height: 1.58;
color: var(--c-text-3);
}
.grade-faq-compact .faq-arrow{
width: 14px;
height: 14px;
opacity: 0.55;
}
@media (max-width: 768px) {
  .grade-seo-box {
    padding: 14px 14px 12px;
  }
  .grade-muted-title {
    font-size: 0.82rem;
    margin-bottom: 8px;
  }
  .grade-about-muted__content,
  .grade-about-muted__content p,
  .page-body--term .grade-about-muted__content,
  .page-body--term .grade-about-muted__content p,
  .page-body--grade .grade-about-muted__content,
  .page-body--grade .grade-about-muted__content p {
    font-size: 0.88rem;
    line-height: 1.85;
  }
  .grade-faq-compact .faq-q {
    font-size: 0.82rem;
    padding: 9px 0;
  }
  .grade-faq-compact .faq-a {
    font-size: 0.8rem;
    line-height: 1.65;
    padding-bottom: 9px;
  }
}
html.dark .grade-seo-box{
background: #1e293b;
border-color: #334155;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
html.dark .grade-seo-box__divider{
background: #334155;
}
html.dark .grade-muted-title{
color: #94a3b8;
}
html.dark .grade-about-muted__content{
color: #cbd5e1;
}
html.dark .grade-about-muted__content p{
color: #cbd5e1;
}
html.dark .grade-about-muted__content strong,
html.dark .grade-about-muted__content b{
color: #e0e7ff;
}
html.dark .grade-faq-compact .faq-item{
border-bottom-color: #334155;
}
html.dark .grade-faq-compact .faq-q{
color: #cbd5e1;
}
html.dark .grade-faq-compact .faq-q:hover{
color: #e2e8f0;
}
html.dark .grade-faq-compact .faq-a{
color: #94a3b8;
}

/* ═══════════════════════════════════════════════════
   Legal pages only — privacy, terms, contact, copyright
   (scoped — does not affect grade/file/subject seo-box)
   ═══════════════════════════════════════════════════ */
.page-body--legal .about-section .section-title{
font-size: 1.6rem !important;
}
.page-body--legal .about-content,
.page-body--legal .about-content p{
font-size: 0.98rem;
line-height: 1.92;
color: var(--c-text-2);
}
.page-body--legal .grade-seo-box--legal{
padding: 20px 24px 18px;
margin-top: 18px;
}
.page-body--legal .grade-seo-box--legal .grade-muted-title{
font-size: 1.02rem;
font-weight: 700;
color: var(--c-text-2);
margin-bottom: 11px;
}
.page-body--legal .grade-seo-box--legal .grade-about-muted__content,
.page-body--legal .grade-seo-box--legal .grade-about-muted__content p,
.page-body--legal .grade-seo-box--legal .grade-about-muted__content li{
font-size: 0.94rem;
line-height: 1.88;
color: var(--c-text-2);
margin-bottom: 9px;
}
.page-body--legal .grade-seo-box--legal .grade-about-muted__content p:last-child{
margin-bottom: 0;
}
.page-body--legal .grade-seo-box--legal .grade-about-muted__content strong{
color: var(--c-text);
font-weight: 700;
}
html.dark .page-body--legal .grade-seo-box--legal .grade-muted-title{
color: #cbd5e1;
}
html.dark .page-body--legal .grade-seo-box--legal .grade-about-muted__content,
html.dark .page-body--legal .grade-seo-box--legal .grade-about-muted__content p{
color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════
   Term Page — Hero compact + internal links
   ═══════════════════════════════════════════════════ */
.grade-hero--term {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 55%, #ede9fe 100%);
  border-color: #bfdbfe;
}
.grade-hero--term .grade-hero-content {
  padding: 18px 24px 16px;
}
.grade-hero--term .grade-hero-title {
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.grade-hero--term .grade-hero-stats {
  margin-bottom: 10px;
  gap: 6px;
}
.grade-hero--term .grade-stat {
  padding: 4px 10px;
}
.grade-hero--term .grade-stat-num {
  font-size: 0.82rem;
}
.grade-hero--term .grade-stat-lbl {
  font-size: 0.64rem;
}
.grade-hero--term .grade-hero-desc {
  font-size: 0.8rem;
  line-height: 1.75;
}

/* قسم «عن الصف/الفصل» — نفس مقاس مقدمة الهيرو */
.page-body--term .grade-about-muted__content,
.page-body--term .grade-about-muted__content p,
.page-body--term .grade-about-muted__content li {
  font-size: 0.8rem;
  line-height: 1.75;
}
.page-body--grade .grade-about-muted__content,
.page-body--grade .grade-about-muted__content p,
.page-body--grade .grade-about-muted__content li {
  font-size: 0.85rem;
  line-height: 1.85;
}

/* Grade / Term page — تقسيم Hero على الموبايل */
.term-intro-part--mobile {
  display: none;
}
.term-intro-part--mobile.card-section {
  padding: 14px 14px 12px;
  margin-top: 12px;
}
.term-intro-part--mobile .grade-hero-tags {
  gap: 6px;
  margin-bottom: 10px;
}
.term-intro-part--mobile .grade-hero-tag {
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
  font-size: 0.68rem;
  padding: 2px 9px;
}
.term-intro-part--mobile .grade-hero-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.85;
  color: #374151;
}
.term-intro-part--mobile .grade-hero-desc strong {
  font-weight: 600;
  color: #1e1b4b;
}
.page-body--term .term-intro-part--mobile .grade-hero-desc {
  font-size: 0.88rem;
  line-height: 1.85;
}
@media (max-width: 768px) {
  .term-intro-part--desktop {
    display: none;
  }
  .term-intro-part--mobile {
    display: block;
  }
  .grade-hero--term .grade-hero-content,
  .page-body--grade .grade-hero .grade-hero-content {
    padding: 10px 12px 8px;
  }
  .grade-hero--term .grade-hero-title,
  .page-body--grade .grade-hero .grade-hero-title {
    font-size: 0.88rem;
    margin-bottom: 8px;
    line-height: 1.4;
  }
  .grade-hero--term .grade-hero-title svg,
  .page-body--grade .grade-hero .grade-hero-title svg {
    width: 16px;
    height: 16px;
  }
  .grade-hero--term .grade-hero-stats,
  .page-body--grade .grade-hero .grade-hero-stats {
    margin-bottom: 8px;
  }
  .grade-hero--term .page-share-bar,
  .page-body--grade .grade-hero .page-share-bar {
    margin-top: 8px;
    padding-top: 8px;
    border-top-color: color-mix(in srgb, #bfdbfe 70%, transparent);
  }
  .page-body--term #subjects.card-section,
  .page-body--grade #grade-terms.card-section {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .term-intro-part--mobile.card-section {
    margin-top: 10px;
    padding: 14px 14px 12px;
  }
  .term-intro-part--mobile .grade-hero-tags {
    gap: 6px;
    margin-bottom: 10px;
  }
  .term-intro-part--mobile .grade-hero-tag {
    font-size: 0.68rem;
    padding: 2px 9px;
    line-height: 1.4;
  }
  .term-intro-part--mobile .grade-hero-desc,
  .page-body--term .term-intro-part--mobile .grade-hero-desc,
  .page-body--grade .term-intro-part--mobile .grade-hero-desc {
    font-size: 0.88rem;
    line-height: 1.85;
    color: #374151;
  }
}
.term-internal-links {
  max-width: 1280px;
  width: calc(100% - 40px);
  margin: 8px auto 0;
  padding: 10px 16px 12px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.term-internal-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.term-internal-links a {
  font-size: 0.72rem;
  color: var(--c-text-3);
  text-decoration: none;
  line-height: 1.5;
}
.term-internal-links a:hover {
  color: var(--c-primary, #2563eb);
  text-decoration: underline;
}

/* ══ Section page — typography (أخف وأصغر) ══ */
.page-body--section .section-hero {
  padding: 10px 16px 8px;
}
.page-body--section .section-hero__header {
  margin: 0;
  padding: 0;
  border: none;
}
.page-body--section .section-hero__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  gap: 6px;
  display: flex;
  align-items: flex-start;
  color: var(--c-text);
  margin: 0;
}
.page-body--section .section-hero__emoji {
  font-size: 1rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.page-body--section .section-about__header {
  margin-bottom: 10px;
  padding-bottom: 10px;
}
.page-body--section .section-hero__desc {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--c-text-3);
  margin-top: 6px;
  line-height: 1.65;
  max-width: 680px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-right: 3px solid var(--section-accent, #2563eb);
}
.page-body--section .section-about__title {
  font-size: 0.88rem;
  font-weight: 700;
  gap: 7px;
}
.page-body--section .section-about__content {
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--c-text-2);
}
.page-body--section .section-about__content h1,
.page-body--section .section-about__content h2,
.page-body--section .section-about__content h3,
.page-body--section .section-about__content h4 {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--c-text);
}
.page-body--section .section-about__content p {
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.75;
  margin-bottom: 8px;
}
.page-body--section .section-about__content strong,
.page-body--section .section-about__content b {
  font-weight: 500;
}
.page-body--section .sg-name,
.page-body--subject .sg-name,
.page-body--term .sg-name {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.45;
}
.page-body--section .sg-card-body,
.page-body--subject .sg-card-body,
.page-body--term .sg-card-body {
  padding-top: 8px;
}
@media (max-width: 640px) {
  .page-body--section .section-hero {
    padding: 8px 12px 6px;
  }
  .page-body--section .section-hero__title { font-size: 0.72rem; line-height: 1.45; }
  .page-body--section .section-hero__emoji { font-size: 0.88rem; }
  .page-body--section .section-about__title { font-size: 0.84rem; }
  .page-body--section .section-related__title { font-size: 0.78rem; }
  .page-body--section .sg-name,
  .page-body--subject .sg-name,
  .page-body--term .sg-name { font-size: 0.72rem; }
}
.page-body--section .section-related__header {
  margin: 0 0 10px;
  padding: 0;
  border: none;
}
.page-body--section .section-related__title {
  font-size: 0.84rem;
  font-weight: 700;
  gap: 7px;
  display: flex;
  align-items: center;
  color: var(--c-text);
  margin: 0;
}
.page-body--section .section-related .simple-grades-grid {
  padding: 4px 0 2px;
  gap: 14px;
}

/* ══ Grade / Term pages — فاصل + تقليل الفراغ ══ */
.content-split {
  width: calc(100% - 40px);
  max-width: 1280px;
  margin: 6px auto;
  height: 1px;
  background: linear-gradient(
    to left,
    transparent 0%,
    color-mix(in srgb, var(--c-border) 90%, #94a3b8) 18%,
    color-mix(in srgb, var(--c-border) 90%, #94a3b8) 82%,
    transparent 100%
  );
  flex-shrink: 0;
}
.page-body--term,
.page-body--grade {
  gap: 0;
}
.page-body--term .grade-hero--term,
.page-body--grade .grade-hero {
  margin-bottom: 0;
}
.page-body--term #subjects.card-section,
.page-body--grade #grade-terms.card-section {
  padding-top: 12px;
  padding-bottom: 12px;
}
.page-body--term #subjects .section-header,
.page-body--grade #grade-terms .section-header {
  margin-bottom: 8px;
  padding-bottom: 10px;
}
.page-body--term #subjects .simple-grades-grid {
  padding: 6px 0 2px;
  gap: 16px;
}
.page-body--subject #subject-content .simple-grades-grid,
.page-body--section #subject-content .simple-grades-grid {
  padding: 6px 0 2px;
  gap: 16px;
}
.page-body--subject #subject-content .content-split--in-card,
.page-body--section #subject-content .content-split--in-card {
  width: 100%;
  max-width: none;
  margin: 10px 0 6px;
}
html.dark .content-split {
  background: linear-gradient(
    to left,
    transparent 0%,
    #334155 18%,
    #334155 82%,
    transparent 100%
  );
}

/* بطاقات مكدّسة + فاصل بين كل بطاقة (صفحة المادة/القسم) */
.simple-grades-grid--stacked {
  grid-template-columns: minmax(0, 210px);
  justify-content: start;
  gap: 0;
  padding: 8px 0 4px;
}
.card-grid-split {
  grid-column: 1 / -1;
  height: 1px;
  margin: 12px 0;
  background: linear-gradient(
    to left,
    transparent 0%,
    color-mix(in srgb, var(--c-border) 90%, #94a3b8) 12%,
    color-mix(in srgb, var(--c-border) 90%, #94a3b8) 88%,
    transparent 100%
  );
}
.card-grid-split--block {
  margin: 14px 0 10px;
}
.page-body--subject,
.page-body--section {
  gap: 14px;
}
.page-body--section #section-related {
  margin-top: 4px;
}
.page-body--section .section-about {
  margin-top: 0;
}
@media (max-width: 768px) {
  .page-body--section {
    gap: 12px;
  }
}
html.dark .card-grid-split {
  background: linear-gradient(
    to left,
    transparent 0%,
    #334155 12%,
    #334155 88%,
    transparent 100%
  );
}
@media (max-width: 640px) {
  .simple-grades-grid--stacked {
    grid-template-columns: minmax(0, 1fr);
    max-width: 220px;
  }
}

html.dark .grade-hero--term {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
  border-color: #334155;
}
html.dark .term-internal-links {
  background: #1e293b;
  border-color: #334155;
}
html.dark .term-internal-links a {
  color: #94a3b8;
}
html.dark .term-internal-links a:hover {
  color: #93c5fd;
}
@media (max-width: 640px) {
  .grade-hero--term .grade-hero-content { padding: 12px 14px 10px; }
  .grade-hero--term .grade-hero-title { font-size: 0.9rem; }
  .term-internal-links { padding: 8px 12px 10px; }
}

/* ── Ad slots (Client-Side) ── */
.ktby-ad-slot:empty { display: none; }
.ktby-ad-slot { margin: 0 auto; max-width: 100%; overflow: hidden; text-align: center; }
.ktby-ad-slot:not(:empty) { margin: 10px auto; }

/* ── Live Search ── */
.live-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 1200;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  max-height: 360px;
  overflow-y: auto;
}
.live-search-status { padding: 14px 16px; font-size: .85rem; color: var(--c-text-2); text-align: center; }
.live-search-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--c-border);
  transition: background .15s;
}
.live-search-item:last-child { border-bottom: none; }
.live-search-item:hover { background: #f0f4ff; }
.live-search-item__type {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: #eff6ff;
  color: #2563eb;
  margin-top: 2px;
}
.live-search-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.live-search-item__title { font-size: .88rem; font-weight: 600; color: var(--c-text); line-height: 1.35; }
.live-search-item__crumb { font-size: .74rem; color: var(--c-text-2); line-height: 1.3; }
.live-search-item--more {
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--c-blue-600);
  background: #f8faff;
}
.live-search-item--more:hover { background: #eff6ff; }
.live-search-item--more svg { flex-shrink: 0; opacity: 0.85; }
.live-search-item__more { line-height: 1.2; }
.search-results-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--c-border); border-radius: 12px; overflow: hidden; }
.search-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--c-border);
  transition: background .15s;
}
.search-result-row:last-child { border-bottom: none; }
.search-result-row:hover { background: #f8fafc; }
.search-result-type {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: #eff6ff;
  color: #2563eb;
}
.search-result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.search-result-title { font-size: .92rem; font-weight: 600; }
.search-result-crumb { font-size: .78rem; color: var(--c-text-2); }

/* ── Error pages ── */
.error-page { text-align: center; padding: 28px 20px 32px !important; }
.error-page__icon {
  font-size: 2.5rem;
  font-weight: 800;
  color: #2563eb;
  opacity: .25;
  line-height: 1;
  margin-bottom: 8px;
}
.error-page__icon--500 { color: #dc2626; }
.error-page__icon--503 { color: #d97706; }
.error-page__logo { margin: 0 auto 16px; }
.error-page__title { font-size: 1.35rem; font-weight: 800; margin: 0 0 8px; color: var(--c-text); }
.error-page__desc { font-size: .92rem; color: var(--c-text-2); max-width: 480px; margin: 0 auto 20px; line-height: 1.6; }
.error-page__btn { display: inline-flex; margin-bottom: 20px; }
.error-page__search { max-width: 420px; margin: 0 auto 24px !important; }
.error-page__links { text-align: right; max-width: 420px; margin: 0 auto; }
.error-page__links-title { font-size: .85rem; font-weight: 700; margin: 0 0 10px; color: var(--c-text); }
.error-page__links ul { list-style: none; padding: 0; margin: 0 0 12px; }
.error-page__links li { margin: 6px 0; }
.error-page__links a { color: var(--c-primary); font-weight: 600; text-decoration: none; font-size: .88rem; }
.error-page__links a:hover { text-decoration: underline; }
.error-page__files { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--c-border); }
html.dark .live-search-dropdown { background: #0f172a; border-color: #334155; }
html.dark .live-search-item:hover { background: #1e293b; }
html.dark .live-search-item--more { background: #1e293b; color: #93c5fd; }
html.dark .live-search-item--more:hover { background: #334155; }
html.dark .search-result-row:hover { background: #1e293b; }

@media (max-width: 768px) {
  .live-search-dropdown { max-height: 280px; }
}

/* ═══════════════════════════════════════════════════
   Secure Download Landing Page
   ═══════════════════════════════════════════════════ */
.download-flash {
  max-width: 1280px;
  width: calc(100% - 40px);
  margin: 0 auto 12px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  color: #92400e;
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: right;
}
.page-body--download {
  padding-bottom: 24px;
}
.download-landing {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 28px 24px 24px;
}
.download-landing__icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 10px;
}
.download-landing__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 16px;
  line-height: 1.5;
}
.download-landing__meta {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: right;
}
.download-landing__meta li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--c-bg-2, #f8fafc);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 0.86rem;
}
.download-landing__meta span {
  color: var(--c-text-3);
}
.download-landing__meta strong {
  color: var(--c-text);
  font-weight: 700;
}
.download-landing__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.download-landing__wait {
  margin: 0;
  font-size: 0.84rem;
  color: var(--c-text-2);
}
.download-progress {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 14px;
}
.download-progress__label {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text);
}
.download-progress__label strong {
  color: var(--c-primary, #2563eb);
  font-weight: 800;
}
.download-progress__track {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}
.download-progress__bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.35s ease;
}
.download-progress__hint {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: var(--c-text-3);
}
.download-landing__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--dl-accent, #2563eb);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}
.download-landing__btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.download-landing__btn--disabled,
.download-landing__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.download-landing__back {
  font-size: 0.82rem;
  color: var(--c-text-2);
  text-decoration: none;
}
.download-landing__back:hover {
  color: var(--c-primary, #2563eb);
}
html.dark .download-flash {
  background: #422006;
  border-color: #92400e;
  color: #fde68a;
}
html.dark .download-landing__meta li {
  background: #1e293b;
  border-color: #334155;
}

/* ═══ Card images — aspect ratio + contain (Lighthouse) ═══ */
.card-img-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg, #eff3f8);
  border-radius: 10px;
}
.card-img-frame .card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.featured-file-thumb [hidden] {
  display: none !important;
}
.featured-file-thumb:not(.recent-icon):not(.ls-img) {
  aspect-ratio: 4 / 3;
  width: var(--fft-size, 90px);
  height: auto;
}
.featured-file-thumb:not(.recent-icon):not(.ls-img) .card-img-frame {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
}
.featured-file-thumb.recent-icon {
  display: block;
  position: relative;
  width: var(--fft-size, 52px);
  height: var(--fft-size, 52px);
  min-width: var(--fft-size, 52px);
  min-height: var(--fft-size, 52px);
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 10px;
  box-sizing: border-box;
  aspect-ratio: unset;
}
.featured-file-thumb.recent-icon .card-img-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  aspect-ratio: unset;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.featured-file-thumb.recent-icon .card-img,
.featured-file-thumb.recent-icon img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
}
.sg-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg);
}
.sg-card-img .card-img-frame,
.sg-card-img .file-card-img-frame {
  border-radius: 10px;
}
.rel-subj-thumb-frame,
.rel-subj-thumb .card-img-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 0;
}
.rel-subj-thumb img,
.rel-subj-thumb .card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rel-thumb-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px 10px 0 0;
}

/* ── News / أخبار التعليم ─────────────────────────────────────── */
.page-body--news {
  max-width: 1280px;
  width: calc(100% - 40px);
  margin: 0 auto;
  padding: 16px 0 24px;
  gap: 12px;
}

.page-body--news .card-section {
  width: 100%;
  max-width: none;
  margin: 0;
}

.news-hero-section {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 55%, #ede9fe 100%);
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  padding: 20px 22px;
  width: 100%;
  margin: 0;
  position: relative;
  overflow: hidden;
}
.news-hero-section::after {
  content: '📰 📅 🎓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6rem;
  opacity: 0.05;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 20px;
}
.news-hero-section__inner { position: relative; z-index: 1; }
.news-hero-section h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e1b4b;
  margin: 0 0 8px;
  line-height: 1.35;
}
.news-hero-section p {
  font-size: 0.88rem;
  color: #4338ca;
  margin: 0;
  line-height: 1.75;
  max-width: 640px;
}
.news-search-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  max-width: 520px;
}
.news-search-form input {
  flex: 1;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  background: #fff;
  color: var(--c-text);
  outline: none;
}
.news-search-form input:focus { border-color: var(--c-blue-600); }
.news-search-form button {
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  background: var(--c-blue-600);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
}
.news-search-form button:hover { background: var(--c-blue-700); }

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 14px;
  align-items: start;
  width: 100%;
}
.news-main-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.news-post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.news-post-card {
  background: var(--c-bg-card, #f8fafc);
  padding: 12px 14px;
}
.news-post-card__cat {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-blue-600);
  margin-bottom: 2px;
}
.news-post-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-text);
}
.news-post-card__excerpt {
  font-size: 0.8rem;
  color: var(--c-text-2);
  line-height: 1.55;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-post-card__meta {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--c-text-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.news-post-card__thumb {
  background: var(--c-blue-50);
}
.news-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.news-sidebar {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.news-side-box {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--s-card);
}
.news-side-box__title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--c-text);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}
.news-cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-text-2);
  transition: background 0.15s, color 0.15s;
}
.news-cat-link:hover { background: var(--c-blue-50); color: var(--c-blue-600); }
.news-popular-link {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.5;
}
.news-popular-link:last-child { border-bottom: 0; padding-bottom: 0; }
.news-popular-link:hover { color: var(--c-blue-600); }

.news-article-header { position: relative; z-index: 1; margin-bottom: 16px; }
.news-article-header .news-post-card__cat {
  display: inline-block;
  margin-bottom: 8px;
  text-decoration: none;
}
.news-article-header h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.45;
  margin: 0 0 10px;
}
.news-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--c-text-3);
}
/* محتويات المقال — قابل للطي */
.news-toc {
  margin: 0 0 18px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-blue-50);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.news-toc__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-text);
  list-style: none;
  user-select: none;
}
.news-toc__toggle::-webkit-details-marker { display: none; }
.news-toc__toggle::after {
  content: '▼';
  margin-inline-start: auto;
  font-size: 0.65rem;
  color: var(--c-text-3);
  transition: transform 0.2s;
}
.news-toc:not([open]) .news-toc__toggle::after { transform: rotate(-90deg); }
.news-toc__toggle-icon { font-size: 1rem; line-height: 1; }
.news-toc__count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-blue-700);
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 8px;
}
.news-toc__nav {
  padding: 0 14px 12px;
  border-top: 1px solid rgba(37, 99, 235, 0.12);
}
.news-toc__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-toc__item a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-text-2);
  line-height: 1.5;
  transition: background 0.15s, color 0.15s;
}
.news-toc__item a:hover {
  background: #fff;
  color: var(--c-blue-600);
}
.news-toc__item--h2 a { font-weight: 700; color: var(--c-text); }
.news-toc__item--h3 a { padding-inline-start: 18px; font-size: 0.8rem; }
.news-toc__item--h4 a { padding-inline-start: 28px; font-size: 0.78rem; font-weight: 500; }
.news-toc__item--h5 a { padding-inline-start: 38px; font-size: 0.76rem; font-weight: 500; color: var(--c-text-3); }

html.dark .news-toc { background: rgba(37, 99, 235, 0.08); border-color: #334155; }
html.dark .news-toc__count { background: #1e293b; border-color: #4338ca; color: #93c5fd; }
html.dark .news-toc__item a:hover { background: #1e293b; }

.news-article-content {
  position: relative;
  z-index: 1;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--c-text-2);
  text-align: right;
}
.news-article-content > *:first-child { margin-top: 0; }
.news-article-content p { margin: 0 0 1rem; }
.news-article-content p:last-child { margin-bottom: 0; }

/* ── عناوين المقال h2 → h5 ── */
.news-article-content h2 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.45;
  margin: 1.85rem 0 0.9rem;
  padding: 0 0 0.55rem;
  border-bottom: 2px solid var(--c-blue-100);
}
.news-article-content h2:first-child { margin-top: 0; }

.news-article-content h3 {
  font-size: 1.04rem;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.5;
  margin: 1.45rem 0 0.7rem;
  padding: 0.35rem 12px 0.35rem 0;
  border-right: 3px solid var(--c-blue-600);
  background: linear-gradient(to left, var(--c-blue-50) 0%, transparent 100%);
  border-radius: 0 8px 8px 0;
}

.news-article-content h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.55;
  margin: 1.15rem 0 0.55rem;
  padding-right: 10px;
  position: relative;
}
.news-article-content h4::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0.45em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-blue-600);
}

.news-article-content h5 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-text-2);
  line-height: 1.6;
  margin: 0.95rem 0 0.45rem;
  letter-spacing: 0.01em;
}

.news-article-content strong,
.news-article-content b {
  font-weight: 700;
  color: var(--c-text);
}
.news-article-content a {
  color: var(--c-blue-600);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.news-article-content a:hover { color: var(--c-blue-700); }
.news-article-content ul,
.news-article-content ol {
  margin: 0 0 1rem;
  padding-right: 1.35rem;
  padding-left: 0;
}
.news-article-content li {
  margin-bottom: 0.35rem;
  line-height: 1.85;
}
.news-article-content li::marker { color: var(--c-blue-600); }
.news-article-content blockquote {
  margin: 1rem 0;
  padding: 12px 16px;
  border-right: 4px solid var(--c-blue-600);
  background: var(--c-blue-50);
  border-radius: 0 10px 10px 0;
  color: var(--c-text);
  font-size: 0.9rem;
  line-height: 1.8;
}
.news-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1rem 0;
}
.news-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
}
.news-article-content th,
.news-article-content td {
  border: 1px solid var(--c-border);
  padding: 8px 10px;
  text-align: right;
}
.news-article-content th {
  background: var(--c-blue-50);
  font-weight: 700;
  color: var(--c-text);
}

html.dark .news-article-content h2 {
  color: #f1f5f9;
  border-bottom-color: #334155;
}
html.dark .news-article-content h3 {
  color: #bfdbfe;
  background: linear-gradient(to left, rgba(37, 99, 235, 0.12) 0%, transparent 100%);
}
html.dark .news-article-content h4 { color: #e2e8f0; }
html.dark .news-article-content h5 { color: #94a3b8; }
html.dark .news-article-content strong,
html.dark .news-article-content b { color: #f1f5f9; }
html.dark .news-article-content blockquote {
  background: rgba(37, 99, 235, 0.1);
  color: #e2e8f0;
}
html.dark .news-article-content th { background: #1e293b; }
.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  position: relative;
  z-index: 1;
}
.news-tag-link {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--c-blue-50);
  color: var(--c-blue-700);
  text-decoration: none;
  border: 1px solid #bfdbfe;
}
.news-tag-link:hover { background: #dbeafe; }

html.dark .news-hero-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e293b 100%);
  border-color: #4338ca;
}
html.dark .news-hero-section h1 { color: #e0e7ff; }
html.dark .news-hero-section p { color: #a5b4fc; }
html.dark .news-search-form input {
  background: #0f172a;
  border-color: #4338ca;
  color: #f1f5f9;
}
html.dark .news-post-card,
html.dark .news-side-box { background: #1e293b; border-color: #334155; }
html.dark .news-post-card:hover { border-color: #6366f1; }
html.dark .news-cat-link:hover { background: rgba(59, 130, 246, 0.12); }

/* مشاركة المقال */
.news-share-bar {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  position: relative;
  z-index: 1;
}

/* الزوار شاهدوا أيضاً — شبكة بطاقات */
.news-also-viewed .section-header { margin-bottom: 14px; }
.news-rel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}
.news-rel-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
}
.news-rel-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}
.news-rel-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--c-blue-50);
}
.news-rel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-rel-thumb--empty,
.news-rel-ph {
  font-size: 2rem;
  line-height: 1;
}
.news-rel-cat {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 5px 8px;
  background: rgba(30, 64, 175, 0.92);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-rel-info {
  padding: 8px 10px 10px;
}
.news-rel-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-blue-600);
  line-height: 1.4;
}
.news-rel-card:hover .news-rel-name { color: var(--c-blue-700); }
html.dark .news-rel-card { background: #1e293b; border-color: #334155; }
html.dark .news-rel-name { color: #93c5fd; }

@media (max-width: 1100px) {
  .news-rel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .news-layout { grid-template-columns: 1fr; }
  .news-sidebar { position: static; order: -1; }
  .news-rel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .page-body--news { width: calc(100% - 24px); gap: 10px; }
  .news-hero-section { padding: 16px; border-radius: 14px; }
  .news-hero-section h1 { font-size: 1.1rem; }
  .news-hero-section::after { display: none; }
  .news-search-form { flex-direction: column; max-width: none; }
  .news-search-form button { width: 100%; padding: 12px; }
  .news-post-card .ls-thumb { width: 72px; height: 72px; min-width: 72px; min-height: 72px; }
  .news-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
