/* Login page specific styles: background image + centered white card with logos on sides */

:root {
    --primary: #b81530;
    --accent: #ffffff;
    --white: #ffffff;
    --border: #e0e0e0;
    --text: #333;
    --text-light: #666;
}

/* Full-screen background image under the page */
.login-background {
    position: fixed;
    inset: 0;
    background-image: url('../public/photo_pickleballTratada.webp');
    background-size: cover;
    background-position: center;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .login-background {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .logo-side {
        display: none;
    }
}

/* Red overlay to keep theme */
.login-overlay {

    margin: 0.625rem auto;
    max-width: 90%;
    align-items: center;
}

/* Logo side containers */
.logo-side {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    opacity: 0.7;
    animation: fadeInSide 1s ease-out;
}

.logo-left {
    animation-delay: 0.1s;
}

.logo-right {
    animation-delay: 0.2s;
}

.logo-side img {
    /*   max-height: 300px;
    max-width: 300px;*/

    height: auto;
    width: auto;
    
    filter: drop-shadow(0 0.25rem 0.9375rem rgba(0, 0, 0, 0.2));

}

@keyframes fadeInSide {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 0.7;
        transform: scale(1);
    }
}

/* Center container holding the white card */
.login-container {
    /* position: fixed; */
    inset: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    /*z-index: 10;*/
    pointer-events: none;
}

/* White card / fragment */
.login-card {
    width: 100%;
    max-width: 28.75rem;
    background: var(--white);
    border-radius: 0.625rem;
    padding: 2.125rem 1.875rem;
    box-shadow: 0 1.125rem 2.5rem rgba(0, 0, 0, 0.25);
    border-top: 0.25rem solid var(--primary);
    text-align: center;
    pointer-events: auto;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(1.875rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Titles */
#login-title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    color: var(--primary);
}

.login-subtitle {
    margin-bottom: 1.125rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Form elements reuse styles similar to register */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.375rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.03125rem;
}

.form-group input {
    padding: 0.75rem 0.875rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--text);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0.375rem 1.25rem rgba(184, 21, 48, 0.08);
}

/* Primary button stays full width */
.btn.btn-primary {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, 100%);
    color: var(--primary);
    border-radius: 0.5rem;
    border: none;
    font-weight: 700;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03125rem;
}

.btn.btn-primary:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.75rem 1.875rem rgba(184, 21, 48, 0.14);
}

/* Footer inside card */
.auth-footer {
    margin-top: 0.75rem;
    border-top: 1px;
    padding-top: 0.75rem;
}

.auth-footer p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: --primary;
}

/* Mobile Logo hidden by default */
.mobile-logo {
    display: none;
}

/* Responsive tweaks */
@media (max-width: 60.5rem) {
    /* Reset grid layout */
    .login-background {
        display: block;
        background-image: url('../public/photo_pickleballTratada.webp'); /* Asegurar fondo */
    }

    /* Hide desktop logos */
    .logo-side {
        display: none;
    }

    /* Login container takes full height */
    .login-container {
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        min-height: 100vh;
        height: 100vh;
    }

    /* Mobile logo area: 1/4 of screen */
    .mobile-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 25vh;
        width: 100%;
        position: relative;
        z-index: 2;
    }

    .mobile-logo img {
        max-height: 60%;
        max-width: 80%;
        filter: drop-shadow(0 0.25rem 0.625rem rgba(0,0,0,0.3));
    }

    /* Login card as a floating card */
    .login-card {
        flex: 0 0 auto; /* No estirar */
        width: 90%;
        max-width: 25rem;
        margin: 0 auto; /* Centrado horizontal */
        border-radius: 1rem; /* Bordes redondeados completos */
        padding: 1.875rem 1.5rem;
        box-shadow: 0 0.625rem 1.5625rem rgba(0,0,0,0.2);
        animation: slideUpMobile 0.5s ease-out;
    }

    @keyframes slideUpMobile {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}



/* ================================
   BACK TO HOME BUTTON
================================ */

.back-home-btn {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--light-gray);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  z-index: 10;
}

.back-home-btn:hover {
  background-color: var(--primary);
  color: white;
  transform: scale(1.1);
}

.back-home-btn i {
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 48rem) {
  .back-home-btn {
    top: 1rem;
    left: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
  }
}