/* Estilos Generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #eef1f5;
    color: #333;
}

/* --- Página de Login --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #005a9c, #003d6b);
}
.login-box {
    background: white;
    padding: 2.5rem 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
    max-width: 400px;
}
.logo {
    max-width: 150px;
    margin-bottom: 1rem;
}
.login-box h2 {
    color: #005a9c;
    margin-bottom: 0.5rem;
}
.login-box p {
    color: #6c757d;
    margin-bottom: 2rem;
}
.login-box input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}
.login-box button {
    width: 100%;
    padding: 0.8rem;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
.login-box button:hover {
    background-color: #218838;
}
.error-mensaje {
    color: #dc3545;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* --- Página del Portal --- */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.logout-button {
    background-color: #dc3545;
    color: white;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}
.logout-button:hover {
    background-color: #c82333;
}
.portal-main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.hospitales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.hospital-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, box-shadow 0.3s;
}
.hospital-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.card-header {
    padding: 1.5rem;
}
.card-header h3 {
    margin: 0 0 0.5rem 0;
    color: #005a9c;
}
.card-header p {
    margin: 0;
    color: #6c757d;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 8px 8px;
}
.status-indicator {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}
.status-disponible {
    background-color: #28a745; /* Verde */
}
.status-no_disponible {
    background-color: #dc3545; /* Rojo */
}
.visit-button {
    background-color: #007bff;
    color: white;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}
.visit-button:hover {
    background-color: #0056b3;
}
/* --- Estilos para Agrupación por Zonas --- */

.zona-titulo {
    color: #003d6b;
    border-bottom: 2px solid #005a9c;
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Agrega un separador visual entre zonas, excepto la última */
.zone-separator {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin-top: 2.5rem;
}

/* Oculta el último separador para un acabado limpio */
main > hr.zone-separator:last-of-type {
    display: none;
}