/* Hamyar Fanni homepage — v89: one authoritative Hero/search layout */
.home-page header.topbar .container.nav{justify-content:center;align-items:center}
.home-page header.topbar .main-nav{display:flex;align-items:center;justify-content:center}

.home-page .home-hero-modern{
  position:relative;
  min-height:760px;
  height:760px;
  display:block;
  overflow:hidden;
  padding:0;
  background:#eaf3f6;
}
.home-page .home-bg{position:absolute;inset:0;z-index:0;overflow:hidden;background:#203847 center/cover no-repeat url("assets/hero-home-v65.jpg")}
.home-page .home-bg .hero-slide{
  position:absolute;inset:0;width:100%;height:100%;display:block;
  object-fit:cover;object-position:center center;opacity:0;
  transition:opacity 1.2s ease-in-out;
}
.home-page .home-bg .hero-slide.is-active{opacity:1}
.home-page .home-bg-overlay{
  position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(90deg,rgba(7,28,43,.66) 0%,rgba(7,28,43,.28) 34%,rgba(247,251,252,.78) 62%,rgba(247,251,252,.98) 82%,#f7fbfc 100%);
}
.home-page .home-hero-content{
  position:relative;z-index:3;width:94%;max-width:1400px;margin:0 auto;
  padding:52px 0 0;text-align:center;
}
.home-page .home-hero-kicker{display:flex;justify-content:center;align-items:center;gap:14px;width:100%;margin:0 0 10px;text-align:center;color:#1389dc;font-weight:900;font-size:13px}
.home-page .home-hero-kicker i{width:55px;height:2px;background:#1599ee;display:block}
.home-page .home-hero-content h1{width:100%;max-width:none;margin:0 auto 10px;text-align:center;white-space:nowrap;font-size:clamp(36px,3.7vw,56px);line-height:1.22;letter-spacing:-1.35px;color:#102d46;overflow:visible}
.home-page .home-hero-content>p{width:min(1100px,94%);max-width:none;margin:0 auto 18px;text-align:center;color:#536c7b;font-size:17px;line-height:2}

.home-page .quick-links{position:relative;width:100%;margin:0 auto;padding:0;background:transparent;z-index:5}
.home-page .quick-grid{width:min(1280px,92%);margin:0 auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:stretch}
.home-page .quick-grid a{position:relative;width:auto;min-width:0;height:122px;min-height:122px;box-sizing:border-box;padding:11px 8px;background:rgba(255,255,255,.94);border:1px solid #e0e9ed;border-radius:13px;text-decoration:none;color:#18324a;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;box-shadow:0 7px 20px rgba(18,45,64,.045);transition:transform .2s,box-shadow .2s,border-color .2s}
.home-page .quick-grid a{overflow:hidden}
.home-page .quick-grid b,.home-page .quick-grid small{display:block;width:100%;max-width:100%;min-width:0;overflow-wrap:anywhere;word-break:normal}
.home-page .quick-grid a:hover{transform:translateY(-4px);border-color:#9dc9df;box-shadow:0 15px 28px rgba(18,45,64,.09)}
.home-page .quick-grid i{font-style:normal;font-size:23px;color:#148fe1;margin-bottom:4px}
.home-page .quick-grid b{font-size:13px;line-height:1.6}
.home-page .quick-grid small{font-size:10px;color:#758792;line-height:1.5;margin-top:4px}
.home-page .quick-grid em{position:absolute;left:8px;bottom:8px;width:28px;height:28px;border-radius:50%;background:#edf6fb;color:#148fe1;display:grid;place-items:center;font-style:normal}

.home-page .home-search-wrap{width:100%;display:flex;flex-direction:column;align-items:center;margin:25px auto 0;position:relative;z-index:10}
.home-page .home-search{width:min(670px,92%);max-width:none;display:flex;background:#fff;border-radius:18px;box-shadow:0 14px 36px rgba(13,38,56,.14);overflow:hidden;border:1px solid #e1eaf0}
.home-page .home-search input{flex:1;border:0;outline:0;padding:15px 20px;font:inherit;color:#173247;min-width:0}
.home-page .home-search button{border:0;background:#1599ee;color:#fff;padding:0 26px;font:inherit;font-weight:900;cursor:pointer}
.home-page .search-result{position:relative;width:min(670px,92%);max-width:none;margin-top:10px;color:#167f82;font-size:12px;line-height:2;background:transparent}
.home-page .search-hit-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.home-page .search-hit-list a{display:flex;flex-direction:column;gap:2px;padding:9px 11px;border:1px solid #d8e5ea;border-radius:12px;background:rgba(255,255,255,.96);color:#173247;text-decoration:none;box-shadow:0 6px 18px rgba(0,0,0,.09)}
.home-page .search-hit-list a{min-width:0;max-width:100%;overflow:hidden}
.home-page .search-hit-list a b,.home-page .search-hit-list a span,.home-page .search-hit-list a small{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.home-page .search-hit-list a small{font-size:9px;color:#1689bd;font-weight:900}
.home-page .search-hit-list a b{font-size:11px;line-height:1.7}
.home-page .search-hit-list a span{font-size:9px;color:#6b7f8b;line-height:1.6}
.home-page .search-count{margin-top:5px;text-align:center;font-size:10px;color:#70838d}
.home-page .search-chips{width:min(670px,92%);display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;margin:12px auto 0;position:relative;z-index:11}
.home-page .search-chips button{border:1px solid #d7e5ea;background:rgba(255,255,255,.78);border-radius:999px;padding:6px 11px;color:#4c6472;font:inherit;font-size:11px;cursor:pointer}
.home-page .search-chips button:hover{background:#fff;border-color:#9bc6cf}

@media(max-width:1200px) and (min-width:901px){
  .home-page .quick-grid{width:94%;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
}
@media(max-width:900px){
  .home-page .home-hero-modern{height:auto;min-height:0;overflow:visible;padding:0 0 26px}
  .home-page .home-bg{height:570px}
  .home-page .home-bg-overlay{background:linear-gradient(180deg,rgba(7,28,43,.38) 0%,rgba(7,28,43,.62) 35%,rgba(247,251,252,.97) 78%,#f7fbfc 100%)}
  .home-page .home-hero-content{padding:48px 4% 0}
  .home-page .home-hero-content h1{white-space:normal;font-size:clamp(34px,7vw,48px);line-height:1.45}
  .home-page .home-hero-content>p{font-size:14px;line-height:2;margin-bottom:18px}
  .home-page .quick-links{margin-top:28px}
  .home-page .quick-grid{width:92%;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .home-page .quick-grid a{min-height:116px;height:116px;padding:12px 9px}
  .home-page .home-search{height:54px}
  .home-page .home-search button{padding:0 16px}
  .home-page .search-hit-list{grid-template-columns:1fr}
}
@media(max-width:520px){
  .home-page .home-bg{height:535px}
  .home-page .home-hero-content{padding:42px 14px 0}
  .home-page .home-hero-kicker{font-size:11px;gap:10px}
  .home-page .home-hero-kicker i{width:36px}
  .home-page .home-hero-content h1{font-size:32px;line-height:1.5;letter-spacing:-.6px}
  .home-page .home-hero-content>p{width:96%;font-size:12.5px}
  .home-page .quick-links{margin-top:24px}
  .home-page .quick-grid{width:calc(100% - 28px);grid-template-columns:1fr;gap:8px}
  .home-page .quick-grid a{min-height:104px;height:104px;border-radius:16px;padding:12px 10px}
  .home-page .quick-grid i{font-size:21px}
  .home-page .quick-grid b{font-size:12px}
  .home-page .quick-grid small{font-size:9px}
  .home-page .home-search{height:52px;border-radius:14px}
  .home-page .home-search input{padding:11px 12px;font-size:12px}
  .home-page .home-search button{padding:0 13px;font-size:11px}
  .home-page .search-chips{gap:7px}
  .home-page .search-chips button{font-size:10px;padding:6px 9px}
}

/* v96 SEO topic cluster navigation */
.seo-topic-panel{margin:38px 0;padding:24px;border:1px solid #dce7eb;border-radius:16px;background:#f7fafb}.seo-topic-panel>h2{margin-top:0}.seo-topic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}.seo-topic-grid a{display:flex;flex-direction:column;gap:4px;padding:14px;border:1px solid #dce7eb;background:#fff;border-radius:12px;text-decoration:none}.seo-topic-grid b{color:#173247;font-size:14px}.seo-topic-grid span{color:#6e808a;font-size:12px;line-height:1.8}.lesson-nav{width:min(1120px,92%);display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:14px;margin:38px auto 10px;direction:ltr}.lesson-nav a{display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:54px;padding:12px 16px;border:1px solid #dbe5e9;border-radius:12px;background:#fff;text-decoration:none;overflow:hidden}.lesson-nav a,.lesson-nav .lesson-nav-empty{direction:rtl}.lesson-nav a:first-child{text-align:left;align-items:flex-start}.lesson-nav a:last-child{text-align:right;align-items:flex-end}.lesson-nav small{display:block;color:#80919a;font-size:10px;line-height:1.5;margin-bottom:3px}.lesson-nav b{display:block;max-width:100%;color:#167f82;font-size:13px;line-height:1.6;overflow-wrap:anywhere;white-space:normal}.lesson-nav-empty{min-height:54px}.lesson-nav-select{display:flex;align-items:center;justify-content:center}.lesson-nav-select select{min-width:92px;height:46px;padding:0 34px 0 12px;border:1px solid #dbe5e9;border-radius:12px;background:#fff;color:#173247;font:inherit;font-size:14px;font-weight:800;text-align:center;text-align-last:center;cursor:pointer;outline:none}.lesson-nav-select select:focus{border-color:#2f8fb0;box-shadow:0 0 0 3px rgba(47,143,176,.12)}.lesson-related{margin:24px auto;padding:20px;width:min(1120px,92%);border-top:1px solid #dde7eb;background:#fafcfd;border-radius:12px}.lesson-related h2{margin-top:0!important}.lesson-related ul{margin:0;padding-right:20px}.lesson-related li{margin:7px 0}@media(max-width:600px){.seo-topic-grid{grid-template-columns:1fr}.lesson-nav{grid-template-columns:1fr auto 1fr;gap:8px}.lesson-nav a{padding:10px 9px}.lesson-nav b{font-size:11px}.lesson-nav select{min-width:76px}.lesson-nav-select select{min-width:76px;padding-right:8px;padding-left:8px;font-size:12px}.lesson-nav small{font-size:9px}}


/* v99 — mobile Hero: keep cards and search over the Hero image; remove the large blank gap */
@media(max-width:800px){
  .home-page .home-hero-modern{min-height:900px!important;padding-bottom:20px!important}
  .home-page .home-bg{height:900px!important}
  .home-page .home-bg-overlay{background:linear-gradient(180deg,rgba(7,28,43,.42) 0%,rgba(7,28,43,.68) 42%,rgba(247,250,251,.82) 86%,rgba(247,250,251,.98) 100%)!important}
  .home-page .home-hero-content{padding:42px 4% 0!important;min-height:0!important}
  .home-page .quick-links{margin-top:14px!important}
  .home-page .home-search-wrap{margin-top:14px!important}
  .home-page .search-chips{margin-top:10px!important;margin-bottom:0!important}
}
@media(max-width:520px){
  .home-page .home-hero-modern{min-height:900px!important}
  .home-page .home-bg{height:900px!important}
  .home-page .home-hero-content{padding-top:38px!important}
  .home-page .quick-links{margin-top:12px!important}
  .home-page .home-search-wrap{margin-top:12px!important}
}

/* v100 — mobile Hero order: search/chips above the cards, all inside the image */
@media(max-width:800px){
  .home-page .home-hero-modern{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
  }
  .home-page .home-bg{
    height:auto!important;
    top:0!important;
    bottom:0!important;
    left:0!important;
    right:0!important;
  }
  .home-page .home-hero-content{order:1!important}
  .home-page .home-search-wrap{order:2!important;margin-top:14px!important}
  .home-page .search-chips{order:3!important}
  .home-page .quick-links{order:4!important;margin-top:14px!important}
}
@media(max-width:520px){
  .home-page .home-search-wrap{margin-top:10px!important}
  .home-page .search-chips{margin-top:9px!important}
  .home-page .quick-links{margin-top:12px!important}
}
