/* FP Galaxy 2.0.5 — compact footer, uniform homepage images, tighter desktop spacing, readable bands.
   Palette: deep green #003028/#00281A, gold #A67E39/#EECB92, paper #F7F4EC. Explicit colours (no variables)
   so dark bands never depend on custom properties. Loaded last. */

/* ---------- Dark bands: never transparent (white text was invisible on the light page) ---------- */
html body .sec.media,
html body section.media{background:#003028 linear-gradient(180deg,#184137 0%,#06322D 42%,#003028 78%,#00281A 100%)!important;color:#F7F4EC}
html body .media .sec-head h2{color:#F7F4EC!important}
html body .media .sec-head .more{color:#EECB92!important}
html body .toolbox{background-color:#003028}
html body .next-bar{background:#003028 linear-gradient(180deg,#184137 0%,#003028 100%)!important}

/* ---------- Footer ---------- */
html body footer.site-footer.fpf{margin-top:28px;font-size:14px;line-height:1.85}
html body .site-footer.fpf .fpf-wrap{max-width:1240px;margin-inline:auto;padding-block:30px 14px}
html body .fpf-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.9fr) minmax(0,1.2fr) minmax(0,1.1fr);gap:28px 36px;align-items:start}
html body .fpf-col{min-width:0}
html body .site-footer.fpf h3{font-size:15px;font-weight:800;margin:4px 0 12px;padding-bottom:8px;color:#EECB92!important;border-bottom:1px solid rgba(166,126,57,.35)}
html body .site-footer.fpf ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
html body .site-footer.fpf li a{display:inline-block;padding-block:3px;text-decoration:none}
html body .site-footer.fpf .flogo{margin:0 0 10px}
html body .site-footer.fpf .flogo img,
html body .site-footer.fpf .logo-official.logo-footer{height:56px!important;max-height:56px!important}
html body .site-footer.fpf .brand-name{font-size:22px}
html body .fpf-about{margin:0 0 12px;font-size:13.5px;line-height:1.9;color:#F1E5C8!important;text-align:start!important;max-width:34em}
html body .fpf-social{display:flex;flex-wrap:wrap;gap:6px}
html body .fpf-social a{display:inline-flex;align-items:center;min-height:32px;padding:2px 12px;border:1px solid rgba(238,203,146,.45);border-radius:999px;font-size:13px;color:#EECB92!important}
html body .fpf-social a:hover{background:#A67E39;color:#00281A!important;border-color:#A67E39}
html body .fpf-cols2{grid-template-columns:1fr 1fr;column-gap:16px}
html body .fpf-contact-list li{display:flex;flex-direction:column;line-height:1.5;margin-bottom:8px}
html body .fpf-contact-list li span{font-size:12px;color:#C8C2B3!important}
html body .fpf-contact-list li a{font-weight:700;color:#F7F4EC!important;padding:0;text-align:start;unicode-bidi:plaintext}
html body .fpf-seal{position:relative;display:inline-block;margin-top:6px;line-height:0}
html body .fpf-seal .fp-ershad-box{display:block!important;margin:0!important;padding:0!important;border:0!important;background:none!important;width:auto!important}
html body .fpf-seal .fp-ershad-t,
html body .site-footer .fp-ershad-t{display:none!important}
html body .fpf-seal #div_eRasanehTrustseal_83021{min-width:72px;min-height:72px;background:#fff;border-radius:10px;padding:5px;line-height:0;box-shadow:0 0 0 1px rgba(166,126,57,.5)}
html body .fpf-seal #div_eRasanehTrustseal_83021 img{max-width:84px;height:auto}
html body .fpf-seal-link{position:absolute;inset:0;z-index:3;border-radius:10px}
html body .fpf-seal-link:focus-visible{outline:2px solid #EECB92;outline-offset:2px}
html body .site-footer.fpf .fbottom{margin-top:20px;padding-top:12px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 16px;font-size:12.5px}
html body .site-footer.fpf .fbottom .f-credit{width:auto;order:3;flex:1 1 100%;text-align:center;margin:0;color:#F1E5C8!important}
html body .site-footer.fpf .fbottom a{color:#EECB92!important}
@media (max-width:1024px){
  html body .fpf-grid{grid-template-columns:1fr 1fr;gap:22px 28px}
}
@media (max-width:640px){
  html body .site-footer.fpf .fpf-wrap{padding-block:24px 12px}
  html body .fpf-grid{grid-template-columns:1fr 1fr;gap:18px 18px}
  html body .fpf-brand,html body .fpf-contact,html body .fpf-cats{grid-column:1/-1}
  html body .fpf-cols2{grid-template-columns:1fr 1fr 1fr;column-gap:10px}
  html body .fpf-quick{grid-column:1/-1}
  html body .site-footer.fpf .fpf-quick ul{display:grid;grid-template-columns:1fr 1fr;column-gap:10px}
  html body .site-footer.fpf .fbottom{justify-content:center;text-align:center}
}

/* ---------- Homepage: uniform card images (same 16:9 frame, cropped from the centre, never stretched) ---------- */
body.home .thumb,
body.home .lead .thumb,
body.home .g3 .thumb,
body.home .g3 .big .thumb,
body.home .mcard .thumb,
body.home .nw-card .thumb,
body.home .advert .thumb{aspect-ratio:16/9!important;height:auto!important;width:100%}
body.home .thumb img,
body.home .archive-home-grid img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center;display:block}
body.home .second{align-items:stretch}
body.home .second .card,
body.home .g3 > *{display:flex;flex-direction:column;min-width:0}
/* University/innovation row: three equal columns so the three photos are the same size */
@media (min-width:901px){
  body.home .g3{grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:start}
  body.home .g3 .big .t{font-size:19px}
  body.home .feed .thumb{aspect-ratio:16/9!important}
}
/* «از آرشیو: خبرهای مهم»: full 16:9 photos, equal-height cards */
body.home .archive-home-grid{align-items:stretch}
body.home .archive-home-grid article{display:flex;flex-direction:column;height:100%;overflow:hidden;border-radius:10px}
body.home .archive-home-grid article > a:first-child,
body.home .archive-home-grid .thumb,
body.home .archive-home-grid figure{display:block;aspect-ratio:16/9;overflow:hidden;margin:0}
body.home .archive-home-grid img{aspect-ratio:16/9;height:auto!important}
/* Phones keep the existing square list thumbnails (uniform among themselves) */
@media (max-width:640px){
  body.home .second .card .thumb,
  body.home .feed .thumb{aspect-ratio:1/1!important}
  body.home .archive-home-grid{grid-template-columns:1fr 1fr!important;gap:12px}
}

/* ---------- Homepage: tighter vertical rhythm on desktop ---------- */
@media (min-width:901px){
  body.home .sec{padding-block:22px}
  body.home .sec-head{margin-bottom:14px}
  body.home .sec-first{margin-top:6px}
  body.home .sec.media{margin-top:12px;padding-block:24px}
  body.home .sec.opinion{margin-top:12px}
  body.home .dossier{padding-block:14px}
  body.home main .ad{margin-block:14px}
  body.home .archive-home{margin:8px 0 12px;padding-top:14px}
  body.home .top{padding-top:14px}
}

/* ---------- «معلم خبرنگار» band: compact, dark green, readable ---------- */
html body .teacher-cta,
html body .teacher-cta.fpt{display:flex!important;align-items:center;justify-content:space-between;gap:16px 24px;flex-wrap:nowrap;
  margin:14px 0!important;padding:16px 22px!important;border-radius:12px;
  background:#003028 linear-gradient(180deg,#184137 0%,#06322D 42%,#003028 78%,#00281A 100%)!important;
  color:#F7F4EC!important;border:0;border-inline-start:6px solid #A67E39;box-shadow:0 10px 24px -18px rgba(0,40,26,.6)}
html body .teacher-cta .fpt-text{min-width:0;flex:1 1 auto}
html body .teacher-cta h2{margin:0 0 4px!important;font-size:19px;font-weight:800;line-height:1.5;color:#EECB92!important;background:none!important}
html body .teacher-cta p{margin:0!important;font-size:14.5px;line-height:1.9;color:#F7F4EC!important;background:none!important;text-align:start!important;max-width:60em}
html body .teacher-cta .btn,
html body .teacher-cta .fpt-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 26px;border-radius:999px;
  background:linear-gradient(135deg,#F1E5C8 0%,#EECB92 22%,#A67E39 50%,#B4793F 70%,#6A4824 100%)!important;color:#00281A!important;
  font-weight:800;font-size:15px;white-space:nowrap;text-decoration:none;border:0}
html body .teacher-cta .btn:hover{filter:brightness(1.08)}
@media (max-width:640px){
  html body .teacher-cta,html body .teacher-cta.fpt{flex-direction:column;align-items:stretch;text-align:start;padding:16px!important}
  html body .teacher-cta .btn{width:100%}
}
