
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f0f4f8;
    color: #222;
}

header {
    background: #154467;
    color: white;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

header h2 {
    margin: 0;
    font-size: 20px;
}

nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

button {
    cursor: pointer;
    padding: 9px 16px;
    border: 1px solid #ccd2d8;
    background: #f6f6f6;
    border-radius: 3px;
}

nav button {
    background: #20577d;
    color: white;
    border-color: #427595;
}

main {
    padding: 25px 20px;
}

h1 {
    text-align: center;
    margin: 8px 0 35px;
    font-size: 32px;
}

.tarjetas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
    max-width: 1500px;
    margin: auto;
}

.tarjeta {
    background: white;
    border-radius: 14px;
    padding: 23px 18px;
    min-height: 420px;
    text-align: center;
    box-shadow: 0 5px 15px #0002;
}

.tarjeta img {
    height: 155px;
    width: 155px;
    object-fit: cover;
    border-radius: 50%;
    background: #ddd;
}

.tarjeta h2 {
    font-size: 22px;
    margin: 24px 0 12px;
}

.tarjeta p {
    line-height: 1.55;
    margin: 10px 0;
}

.formulario {
    max-width: 720px;
    margin: 20px auto;
    background: white;
    padding: 15px;
    box-shadow: 0 2px 12px #0001;
}

.titulo {
    background: #154467;
    color: white;
    padding: 13px;
    margin: -15px -15px 15px;
    font-size: 18px;
}

label {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    font-size: 13px;
    font-weight: bold;
}

input, select {
    padding: 9px;
    border: 1px solid #d7dce2;
    border-radius: 3px;
    width: 100%;
    font: inherit;
    font-weight: normal;
}

.botones {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.azul {
    background: #0875d9;
    color: white;
    border-color: #0875d9;
}

.rojo {
    background: #dc2935;
    color: white;
    border-color: #dc2935;
}

.busqueda {
    display: flex;
    gap: 10px;
    align-items: center;
}

.busqueda label {
    flex: 1;
}

h4 {
    background: #e9eef5;
    padding: 10px;
}

.foto-consulta {
    margin-left: 162px;
}

.foto-consulta img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

#mensaje {
    text-align: center;
    font-weight: bold;
    color: #154467;
}

@media (max-width: 1100px) {
    .tarjetas {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 760px) {
    .tarjetas {
        grid-template-columns: repeat(2, 1fr);
    }

    .tarjeta {
        min-height: 350px;
    }

    .tarjeta img {
        width: 110px;
        height: 110px;
    }

    .tarjeta h2 {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .tarjetas {
        grid-template-columns: 1fr;
    }

    label {
        grid-template-columns: 1fr;
    }

    .foto-consulta {
        margin-left: 0;
    }

    .busqueda {
        display: block;
    }
}
.vista-previa {
    text-align: center;
    margin: 15px 0;
}

.vista-previa img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ccc;
}
.foto-consulta {
    margin: 10px 0 20px 0;
}

.foto-consulta img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
}