/*
 * Agah Animated Footer — stylesheet
 * Namespaced under .agah-ftr so it never collides with theme/Elementor styles.
 *
 * Hover/entrance timing values were read directly off the live agahacademy.com
 * footer's own CSS. On desktop (a real hover-capable pointer):
 *   - the whole footer card lifts 10px and its background flattens on hover
 *   - the trust badge + social icons sit at 30% opacity and reveal to 100%
 *     when you hover the card (1s transition)
 *   - quick-access links do a simple 0.3s color fade on hover
 *   - social icons do a simple 0.3s color/opacity fade on hover
 * On touch devices (no real hover) the badge/icons are shown at full
 * opacity/brightness permanently instead of relying on a hover that will
 * never fire — see the `(hover: hover)` block near the bottom.
 * The footer slides up (24px, 0.45s, cubic-bezier(.22,1,.36,1)) once when it
 * scrolls into view.
 */

.agah-ftr {
  --agah-c1: #A96045;               /* gradient start / hover flat color */
  --agah-c2: #7B3C25;               /* gradient end */
  --agah-ink: #F5F5F5;              /* brand name */
  --agah-ink-soft: rgba(245, 245, 245, .82);   /* description text */
  --agah-ink-faint: rgba(245, 245, 245, .4);   /* tagline */
  --agah-heading: #F8F3E3;          /* "quick access" heading + link hover color */
  --agah-link: rgba(255, 246, 229, .51);
  --agah-link-hover: #F8F3E3;
  --agah-chip-bg: rgba(255, 246, 229, .12);
  --agah-chip-ink: #69727D;
  --agah-copyright: rgba(255, 246, 229, .5);
  --agah-radius: 16px;
  --agah-shadow: 0 10px 50px rgba(0, 0, 0, .1);
  --agah-ease-in: cubic-bezier(.22, 1, .36, 1);

  display: block;
  direction: rtl;
  font-family: 'IRANYekanX', Tahoma, Arial, sans-serif;
  padding: clamp(16px, 4vw, 40px) clamp(12px, 4vw, 32px) 48px;
  box-sizing: border-box;
}

.agah-ftr *,
.agah-ftr *::before,
.agah-ftr *::after {
  box-sizing: border-box;
}

.agah-ftr__inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- card ---------- */

.agah-ftr__card {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
padding:48px 48px 24px 48px;
border-radius: var(--agah-radius);
  background-color: transparent;
  background-image: linear-gradient(179deg, var(--agah-c1) 0%, var(--agah-c2) 100%);
  box-shadow: var(--agah-shadow);

  /* entrance: slide up + fade in once, matching the live site's own timing */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .45s var(--agah-ease-in), transform .45s var(--agah-ease-in);
}

.agah-ftr__card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* hover: takes over with the site's own 1s lift + flatten-to-solid-color */
@media (hover: hover) and (pointer: fine) {
  .agah-ftr__card.is-visible:hover {
    transition: background-color 1s, transform 1s;
    background-color: var(--agah-c1);
    transform: translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .agah-ftr__card.is-visible:hover {
    transform: none;
  }
}

.agah-ftr__col {
  position: relative;
}

/* ---------- brand block ---------- */

.agah-ftr__brand {
  flex: 1 1 260px;
  min-width: 220px;
}

.agah-ftr__logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  border-radius: 16px;
}

.agah-ftr__logo:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.agah-ftr__logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.agah-ftr__logo-icon img {
  width: 70%;
  height: 70%;
  object-fit: cover;
  display: block;
}

.agah-ftr__logo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.agah-ftr__brand-name {
  font-family: 'Gramophone', 'iransans', 'IRANYekanX', sans-serif;
  font-weight: 900;
  font-size: 19px;
  color: var(--agah-ink);
  line-height: 1.3;
}

.agah-ftr__brand-tagline {
  font-family: 'iransans', 'IRANYekanX', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--agah-ink-faint);
}

