/*
 * Mashin Irani — Mobile Footer (Technolife-style layout, our navy/gold palette).
 * Mobile-only: shown ≤768px when the body carries .mi-mfooter-on; the frozen desktop footer is
 * hidden there. --mi-* tokens with hex fallbacks.
 */

.mi-mfooter { display: none; direction: rtl; font-family: var(--mi-font-sans, "Vazirmatn", Tahoma, sans-serif); }

/* Swap footers on mobile only, when active. */
@media (max-width: 768px) {
  body.mi-mfooter-on .site-footer { display: none !important; }
  body.mi-mfooter-on .mi-mfooter { display: block; }
}

.mi-mfooter *,
.mi-mfooter *::before,
.mi-mfooter *::after { box-sizing: border-box; }

.mi-mfooter__card {
  margin: var(--mi-space-2, 8px) var(--mi-space-2, 8px) 88px;
  padding: var(--mi-space-4, 16px);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(105deg, #223a63 0%, var(--mi-color-navy-900, #102134) 62%);
  color: var(--mi-color-ivory-50, #f5f0e9);
}

/* ---- Top: brand + back to top ---- */
.mi-mfooter__top { display: flex; align-items: center; justify-content: space-between; gap: var(--mi-space-3, 12px); }
.mi-mfooter__brand { display: inline-flex; align-items: center; gap: var(--mi-space-2, 8px); text-decoration: none; color: inherit; }
.mi-mfooter__brand img { width: 40px; height: 40px; border-radius: var(--mi-radius-md, 8px); flex: 0 0 auto; }
.mi-mfooter__wm { display: flex; flex-direction: column; line-height: 1.15; }
.mi-mfooter__wm b { font-size: 1rem; font-weight: 700; color: var(--mi-color-ivory-50, #f5f0e9); }
.mi-mfooter__wm i { font-style: normal; font-size: .625rem; letter-spacing: .08em; color: var(--mi-color-gold-300, #e0c58f); }

.mi-mfooter__totop {
  display: inline-flex; align-items: center; gap: var(--mi-space-1, 4px);
  height: 40px; padding: 0 var(--mi-space-4, 16px);
  border: 0; border-radius: var(--mi-radius-lg, 12px);
  background: var(--mi-color-ivory-50, #f5f0e9);
  color: var(--mi-color-navy-900, #102134);
  font-family: inherit; font-weight: 600; font-size: .8125rem;
  cursor: pointer; white-space: nowrap;
}
.mi-mfooter__totop svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.mi-mfooter__about {
  margin: var(--mi-space-3, 12px) 0 0;
  font-size: var(--mi-font-size-caption, .8125rem);
  line-height: 1.7;
  color: var(--mi-color-sand-200, #d9cbc2);
}

.mi-mfooter__hr { height: 1px; background: rgba(245, 240, 233, .16); margin: var(--mi-space-4, 16px) 0; }

/* ---- Accordions ---- */
.mi-mfooter__accs { display: block; }
.mi-mfooter__acc + .mi-mfooter__acc { border-top: 1px solid rgba(245, 240, 233, .1); }
.mi-mfooter__acch {
  display: flex; align-items: center; justify-content: space-between; gap: var(--mi-space-2, 8px);
  width: 100%; padding: var(--mi-space-3, 12px) var(--mi-space-1, 4px);
  border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: .9375rem;
  color: var(--mi-color-ivory-50, #f5f0e9); text-align: start;
}
.mi-mfooter__chev { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: var(--mi-color-gold-300, #e0c58f); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--mi-motion-duration-300, 300ms) var(--mi-ease-standard, cubic-bezier(.2, 0, 0, 1)); }
.mi-mfooter__acch[aria-expanded="true"] .mi-mfooter__chev { transform: rotate(180deg); }

.mi-mfooter__accbody { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--mi-motion-duration-300, 300ms) var(--mi-ease-standard, cubic-bezier(.2, 0, 0, 1)); }
.mi-mfooter__acch[aria-expanded="true"] + .mi-mfooter__accbody { grid-template-rows: 1fr; }
.mi-mfooter__accinner { overflow: hidden; }
.mi-mfooter__accbody ul { list-style: none; margin: 0; padding: 0 var(--mi-space-1, 4px) var(--mi-space-2, 8px); display: flex; flex-direction: column; gap: var(--mi-space-1, 4px); }
.mi-mfooter__accbody li { padding-inline-start: var(--mi-space-3, 12px); border-inline-start: 1px solid rgba(224, 197, 143, .3); }
.mi-mfooter__accbody a {
  display: block; padding: var(--mi-space-2, 8px) 0;
  color: var(--mi-color-sand-200, #d9cbc2); text-decoration: none;
  font-size: var(--mi-font-size-body-sm, .875rem);
}
.mi-mfooter__accbody a:hover { color: var(--mi-color-gold-300, #e0c58f); }

/* ---- Contact ---- */
.mi-mfooter__ctitle { margin: 0 0 var(--mi-space-3, 12px); font-weight: 700; font-size: 1rem; color: var(--mi-color-ivory-50, #f5f0e9); }
.mi-mfooter__social { display: flex; gap: var(--mi-space-3, 12px); margin-bottom: var(--mi-space-4, 16px); }
.mi-mfooter__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--mi-radius-pill, 999px);
  background: rgba(245, 240, 233, .1); color: var(--mi-color-ivory-50, #f5f0e9);
}
/*
 * These are the theme's LINE icons. Painting them with `fill` collapsed each one into a solid
 * silhouette — survivable for the telegram plane and the whatsapp bubble, but it turned #i-ig into a
 * featureless rounded blob, and it makes any sandbox-sprite symbol render as nothing at all (those
 * carry fill="none" as a presentation attribute on the <symbol>, which beats the inherited value).
 * Paint them the way the rest of the site paints icons instead.
 */
.mi-mfooter__social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mi-mfooter__social { flex-wrap: wrap; }
.mi-mfooter__phone {
  display: inline-flex; align-items: center; gap: var(--mi-space-2, 8px);
  color: var(--mi-color-ivory-50, #f5f0e9); text-decoration: none;
  font-size: var(--mi-font-size-body-sm, .875rem); font-weight: 600;
}
.mi-mfooter__phone svg { width: 18px; height: 18px; fill: var(--mi-color-gold-300, #e0c58f); }

/* ---- Seals + copyright ---- */
.mi-mfooter__seals { display: flex; gap: var(--mi-space-2, 8px); }
.mi-mfooter__seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--mi-radius-md, 8px);
  background: rgba(245, 240, 233, .08); border: 1px solid rgba(224, 197, 143, .2);
  color: var(--mi-color-gold-300, #e0c58f);
}
.mi-mfooter__seal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mi-mfooter__copy {
  margin: var(--mi-space-4, 16px) 0 0; text-align: center;
  font-size: var(--mi-font-size-overline, .75rem); line-height: 1.7;
  color: var(--mi-color-sand-200, #d9cbc2); opacity: .85;
}

@media (prefers-reduced-motion: reduce) {
  .mi-mfooter__accbody, .mi-mfooter__chev { transition: none !important; }
}

/*
 * mirani-home-fixes.css re-colours the hello reset selectors: [type="button"],button{color:#0E1D3B}.
 * Our accordion headers are <button type="button">, so [type="button"] matches them at (0,1,0) —
 * a tie with .mi-mfooter__acch that load order hands to home-fixes, i.e. navy text on the navy card:
 * invisible titles. Re-assert ours at (0,2,0), and at (0,3,0) for the :hover/:focus pair it also sets
 * (that one washes the ivory back-to-top button navy-on-navy after a tap).
 */
.mi-mfooter .mi-mfooter__acch,
.mi-mfooter .mi-mfooter__acch:hover,
.mi-mfooter .mi-mfooter__acch:focus {
  color: var(--mi-color-ivory-50, #f5f0e9);
  background-color: transparent;
}
.mi-mfooter .mi-mfooter__totop,
.mi-mfooter .mi-mfooter__totop:hover,
.mi-mfooter .mi-mfooter__totop:focus {
  color: var(--mi-color-navy-900, #102134);
  background-color: var(--mi-color-ivory-50, #f5f0e9);
}
