/* Component & layout fixes (logo, course anchors, footer, mobile hero, desktop layout) */
/* ---- academy logo (emblem) ---- */
.brand .ay-logo{height:46px;width:auto;aspect-ratio:417/542;display:block;flex:0 0 auto;color:#fff;transition:transform .25s ease,filter .25s ease,height .3s ease}
.site-header.is-stuck .brand .ay-logo{height:40px}
.brand:hover .ay-logo,.brand:focus-visible .ay-logo{transform:translateY(-1px) scale(1.03);filter:drop-shadow(0 5px 14px rgba(200,138,61,.28))}
.f-brand .f-logo{display:inline-flex;color:#fff;flex:0 0 auto}
.f-brand .f-logo svg{display:block;width:30px;height:39px}
@media (max-width:760px){.brand .ay-logo{height:38px}.site-header.is-stuck .brand .ay-logo{height:34px}}
.brand{cursor:pointer}

/* ---- course-anchor-style ---- */
html{scroll-behavior:smooth}
.course[id]{scroll-margin-top:7rem}
.drawer-course-group{display:grid;gap:.35rem}
.drawer-course-group .drawer-parent{margin-bottom:.1rem}
.drawer-courses{display:grid;gap:.15rem;padding:0 .8rem .65rem 0;border-inline-start:1px solid rgba(193,122,61,.28)}
.drawer-courses a{font-size:.9rem;color:var(--muted);padding:.55rem .8rem;transition:color .2s ease,transform .2s ease}
.drawer-courses a:hover,.drawer-courses a:focus-visible{color:var(--copper);transform:translateX(-3px)}
@media (max-width:640px){.course[id]{scroll-margin-top:5.5rem}}

/* ---- footer-contact-polish ---- */
.footer-contact .contact-phone,
.footer-contact .phone,
.footer-contact a[href^="tel:"]{
  display:block;
  width:100%;
  text-align:right !important;
  direction:ltr;
}
.footer-contact .contact-item,
.footer-contact .contact-row{
  text-align:right !important;
}
.bm-credit{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  color:inherit;
  text-decoration:none;
  transition:color .2s ease, opacity .2s ease;
}
.bm-credit:hover,.bm-credit:focus-visible{
  color:var(--copper,#C59A2E);
  opacity:1;
}

/* ---- mobile-hero-image-fix ---- */
@media (max-width: 768px){
  .hero{
    background-image:
      linear-gradient(180deg, rgba(8,7,6,.22) 0%, rgba(8,7,6,.48) 58%, rgba(8,7,6,.88) 100%),
      url("../images/profile/ali-yousefi-portrait.jpg") !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
  }
}

/* ---- footer-phone-right-fix ---- */
footer .phone,
footer .contact-phone,
footer a[href^="tel:"],
footer [class*="phone"],
.footer .phone,
.footer .contact-phone,
.footer a[href^="tel:"],
.contact .phone,
.contact .contact-phone,
.contact a[href^="tel:"]{
  display:block !important;
  width:100% !important;
  text-align:right !important;
  direction:ltr !important;
  margin-left:0 !important;
  margin-right:0 !important;
}
footer .contact-item,
footer .contact-row,
.footer .contact-item,
.footer .contact-row{
  text-align:right !important;
  align-items:flex-start !important;
  justify-items:start !important;
}

/* ---- inline-patch ---- */
.footer-phone-number{display:block!important;width:100%!important;text-align:right!important;direction:ltr!important}

/* ---- desktop-hero-split-layout ---- */
/* Desktop: portrait on the left, hero copy on the right — never underneath the text. */
@media (min-width: 901px){
  .hero{
    min-height: 760px;
  }

  .hero-scene{
    left: 0 !important;
    right: auto !important;
    width: 50% !important;
    height: 100% !important;
    z-index: 0 !important;
    pointer-events: none;
  }

  .hero-scene .scene-photo{
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    height: 94% !important;
    max-width: 100% !important;
    max-height: 94% !important;
    object-fit: contain !important;
    object-position: center bottom !important;
    filter: drop-shadow(0 35px 70px rgba(0,0,0,.55));
  }

  .hero-scrim{
    z-index: 1 !important;
    background:
      linear-gradient(90deg,
        rgba(16,13,10,.05) 0%,
        rgba(16,13,10,.16) 34%,
        rgba(16,13,10,.72) 54%,
        rgba(16,13,10,.98) 72%,
        rgba(16,13,10,1) 100%) !important;
  }

  .hero-in{
    position: relative;
    z-index: 2;
    align-items: stretch !important;
    text-align: right !important;
    justify-content: center !important;
    min-height: 760px !important;
    padding-top: 8rem !important;
    padding-bottom: 4rem !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }

  .hero-kicker,
  .hero h1,
  .hero-lede,
  .hero-cta,
  .hero-foot{
    width: min(52%, 680px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-self: flex-start !important;
  }

  /* Make the circled hero information row span the full available width. */
  .hero-foot{
    width: 100% !important;
    max-width: none !important;
  }

  .hero-kicker{
    justify-content: flex-start !important;
    align-self: flex-start !important;
  }

  .hero h1{
    max-width: 680px !important;
    margin-inline: 0 !important;
    align-self: flex-start !important;
    text-align: right !important;
  }

  .hero-lede{
    max-width: 560px !important;
    margin-inline: 0 !important;
    align-self: flex-start !important;
    text-align: right !important;
  }

  .hero-cta{
    justify-content: flex-start !important;
    align-self: flex-start !important;
  }

  .hero-foot{
    align-items: flex-start !important;
    justify-content: flex-start !important;
    align-self: flex-end !important;
    text-align: right !important;
  }

  .hero-foot .ticks{
    justify-content: flex-start !important;
  }

  .hero-foot .scroll-cue{
    align-self: flex-start !important;
  }
}

/* ---- desktop-all-courses-single-row ---- */
@media (min-width:1081px){
  #courses .course-grid{
    grid-template-columns:1fr !important;
    gap:1.4rem !important;
  }

  #courses .course,
  #courses .course.lead-card{
    grid-column:1 / -1 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1.05fr) minmax(0,1fr) !important;
    min-height:340px;
  }

  #courses .course .art,
  #courses .course.lead-card .art{
    grid-column:1;
    grid-row:1;
    aspect-ratio:auto !important;
    min-height:340px !important;
    height:100%;
  }

  #courses .course .txt{
    grid-column:2;
    grid-row:1;
    min-height:340px;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }

  /* Keep the RTL visual order identical to the first card:
     text on the right and artwork on the left. */
  #courses .course .art{order:1}
  #courses .course .txt{order:2}
}

/* ---- footer-contact-alignment ---- */
.site-footer .footer-contact-col > a{
  display:block;
  font-size:var(--t-small);
  padding-block:.4rem;
  color:#B2BAC4;
  line-height:1.55;
  transition:color .25s var(--ease),transform .25s var(--ease);
}
.site-footer .footer-contact-col > a:hover{
  color:#E2C76B;
  transform:translateX(-3px);
}
.site-footer .footer-contact-col .footer-address-link{
  margin-top:0 !important;
}
.site-footer .socials{
  flex-wrap:wrap;
  align-items:center;
}

