/* V7.16 — AL-IMAM, public site. Existing app.css and logged-in pages untouched. */
.home-page{--forest:#064336;--forest-dark:#042f29;--mint:#e6f0e9;--gold:#eac374;--linen:#fbfaf4;--text:#173d34;--muted:#627a6c;color:var(--text);background:var(--linen);font-family:'Tajawal','Cairo',Tahoma,Arial,sans-serif;line-height:1.7}
.home-page :is(h1,h2,h3,p){margin-top:0}.home-page button,.home-page select{font:inherit}.home-page a{text-decoration:none}.home-page :focus-visible{outline:3px solid #c28c3c;outline-offset:3px}.home-container{width:min(1180px,calc(100% - 48px));margin-inline:auto}
.announcement{min-height:35px;padding:5px 18px;background:#f7ebcc;color:#705022;text-align:center;display:flex;align-items:center;justify-content:center;gap:14px;font-size:12px;font-weight:700;letter-spacing:.015em}
.home-header{height:84px;padding:9px clamp(18px,4vw,70px);display:flex;gap:26px;align-items:center;justify-content:space-between;background:#fff;position:sticky;top:0;z-index:30;border-bottom:1px solid #e5ede5;box-shadow:0 7px 24px rgba(24,60,47,.04)}
.home-brand,.home-footer-brand{display:flex;align-items:center;gap:12px;color:#0d4638;min-width:180px}.home-brand img{width:63px;height:63px;object-fit:contain;border-radius:50%;background:white}.home-brand strong,.home-footer-brand strong{font-size:22px;line-height:1.12;display:block;font-weight:800}.home-brand small,.home-footer-brand small{font-family:'Tajawal',sans-serif;color:#5b8073;letter-spacing:.18em;font-size:10px;display:block;margin-top:5px;direction:ltr}.home-nav{display:flex;align-items:center;gap:clamp(12px,1.8vw,31px)}.home-nav a{font-size:14px;font-weight:800;color:#325a4d;white-space:nowrap;transition:color .2s}.home-nav a:hover{color:#bd8e3c}.home-actions{display:flex;align-items:center;gap:12px}.language-switch{display:flex;align-items:center;gap:5px;border:1px solid #e1ebe2;border-radius:12px;padding:8px 10px;background:#f8fbf8}.language-switch select{border:0;background:transparent;color:#21483d;min-width:80px;font-size:13px;font-weight:800;max-width:130px;outline:0}.home-signin{font-size:13px;font-weight:850;background:var(--forest);color:white;border-radius:11px;padding:12px 15px;white-space:nowrap}.nav-mobile-toggle{display:none;border:1px solid #d5e6da;background:#fff;color:#074438;padding:7px 12px;border-radius:10px;font-size:22px}
.home-hero{background:radial-gradient(ellipse at 24% 20%,#136350 0,transparent 32%),linear-gradient(112deg,#022b25 0%,#073f35 55%,#0b4b3f 100%);color:#fff;position:relative;overflow:hidden}.home-hero::before{content:'۞';position:absolute;left:-75px;top:100px;font-size:530px;color:#ffffff05;line-height:1;pointer-events:none}.home-hero-inner{max-width:1290px;margin:auto;display:grid;grid-template-columns:1.1fr .9fr;min-height:570px;align-items:center;gap:45px;padding:64px clamp(25px,6vw,85px) 90px}.home-hero-copy{position:relative;z-index:2}.home-overline{color:var(--gold);font-weight:800;font-size:14px;letter-spacing:.02em}.spark{font-size:20px;padding-inline-end:8px}.home-hero h1{font-family:'Amiri','Noto Naskh Arabic',serif;font-size:clamp(46px,5.1vw,77px);line-height:1.28;font-weight:700;margin:13px 0 16px;letter-spacing:-.02em}.home-hero h1 span{color:var(--gold)}.home-hero p{max-width:570px;color:#dbebe3;font-size:clamp(17px,1.6vw,20px);line-height:1.95;margin-bottom:28px}.home-hero-buttons{display:flex;gap:12px;flex-wrap:wrap}.home-btn{display:inline-flex;gap:23px;justify-content:center;align-items:center;min-height:52px;padding:11px 22px;border-radius:12px;font-weight:850;font-size:15px;cursor:pointer;transition:transform .2s,filter .2s;white-space:nowrap}.home-btn:hover{transform:translateY(-2px);filter:brightness(1.06)}.home-btn-gold{color:#1e3c32;background:var(--gold)}.home-btn-outline{border:1px solid #7ca59a;color:#fff;background:#ffffff10}.home-btn-dark{background:var(--forest);color:#fff}.home-hero-trust{display:flex;flex-wrap:wrap;gap:9px 19px;color:#cfe3d6;font-size:13px;font-weight:650;margin-top:26px}.home-hero-trust span span{padding-inline-start:4px}.hero-seal{position:relative;min-height:440px;display:flex;align-items:center;justify-content:center}.seal-ring{position:absolute;border:1px solid #f9d47c55;border-radius:50%;aspect-ratio:1}.ring-outer{width:min(98%,440px);box-shadow:0 0 0 35px #ffffff05,0 0 0 70px #ffffff03}.ring-middle{width:min(90%,390px);background:radial-gradient(circle,#17785b 0%,#0e5849 70%,#0a4339 100%);border-color:#4f9b78aa}.seal-disc{width:min(72%,305px);aspect-ratio:1;padding:12px;background:#fffaf0;border:9px solid #e8bb63;border-radius:50%;z-index:2;box-shadow:0 20px 65px #001e196d,0 0 0 7px #ffffff16;overflow:hidden}.seal-disc img{width:100%;height:100%;object-fit:contain;border-radius:50%}.seal-caption{position:absolute;bottom:24px;right:10%;z-index:3;display:flex;gap:7px;padding:11px 18px;border-radius:12px;color:#113d32;background:white;font-weight:800;box-shadow:0 8px 35px #001e1947;font-size:13px}.seal-caption>span:first-child{color:#b28538}.ornament{position:absolute;top:10%;color:#e7bf74a3;font-size:35px}.ornament-left{left:0}.ornament-right{right:9%}.hero-edge{position:absolute;bottom:0;left:0;right:0;min-height:33px;display:flex;align-items:center;justify-content:center;gap:30px;background:#e5bf72;color:#245345;font-size:10px;letter-spacing:.25em;font-weight:800}
.home-section{padding:95px 0}.section-intro{text-align:center;max-width:720px;margin:0 auto 38px}.section-kicker{font-weight:850;color:#aa7e37;font-size:14px}.section-intro h2,.section-flex h2,.help-intro h2{font-family:'Amiri','Noto Naskh Arabic',serif;font-size:clamp(34px,3.7vw,49px);line-height:1.35;margin:6px 0 8px;color:#104638}.section-intro p,.section-flex p,.help-intro p{color:#61796d;font-size:16px;line-height:1.9;margin:0}.program-grid,.video-grid,.steps-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.program-card{background:#fff;border:1px solid #e1ebe2;border-radius:22px;padding:32px;min-height:235px;box-shadow:0 18px 42px #103b2e0b;transition:transform .2s,box-shadow .2s}.program-card:hover{transform:translateY(-4px);box-shadow:0 22px 42px #103b2e13}.program-icon{display:grid;place-items:center;width:64px;height:64px;background:#f8f0d9;border-radius:18px;color:#956c2d;font-family:'Amiri',serif;font-size:37px}.program-card h3{font-family:'Amiri',serif;font-size:27px;margin:15px 0 4px}.program-card p{font-size:14px;color:#5d746b;line-height:1.8}.home-video-section{background:#edf4ed}.section-flex{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:32px}.section-flex>div{max-width:730px}.section-icon{border:1px solid #cfdfd2;background:#fff;border-radius:21px;width:79px;height:79px;display:grid;place-items:center;font-size:27px;color:#b68a40}.video-grid{align-items:stretch}.video-card{border:1px solid #dae8df;background:#fff;border-radius:19px;overflow:hidden;box-shadow:0 9px 25px #123b3010;display:flex;flex-direction:column}.video-cover{position:relative;aspect-ratio:16/9;width:100%;border:0;background:radial-gradient(circle at 30% 20%,#327968,#073c32 78%);display:grid;place-items:center;color:#fff;overflow:hidden;cursor:pointer}.video-cover:after{content:'۞';position:absolute;font-family:'Amiri';font-size:135px;left:-15px;top:-35px;opacity:.09}.video-cover img{width:100%;height:100%;object-fit:cover}.cover-play{position:absolute;display:grid;place-items:center;z-index:1;width:66px;height:66px;border-radius:50%;background:#f5c974;color:#163c32;box-shadow:0 12px 36px #082e2a69;font-size:23px;transition:scale .2s}.video-cover:hover .cover-play{scale:1.09}.video-cover:focus-visible{outline:3px solid #ddaa51;outline-offset:-3px}.video-desc{padding:19px 21px 23px;flex:1}.video-desc .video-tags{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:8px}.video-tag{font-size:11px;font-weight:800;color:#286950;background:#eaf5ed;border-radius:100px;padding:3px 9px}.video-tag.lang{background:#f8f0dd;color:#94713e;direction:ltr}.video-desc h3{font-size:17px;line-height:1.55;margin:0 0 7px;font-weight:800}.video-desc p{font-size:13px;line-height:1.7;margin:0;color:#647b70}.videos-empty{grid-column:1/-1;border:1px dashed #bcd5c5;border-radius:19px;padding:38px 22px;text-align:center;background:#ffffff9c;color:#597368;font-size:15px}.home-link-more{display:flex;align-items:center;gap:14px;margin:25px auto 0;padding:12px 20px;border:1px solid #bad4c3;border-radius:12px;background:#fff;color:#175845;font-weight:800;cursor:pointer}.home-guides{background:#fff}.guide-switch{display:flex;margin:0 auto 35px;background:#eef4ef;border-radius:15px;padding:6px;width:max-content;max-width:100%;gap:5px}.guide-switch button{border:0;border-radius:11px;background:transparent;color:#4b6c5c;padding:14px 28px;font-weight:800;font-size:14px;cursor:pointer;min-width:170px}.guide-switch button.active{background:#064b3a;color:#fff;box-shadow:0 6px 18px #064b3a24}.guide-layout{display:grid;grid-template-columns:.34fr .66fr;gap:22px}.guide-videos{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.guide-illustration{background:linear-gradient(155deg,#093c32,#0a5d49);border-radius:19px;padding:38px 22px;display:flex;align-items:center;justify-content:center;gap:18px;flex-direction:column;text-align:center;color:#fff}.guide-play-symbol{width:88px;height:88px;border-radius:25px;display:grid;place-items:center;background:#edca81;color:#134739;font-size:29px}.guide-illustration strong{font-family:'Amiri',serif;font-size:26px;line-height:1.5}.guide-illustration span{color:#d4e7db;font-size:13px}.steps-grid{counter-reset:steps}.step-card{background:#fff;border:1px solid #e3e9e2;border-radius:20px;padding:30px;position:relative}.step-card:before{content:'';position:absolute;top:-1px;right:32px;width:80px;height:3px;background:#e6bc71}.step-no{font-size:38px;font-weight:700;color:#d5ad63;line-height:1}.step-card h3{margin:19px 0 6px;font-size:19px}.step-card p{font-size:14px;color:#65786f;line-height:1.8}.home-help{background:#edf4ee}.help-shell{display:grid;grid-template-columns:.9fr 1.1fr;gap:60px;align-items:center}.help-intro .home-btn{margin-top:27px}.faq-list details{background:#fff;border:1px solid #dce9df;border-radius:15px;margin-bottom:12px;padding:18px 24px}.faq-list summary{cursor:pointer;font-weight:800;color:#215443}.faq-list p{font-size:14px;color:#64786b;margin:12px 0 0;line-height:1.8}.closing-cta{margin:20px auto 0;min-height:185px;padding:35px clamp(20px,8vw,120px);display:flex;align-items:center;gap:25px;background:var(--forest-dark);color:#fff}.closing-cta img{width:85px;height:85px;border-radius:50%;background:#fff;object-fit:contain}.closing-cta>div{flex:1}.closing-cta h2{font-family:'Amiri',serif;color:white;font-size:clamp(26px,3vw,37px);margin:0}.closing-cta p{color:#bcd8cd;margin:5px 0 0}.home-footer{background:#082c26;padding:28px 0;color:#c8dfd3}.footer-columns{display:flex;align-items:center;gap:22px}.home-footer-brand{color:#fff;min-width:210px}.home-footer-brand strong{color:#fff;font-size:18px}.home-footer-brand img{width:51px;height:51px;background:#fff;border-radius:50%}.home-footer p{font-size:12px;color:#a9c5b8;flex:1}.home-footer a{color:#efcc88;white-space:nowrap;font-weight:800}.home-video-dialog{width:min(820px,calc(100vw - 24px));max-height:94vh;padding:0;border:1px solid #cfddd3;border-radius:17px;overflow:auto;box-shadow:0 35px 100px #04291f88}.home-video-dialog::backdrop{background:#042b25c8}.player-header{padding:14px 19px;background:#fff;display:flex;justify-content:space-between;gap:12px;align-items:center}.player-header h3{font-size:18px;line-height:1.5;margin:0}.player-header button{background:#ecf3ed;border:0;border-radius:10px;font-size:25px;cursor:pointer;width:40px;height:40px;color:#073e35}.player-frame{aspect-ratio:16/9;background:#041f1b;display:grid;place-items:center;color:#fff}.player-frame iframe,.player-frame video{border:0;width:100%;height:100%}.home-video-dialog>p{font-size:14px;color:#476859;margin:0;padding:18px}.public-notice{margin-bottom:28px;padding:24px;border:1px solid #e9d29b;border-radius:16px;background:#fff9e9}.public-notice h2{font-family:'Amiri',serif;font-size:24px;color:#614b26}.public-notice p{white-space:pre-wrap;line-height:1.8}
html[dir='ltr'] .home-page .hero-seal .seal-caption{right:8%;left:auto}html[dir='ltr'] .home-page .step-card:before{right:auto;left:32px}html[dir='ltr'] .home-hero h1{font-family:'Tajawal',sans-serif;letter-spacing:-.025em;line-height:1.25}html[dir='ltr'] .section-intro h2,html[dir='ltr'] .section-flex h2,html[dir='ltr'] .help-intro h2,html[dir='ltr'] .step-card h3,html[dir='ltr'] .closing-cta h2{font-family:'Tajawal',sans-serif;line-height:1.3}
@media(max-width:1150px){.home-nav{gap:13px}.home-nav a{font-size:12px}.home-header{padding-inline:21px}.home-brand{min-width:145px}}
@media(max-width:980px){.home-header{height:74px}.nav-mobile-toggle{display:block}.home-nav{display:none;position:absolute;top:74px;left:12px;right:12px;background:#fff;border:1px solid #d6e5db;box-shadow:0 15px 50px #092f2924;border-radius:14px;padding:15px;flex-direction:column;align-items:stretch;gap:0}.home-nav.open{display:flex}.home-nav a{padding:12px 15px;font-size:15px;border-bottom:1px solid #edf4ee}.home-hero-inner{grid-template-columns:1fr 1fr;gap:8px;padding:45px 30px 65px}.hero-seal{min-height:340px}.seal-disc{width:64%}.ring-outer{width:94%}.ring-middle{width:87%}.home-hero h1{font-size:48px}.guide-layout{grid-template-columns:1fr}.guide-illustration{min-height:180px}.guide-videos{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.home-container{width:calc(100% - 30px)}.home-header{padding:7px 13px;gap:10px}.home-brand{gap:7px;min-width:0}.home-brand img{width:49px;height:49px}.home-brand strong{font-size:18px}.home-brand small{font-size:8px}.home-actions{gap:7px}.language-switch{padding:5px}.language-switch select{min-width:62px;max-width:77px;font-size:11px}.home-signin{display:none}.home-hero-inner{grid-template-columns:1fr;padding:38px 20px 55px;gap:8px}.home-hero h1{font-size:clamp(42px,10vw,59px);margin-bottom:5px}.home-hero p{font-size:16px}.home-hero-trust{font-size:11px;gap:7px 14px}.hero-seal{min-height:260px;max-width:320px;width:100%;margin:5px auto 0}.seal-disc{width:63%;border-width:5px;padding:7px}.seal-caption{bottom:8px;font-size:11px;right:9%}.ornament{display:none}.home-section{padding:64px 0}.section-intro{margin-bottom:25px}.program-grid,.video-grid,.steps-grid,.guide-videos{grid-template-columns:1fr;gap:13px}.program-card{min-height:unset;padding:22px}.program-card h3{margin-top:7px}.section-flex{align-items:flex-start}.section-icon{width:52px;height:52px;flex-shrink:0}.guide-switch{width:100%}.guide-switch button{min-width:0;flex:1;padding:12px 8px}.guide-illustration{min-height:160px;padding:15px}.guide-play-symbol{width:55px;height:55px;border-radius:12px}.help-shell{grid-template-columns:1fr;gap:26px}.closing-cta{flex-wrap:wrap;gap:15px;padding:28px 18px}.closing-cta img{width:55px;height:55px}.closing-cta .home-btn{width:100%}.footer-columns{flex-wrap:wrap}.home-footer p{flex-basis:100%}.home-btn{font-size:13px;padding:12px 16px;gap:10px}.home-hero-buttons .home-btn{flex:1}.video-cover{aspect-ratio:16/9}}
@media(prefers-reduced-motion:reduce){.home-btn,.program-card,.cover-play{transition:none!important}}

/* V7.17: grouped book series, preserving uploaded cover art. */
.program-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:18px}
.curriculum-library-card{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;overflow:hidden}
.curriculum-covers{height:206px;width:100%;display:flex;align-items:center;justify-content:center;gap:5px;border-radius:14px;background:linear-gradient(145deg,#fff9ed,#e7f1e6);padding:9px;margin-bottom:10px}
.curriculum-covers img{height:100%;min-width:0;width:auto;max-width:96%;object-fit:contain;box-shadow:0 7px 14px #052f2629;border-radius:5px}
.curriculum-covers img:nth-child(n+2){max-width:33%}
.curriculum-covers:has(img:nth-child(3)) img{max-width:32%}
.curriculum-quran{font-family:Amiri,serif;font-size:76px;background:radial-gradient(circle at center,#266851,#073f35);color:#e9c77a}
.curriculum-library-card h3{font-family:Amiri,serif;font-size:24px;margin:9px 0 4px}
.curriculum-library-card p{flex:1;margin:4px 0 17px;line-height:1.75}
.program-details{display:inline-flex;border:1px solid #ccad61;background:#fdf2d5;border-radius:10px;padding:10px 18px;color:#063e33;font-weight:800;text-decoration:none}
@media(max-width:1120px){.program-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.program-grid{grid-template-columns:1fr}.curriculum-covers{height:230px}.curriculum-library-card p{font-size:14px}}
