.footer-banner {
  width: 100%;
  height: 150px;
  background-image: url("img/footer.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: fadeIn 1s ease-out 2s both;
  position: relative;
  overflow: hidden;
}

.footer-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
}

.footer-banner:hover::before {
  background: rgba(0, 0, 0, 0.1);
}

/* Línea divisora del banner del footer */
.pre-footer-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #e09e59, #d4894a, #e09e59);
  box-shadow: 0 2px 8px rgba(224, 158, 89, 0.4);
  z-index: 10;
}

.pre-footer-banner {
  position: relative;
  background-image: url("../img/footer.jpg");
  background-size: cover;
  background-position: center;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 1s ease-out 2s both;
  flex-shrink: 0;
  overflow: hidden;
}

.pre-footer-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease;
}

.pre-footer-banner:hover::before {
  background: rgba(0, 0, 0, 0.2);
}

footer {
  background-color: #973131;
  color: white;
  font-family: "Jura", sans-serif;
  padding: 40px 30px;
  animation: slideInFromBottom 1s ease-out 2.1s both;
  z-index: 100;
  position: relative;
  flex-shrink: 0;
  opacity: 0;
  background: linear-gradient(135deg, #973131 0%, #c53030 100%);
}

/* Logo del footer animado */
.footer-logo {
  text-align: center;
  margin-bottom: 30px;
  animation: bounceIn 1s ease-out 2.3s both;
  opacity: 0;
}

.footer-logo img {
  height: 100px;
  width: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: float 4s ease-in-out infinite;
  border: 3px solid rgba(224, 158, 89, 0.3);
}

.footer-logo img:hover {
  transform: scale(1.2) rotate(15deg);
  box-shadow: 0 20px 50px rgba(224, 158, 89, 0.5);
  filter: brightness(1.2);
  border-color: #e09e59;
}

/* Contenido del footer con grid */
.footer-content {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  animation: fadeInUp 1s ease-out 2.4s both;
  opacity: 0;
}

/* Columnas del footer con efectos glassmorphism */
.footer-column {
  padding: 25px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(40px);
  position: relative;
  overflow: hidden;
}

.footer-column::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(224, 158, 89, 0.1), transparent);
  transition: left 0.6s ease;
}

.footer-column:hover::before {
  left: 100%;
}

.footer-column:nth-child(1) {
  animation-delay: 2.5s;
}
.footer-column:nth-child(2) {
  animation-delay: 2.6s;
}
.footer-column:nth-child(3) {
  animation-delay: 2.7s;
}

.footer-column:hover {
  transform: translateY(-15px) scale(1.02);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(224, 158, 89, 0.4);
}

/* Títulos de las columnas con efectos especiales */
.footer-column h3 {
  font-size: 24px;
  margin-bottom: 20px;
  font-family: "Kaushan Script", cursive;
  color: #e09e59;
  position: relative;
  transition: all 0.4s ease;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(224, 158, 89, 0.3);
}

.footer-column h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #e09e59, #d4894a);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(224, 158, 89, 0.4);
}

.footer-column:hover h3::after {
  width: 100%;
}

.footer-column h3:hover {
  transform: scale(1.08) translateY(-3px);
  text-shadow: 0 5px 15px rgba(224, 158, 89, 0.5);
  color: #d4894a;
}

/* Párrafos y enlaces con animaciones mejoradas */
.footer-column p {
  font-size: 16px;
  margin: 10px 0;
  color: #f0f0f0;
  font-family: "Jura", sans-serif;
  transition: all 0.3s ease;
  line-height: 1.7;
  position: relative;
}

