/* Home page only: deep-teal full-screen sections, glass cards, outlined buttons, side dots.
   Loaded after site.css. Remove the @push/@section lines in pages/home.blade.php to switch it off. */

.fp-page { --fp-top: calc(var(--announce-h, 0px) + var(--header-h)); --teal: #23c9c6; scroll-padding-top: var(--fp-top); }
.fp-page[data-theme="dark"] { --paper: #03303c; --surface: #0b3b48; }
body.fp { background: #03303c; }

/* ---------- Fixed chrome ---------- */
.fp .topbar, .fp .theme-toggle { display: none; }
.fp .announce { position: fixed; top: 0; inset-inline: 0; z-index: 55; }
.fp .site-header { position: fixed; inset-inline: 0; top: var(--announce-h, 0px); }
.fp .site-header, .fp .site-header.is-scrolled { background: rgba(38,76,89,.96); border-color: transparent; }
.fp .site-header { transition: background .45s, box-shadow .45s; }
.fp .site-header:not(.is-scrolled) { background: linear-gradient(180deg, rgba(0,34,44,.55), rgba(0,34,44,0)); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.fp .site-header::after { display: none; }
.fp .site-header .main-nav > ul > li > a { padding-block: 10px; border-radius: 12px; }
.fp .site-header .main-nav > ul > li > a[aria-current="page"] { background: rgba(255,255,255,.1); }
.fp .site-header .main-nav a::after { display: none; }
.fp .site-header .main-nav .sub { background: rgba(9,52,64,.98); border-color: rgba(255,255,255,.14); }
.fp .site-header .header-cta { --bg: transparent; --bd: rgba(255,255,255,.75); --fg: #fff; }
.fp .site-header .header-cta:hover { --bg: #fff; --bd: #fff; --fg: #04303c; }
@media (min-width: 1241px) { .fp .menu-toggle { display: none; } }

/* ---------- Buttons ---------- */
.fp main .btn { border-radius: 16px; }
.fp main .btn-primary, .fp main .btn-ghost, .fp main .btn-light { --bg: transparent; --bd: rgba(255,255,255,.65); --fg: #fff; }
.fp main .btn-primary:hover, .fp main .btn-ghost:hover, .fp main .btn-light:hover { --bg: #fff; --bd: #fff; --fg: #04303c; }

/* ---------- Slides ---------- */
.fp main > .section { content-visibility: visible; contain-intrinsic-size: none; }
.fp main > section:not(.hs) { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  min-height: 100vh; min-height: 100svh; padding-block: calc(var(--fp-top) + clamp(16px, 3vh, 40px)) clamp(24px, 4vh, 48px); color: #fff; }

.fp main { --surface: rgba(255,255,255,.055); --sand: #1f4654; --line: rgba(255,255,255,.12); --line-soft: rgba(255,255,255,.08);
  --heading: #fff; --heading-2: #e3f1f3; --ink: #eaf4f5; --ink-2: #c3d9dd; --ink-3: #99b8bf; --body-ink: #dcebed; --link: #7fdcda; }
.fp main > section:not(.hs):not(.books-dark):not(.podcast-band) { background: radial-gradient(1100px 600px at 80% 0%, rgba(40,150,165,.22), transparent 65%), linear-gradient(165deg, #04404f, #022b36); }
/* every other slide carries the dotted pattern */
.fp main > section.section-sand { background: #1f4654 !important; }
.fp main > section.section-sand::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.085) 28%, transparent 32%); background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, transparent 5%, #000); mask-image: linear-gradient(180deg, transparent 5%, #000); }
.fp main > section.books-dark, .fp main > section.podcast-band { background: radial-gradient(900px 520px at 15% 10%, rgba(35,201,198,.16), transparent 65%), linear-gradient(160deg, #043a49, #01222b) !important; }

.fp main .section-head { margin-bottom: clamp(20px, 3.5vh, 40px); }
.fp main .section-head h2, .fp main .bd-head h2, .fp main .academy-head h2 { color: #fff; }
.fp main .eyebrow { color: var(--teal); }

/* glass cards */
.fp main .brand-card, .fp main .sector-card, .fp main .program-card, .fp main .post-card, .fp main .project-card, .fp main .media-card {
  background: rgba(2,28,36,.42); border-color: rgba(255,255,255,.1); border-radius: 28px; box-shadow: 0 30px 50px -36px rgba(0,0,0,.8);
  transition: transform .4s var(--ease), background .4s, border-color .4s; }
.fp main .brand-card:hover, .fp main .sector-card:hover, .fp main .program-card:hover, .fp main .post-card:hover, .fp main .project-card:hover, .fp main .media-card:hover {
  transform: translateY(-6px); background: rgba(2,28,36,.7); border-color: rgba(35,201,198,.45); }

/* ---------- Side dots ---------- */
.fp-dots { position: fixed; z-index: 45; right: clamp(6px, 1.4vw, 24px); top: 50%; translate: 0 -50%; display: grid; justify-items: center; gap: 4px; }
.fp-dot { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.fp-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 4px rgba(0,0,0,.35); transition: width .35s var(--ease), height .35s var(--ease), background .35s; }
.fp-dot:hover::before { background: #fff; }
.fp-dot[aria-current="true"]::before { width: 16px; height: 16px; background: #fff; }
@media (max-width: 767px) { .fp-dots { right: 0; gap: 0; } .fp-dot { width: 14px; height: 20px; } .fp-dot::before { width: 5px; height: 5px; } .fp-dot[aria-current="true"]::before { width: 9px; height: 9px; } }

/* Touch screens: gentle native snapping (mouse and trackpad are handled in home.js) */
@media (pointer: coarse) {
  .fp-page { scroll-snap-type: y proximity; scroll-padding-top: 0; }
  .fp main > section, .fp .site-footer { scroll-snap-align: start; }
}

/* ---------- Hero ---------- */
.fp .hs { background: #033846; min-height: max(620px, 100vh); min-height: max(620px, 100svh); padding-top: var(--fp-top); }
.fp .hs-media { background: linear-gradient(160deg, #05485a, #022b36); }
.fp .hs-video, .fp .hs-poster { filter: saturate(.55) contrast(1.05); }
.fp .hs-veil { background:
    linear-gradient(270deg, rgba(0,42,54,.9) 0%, rgba(0,54,68,.76) 45%, rgba(0,56,70,.68) 100%),
    linear-gradient(180deg, rgba(0,30,40,.55), transparent 30%, rgba(0,34,44,.78)); }
.fp .hs--video .hs-word, .fp .hs-dots { display: none; }
.fp .hs-kicker { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.22); color: #fff; }
.fp .hs-kicker::before { background: var(--teal); box-shadow: 0 0 0 4px rgba(35,201,198,.22); }
.fp .hs-name-en { color: #fff; }
.fp .hs-name-en::after { background: linear-gradient(270deg, var(--teal), transparent); }
.fp .hs-slides { border: 0; padding: 0; }
.fp .hs-btn { min-height: 48px; padding-inline: 1.7em; border-radius: 16px; --bd: rgba(255,255,255,.8); }
.fp .hs-btn:hover { --bg: #fff; --bd: #fff; --fg: #04303c; }
.fp .hs-arrow:hover { background: #fff; border-color: #fff; color: #04303c; }
.fp .hs-creds .icon { color: var(--teal); }
.fp .hs-panel { padding: clamp(18px, 3vh, 30px); border-radius: 30px; background: rgba(4,32,42,.42); border-color: rgba(255,255,255,.1); }
.fp .hs-panel-title { font-size: 1.15rem; }
.fp .hs-panel li { border: 0; padding-block: clamp(7px, 1.4vh, 13px); }
.fp .hs-ticker .marquee { background: rgba(0,92,122,.55); border-color: transparent; }
.fp .hs-scroll { background: rgba(201,164,104,.42); color: #ffd27a; }
.fp .hs-scroll { display: grid; }
@media (min-width: 900px) {
  .fp .hs--video .hs-grid { grid-template-columns: minmax(0, 1.25fr) minmax(300px, 430px); gap: clamp(32px, 7vw, 120px); }
  .fp .hs--video .hs-panel { grid-column: auto; justify-self: end; width: 100%; }
  .fp .hs--video .hs-panel ul { grid-template-columns: 1fr; }
  .fp .hs--video .hs-headline { font-size: clamp(1.4rem, min(2.4vw, 4.2vh), 2.2rem); line-height: 1.75; max-width: 30ch; }
}
@media (max-width: 899px) { .fp .hs--video .hs-grid { grid-template-columns: 1fr; } }
@media (min-width: 768px) and (max-height: 800px) { .fp .hs-scroll, .fp .hs-creds { display: none; } }

/* ---------- Footer: last slide ---------- */
.fp .site-footer { content-visibility: visible; contain-intrinsic-size: none; background: radial-gradient(900px 420px at 85% 0%, rgba(35,201,198,.12), transparent 60%), linear-gradient(160deg, #032f3b, #01171e); }

/* ---------- Fit desktop slides into one screen ---------- */
@media (min-width: 992px) and (max-height: 900px) {
  .fp main > section:not(.hs) { padding-block: calc(var(--fp-top) + 12px) 20px; }
  .fp main .section-head h2 { margin-top: 2px; }
}

@media (min-width: 900px) {
  .fp .hs-grid { padding-block: clamp(8px, 2vh, 32px) clamp(6px, 1.5vh, 20px); }
  .fp .hs-copy { gap: clamp(6px, 1.2vh, 14px); }
  .fp .hs-name { font-size: clamp(2.8rem, min(5.6vw, 9vh), 5.8rem); }
  .fp .hs--video .hs-headline { font-size: clamp(1.15rem, min(2vw, 3vh), 2rem); line-height: 1.8; max-width: 36ch; }
  .fp .hs-slide { gap: clamp(8px, 1.6vh, 18px); }
  .fp .hs-btn { min-height: 44px; }
}

.fp main .sector-icon { background: rgba(35,201,198,.14); color: var(--teal); }

/* Desktop: denser cards so each section reads as one screen (home.js scales the remainder) */
@media (min-width: 992px) {
  .fp .brand-stage { height: clamp(110px, 17vh, 190px); }
  .fp .brand-stage img { max-height: 72%; }
  .fp .brand-body { padding: 16px 22px; }
  .fp .brand-card h3 { font-size: 1.12rem; }
  .fp .brand-body p { margin-top: 6px; font-size: .85rem; line-height: 1.85; }

  .fp .sectors-title { margin-bottom: 14px; }
  .fp .sector-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .fp .sector-card { padding: 16px; }
  .fp .sector-card header { margin-bottom: 10px; padding-bottom: 10px; }
  .fp .org-list { gap: 6px; }
  .fp .org-list li { padding: .22em .7em; font-size: .8rem; }

  .fp .bd-head { margin-bottom: 12px; align-items: center; }
  .fp .books-dark .series-box { padding: 12px 18px; }
  .fp .books-dark .series-box p { margin-top: 4px; font-size: .8rem; line-height: 1.8; }
  .fp .bk-stage { aspect-ratio: auto; height: clamp(140px, 25vh, 250px); }
  .fp .bk-stage .bk-img { width: 100%; height: 100%; object-fit: contain; }
  .fp .bk-info { gap: 4px; }
  .fp .bk-info h3 { font-size: .92rem; }
  .fp .bk-info p { font-size: .78rem; line-height: 1.75; }
  .fp .books-dark .center-actions { margin-top: 14px; }

  .fp .academy-head { margin-bottom: 14px; }
  .fp .topic-chips { margin-bottom: 18px; }
  .fp .program-cover { aspect-ratio: 16 / 8; }
  .fp #academy .center-actions { margin-top: 18px; }
}
@media (min-width: 992px) and (max-height: 880px) {
  .fp .hs-creds { display: none; }
  .fp .hs-name { font-size: clamp(2.6rem, 8vh, 4.6rem); }
  .fp .hs-kicker { font-size: .74rem; }
  .fp .hs-tagline { font-size: .95rem; margin-top: 0; }
  .fp .hs-ticker .marquee-track li { padding-block: 8px; }
}

/* logo plates keep the whole logo on short screens; slider arrows sit beside the button */
@media (min-width: 992px) {
  .fp .brand-stage img { max-height: clamp(78px, 12.5vh, 130px); }
  .fp .hs-arrows { inset-inline-end: auto; inset-inline-start: 250px; bottom: 5px; }
}
.fp .hs-scroll { background: rgba(201,164,104,.6); color: #ffe2a8; }

.fp #academy .cards-3 > :nth-child(n+4) { display: none; } /* home shows three; the rest is behind «مشاهده‌ی همه» */

/* short laptop screens (e.g. 1366×768): keep the whole hero, ticker included, on one screen */
@media (min-width: 992px) and (max-height: 720px) {
  .fp .hs { min-height: max(540px, 100vh); min-height: max(540px, 100svh); }
  .fp .hs-name { font-size: clamp(2.2rem, 7vh, 3.6rem); }
  .fp .hs-scroll { display: none; }
  .fp .hs-lockup { width: 300px; }
  .fp .hs-copy { gap: 4px; }
  .fp .hs--video .hs-headline { font-size: 1.1rem; line-height: 1.75; }
  .fp .hs-panel { padding: 14px 18px; }
  .fp .hs-panel li { padding-block: 5px; }
  .fp .hs-ticker { margin-bottom: 10px; }
}
@media (max-width: 767px) { .fp .hs-creds { display: none; } }

/* consultation link in the hero: outline icon (the demo play icon was a filled shape) */
.hs-demo.hs-consult .icon { fill: none; stroke: currentColor; padding: 6px; }

/* ---------- Hero side column: rotating headline above the «در یک نگاه» panel ---------- */
.fp .hs-side { position: relative; z-index: 2; display: flex; flex-direction: column; gap: clamp(12px, 2.4vh, 28px); min-width: 0; }
.fp .hs-side .hs-slides { margin: 0; max-width: none; }
.fp .hs-side .hs-headline { margin: 0; max-width: none; }
@media (max-width: 767px) { .fp .hs-side { padding-bottom: 8px; } }
@media (min-width: 900px) {
  .fp .hs-side { justify-self: end; width: 100%; }
  .fp .hs--video .hs-side .hs-headline { font-size: clamp(1.1rem, min(1.7vw, 2.8vh), 1.65rem); line-height: 1.8; max-width: none; }
  .fp .hs-side .hs-arrows { inset-inline-start: auto; inset-inline-end: 0; bottom: 5px; }
}
/* up to full-HD-ish heights the four figures go two by two, so both blocks fit one screen */
@media (min-width: 900px) and (max-height: 949px) {
  .fp .hs--video .hs-side .hs-panel ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
  .fp .hs-side .hs-panel { padding: 16px 18px; border-radius: 24px; }
  .fp .hs-side .hs-panel-title { margin-bottom: 8px; font-size: 1rem; }
  .fp .hs-side .hs-panel li { gap: 8px; padding-block: 7px; font-size: .8rem; }
  .fp .hs-side .hs-panel-icon { width: 32px; height: 32px; }
  .fp .hs-side .hs-btn-block { margin-top: 8px; min-height: 40px; }
}
.fp .hs-side .hs-panel { align-self: stretch; width: 100%; }
/* headlines differ in length: anchor them to the bottom so the button always sits beside the arrows, right above the panel */
@media (min-width: 768px) { .fp .hs-side .hs-slide { justify-content: flex-end; } }

/* ---------- Hero: rotating professional titles ---------- */
.fp .hs-roles { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(8px, 1.6vh, 16px); margin-top: 6px; }
.fp .hs-roles-list { list-style: none; margin: 0; padding: 0; display: grid; }
.fp .hs-roles-list li { padding-inline-start: 14px; border-inline-start: 3px solid var(--teal); font-size: clamp(.92rem, min(1.2vw, 2.1vh), 1.12rem); font-weight: 700; line-height: 1.8; color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.35); }
.js .fp .hs-roles-list li { grid-area: 1 / 1; align-self: center; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s ease, transform .25s var(--ease), visibility 0s .25s; }
.js .fp .hs-roles-list li.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease .08s, transform .35s var(--ease) .08s, visibility 0s; }

.fp .hs-roles-nav { display: none; align-items: center; gap: 10px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.js .fp .hs-roles-nav { display: inline-flex; }
.fp .hs-roles-btn { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; transition: background .25s, color .25s, transform .25s var(--ease); }
.fp .hs-roles-btn:hover { background: #fff; color: #04303c; transform: scale(1.06); }
.fp .hs-roles-btn .icon { width: 14px; height: 14px; }
.fp .hs-roles-btn.is-prev .icon { transform: rotate(-90deg); }  /* RTL: previous points right */
.fp .hs-roles-btn.is-next .icon { transform: rotate(90deg); }
.fp .hs-roles-dots { display: flex; align-items: center; }
.fp .hs-roles-dot { position: relative; width: 14px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; transition: width .35s var(--ease); }
.fp .hs-roles-dot::before, .fp .hs-roles-dot::after { content: ""; position: absolute; top: 9px; right: 4px; height: 6px; border-radius: 6px; }
.fp .hs-roles-dot::before { left: 4px; background: rgba(255,255,255,.38); }
.fp .hs-roles-dot.is-active { width: 32px; }
.fp .hs-roles-dot.is-active::after { width: calc(100% - 8px); background: var(--teal); }
.fp .hs-roles.is-running .hs-roles-dot.is-active::after { animation: hs-roles-fill 2.2s linear both; } /* same as DELAY in site.js */
@keyframes hs-roles-fill { from { width: 6px; } to { width: calc(100% - 8px); } }

/* ---------- Hero: «سایت‌های مرتبط» glass menu ---------- */
.fp .hs-links { position: relative; align-self: stretch; width: 100%; padding: clamp(14px, 2.4vh, 24px); border-radius: 28px;
  background: linear-gradient(165deg, rgba(10,58,72,.68), rgba(2,26,35,.6));
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 40px 70px -40px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.1);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.fp .hs-links::before { content: ""; position: absolute; top: -1px; inset-inline: 18%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(35,201,198,.95), rgba(232,199,160,.85), transparent); }
.fp .hs-links-head { display: flex; align-items: center; gap: 12px; margin: 0 4px clamp(10px, 1.8vh, 18px); }
.fp .hs-links-head::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(35,201,198,.18), 0 0 14px rgba(35,201,198,.8); }
.fp .hs-links-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(270deg, rgba(255,255,255,.22), transparent); }
.fp .hs-links-head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #fff; white-space: nowrap; }

.fp .hs-links-list { display: grid; gap: clamp(6px, 1vh, 10px); }
.fp .hs-link { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: clamp(6px, 1.1vh, 11px); padding-inline-end: 12px; border-radius: 18px; color: #fff;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07);
  transition: background .35s, border-color .35s, transform .45s var(--ease), box-shadow .45s; }
.fp .hs-link::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: 0; transition: opacity .35s;
  background: linear-gradient(270deg, rgba(35,201,198,.2), rgba(35,201,198,.04) 60%, transparent); }
.fp .hs-link:hover, .fp .hs-link:focus-visible { transform: translateX(-5px); border-color: rgba(35,201,198,.5); background: rgba(255,255,255,.07); box-shadow: 0 18px 30px -22px rgba(0,0,0,.9); }
.fp .hs-link:hover::after, .fp .hs-link:focus-visible::after { opacity: 1; }
.fp .hs-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 18px; }

.fp .hs-link-icon { width: clamp(34px, 5vh, 44px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 13px; color: #7ce8e5;
  background: linear-gradient(145deg, rgba(35,201,198,.24), rgba(35,201,198,.06)); border: 1px solid rgba(35,201,198,.26);
  transition: background .35s, color .35s, border-color .35s; }
.fp .hs-link-icon .icon { width: 20px; height: 20px; }
.fp .hs-link:hover .hs-link-icon, .fp .hs-link:focus-visible .hs-link-icon { background: linear-gradient(145deg, #f0d7ad, #c9a468); border-color: transparent; color: #04303c; }
.fp .hs-link-label { font-size: .9rem; font-weight: 700; line-height: 1.7; }
.fp .hs-link-go { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.7);
  transition: background .35s, color .35s, border-color .35s, transform .45s var(--ease); }
.fp .hs-link-go .icon { width: 14px; height: 14px; }
.fp .hs-link:hover .hs-link-go, .fp .hs-link:focus-visible .hs-link-go { background: #fff; border-color: #fff; color: #04303c; transform: translateX(-2px); }

@media (prefers-reduced-motion: no-preference) {
  .fp .hs-link { animation: hs-link-in .7s var(--ease) backwards; animation-delay: calc(.25s + var(--i) * 90ms); }
}
@keyframes hs-link-in { from { opacity: 0; transform: translateX(-22px); } }
@media (min-width: 900px) and (max-height: 720px) {
  .fp .hs-link-label { font-size: .84rem; }
  .fp .hs-link-go { width: 26px; height: 26px; }
}

/* ticker text fades out before it reaches the pause button */
.fp .hs-ticker .marquee::after { display: block; right: 0; width: 84px; background: linear-gradient(270deg, #054a61 52%, rgba(5,74,97,0)); }