.agah-ftr__desc {
  margin: 18px 0 0;
  font-family: 'iransans', 'IRANYekanX', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.9;
  color: var(--agah-ink-soft);
  max-width: 340px;
}

/* ---------- quick links block ---------- */

.agah-ftr__links {
  flex: 1 1 300px;
  min-width: 260px;
}

.agah-ftr__heading {
  margin: 0 0 20px;
  font-family: 'iransans', 'IRANYekanX', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--agah-heading);
}

.agah-ftr__link-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.agah-ftr__link-col {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agah-ftr__link-col a {
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
  color: var(--agah-link);
  font-family: 'iransans', 'IRANYekanX', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 1px;
  transition: color .3s;
}

.agah-ftr__link-col a:hover,
.agah-ftr__link-col a:focus-visible {
  color: var(--agah-link-hover);
}

.agah-ftr__link-col a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 3px;
}

.agah-ftr__socials {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.agah-ftr__social {
  width: 32px;
  height: 32px;
  border-radius: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--agah-chip-bg);
  color: #fff; /* visible by default; dimmed to a muted tone only where hover can reveal it again — see below */
  text-decoration: none;
}

.agah-ftr__social svg {
  width: 15px;
  height: 15px;
  fill: white !important;
}

.agah-ftr__social:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- trust badge ---------- */

.agah-ftr__trust {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agah-ftr__badge,
.agah-ftr__badge-wrap {
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

.agah-ftr__badge img,
.agah-ftr__badge-wrap img {
  display: block;
  width: 120px;
  height: auto;
  border-radius: 12px;
}

/* ---------- copyright ---------- */

.agah-ftr__copyright {
  flex-basis: 100%;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
}

.agah-ftr__copyright p {
  margin: 0;
  font-family: 'iransans', 'IRANYekanX', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--agah-copyright);
}

/* ---------- back-to-top ---------- */

.agah-ftr__totop {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-end: 24px;
  z-index: 60;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(179deg, var(--agah-c1), var(--agah-c2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.9);
  transition: opacity .35s ease, transform .35s var(--agah-ease-in), visibility .35s;
}

.agah-ftr__totop.is-shown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.agah-ftr__totop:hover,
.agah-ftr__totop:focus-visible {
  transform: translateY(-4px) scale(1.05);
}

.agah-ftr__totop:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.agah-ftr__totop svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------- hover-capable devices only ---------- */
/* Social icons and the trust badge are always at full visibility (opacity 1)
   on every device. On a real mouse/trackpad, the icon glyph itself still
   does the site's own subtle 0.3s color brighten on hover. */

@media (hover: hover) and (pointer: fine) {
  .agah-ftr__social {
    color: var(--agah-chip-ink);
    transition: color .3s, opacity 1;  }

  .agah-ftr__social:hover,
  .agah-ftr__social:focus-visible {
    color: #fff;
    opacity: 1;  }
}

/* ---------- responsive ---------- */

@media (max-width: 780px) {
  .agah-ftr__card {
    flex-direction: column;
    align-items: stretch;
  }

  /* reset the desktop width hints — in a column layout "flex-basis" becomes
     a HEIGHT hint instead, which is what was forcing tall empty gaps */
  .agah-ftr__brand,
  .agah-ftr__links,
  .agah-ftr__trust {
    flex: none;
    min-width: 0;
  }

  /* everything keeps natural (right/RTL) alignment on mobile, not centered */
  .agah-ftr__desc {
    max-width: none;
  }

  .agah-ftr__socials {
    justify-content: flex-start;
  }

  .agah-ftr__trust {
    margin-top: 8px;
  }

  .agah-ftr__totop {
    inset-inline-end: 16px;
    inset-block-end: 16px;
    width: 42px;
    height: 42px;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .agah-ftr__card,
  .agah-ftr__totop {
    transition: none !important;
    animation: none !important;
  }

  .agah-ftr__card {
    opacity: 1 !important;
    transform: none !important;
  }
}