/* =====================================================================
   footer.css
   - Footer layout, grid, and theme
====================================================================== */

/* [footer.css] Footer layout & theme */
.site-footer {
  background: var(--site-bg, #e9eef3);
  color: var(--site-text, #0b2239);
  margin-top: 2rem;
}
.site-footer .wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

/* Footer grid */
.footer-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, 1fr);
}
.footer-brand { grid-column: span 6; }
.footer-links { grid-column: span 3; }
.footer-social {
  grid-column: span 3;
  display: flex;
  gap: .65rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Text blocks */
.footer-name { font-size: 1.125rem; font-weight: 600; margin: 0 0 .25rem; }
.footer-addr div { line-height: 1.4; }
.footer-phones, .footer-principal { margin: .5rem 0 0; }

/* Links */
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links a { text-decoration: none; }

/* Meta bar */
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dotted rgba(0,0,0,.2);
  padding-top: .5rem;
  margin-top: .5rem;
}
.back-to-top { text-decoration: none; }

/* Mobile layout adjustments */
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand, .footer-links, .footer-social { grid-column: auto; }
  .footer-social { justify-content: flex-start; }
  .footer-meta {
    flex-direction: column;
    gap: .5rem;
    align-items: flex-start;
  }
}

/* Footer social */
.footer-social .social {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.30);
  box-shadow: 0 6px 16px rgba(0,0,0,.16), inset 0 -1px 0 rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.footer-social .social.facebook {
  background: linear-gradient(180deg, #2b8bff 0%, #1e70d6 100%);
}

.footer-social .social.instagram {
  background: linear-gradient(140deg, #feda75 0%, #fa7e1e 33%, #d62976 58%, #962fbf 78%, #4f5bd5 100%);
}

.footer-social .social.x,
.footer-social .social.twitter {
  background: linear-gradient(180deg, #474747 0%, #1a1a1a 100%);
}

.footer-social .social.youtube {
  background: linear-gradient(180deg, #ff3d3d 0%, #d40000 100%);
}

.footer-social .social:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(0,0,0,.20), inset 0 -1px 0 rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.18);
}

.footer-social .social:focus-visible {
  outline: 3px solid var(--site-accent, #1f6feb);
  outline-offset: 2px;
}

.footer-social .social img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
  --glyph-scale: 1;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.14));
  transform: scale(var(--glyph-scale));
  transform-origin: center center;
}

/* Optical balancing: make center marks feel equally weighted. */
.footer-social .social.facebook img { --glyph-scale: 1.10; }
.footer-social .social.instagram img { --glyph-scale: 1.08; }
.footer-social .social.x img,
.footer-social .social.twitter img { --glyph-scale: 1.06; }
.footer-social .social.youtube img { --glyph-scale: 1.20; }

@media (prefers-reduced-motion: reduce) {
  .footer-social .social {
    transition: none;
  }
  .footer-social .social:hover {
    transform: none;
  }
}
