/*
  CSS Grid Layout
  This is a robust way to structure the main page layout.
*/
body {
    display: grid;
    grid-template-rows: auto 1fr auto; /* Header, Main (stretches), Footer */
    grid-template-areas:
        "header"
        "main"
        "footer";
    min-height: 100vh;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: #1e293b;
    line-height: 1.6;
    background-color: #f8fafc;
    overflow-x: hidden;
}

header {
    grid-area: header;
}

main {
    grid-area: main;
}

footer {
    grid-area: footer;
}

/* General Styles */
* {
    padding: 0;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Floating Action Buttons (remain fixed) */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s;
    animation: pulse 2s infinite;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn i {
    color: white;
    font-size: 32px;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

#scrollToTopBtn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #223e7c;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex; 
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

#scrollToTopBtn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scrollToTopBtn:hover {
    background-color: #3f4040;
    transform: translateY(-5px);
}

#scrollToTopBtn i {
    font-size: 24px;
}
/* Estilos mejorados para notificaciones */
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 16px;
  border-radius: 8px;
  max-width: 400px;
  min-width: 300px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideInFromTop 0.3s ease-out;
  color: white;
  font-family: 'Poppins', sans-serif;
}

.notification.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1f2937;
}

.notification.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

@keyframes slideInFromTop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Animación de salida */
.notification.fade-out {
  animation: slideOutToTop 0.3s ease-in forwards;
}

@keyframes slideOutToTop {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* Responsive para notificaciones */
@media (max-width: 640px) {
  .notification {
    left: 1rem;
    right: 1rem;
    transform: translateX(0);
    max-width: none;
    min-width: auto;
  }
  
  @keyframes slideInFromTop {
    0% {
      opacity: 0;
      transform: translateY(-20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideOutToTop {
    0% {
      opacity: 1;
      transform: translateY(0);
    }
    100% {
      opacity: 0;
      transform: translateY(-20px);
    }
  }
}

/* Estilos para el botón de toggle del tema */
.theme-toggle {
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}