.site-footer.mada-footer {
  padding: 54px 0 0;
  background: #eff6ff;
  border-top: 1px solid #c6d9ef;
  color: #243e68;
}
.mada-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
  align-items: start;
}
.mada-footer .footer-wordmark {
  display: inline-block;
  font: 700 21px/1.5 Plex, Cairo, sans-serif;
  letter-spacing: -.4px;
  color: #1f365d;
}
.mada-footer .footer-about > p {
  max-width: 280px;
  margin-top: 17px;
  font-size: 12px;
  line-height: 2;
  color: #496a99;
}
.mada-footer h2 {
  margin: 2px 0 22px;
  font: 700 14px/1.6 Plex, Cairo, sans-serif;
  letter-spacing: 0;
  color: #1f365d;
}
.mada-footer ul { list-style: none; margin: 0; padding: 0; }
.mada-footer li + li { margin-top: 9px; }
.mada-footer .footer-column a {
  display: inline-block;
  padding: 2px 0;
  color: #496a99;
  font-size: 12px;
  line-height: 1.8;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: color .2s, transform .35s var(--ease-out, ease), text-decoration-color .2s;
}
.mada-footer .footer-column a:hover {
  color: var(--blue);
  transform: translateX(-3px);
  text-decoration: underline;
}
.mada-footer .footer-social { display: flex; align-items: center; gap: 11px; }
.mada-footer .footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d9eaf8;
  color: #243e68;
  transition: transform .4s var(--ease-out, ease), background .25s, color .25s;
}
.mada-footer .footer-social svg { width: 19px; height: 19px; stroke-width: 1.7; }
.mada-footer .footer-social a:hover { transform: translateY(-4px); background: #243e68; color: white; }
.mada-footer .footer-slogan { font-size: 11px; line-height: 2; margin-top: 18px; color: #496a99; }
.mada-footer .footer-legal {
  border-top: 1px solid #c6d9ef;
  min-height: 69px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding-block: 20px;
  font-size: 11px;
  color: #496a99;
}
.mada-footer .footer-legal p { color: inherit; }
.mada-footer .footer-language { display: inline-flex; align-items: center; gap: 8px; color: #243e68; }
.mada-footer .footer-language svg { width: 14px; height: 14px; }

@media (max-width: 1000px) {
  .mada-footer .footer-grid { gap: 32px; grid-template-columns: 1.25fr 1fr 1fr .9fr; }
}
@media (max-width: 700px) {
  .site-footer.mada-footer { padding-top: 38px; }
  .mada-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 24px; padding-bottom: 32px; }
  .mada-footer .footer-about { grid-column: 1 / -1; }
  .mada-footer .footer-about > p { max-width: 400px; margin-top: 10px; font-size: 13px; }
  .mada-footer h2 { margin-bottom: 14px; }
  .mada-footer li + li { margin-top: 1px; }
  .mada-footer .footer-column a { padding-block: 10px; font-size: 13px; }
  .mada-footer .footer-follow { grid-column: 1 / -1; }
  .mada-footer .footer-follow h2 { margin-bottom: 14px; }
  .mada-footer .footer-social a { width: 44px; height: 44px; }
  .mada-footer .footer-slogan { margin-top: 13px; font-size: 12px; }
  .mada-footer .footer-legal { font-size: 10px; gap: 12px; }
}
@media (max-width: 370px) {
  .mada-footer .footer-legal { flex-wrap: wrap; }
}

.floating-social {
  position: fixed;
  left: calc(10px + env(safe-area-inset-left, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px;
  max-height: max(60px, calc(100vh - 190px));
  max-height: max(60px, calc(100svh - 190px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.floating-social::-webkit-scrollbar { display: none; }
.floating-social-link {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 3px 8px #17253e1c;
  transition: filter .2s ease;
}
.floating-facebook { background: #1877f2; }
.floating-instagram { background: linear-gradient(35deg,#d65523,#bd2776,#6946bb); }
.floating-tiktok, .floating-x { background: #17212f; }
.floating-youtube { background: #d91e26; }
.floating-linkedin { background: #0a66c2; }
.floating-social-link svg { width: 21px; height: 21px; stroke-width: 1.6; }
.floating-facebook svg { width: 19px; height: 19px; }
.floating-social-link:hover { filter: brightness(1.12); }
.floating-social-link:focus-visible { outline: 3px solid #f2ac3c; outline-offset: 2px; }
.floating-social-tooltip { position: fixed; z-index: 26; width: max-content; padding: 9px 13px; border-radius: 10px; background: #17253e; color: #fff; font-size: 13px; font-weight: 700; line-height: 1.5; text-align: center; overflow-wrap: anywhere; box-shadow: 0 4px 16px #17253e24; }
.floating-social-tooltip::before { content: ''; position: absolute; left: -4px; top: calc(50% - 4px); width: 8px; height: 8px; background: inherit; transform: rotate(45deg); }
.floating-social-tooltip[hidden] { display: none; }
.floating-whatsapp {
  position: fixed;
  left: calc(16px + env(safe-area-inset-left, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border: 1px solid #ffffff24;
  border-radius: 50%;
  background: #117d44;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  box-shadow: 0 5px 18px #082c2426, 0 0 18px #25d36645;
  transition: background .2s ease, box-shadow .2s ease;
}
.floating-whatsapp svg { width: 26px; height: 26px; stroke-width: 1.7; }
.floating-whatsapp-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  width: max-content;
  max-width: min(220px, calc(100vw - 100px - env(safe-area-inset-left, 0px)));
  padding: 9px 13px;
  border-radius: 10px;
  background: #17253e;
  color: #fff;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 16px #17253e24;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-4px,-50%);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.floating-whatsapp-tooltip::before { content: ''; position: absolute; left: -4px; top: calc(50% - 4px); width: 8px; height: 8px; background: inherit; transform: rotate(45deg); }
.floating-whatsapp:focus-visible .floating-whatsapp-tooltip { opacity: 1; visibility: visible; transform: translate(0,-50%); }
@media(hover:hover) and (pointer:fine) {
  .floating-whatsapp:hover { background: #0d6838; box-shadow: 0 7px 22px #082c2438, 0 0 26px #25d36680; }
  .floating-whatsapp:hover .floating-whatsapp-tooltip { opacity: 1; visibility: visible; transform: translate(0,-50%); }
}
.floating-whatsapp:active { background: #0d6838; }
.floating-whatsapp:focus-visible { outline: 3px solid #f2ac3c; outline-offset: 4px; }
/* Below this width the page gutter (48px) is narrower than the mid-height rail, which then
   covers text. Stack the rail just above the WhatsApp button instead (bottom + size + gap - padding). */
@media(max-width:1320px) {
  .floating-social { top: auto; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); transform: none; }
  /* Room under the last footer line so the floating stack never covers it at the end of the page. */
  .mada-footer .footer-legal { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
@media(max-width:650px) {
  .floating-social { left: calc(6px + env(safe-area-inset-left, 0px)); gap: 8px; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .floating-whatsapp { left: calc(12px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 48px; height: 48px; min-height: 48px; }
  .floating-whatsapp svg { width: 24px; height: 24px; }
}
@media(prefers-reduced-motion:reduce) { .floating-social-link, .floating-whatsapp, .floating-whatsapp-tooltip { transition: none; } }
@media print { .floating-social, .floating-social-tooltip, .floating-whatsapp { display: none; } }

/* Social controls settle after two pulses; WhatsApp keeps a soft green glow. */
.floating-social-link { position: relative; --contact-halo: #1877f2; }
.floating-whatsapp { --contact-halo: #20a564; }
.floating-instagram { --contact-halo: #c84d8e; }
.floating-youtube { --contact-halo: #e84950; }
.floating-linkedin { --contact-halo: #328ac0; }
.floating-tiktok,.floating-x { --contact-halo: #7995b8; }
.floating-social-link:nth-child(2) { --contact-delay: 70ms; }
.floating-social-link:nth-child(3) { --contact-delay: 140ms; }
.floating-social-link:nth-child(4) { --contact-delay: 210ms; }
.floating-social-link:nth-child(5) { --contact-delay: 280ms; }
.floating-social-link:nth-child(6) { --contact-delay: 350ms; }
@keyframes contact-enter {
  from { opacity: 0; transform: translate3d(-12px,8px,0) scale(.85); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}
@keyframes contact-halo {
  0% { opacity: .6; transform: scale(.88); }
  65%,100% { opacity: 0; transform: scale(1.08); }
}
@keyframes whatsapp-glow {
  0%,100% { opacity: .22; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.1); }
}
@media(prefers-reduced-motion:no-preference) {
  html:not(.motion-disabled) :is(.floating-social-link,.floating-whatsapp) {
    animation: contact-enter 620ms cubic-bezier(.22,1,.36,1) var(--contact-delay,0ms) backwards;
    transition: transform .25s cubic-bezier(.22,1,.36,1),filter .2s,background .2s,box-shadow .25s;
  }
  html:not(.motion-disabled) :is(.floating-social-link,.floating-whatsapp)::after {
    content: ''; position: absolute; inset: -3px; border: 1.5px solid var(--contact-halo); border-radius: inherit;
    pointer-events: none; opacity: 0;
    animation: contact-halo 1.6s ease-out calc(650ms + var(--contact-delay,0ms)) 2;
  }
  html:not(.motion-disabled) .floating-whatsapp::after {
    border-color: #25d366;
    box-shadow: 0 0 12px #25d36680, 0 0 24px #25d36645;
    animation: whatsapp-glow 3s ease-in-out infinite;
  }
  html.motion-paused .floating-whatsapp::after { animation-play-state: paused; }
  html:not(.motion-disabled) :is(.floating-social-link,.floating-whatsapp) > svg {
    transform-origin: center; transition: transform .35s cubic-bezier(.22,1,.36,1);
  }
  html:not(.motion-disabled) :is(.floating-social-link,.floating-whatsapp):focus-visible > svg { transform: scale(1.13) rotate(-7deg); }
  html:not(.motion-disabled) :is(.floating-social-link,.floating-whatsapp):active { transform: scale(.93); }
}
@media(prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine) {
  html:not(.motion-disabled) :is(.floating-social-link,.floating-whatsapp):hover { transform: translateY(-2px) scale(1.04); }
  html:not(.motion-disabled) :is(.floating-social-link,.floating-whatsapp):hover > svg { transform: scale(1.13) rotate(-7deg); }
  html:not(.motion-disabled) :is(.floating-social-link,.floating-whatsapp):active { transform: scale(.93); }
}
