/* Homepage composition and the shared footer. Daawah's blue stays stable in both modes. */
[data-home-refresh] { --home-space: 64px; }
.home-hero .hero-inner { grid-template-columns: minmax(260px,.75fr) minmax(0,1.5fr); gap: clamp(32px,4vw,64px); padding-block:40px; align-items:center; }
.home-hero .hero-copy h1 { font-size:clamp(38px,3.6vw,58px); line-height:1.35; margin:0 0 20px; white-space:nowrap; }
.home-hero .hero-copy p { font-size:20px; line-height:1.9; margin:0 0 28px; max-width:32ch; }
.home-hero .hero-media { padding:0; margin:0; }
.home-hero .viewing-stage { padding:12px; background:#10396c; border-color:transparent; border-radius:16px; }
.home-hero .viewing-stage::before { display:none; }
.home-hero .watch-toolbar { margin:8px 0 0; padding:0; min-height:44px; justify-content:flex-start; }
.home-hero .watch-action { min-height:40px; padding:6px 14px; font-size:13px; }
.home-hero .player-frame { border-radius:8px; }
.home-hero:after { opacity:.045; width:460px; height:460px; top:-200px; inset-inline-start:-180px; }
.home-hero-link { display:inline-flex; align-items:center; justify-content:center; gap:20px; min-height:48px; padding:10px 20px; border-radius:8px; color:#164b8d; background:#fff; font-weight:700; }
.home-hero-link:hover { background:#e4eef9; }
[data-home-refresh] .section { margin-block:var(--home-space); padding-block:0; }
[data-home-refresh] .section-heading { align-items:center; margin-bottom:24px; gap:24px; }
[data-home-refresh] .section-heading h2 { font-size:28px; line-height:1.4; margin:0; }
[data-home-refresh] .section-heading p { margin:8px 0 0; font-size:16px; color:var(--muted); }
.home-row .text-link { gap:12px; white-space:nowrap; }
.home-row-controls { margin-top:12px; }
.home-row-controls button { display:grid; place-items:center; }
.home-landscape-track > .card { flex-basis:calc((100% - 72px)/4); }
.home-landscape-track .card h3 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.category-track { gap:20px; }
.category-tile { flex:0 0 calc((100% - 80px)/5); scroll-snap-align:start; min-width:0; }
.category-picture { display:block; aspect-ratio:3/2; overflow:hidden; border-radius:12px; background:var(--ground); }
.category-picture img { display:block; width:100%; height:100%; object-fit:cover; transition:transform 320ms ease; }
.category-title { display:block; font-size:20px; font-weight:700; margin-top:14px; color:var(--ink); }
.category-count { display:block; font-size:14px; color:var(--muted); margin-top:4px; }
[data-home-refresh] .visual-library-section { padding-block:48px; background:#edf3fa; }
.visual-library-layout { display:grid; grid-template-columns:minmax(0,1.85fr) minmax(260px,1fr); gap:28px; align-items:start; }
.visual-library-main { min-width:0; }
.library-screen { position:relative; aspect-ratio:16/9; overflow:hidden; border-radius:12px; background:#10396c; }
.library-screen > img,.library-screen > iframe { width:100%; height:100%; display:block; object-fit:cover; border:0; }
.library-screen > img { filter:brightness(.74); }
.library-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:12px; width:100%; background:transparent; color:white; font:inherit; font-size:16px; font-weight:700; cursor:pointer; }
.library-play svg { box-sizing:content-box; padding:22px; background:white; color:#164b8d; border-radius:50%; }
.library-play span { background:#10396c; padding:6px 16px; border-radius:6px; }
.library-caption { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding-top:20px; }
.library-caption h3 { margin:0; font-size:23px; line-height:1.6; }
.library-caption a { flex-shrink:0; display:flex; gap:8px; align-items:center; min-height:44px; color:var(--blue); font-size:14px; }
.library-status { font-size:14px; color:var(--muted); }
.library-status:empty { display:none; }
.library-playlist { max-height:450px; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:8px; padding:2px; }
.library-item { display:grid; grid-template-columns:110px minmax(0,1fr) 16px; align-items:center; gap:14px; padding:12px; border:1px solid transparent; background:transparent; border-radius:10px; color:var(--ink); text-align:right; font:inherit; cursor:pointer; flex-shrink:0; }
.library-item img { width:110px; height:70px; object-fit:cover; border-radius:6px; }
.library-item span { font-weight:500; font-size:15px; line-height:1.7; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.library-item[aria-pressed="true"] { background:var(--paper,#fff); border-color:#6a94c5; }
.library-item:hover { background:#dce8f6; }
[data-home-refresh] .poster-section { padding-block:48px; background:#10396c; color:white; }
.poster-section .section-heading :is(h2,p),.poster-section .text-link,.poster-section h3 { color:#fff; }
.poster-section .section-heading p { color:#d5e4f5; }
.poster-track { gap:24px; }
.poster-card { flex:0 0 calc((100% - 96px)/5); scroll-snap-align:start; min-width:0; }
.poster-picture { display:flex; align-items:center; justify-content:center; aspect-ratio:4/5; background:#0c2b50; border-radius:10px; overflow:hidden; }
.poster-picture img { width:100%; height:100%; object-fit:contain; }
.poster-card h3 { margin:14px 0 0; font-size:17px; line-height:1.7; }
.poster-section .carousel-controls button { color:#fff; border-color:#7194be; background:transparent; }
.poster-section .carousel-status { color:#d5e4f5; }
.home-history .history-cards.carousel-track { display:flex; }
.home-history .history-card { flex:0 0 calc((100% - 72px)/4); scroll-snap-align:start; }
.site-footer { background:#0d2e56; color:#fff; border:0; padding:56px 0 0; margin-top:56px; }
.footer-columns { display:grid; grid-template-columns:1.4fr 1fr 1fr 1.25fr; gap:40px; align-items:start; padding-bottom:36px; }
.site-footer .footer-brand img { width:156px; height:auto; background:#fff!important; padding:10px!important; border-radius:8px!important; filter:none; }
.site-footer p { margin:14px 0 0; text-align:start; color:#d1e0f1; font-size:16px; line-height:1.8; }
.site-footer .footer-identity>p:first-of-type { color:white; font-size:22px; font-weight:700; }
.site-footer .footer-description { font-size:14px; max-width:29ch; }
.site-footer h2 { margin:8px 0 14px; color:white; font-size:18px; line-height:1.6; }
.site-footer nav.footer-column { display:flex; flex-direction:column; align-items:flex-start; gap:0; margin:0; }
.footer-column a,.footer-contact { min-height:40px; display:inline-flex; align-items:center; font-size:15px; color:#d1e0f1; }
.site-footer a:hover { color:#fff; text-decoration:underline; text-underline-offset:5px; }
.site-footer .social-links { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-start; margin-top:20px; min-width:0; }
.site-footer .social-links a { border-color:#51749d; background:transparent; color:white; width:40px; height:40px; }
.footer-app-link { display:inline-flex; align-items:center; gap:12px; padding:12px 16px; min-height:48px; border:1px solid #6a8bb4; border-radius:8px; margin-top:22px; color:#fff; font-size:15px; }
.footer-contact { display:flex; margin-top:10px; }
.footer-bottom { display:flex; align-items:center; flex-wrap:wrap; gap:24px; padding-block:20px; border-top:1px solid #355779; color:#c6d8ec; font-size:13px; }
.site-footer .footer-bottom small { margin-inline-end:auto; color:#c6d8ec; font-size:13px; }
.footer-bottom a { display:flex; align-items:center; min-height:40px; }
.site-footer :is(a,button):focus-visible,.poster-section :is(a,button):focus-visible { outline:3px solid #fff; outline-offset:4px; }
html[data-theme="dark"] .visual-library-section { background:#132b46; }
html[data-theme="dark"] .library-item[aria-pressed="true"],html[data-theme="dark"] .library-item:hover { background:#1e4068; }
html[data-theme="dark"] .library-caption a { color:#b7d5fa; }
@media(hover:hover) and (prefers-reduced-motion:no-preference) { .category-tile:hover img { transform:scale(1.035); } }
@media(max-width:1050px) {
 .home-hero .hero-inner { grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr); gap:28px; }
 .home-hero .hero-copy h1 { font-size:42px; }
 .home-hero .hero-copy p { font-size:18px; }
 .category-tile { flex-basis:calc((100% - 60px)/4); }
 .poster-card { flex-basis:calc((100% - 72px)/4); }
 .home-landscape-track>.card,.home-history .history-card { flex-basis:calc((100% - 48px)/3); }
 .visual-library-layout { grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr); gap:20px; }
 .library-item { grid-template-columns:90px 1fr; gap:10px; padding:8px; }
 .library-item>svg { display:none; }.library-item img { width:90px;height:60px; }
 .footer-columns { grid-template-columns:1.3fr 1fr 1fr; gap:28px; }.footer-app { grid-column:1/-1; }
}
@media(max-width:760px) {
 [data-home-refresh] { --home-space:40px; }
 .home-hero .hero-inner { grid-template-columns:1fr; gap:24px; padding-block:28px; }
 .home-hero .hero-copy { display:grid; grid-template-columns:1fr auto; gap:8px 16px; align-items:center; }
 .home-hero .hero-copy h1 { font-size:34px; margin:0; }
 .home-hero .hero-copy p { font-size:15px; grid-column:1; margin:0; line-height:1.8; }
 .home-hero-link { grid-column:2; grid-row:1/3; padding:8px 12px; gap:8px; font-size:13px; }
 .home-hero-link svg { display:none; }
 .home-hero .viewing-stage { padding:8px; }.home-hero .watch-toolbar { margin-top:4px; }
 [data-home-refresh] .section-heading { gap:16px; margin-bottom:20px; }
 [data-home-refresh] .section-heading h2 { font-size:23px; }
 [data-home-refresh] .section-heading p { font-size:14px; }
 .home-row .text-link,.visual-library-section .text-link { font-size:13px; }
 .home-landscape-track>.card,.home-history .history-card { flex-basis:calc((100% - 16px)/2); }
 .category-tile { flex-basis:calc((100% - 32px)/3); }.category-track { gap:16px; }
 .category-title { font-size:18px; }.category-count { font-size:13px; }
 .poster-card { flex-basis:calc((100% - 32px)/3); }.poster-track { gap:16px; }
 .visual-library-layout { grid-template-columns:1fr; gap:20px; }
 .library-playlist { flex-direction:row; max-height:none; overflow-x:auto; scroll-snap-type:x mandatory; }
 .library-item { flex:0 0 270px; grid-template-columns:90px 1fr; scroll-snap-align:start; }
 .library-caption { padding-top:14px; gap:14px; }.library-caption h3 { font-size:19px; }.library-caption a { font-size:13px; }
 [data-home-refresh] .poster-section,[data-home-refresh] .visual-library-section { padding-block:32px; }
 .home-row-controls { justify-content:flex-end; }
 .site-footer { padding-top:36px; }.footer-columns { grid-template-columns:1fr 1fr; gap:28px 20px; }
 .footer-identity { grid-column:1/-1; }.footer-app { grid-column:1/-1; }.site-footer .footer-description { max-width:45ch; }
 .site-footer .footer-bottom small { flex-basis:100%; }.footer-bottom { gap:8px 24px; }
}
@media(max-width:440px) {
 .home-hero .hero-copy { display:block; }.home-hero .hero-copy h1 { font-size:32px; }
 .home-hero .hero-copy p { margin-top:8px; }.home-hero .hero-copy p br { display:none; }
 .home-hero-link { margin-top:14px; min-height:44px; }
 .category-tile { flex-basis:calc((100% - 16px)/2.25); }
 .poster-card { flex-basis:calc((100% - 16px)/2); }
 .home-landscape-track>.card,.home-history .history-card { flex-basis:82%; }
 .section-heading .text-link svg { display:none; }
 .library-caption { display:block; }.library-caption a { margin-top:4px; }
}
