* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f5f7f5;
  color: #333;
  line-height: 1.6;
}

.full-screen-section {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/*Propiedades comunes */
.login-section {
    padding: 40px;
    width: 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
    margin-top: -10%;
}

.logo-container {
    margin-bottom: 20px;
    text-align: center;
}

.logo-container img {
    width: 150px;
    height: auto;
    display: inline-block;
}

/*Propiedades comunes */
.login-section h1 {
    text-align: center;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
    display: grid; /* Usamos grid para un mejor control del diseño */
    grid-template-columns: auto; /* La primera columna para la etiqueta, la segunda para el input */
    align-items: center; /* Alineación vertical al centro */
    
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
    justify-self: left;
}

.form-group input[type="email"],
.form-group input[type="password"] {
    width: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    background-color: #d9d9d9;
}

.button-group {
    display: flex;
    gap: 10% 10%;
    justify-content: right;
}

/* Propiedades comunes*/
.btn-primary, .btn-secondary {
    padding: 10px 20px;
    width: 45%;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color:white;
}

.btn-primary {
    background-color: #7C896F; /* Verde grisáceo para "Entrar" */
}

.btn-secondary {
    background-color: #7C896F; /* Gris para "Registrarse" */
}

.btn-primary:hover {
    background-color: #4cae4c;
}

.btn-secondary:hover {
    background-color: #6c757d;
}

.image-section {
    width: 70%;
    height: 100%;
}

.image-section img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/* --- Media Queries --- */

/* Tabletas (pantallas ≥ 768px Y < 992px) */
@media (min-width: 768px) and (max-width: 991px) {
    .full-screen-section {
        flex-direction: column; /* Tablet: stack sections vertically */
        justify-content: center; /* Center content vertically */
        align-items: center; /* Center content horizontally */
        height: auto; /* Allow height to adjust */
        min-height: 100vh; /* Ensure it still covers the viewport initially */
    }

    .login-section {
        width: 70%; /* Tablet width for the form section */
        max-width: 500px; /* Limit max-width for better control */
        padding: 40px;
        margin: 20px auto; /* Center the section on the page */
        border-radius: 8px; /* Add some rounded corners */
        box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Subtle shadow */
    }

    .logo-container img {
        width: 150px; /* Keep logo size for tablets */
    }

    .login-section h1 {
        font-size: 28px; /* Tablet heading size */
    }

    .form-group {
        width: 100%; /* Take full width of login-section */
    }

    .button-group {
        flex-direction: row; /* Keep buttons in a row for tablets */
        gap: 15px; /* Adjust gap for tablets */
        justify-content: center; /* Center the group */
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        width: 48%; /* Adjust width to fit two buttons in a row with gap */
    }

    /* Hide the image section on tablets for a cleaner form-focused layout */
    .image-section {
        display: none;
    }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Móviles (pantallas < 768px) */
@media (max-width: 767px) {
    body {
        /* Ensure body allows content to grow */
        min-height: 100vh;
    }
    .full-screen-section {
        flex-direction: column; /* Mobile: stack sections vertically */
        justify-content: flex-start; /* Start content from top */
        align-items: center; /* Center content horizontally */
        height: auto; /* Allow height to adjust */
        min-height: 100vh; /* Ensure it still covers the viewport initially */
    }

    .login-section {
        width: 100%; /* Mobile: full width */
        padding: 30px 20px; /* Mobile padding */
        margin: 0; /* No external margins */
        border-radius: 0; /* No border-radius or shadow */
        box-shadow: none;
        min-height: auto;
    }

    .logo-container img {
        width: 120px; /* Mobile logo size */
    }

    .login-section h1 {
        font-size: 24px; /* Mobile heading size */
    }

    .form-group {
        width: 90%; /* Mobile: narrower form groups */
    }

    .button-group {
        flex-direction: column; /* Stack buttons vertically on mobiles */
        gap: 10px; /* Gap between stacked buttons */
        width: 90%; /* Make button group align with form groups */
        justify-content: center; /* Center buttons */
        align-items: center; /* Center stacked buttons */
        margin-top: 15px;
    }

    .btn-primary, .btn-secondary {
        width: 100%; /* Mobile: buttons take full width of button-group */
        max-width: 250px; /* Limit max-width to prevent stretching too wide */
    }

    /* Hide the image section on mobiles */
    .image-section {
      display: none;
    }
}