/* BODY Y BACKGROUND */
body {
    font-family: Candara, "Comic Sans MS", Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* altura mínima igual a la ventana */
    display: flex;
    flex-direction: column;
    background: url('../images/back4.png') no-repeat center center;
    background-size: cover;
    position: relative;
}

/* Overlay oscuro */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

/* CONTENEDOR PRINCIPAL */
.main-wrapper {
    flex: 1; /* ocupa todo el espacio disponible */
    display: flex;
    flex-direction: column;
    justify-content: center; /* centra verticalmente */
    align-items: center;     /* centra horizontalmente */
    padding: 20px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* TÍTULO Y LOGO */
.title-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    z-index: 1;
    position: relative;
    animation: fadeIn 1s ease-in-out;
}

.title-container img {
    height: 90px;
    animation: zoomIn 1s ease-out;
}

h1 {
    color: white;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
    font-size: 4.5rem;
    font-weight: bold;
    margin: 0;
}

/* SUBTÍTULO */
.subtitle {
    color: #f0f0f0;
    font-size: 2.5rem;
    margin-bottom: 25px;
    z-index: 1;
    position: relative;
    text-align: center;
    animation: fadeIn 1.2s ease-in-out;
}

/* BOTONES */
.button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    padding: 15px 30px;
    margin: 10px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    width: 300px;
    max-width: 90%;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    animation: slideUp 0.8s ease-out;
    z-index: 1;
}

.button:active {
    transform: scale(0.97);
}

.planilla, .facturacion {
    background-color: rgba(36, 36, 36, 0.85);
    border: 2px solid rgba(66, 133, 244, 0.6);
    transition: 0.3s ease-in-out;
}

.planilla:hover, .facturacion:hover {
    background-color: rgba(0, 0, 0, 0.95);
    border-color: rgba(66, 133, 244, 0.95);
    box-shadow: 0px 0px 15px rgba(66, 133, 244, 0.8);
}

img.button-logo {
    height: 30px;
    border-radius: 4px;
    padding: 2px;
}

/* FOOTER */
footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    padding: 10px 0;
    width: 100%;
    background: rgba(0,0,0,0.2);
}

footer:hover {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0px 0px 6px rgba(255, 255, 255, 0.8);
}

/* ANIMACIONES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* RESPONSIVIDAD */
@media (max-width: 600px) {
    .title-container h1 {
        font-size: 2rem;
    }
    .title-container img {
        height: 45px;
    }
    .subtitle {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    .button {
        font-size: 1rem;
        padding: 12px 20px;
        width: 70%;
    }
    img.button-logo {
        height: 25px;
    }
    .main-wrapper {
        padding-bottom: 20px; /* más espacio para el footer en móviles */
    }
}