.footer-column p:hover {
  color: white;
  transform: translateX(8px);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.footer-column a {
  color: #e09e59;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: inline-block;
  font-size: 16px;
  margin: 8px 0;
}

.footer-column a::before {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #e09e59, #d4894a);
  transition: width 0.4s ease;
  border-radius: 1px;
}

.footer-column a:hover {
  color: #d4894a;
  transform: translateY(-3px) scale(1.05);
  text-shadow: 0 4px 12px rgba(224, 158, 89, 0.4);
}

.footer-column a:hover::before {
  width: 100%;
}

/* Efectos especiales para columnas específicas */
.footer-column:last-child {
  text-align: center;
}

.footer-column:last-child p {
  font-style: italic;
  font-size: 18px;
  color: #e09e59;
  text-shadow: 0 2px 8px rgba(224, 158, 89, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

.footer-column:last-child p:last-child {
  font-weight: bold;
  margin-top: 15px;
  color: #d4894a;
  font-size: 16px;
}

/* Línea divisoria animada */
.footer-divider {
  width: 0;
  margin: 40px auto 20px;
  border-top: 3px solid #e09e59;
  box-shadow: 0 3px 12px rgba(224, 158, 89, 0.4);
  animation: expandWidth 1.8s ease-out 3.2s both;
  border-radius: 2px;
}

/* Derechos de autor con efecto typewriter */
.footer-copyright {
  text-align: center;
  font-size: 15px;
  color: #f0f0f0;
  padding: 25px 0;
  margin-top: 20px;
  animation: fadeInUp 1s ease-out 3.5s both;
  opacity: 0;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(224, 158, 89, 0.1), transparent);
  animation: typewriter 2.5s ease-out 3.7s both;
}

.footer-copyright:hover {
  color: white;
  transform: scale(1.02);
  text-shadow: 0 3px 8px rgba(224, 158, 89, 0.3);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(224, 158, 89, 0.3);
}

/* Animaciones adicionales para keyframes */
@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 80%;
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) translateY(-10px);
  }
  70% {
    transform: scale(0.95) translateY(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typewriter {
  from {
    left: -100%;
  }
  to {
    left: 100%;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
======================================== */

/* Extra Large screens (1400px y más) */
@media (min-width: 1400px) {
  .form-container {
    max-width: 550px;
    padding: 3rem;
  }

  .form-title {
    font-size: 2.6rem;
  }

  .info-panel .logo img {
    width: 200px;
    height: 200px;
  }

  .footer-logo img {
    height: 120px;
    width: 120px;
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    max-width: 1400px;
  }

  .footer-column {
    padding: 30px;
  }

  .footer-column h3 {
    font-size: 26px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 17px;
  }
}

/* Large screens (1200px - 1399px) */
@media (max-width: 1199px) {
  .form-container {
    max-width: 480px;
    padding: 2.5rem;
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    max-width: 1200px;
  }

  .footer-column {
    padding: 25px;
  }

  .footer-logo img {
    height: 110px;
    width: 110px;
  }
}

/* Medium screens (992px - 1199px) */
@media (max-width: 991px) {
  .form-container {
    max-width: 450px;
    padding: 2rem;
  }

  .info-panel .logo img {
    width: 160px;
    height: 160px;
  }

  header h1 {
    font-size: 50px;
  }

  /* Footer ajustes para medium screens */
  footer {
    padding: 35px 25px;
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 100%;
  }

  .footer-column {
    padding: 20px;
  }

  .footer-logo img {
    height: 100px;
    width: 100px;
  }

  .footer-column h3 {
    font-size: 22px;
    margin-bottom: 15px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 15px;
    margin: 8px 0;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 768px) {
  /* Reducir animaciones en móviles */
  * {
    animation-duration: 0.5s !important;
  }

  .float {
    animation: none !important;
  }

  /* Layout vertical en tablets */
  .main-container {
    flex-direction: column;
  }

  .info-panel,
  .form-panel {
    width: 100%;
    min-height: auto;
  }

  .info-panel {
    padding: 2rem 1rem;
    order: 1;
    min-height: 300px;
  }

  .form-panel {
    padding: 2rem 1rem;
    order: 2;
  }

  .form-container {
    max-width: 95%;
    padding: 2rem;
    margin: 1rem auto;
  }

  /* Header responsive */
  header {
    height: auto;
    min-height: 140px;
    padding: 15px;
  }

  header .top {
    flex-direction: column;
    gap: 15px;
  }

  header .top nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
  }

  nav a {
    font-size: 15px;
    margin: 0;
    padding: 8px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    white-space: nowrap;
  }

  header h1 {
    font-size: 36px;
    margin-top: 15px;
  }

  header img {
    height: 70px;
    width: 70px;
  }

  .info-panel .logo img {
    width: 120px;
    height: 120px;
  }

  /* Form elements */
  .input-group {
    margin-bottom: 1.3rem;
  }

  .form-input {
    padding: 0.9rem 0.9rem 0.9rem 2.5rem;
    font-size: 0.95rem;
  }

  .input-icon {
    font-size: 1.1rem;
    left: 0.9rem;
  }

  /* CAPTCHA responsive */
  .captcha-container {
    flex-direction: column;
    gap: 1rem;
  }

  .captcha-display {
    height: 55px;
    font-size: 1.2rem;
  }

  .captcha-refresh {
    width: 100%;
    height: 50px;
    font-size: 1.1rem;
  }

  .captcha-input {
    padding: 0.9rem;
    font-size: 0.95rem;
  }

  .submit-btn {
    padding: 1.1rem;
    font-size: 1rem;
  }

  .login-link,
  .register-link {
    padding: 0.7rem 1.3rem;
    font-size: 0.9rem;
  }

  /* Footer responsive para tablets */
  footer {
    padding: 30px 20px;
  }

  .footer-logo {
    margin-bottom: 25px;
  }

  .footer-logo img {
    height: 90px;
    width: 90px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 100%;
  }

  .footer-column {
    padding: 18px;
    border-radius: 15px;
  }

  .footer-column h3 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 14px;
    margin: 6px 0;
  }

  /* Tercera columna ocupa toda la fila */
  .footer-column:nth-child(3) {
    grid-column: 1 / -1;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
  }

  .pre-footer-banner {
    height: 100px;
  }

  .footer-divider {
    margin: 30px auto 15px;
  }

  .footer-copyright {
    padding: 20px 0;
    font-size: 14px;
  }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .footer-column:nth-child(3) {
    grid-column: 1 / -1;
    margin-top: 10px;
  }

  .footer-column {
    padding: 15px;
  }

  .footer-column h3 {
    font-size: 19px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 13px;
  }
}

/* Mobile Portrait (480px - 575px) */
@media (max-width: 575px) {
  header {
    min-height: 120px;
    padding: 10px;
  }

  header .top nav {
    flex-direction: column;
    gap: 8px;
  }

  nav a {
    font-size: 14px;
    padding: 6px 12px;
    width: 100%;
    text-align: center;
  }

  header h1 {
    font-size: 28px;
  }

  header img {
    height: 60px;
    width: 60px;
  }

  .form-container {
    padding: 1.5rem;
    border-radius: 20px;
    max-width: 98%;
    margin: 0.5rem auto;
  }

  .info-panel .logo img {
    width: 100px;
    height: 100px;
  }

  .info-panel {
    min-height: 250px;
    padding: 1.5rem 1rem;
  }

  .form-panel {
    padding: 1rem 0.5rem;
  }

  .input-group {
    margin-bottom: 1.2rem;
  }

  .form-input {
    padding: 0.8rem 0.8rem 0.8rem 2.3rem;
    font-size: 0.9rem;
  }

  .input-icon {
    font-size: 1rem;
    left: 0.8rem;
  }

  .captcha-display {
    height: 50px;
    font-size: 1.1rem;
  }

  .captcha-refresh {
    height: 45px;
    font-size: 1rem;
  }

  .submit-btn {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .login-link,
  .register-link {
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem;
  }

  /* Footer mobile completo */
  footer {
    padding: 25px 15px;
  }

  .footer-logo {
    margin-bottom: 20px;
  }

  .footer-logo img {
    height: 80px;
    width: 80px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 100%;
  }

  .footer-column {
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 10px;
  }

  .footer-column h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 13px;
    margin: 5px 0;
  }

  .footer-column:last-child p {
    font-size: 16px;
  }

  .footer-column:last-child p:last-child {
    font-size: 14px;
  }

  .pre-footer-banner {
    height: 80px;
  }

  .footer-divider {
    margin: 25px auto 10px;
  }

  .footer-copyright {
    padding: 15px 10px;
    font-size: 12px;
    line-height: 1.4;
  }
}

/* Extra Small Mobile (320px - 479px) */
@media (max-width: 479px) {
  .form-container {
    padding: 1.2rem;
    max-width: 100%;
    margin: 0.25rem;
  }

  .info-panel .logo img {
    width: 90px;
    height: 90px;
  }

  .info-panel {
    min-height: 200px;
  }

  .form-input {
    padding: 0.7rem 0.7rem 0.7rem 2.1rem;
  }

  .input-icon {
    left: 0.7rem;
  }

  /* Footer extra small */
  footer {
    padding: 20px 10px;
  }

  .footer-logo img {
    height: 70px;
    width: 70px;
  }

  .footer-content {
    gap: 12px;
  }

  .footer-column {
    padding: 12px;
    border-radius: 10px;
  }

  .footer-column h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 12px;
    margin: 4px 0;
    line-height: 1.4;
  }

  .footer-column:last-child p {
    font-size: 14px;
  }

  .footer-column:last-child p:last-child {
    font-size: 12px;
  }

  .pre-footer-banner {
    height: 60px;
  }

  .footer-divider {
    margin: 20px auto 8px;
  }

  .footer-copyright {
    padding: 12px 5px;
    font-size: 11px;
    line-height: 1.3;
  }
}

/* Ultra Small Mobile (280px - 319px) */
@media (max-width: 319px) {
  footer {
    padding: 15px 5px;
  }

  .footer-logo img {
    height: 60px;
    width: 60px;
  }

  .footer-column {
    padding: 10px;
  }

  .footer-column h3 {
    font-size: 15px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 11px;
  }

  .footer-copyright {
    font-size: 10px;
    padding: 10px 3px;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  footer {
    padding: 20px 15px;
  }

  .footer-logo {
    margin-bottom: 15px;
  }

  .footer-logo img {
    height: 60px;
    width: 60px;
  }

  .footer-content {
    gap: 15px;
  }

  .footer-column {
    padding: 12px;
  }

  .footer-column h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 12px;
    margin: 3px 0;
  }

  .pre-footer-banner {
    height: 60px;
  }

  .footer-copyright {
    padding: 10px 0;
    font-size: 11px;
  }
}

/* ========================================
   PREFERENCIAS DE USUARIO
======================================== */

/* Reducir animaciones para usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .float {
    animation: none !important;
  }

  .footer-logo img {
    animation: none !important;
  }

  .footer-column:last-child p {
    animation: none !important;
  }
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
  .form-input {
    border-width: 3px;
  }

  .submit-btn {
    border: 2px solid #000;
  }

  .captcha-display {
    border-width: 3px;
  }

  .footer-column {
    border-width: 2px;
  }
}
