/* =========================================================================
   Haji School – home page (home.css). Requires theme.css.
   Dark sections use the --dark-* tokens so they stay navy in both themes.
   ========================================================================= */

.hm-section { padding: 96px 0 30px; }
.hm-band { padding: 96px 0; background: var(--bg-2); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 0; line-height: 1.4; }
.sec-head p { color: var(--muted); font-size: 15.5px; margin: 8px 0 0; max-width: 520px; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; color: var(--link); border-bottom: 2px solid var(--primary); padding-bottom: 3px; transition: gap .2s; }
.see-all:hover { gap: 10px; }
.see-all svg { width: 16px; height: 16px; }
html[dir="rtl"] .see-all svg { transform: scaleX(-1); }

/* ------------------------------------------------------------------ hero */
.hero {
    position: relative; overflow: hidden; color: var(--dark-text);
    background: radial-gradient(ellipse 900px 520px at 78% -10%, color-mix(in srgb, var(--dark-surface) 70%, var(--primary) 30%) 0%, var(--dark-bg) 55%), var(--dark-bg);
    padding: 84px 0 0;
}
@supports not (background: color-mix(in srgb, #000, #fff)) { .hero { background: radial-gradient(ellipse 900px 520px at 78% -10%, var(--dark-surface) 0%, var(--dark-bg) 55%), var(--dark-bg); } }
.hero::after { content: ""; position: absolute; inset-inline-start: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--primary-rgb), .22), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-bottom: 76px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #f4c877; font-size: 14.5px; font-weight: 600; margin-bottom: 20px; animation: fadeUp .6s var(--ease) both; }
.hero-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 6px rgba(var(--primary-rgb), .2); }
.hero h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.35; margin: 0 0 20px; color: var(--dark-text); animation: fadeUp .6s .1s var(--ease) both; }
.hero h1 em { font-style: normal; color: #f4c877; position: relative; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px; background: rgba(var(--primary-rgb), .25); border-radius: 6px; z-index: -1; }
.hero .lead { font-size: 18px; color: var(--dark-muted); max-width: 500px; margin: 0 0 32px; line-height: 1.85; animation: fadeUp .6s .2s var(--ease) both; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; animation: fadeUp .6s .3s var(--ease) both; }
.hero-stats { display: flex; gap: 36px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 24px; flex-wrap: wrap; animation: fadeUp .6s .4s var(--ease) both; }
.hero-stats b { font-size: 26px; display: block; color: var(--dark-text); font-weight: 800; line-height: 1.2; }
.hero-stats span { font-size: 13.5px; color: var(--dark-muted); }

.hero-visual { position: relative; height: 520px; animation: fadeUp .8s .2s var(--ease) both; }
.float-card { position: absolute; border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); }
.fc-main { width: 88%; inset-inline-start: 0; top: 36px; background: linear-gradient(160deg, var(--dark-surface), var(--dark-bg)); padding: 18px; border: 1px solid rgba(255, 255, 255, .12); color: var(--dark-text); animation: floatY 7s ease-in-out infinite; }
.fc-slides { position: relative; }
.fc-slide { display: none; color: inherit; }
.fc-slide.active { display: block; animation: slideIn .6s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
html[dir="rtl"] .fc-slide.active { animation-name: slideInRtl; }
@keyframes slideInRtl { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.fc-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.fc-dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .25); transition: all .3s var(--spring); }
.fc-dots button.active { width: 20px; border-radius: 5px; background: var(--primary); }
.fc-dots:empty { display: none; }
.fc-thumb { position: relative; border-radius: var(--radius-sm); aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 14px; background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb), .35), transparent 60%), linear-gradient(135deg, #3a4090, #20244f); }
.fc-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.fc-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 17, 48, .6), transparent 60%); }
.fc-thumb .play-btn { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(var(--primary-rgb), .18); transition: transform .35s var(--spring), border-radius .35s; }
.fc-main:hover .play-btn { transform: translate(-50%, -50%) scale(1.1); border-radius: 30%; }
.fc-thumb .play-btn svg { width: 22px; height: 22px; margin-inline-start: 3px; }
.fc-main h4 { color: var(--dark-text); font-size: 16px; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-main p { color: var(--dark-muted); font-size: 13.5px; margin: 0; }
.fc-progress { margin-top: 14px; height: 6px; border-radius: 10px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.fc-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 10px; }
.fc-badge { inset-inline-end: 0; bottom: 20px; background: var(--bg); color: var(--text); padding: 16px 18px; display: flex; align-items: center; gap: 12px; width: 240px; animation: floatY 8s 1s ease-in-out infinite; }
.fc-badge .ring { position: relative; width: 46px; height: 46px; border-radius: 50%; flex: none; background: conic-gradient(var(--success) 0 var(--pct, 78%), var(--border) 0 100%); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.fc-badge .ring::before { content: ""; position: absolute; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); }
.fc-badge .ring b { position: relative; z-index: 1; }
.fc-badge strong { display: block; font-size: 14px; }
.fc-badge small { color: var(--muted); font-size: 12px; }
.fc-users { inset-inline-start: 20px; top: -6px; background: var(--bg); color: var(--text); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; animation: floatY 6s .5s ease-in-out infinite; }
.fc-users .dots { display: flex; }
.fc-users .dots span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg); margin-inline-end: -9px; background: linear-gradient(135deg, var(--violet), var(--success)); }
.fc-users .dots span:nth-child(2) { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.fc-users .dots span:nth-child(3) { background: linear-gradient(135deg, var(--info), var(--violet)); }
.fc-users .live { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(47, 191, 159, .6); animation: pulseDot 2s infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulseDot { 70% { box-shadow: 0 0 0 10px rgba(47, 191, 159, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 191, 159, 0); } }

/* ----------------------------------------------------------------- strip */
.strip { background: var(--primary); color: var(--on-primary); padding: 12px 0; overflow: hidden; white-space: nowrap; font-weight: 700; font-size: 14.5px; }
.strip-track { display: inline-flex; gap: 52px; animation: marquee 28s linear infinite; }
.strip-track span { display: inline-flex; align-items: center; gap: 10px; }
.strip-track span::before { content: "◆"; font-size: 9px; }
.strip:hover .strip-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html[dir="rtl"] .strip-track { animation-name: marqueeRtl; }
@keyframes marqueeRtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ------------------------------------------------------------ ad banners */
.ad-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.ad-banner { display: block; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 3 / 1; background: var(--surface-2); box-shadow: var(--shadow-sm); transition: transform .4s var(--spring), box-shadow .4s; }
.ad-banner:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ad-banner img { width: 100%; height: 100%; object-fit: cover; }
.ad-banner .tag { position: absolute; top: 8px; inset-inline-start: 8px; font-size: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(15, 17, 48, .55); color: #fff; }

/* ------------------------------------------------------------ categories */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 16px; text-align: center; cursor: pointer; transition: transform .3s var(--spring), box-shadow .3s, border-color .3s; }
.cat-card:hover, .cat-card.active { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(var(--primary-rgb), .5); }
.cat-card.active { background: rgba(var(--primary-rgb), .08); }
.cat-icon { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 24px; font-weight: 800; transition: transform .35s var(--spring); }
.cat-card:hover .cat-icon { transform: rotate(-8deg) scale(1.08); }
.cat-icon.has-img { padding: 0; overflow: hidden; border-radius: 50%; width: 64px; height: 64px; }
.cat-icon img, .inst-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.cat-card h4 { font-size: 15px; margin: 0 0 4px; }
.cat-card span { font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------------------- courses */
.courses-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.courses-tools .search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 6px 6px 16px; min-width: 300px; flex: 1; max-width: 420px; transition: box-shadow .3s; }
html[dir="rtl"] .courses-tools .search { padding: 6px 16px 6px 6px; }
.courses-tools .search:focus-within { box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .18); }
.courses-tools .search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.courses-tools .search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; color: var(--text); padding: 8px 4px; }
.active-filter { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--dark-bg); color: var(--dark-text); font-size: 13px; font-weight: 700; }
.active-filter button { border: 0; background: rgba(255, 255, 255, .15); color: inherit; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.active-filter svg { width: 12px; height: 12px; }
.load-more-wrap { text-align: center; margin-top: 34px; }

/* -------------------------------------------------------------- features */
.feat-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.feat-list { display: flex; flex-direction: column; gap: 28px; }
.feat-item { display: flex; gap: 18px; }
.feat-icon { width: 52px; height: 52px; border-radius: 15px; flex: none; display: grid; place-items: center; }
.feat-icon svg { width: 22px; height: 22px; }
.feat-item h4 { font-size: 17px; margin: 0 0 6px; }
.feat-item p { font-size: 14.5px; color: var(--muted); margin: 0; max-width: 420px; line-height: 1.8; }
.stat-panel { position: relative; overflow: hidden; background: var(--dark-bg); color: var(--dark-text); border-radius: var(--radius-lg); padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.stat-panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 10%, rgba(var(--primary-rgb), .28), transparent 55%); }
.stat-panel .cell { position: relative; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.stat-panel .cell b { display: block; font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: 36px; color: #f4c877; line-height: 1.3; }
html[lang="en"] .stat-panel .cell b { font-family: var(--font-en); font-weight: 900; }
.stat-panel .cell span { font-size: 13.5px; color: var(--dark-muted); }

/* ----------------------------------------------------------- instructors */
.inst-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.inst-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 20px; text-align: center; cursor: pointer; transition: transform .3s var(--spring), box-shadow .3s; }
.inst-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.inst-avatar { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; margin: 0 auto 14px; display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 800; font-family: var(--font-display); background: linear-gradient(135deg, var(--violet), var(--accent)); box-shadow: var(--shadow); }
.inst-card h4 { font-size: 15.5px; margin: 0 0 4px; }
.inst-card span { display: block; font-size: 13px; color: var(--muted); }
.inst-card .meta { margin-top: 12px; display: flex; justify-content: center; gap: 12px; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------- testimonials */
.testi-box { max-width: 780px; margin: 0 auto; text-align: center; position: relative; }
.testi-box .quote { width: 46px; height: 46px; margin: 0 auto 20px; color: var(--primary); opacity: .6; }
.testi-slide { display: none; animation: fadeUp .5s var(--ease); }
.testi-slide.active { display: block; }
.testi-slide p { font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: clamp(21px, 2.6vw, 29px); line-height: 1.75; color: var(--text); margin: 0 0 26px; }
html[lang="en"] .testi-slide p { font-family: var(--font-en); font-weight: 700; font-size: clamp(18px, 2.2vw, 24px); }
.testi-person { display: flex; align-items: center; justify-content: center; gap: 12px; }
.testi-person .av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: var(--on-primary); font-weight: 800; }
.testi-person strong { display: block; font-size: 14.5px; }
.testi-person span { font-size: 12.5px; color: var(--muted); }
.testi-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.testi-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: var(--border); padding: 0; transition: all .3s var(--spring); }
.testi-dots button.active { background: var(--primary); width: 26px; border-radius: 6px; }

