/* ========================================
   FOOTER - UNA LÍNEA HORIZONTAL
   ======================================== */

.footer-section {
  background-color: #5957b8;
  color: #ffffff;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}



.footer-content-wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  padding: 0 20px;
}

/* ========================================
   CONTENEDOR PRINCIPAL - TODO EN UNA FILA
   ======================================== */

.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  width: 100%;
  box-sizing: border-box;
}

/* ========================================
   LOGO (IZQUIERDA)
   ======================================== */

.footer-logo-wrap {
  flex-shrink: 0;
  animation: fadeInLeft 0.8s ease-out;
}

.footer-logo-image {
  max-width: 180px;
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
}


.footer-logo-image {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.4s ease;
}

.footer-logo-wrap:hover .footer-logo-image {
  transform: translateY(-4px) scale(1.06);
  filter: brightness(1.15) drop-shadow(0 10px 20px rgba(0,0,0,0.25));
}


/* ========================================
   COPYRIGHT (CENTRO)
   ======================================== */

.footer-bottom-row {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
  padding: 0;
  border-top: none;
  margin: 0;
}

.copyright-container {
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.copyright-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.copyright-symbol {
  font-size: 14px;
  font-weight: 700;
}

.copyright-year {
  font-weight: 600;
  color: #ffffff;
}

.copyright-company {
  font-weight: 700;
  color: #ffffff;
  position: relative;
}

.copyright-company::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  transition: height 0.3s ease;
}

.copyright-company:hover::after {
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
}

.copyright-separator {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

.copyright-rights {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   REDES SOCIALES (DERECHA)
   ======================================== */

.footer-social-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
  animation: fadeInRight 0.8s ease-out 0.4s backwards;
}

.social-icon-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Efecto de brillo al pasar el mouse */
.social-icon-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.social-icon-link:hover::before {
  width: 100%;
  height: 100%;
}

.social-icon-link:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

/* Animación del icono interno */
.social-svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.social-icon-link:hover .social-svg {
  transform: scale(1.1) rotate(-5deg);
}

/* Colores oficiales por red con gradientes mejorados */
.facebook {
  background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.facebook:hover {
  background: linear-gradient(135deg, #2b88ff 0%, #1877f2 100%);
}

.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram:hover {
  background: linear-gradient(45deg, #f5a952 0%, #eb7c4f 25%, #e63a56 50%, #d33678 75%, #c92a9a 100%);
}

.linkedin {
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
}

.linkedin:hover {
  background: linear-gradient(135deg, #0077d4 0%, #0a66c2 100%);
}

/* Animación de pulso sutil */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }
}

.social-icon-link {
  animation: pulse 3s ease-in-out infinite;
}

.social-icon-link:hover {
  animation: none;
}

/* ========================================
   ANIMACIONES KEYFRAMES
   ======================================== */

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================================
   RESPONSIVIDAD
   ======================================== */

/* Tablets grandes (≤ 1024px) */
@media (max-width: 1024px) {
  .footer-top-row {
    gap: 20px;
  }

  .footer-logo-image {
    max-width: 160px;
  }

  .copyright-text {
    font-size: 13px;
    gap: 5px;
  }

  .social-icon-link {
    width: 42px;
    height: 42px;
  }

  .social-svg {
    width: 20px;
    height: 20px;
  }

  .footer-social-wrap {
    gap: 12px;
  }
}

/* Tablets medianas (≤ 900px) */
@media (max-width: 900px) {
  .footer-top-row {
    gap: 15px;
  }

  .footer-logo-image {
    max-width: 140px;
  }

  .copyright-text {
    font-size: 12px;
    gap: 4px;
  }

  .social-icon-link {
    width: 40px;
    height: 40px;
  }

  .social-svg {
    width: 19px;
    height: 19px;
  }
}

/* ========================================
   LAYOUT VERTICAL CENTRADO (≤ 768px)
   ⚠️ ORDEN: LOGO → REDES → COPYRIGHT
   ======================================== */

@media (max-width: 768px) {
  .footer-section {
    padding: 35px 20px;
  }

  .footer-top-row {
    flex-direction: column; /* ✅ Apilamos verticalmente */
    justify-content: center;
    align-items: center; /* ✅ Todo centrado */
    gap: 25px;
  }

  /* 1. LOGO - Primero (orden por defecto) */
  .footer-logo-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    order: 1; /* ✅ Logo primero */
  }

  .footer-logo-image {
    max-width: 160px;
  }

  /* 2. REDES SOCIALES - Segundo */
  .footer-social-wrap {
    width: 100%;
    display: flex !important; /* ✅ CRÍTICO: Fuerza que se muestre */
    visibility: visible !important; /* ✅ CRÍTICO: Asegura visibilidad */
    justify-content: center; /* ✅ Centramos */
    order: 2; /* ✅ Redes en segundo lugar */
    gap: 15px;
  }

  .social-icon-link {
    width: 44px;
    height: 44px;
    display: flex !important; /* ✅ Fuerza visualización */
  }

  .social-svg {
    width: 21px;
    height: 21px;
  }

  /* 3. COPYRIGHT - Tercero (al final) */
  .footer-bottom-row {
    width: 100%;
    order: 3; /* ✅ Copyright al final */
  }

  .copyright-text {
    font-size: 13px;
    gap: 5px;
    white-space: normal; /* ✅ Permite wrap */
  }
}

/* Móviles (≤ 480px) */
@media (max-width: 480px) {
  .footer-section {
    padding: 30px 15px;
  }

  .footer-top-row {
    gap: 20px;
  }

  .footer-logo-image {
    max-width: 140px;
  }

  .copyright-text {
    font-size: 12px;
    gap: 4px;
    line-height: 1.6;
  }

  .copyright-separator {
    font-size: 10px;
  }

  .social-icon-link {
    width: 42px;
    height: 42px;
  }

  .social-svg {
    width: 20px;
    height: 20px;
  }

  .footer-social-wrap {
    gap: 12px;
  }
}

/* Móviles pequeños (≤ 360px) */
@media (max-width: 360px) {
  .footer-section {
    padding: 25px 12px;
  }

  .footer-top-row {
    gap: 18px;
  }

  .footer-logo-image {
    max-width: 120px;
  }

  .copyright-text {
    font-size: 11px;
    gap: 3px;
  }

  .copyright-symbol {
    font-size: 12px;
  }

  .social-icon-link {
    width: 38px;
    height: 38px;
  }

  .social-svg {
    width: 18px;
    height: 18px;
  }

  .footer-social-wrap {
    gap: 10px;
  }

  /* Removemos efectos hover en pantallas muy pequeñas */
  .copyright-company::after {
    display: none;
  }
}

/* ========================================
   FIX GLOBAL PARA OVERFLOW
   ======================================== */

.footer-section * {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}