/* Reset y configuración base */
    html, body {
      margin: 0;
      padding: 0;
      height: 100vh; /* Full viewport height */
      min-height: 100vh; /* Ensure minimum height */
      min-height: -webkit-fill-available; /* Fix for mobile browsers */
      box-sizing: border-box;
    }
    *, *:before, *:after {
      box-sizing: inherit;
    }
    body {
      font-family: 'Poppins', sans-serif;
      color: #333;
      display: flex;
      flex-direction: column;
      overflow-x: hidden;
    }

    /* Fondo fijo (carrusel para desktop) */
    .background-carousel {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -2;
      overflow: hidden;
      background-size: cover;
      background-position: center;
    }
    .background-carousel .carousel {
      display: flex;
      width: 200%;
      height: 100%;
      animation: fadeSlide 12s infinite ease-in-out;
    }
    .background-carousel img {
      width: 50%;
      height: 100%;
      object-fit: cover;
      object-position: top;
    }

    /* Capa de overlay */
    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.3);
      z-index: -1;
    }

    /* Contenedor principal para sticky footer */
    .page-content {
      display: flex;
      flex-direction: column;
      flex: 1 0 auto; /* Grow to fill space, don't shrink */
      min-height: calc(100vh - 60px); /* Adjust for approximate footer height */
    }

    /* Contenedor principal del contenido con dos columnas (Desktop) */
    main.main-container {
      max-width: 1200px;
      width: 100%;
      margin: 0 auto;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      padding: 40px 20px;
      position: relative;
      z-index: 1;
      flex: 1; /* Ensure main grows to fill space */
    }

    /* Columna izquierda */
    .text-content {
      flex: 1;
    }

    /* Columna derecha: login */
    .login-container {
      width: 400px;
      max-width: 100%;
      margin: 0 auto;
      padding: 0 15px;
    }

    .login-box {
      background: rgba(255, 255, 255, 0.85);
      padding: 2.5rem;
      border-radius: 15px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
      width: 100%;
      animation: fadeInUp 0.8s ease-out forwards 0.5s;
      text-align: center;
      overflow: hidden;
    }

    .login-box h1 {
      font-family: 'Poppins', sans-serif;
      margin-bottom: 2rem;
      color: #333;
      font-size: 1.8rem;
      font-weight: 700;
    }

    .login-box label {
      display: block;
      margin: 0.5rem 0 0.3rem;
      font-weight: 600;
      color: #555;
      text-align: left;
      width: 100%;
    }

    .login-box input {
      width: 100%;
      padding: 0.9rem;
      margin-bottom: 1.2rem;
      border: 1px solid #ddd;
      border-radius: 8px;
      font-size: 1rem;
      transition: border-color 0.3s ease, box-shadow 0.3s ease;
      text-align: left;
    }

    .login-box input:focus {
      border-color: #e63946;
      box-shadow: 0 0 8px rgba(230, 57, 70, 0.3);
      outline: none;
    }

    .password-container {
      position: relative;
      margin-bottom: 1.2rem;
      text-align: left;
      width: 100%;
    }

    .password-container input {
      margin-bottom: 0;
    }

    .toggle-password {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      font-size: 1.1rem;
      color: #555;
    }

    .login-box button[type="submit"] {
      width: 100%;
      padding: 1rem;
      background-color: #e63946;
      border: none;
      border-radius: 25px;
      color: #fff;
      font-size: 1.1rem;
      font-weight: 600;
      cursor: pointer;
      transition: background-color 0.3s ease, transform 0.3s ease;
      margin-top: 1rem;
    }

    .login-box button[type="submit"]:hover {
      background-color: #c81f2e;
      transform: scale(1.03);
    }

    .error-message {
      color: #e63946;
      text-align: center;
      margin-bottom: 1.5rem;
      font-size: 1rem;
      font-weight: 600;
    }

    .remember-me-label {
      display: flex;
      align-items: center;
      margin-bottom: 1rem;
      font-size: 0.95rem;
      font-weight: 400;
      color: #555;
      cursor: pointer;
      transition: color 0.3s ease;
      text-align: left;
    }

    .remember-me-label input {
      width: 16px;
      height: 16px;
      margin-right: 8px;
      margin-bottom: 0;
      accent-color: #e63946;
      cursor: pointer;
    }

    .remember-me-label:hover {
      color: #e63946;
    }

    /* Footer (en flujo, pegado al final con flex) */
     footer {
      background: #333;
      color: #fff;
      padding: 1rem 0;
      text-align: center;
    }

    footer p {
      margin: 0.3rem 0;
      font-size: 0.9rem;
    }

    .social-links {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 1rem;
    }

    .social-links a {
      display: inline-block;
      transition: transform 0.3s ease;
    }

    .social-links a:hover {
      transform: scale(1.1);
    }

    .social-links img {
      width: 30px; /* Ajusta el tamaño según tus necesidades */
      height: 30px;
      object-fit: contain;
    }
    
    /* Animaciones */
    @keyframes fadeInUp {
      0% { opacity: 0; transform: translateY(50px); }
      100% { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeSlide {
      0%, 48% { transform: translateX(0); opacity: 1; }
      49% { opacity: 0.5; }
      50%, 98% { transform: translateX(-50%); opacity: 1; }
      99% { opacity: 0.5; }
      100% { transform: translateX(0); opacity: 1; }
    }

    /* =========================
       MEDIA QUERIES: MOBILE
       ========================= */
    @media (max-width: 768px) {
      /* Usar una sola imagen estática en dispositivos móviles */
      .background-carousel {
        background-image: url('../../images/img23.jpg');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
      }
      .background-carousel .carousel {
        display: none;
      }

      /* Logo container for mobile */
      .mobile-logo {
        display: block !important;
        text-align: center;
        margin-bottom: 1rem;
      }

      .mobile-logo img {
        max-width: 200px;
        height: auto;
      }

      /* Mostrar el contenido en columna */
      main.main-container {
        flex-direction: column;
        padding: 10px 10px;
        padding-top: 5px; /* Reduced padding since logo is now separate */
      }

      .login-container {
        width: 90%;
        max-width: 400px;
        margin: 0 auto;
        padding: 0 10px;
      }

      
      .login-box {
        background: transparent !important;
        box-shadow: none !important;
        padding: 2rem;
      }

      /* Inputs con fondo semi-transparente y texto blanco */
      .login-box input {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.5);
        width: 100%;
      }
      .login-box input::placeholder {
        color: rgba(255, 255, 255, 0.7);
      }
      /* Labels y título en blanco */
      .login-box label, .login-box h1 {
        color: #fff;
      }

      /* Ajustar el color del ícono en modo móvil */
      .toggle-password {
        color: #fff;
      }

      /* Fix checkbox alignment */
      .remember-me-label {
        margin-left: 20px;
        align-items: center;
        gap: 8px;
      }

      .remember-me-label input {
        margin-right: 0;
        margin-top: 0;
        flex-shrink: 0;
      }

      footer {
        padding: 0.8rem 0;
        width: 100%;
      }
      .social-links img {
        width: 25px;
        height: 25px;
      }

      /* Ensure the body and page-content take full height on mobile */
      html, body {
        height: 100vh;
        min-height: 100vh;
        min-height: -webkit-fill-available;
      }
      .page-content {
        min-height: calc(100vh - 50px); /* Adjust for smaller footer height on mobile */
      }
    }

    @media (max-width: 480px) {
      .login-box h1 {
        font-size: 1.6rem;
      }
      .login-box input,
      .login-box button[type="submit"] {
        font-size: 0.95rem;
        padding: 0.8rem;
      }
    }

    /* Hide mobile logo on desktop */
    .mobile-logo {
      display: none;
    }