/* ------------------------------------------------------------------ cta */
.cta-banner { position: relative; overflow: hidden; margin: 70px auto 0; background: linear-gradient(120deg, var(--dark-bg) 0%, var(--dark-surface) 100%); border-radius: var(--radius-lg); padding: 60px 56px; color: var(--dark-text); display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta-banner::after { content: ""; position: absolute; inset-inline-start: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--primary-rgb), .4), transparent 70%); }
.cta-banner h3 { font-size: clamp(24px, 3vw, 32px); max-width: 460px; margin: 0 0 10px; }
.cta-banner p { color: var(--dark-muted); font-size: 15px; max-width: 440px; margin: 0; }
.cta-right { display: flex; gap: 14px; flex-shrink: 0; position: relative; z-index: 1; flex-wrap: wrap; }
.seal-row { display: flex; justify-content: center; margin-top: 40px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .inst-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hero { padding-top: 56px; }
    .hero-grid { grid-template-columns: 1fr; padding-bottom: 56px; }
    .hero-visual { height: 400px; margin-top: 10px; }
    .feat-wrap { grid-template-columns: 1fr; gap: 36px; }
    .cta-banner { flex-direction: column; text-align: center; padding: 44px 28px; }
    .cta-banner p { margin: 0 auto; }
    .hm-section { padding: 70px 0 20px; }
    .hm-band { padding: 70px 0; }
}
@media (max-width: 640px) {
    .hero-visual { height: auto; display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
    .hero-visual .float-card { position: static; width: 100%; animation: none; transform: none; }
    .fc-users { order: -1; width: auto; align-self: flex-start; }
    .fc-badge { width: 100%; }
    .fc-main { padding: 14px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .inst-row { grid-template-columns: 1fr 1fr; gap: 12px; }
    .hero-stats { gap: 20px; }
    .fc-badge { width: 200px; }
    .stat-panel { grid-template-columns: 1fr; padding: 32px; }
    .courses-tools .search { min-width: 0; max-width: none; }
    .ad-banners { grid-template-columns: 1fr; }
    .sec-head h2 { font-size: 26px; }
}
