*{

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}


body{

    background-image: url(../img/fondo.png);
    font-family: 'Century Gothic';
    background-size: cover;

}

header{
    
    background-color: rgb(22, 32, 66);
    margin-right: 35px;
    margin-left: 35px;
    min-height: 100px;
    padding: 15px 30px;
    border-radius: 20px 20px 0 0;

    display: flex;
    align-items: center;
    
}

/* ======================================================
   HEADER
   ====================================================== */



.head-logo{
    flex-shrink: 0;
}

.head-logo a{
    display: block;
}

.head-logo img{
    width: 85px;
    height: 85px;

    display: block;
    object-fit: cover;

    border-radius: 50%;
}

.nv{
    flex: 1;
}

.menu{
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 20px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.menu li{
    margin: 0;
}

.menu a{
    display: block;

    padding: 10px 5px;

    color: white;

    font-size: 16px;
    text-align: center;
    text-decoration: none;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.menu a:hover{
    color: #a9c4ff;
    transform: translateY(-2px);
}

.perfil{
    flex-shrink: 0;
}

.perfil-enlace{
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid white;
    border-radius: 50%;

    color: white;
    font-size: 23px;
    text-decoration: none;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.perfil-enlace:hover{
    background-color: white;
    color: #172345;
    transform: scale(1.06);
}

/* Oculto en escritorio */

.menu-toggle{
    display: none;

    width: 48px;
    height: 48px;

    align-items: center;
    justify-content: center;

    margin-left: auto;

    border: 2px solid white;
    border-radius: 12px;

    background-color: transparent;
    color: white;

    font-size: 22px;
    cursor: pointer;
}

@media (max-width: 950px){

    .header{
        flex-wrap: wrap;
        gap: 12px;

        min-height: auto;
        padding: 12px 18px;
    }

    .head-logo img{
        width: 68px;
        height: 68px;
    }

    .menu-toggle{
        display: flex;
    }

    .perfil{
        margin-left: 0;
    }

    .perfil-enlace{
        width: 46px;
        height: 46px;
    }

    .nv{
        width: 100%;
        flex-basis: 100%;

        max-height: 0;
        overflow: hidden;

        opacity: 0;

        transition:
            max-height 0.4s ease,
            opacity 0.3s ease;
    }

    .nv.activo{
        max-height: 420px;
        opacity: 1;
    }

    .menu{
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        padding-top: 8px;
    }

    .menu li{
        width: 100%;
    }

    .menu a{
        width: 100%;

        padding: 14px 12px;

        border-bottom: 1px solid rgba(255, 255, 255, 0.16);

        text-align: left;
    }

    .menu li:last-child a{
        border-bottom: none;
    }
}

@media (max-width: 480px){

    .header{
        width: calc(100% - 16px);
        padding: 10px 12px;

        border-radius: 16px 16px 0 0;
    }

    .head-logo img{
        width: 57px;
        height: 57px;
    }

    .menu-toggle,
    .perfil-enlace{
        width: 42px;
        height: 42px;
    }

    .menu-toggle{
        font-size: 19px;
    }

    .perfil-enlace{
        font-size: 19px;
    }

    .menu a{
        padding: 12px 10px;
        font-size: 14px;
    }
}

/* ======================================================
   ADOPCIONES
   ====================================================== */

.pagina-adopciones{
    background-color: rgba(200, 217, 230, 0.918);
    margin-right: 35px;
    margin-left: 35px;
    padding: 12px 10px;
    color: #172345;
}

.encabezado-adopciones{
    max-width: 830px;
    margin: 0 auto 38px;
    text-align: center;
}

.subtitulo-adopciones{
    display: inline-block;
    margin-bottom: 8px;

    color: #315eae;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.encabezado-adopciones h1{
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 52px);
}

.encabezado-adopciones p{
    margin: 0;

    color: #4f607b;
    font-size: 17px;
    line-height: 1.7;
}


/* Herramientas */

.herramientas-adopciones{
    margin-bottom: 32px;
    padding: 18px;

    border-radius: 18px;

    background-color: rgba(210, 226, 240, 0.95);

    box-shadow: 0 8px 24px rgba(23, 35, 69, 0.1);
}

.buscador-adopciones{
    width: min(470px, 100%);

    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0 auto 17px;
    padding: 0 14px;

    border: 2px solid transparent;
    border-radius: 12px;

    background-color: white;
}

.buscador-adopciones:focus-within{
    border-color: #315eae;

    box-shadow: 0 0 0 4px rgba(49, 94, 174, 0.13);
}

.buscador-adopciones i{
    color: #687895;
}

.buscador-adopciones input{
    width: 100%;

    padding: 13px 0;

    border: none;
    background: transparent;

    color: #172345;
    font-family: inherit;
    font-size: 15px;

    outline: none;
}

.filtros-adopciones{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
}

.filtro-adopcion{
    padding: 9px 16px;

    border: 2px solid #172345;
    border-radius: 22px;

    background-color: transparent;
    color: #172345;

    font-family: inherit;
    font-weight: 700;

    cursor: pointer;

    transition: 0.25s ease;
}

.filtro-adopcion:hover,
.filtro-adopcion.activo{
    background-color: #172345;
    color: white;
}


/* Tarjetas */

.catalogo-adopciones{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.tarjeta-adopcion{
    overflow: hidden;

    border-radius: 23px;
    background-color: rgba(210, 226, 240, 0.98);

    box-shadow: 0 11px 30px rgba(23, 35, 69, 0.15);

    cursor: pointer;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.tarjeta-adopcion:hover{
    transform: translateY(-7px);

    box-shadow: 0 18px 40px rgba(23, 35, 69, 0.23);
}

.imagen-adopcion{
    position: relative;

    height: 285px;
    overflow: hidden;
}

.imagen-adopcion img{
    width: 100%;
    height: 100%;

    display: block;
    object-fit: cover;

    transition: transform 0.45s ease;
}

.tarjeta-adopcion:hover .imagen-adopcion img{
    transform: scale(1.06);
}

.insignia-adopcion{
    position: absolute;
    top: 17px;
    left: 17px;

    padding: 7px 13px;

    border-radius: 20px;

    color: white;

    font-size: 13px;
    font-weight: 700;

    box-shadow: 0 4px 13px rgba(0, 0, 0, 0.22);
}

.insignia-adopcion.disponible{
    background-color: #217a48;
}

.insignia-adopcion.adoptado{
    background-color: #315eae;
}

.contenido-tarjeta-adopcion{
    padding: 25px;
}

.nombre-adopcion{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 19px;
}

.nombre-adopcion h2{
    margin: 0 0 5px;
    font-size: 29px;
}

.nombre-adopcion span{
    color: #64738e;
    font-size: 14px;
}

.nombre-adopcion > i{
    color: #315eae;
    font-size: 24px;
}

.estado-salud-adopcion{
    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 18px;
    padding: 12px;

    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.67);
}

.estado-salud-adopcion > i{
    width: 37px;
    height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background-color: #172345;
    color: white;
}

.estado-salud-adopcion span,
.estado-salud-adopcion strong{
    display: block;
}

.estado-salud-adopcion span{
    margin-bottom: 3px;

    color: #64738e;
    font-size: 12px;
}

.estado-salud-adopcion.recuperacion strong{
    color: #a0640d;
}

.estado-salud-adopcion.estable strong,
.estado-salud-adopcion.recuperado strong{
    color: #217a48;
}

.contenido-tarjeta-adopcion > p{
    min-height: 67px;

    margin: 0 0 22px;

    color: #465875;
    font-size: 14px;
    line-height: 1.55;
}

.acciones-tarjeta-adopcion{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.acciones-tarjeta-adopcion.una-accion{
    grid-template-columns: 1fr;
}

.boton-ver-detalle,
.boton-adoptame{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;
    padding: 10px 12px;

    border-radius: 11px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;

    cursor: pointer;

    transition: 0.25s ease;
}

.boton-ver-detalle{
    border: 2px solid #172345;

    background-color: transparent;
    color: #172345;
}

.boton-adoptame{
    border: 2px solid #172345;

    background-color: #172345;
    color: white;
}

.boton-ver-detalle:hover{
    background-color: white;
}

.boton-adoptame:hover{
    background-color: #315eae;
    border-color: #315eae;
}


/* Sin resultados */

.sin-resultados-adopcion{
    display: none;

    padding: 60px 20px;

    text-align: center;
}

.sin-resultados-adopcion.activo{
    display: block;
}

.sin-resultados-adopcion i{
    margin-bottom: 14px;

    color: #315eae;
    font-size: 42px;
}

.sin-resultados-adopcion h2{
    margin: 0 0 7px;
}

.sin-resultados-adopcion p{
    margin: 0;
    color: #64738e;
}

.aviso-adopcion{
    display: flex;
    align-items: flex-start;
    gap: 13px;

    max-width: 1000px;

    margin: 35px auto 0;
    padding: 18px 22px;

    border-radius: 14px;

    background-color: rgba(210, 226, 240, 0.96);
    color: #425472;
}

.aviso-adopcion i{
    margin-top: 3px;

    color: #315eae;
    font-size: 20px;
}

.aviso-adopcion p{
    margin: 0;
    line-height: 1.6;
}


/* Modal */

.fondo-modal-adopcion{
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 22px;

    background-color: rgba(7, 18, 49, 0.76);

    z-index: 4500;
}

.fondo-modal-adopcion.activo{
    display: flex;
}

.modal-animal{
    position: relative;

    width: min(1000px, 100%);
    max-height: 92vh;

    overflow-y: auto;

    border-radius: 24px;
    background-color: #d3e2f0;
}

.cerrar-modal-animal{
    position: absolute;
    top: 17px;
    right: 17px;

    width: 43px;
    height: 43px;

    border: none;
    border-radius: 50%;

    background-color: #172345;
    color: white;

    font-size: 19px;
    cursor: pointer;

    z-index: 3;
}

.cabecera-modal-animal{
    display: grid;
    grid-template-columns: 40% 60%;
}

.foto-modal-animal{
    min-height: 490px;
}

.foto-modal-animal img{
    width: 100%;
    height: 100%;

    display: block;
    object-fit: cover;
}

.informacion-modal-animal{
    padding: 45px 38px;
}

.estado-modal-adopcion{
    display: inline-block;

    margin-bottom: 12px;
    padding: 7px 13px;

    border-radius: 19px;

    background-color: #217a48;
    color: white;

    font-size: 13px;
    font-weight: 700;
}

.informacion-modal-animal h2{
    margin: 0 0 7px;
    font-size: 42px;
}

#modalDatosAnimal{
    margin: 0 0 21px;
    color: #64738e;
}

.salud-modal-animal{
    margin-bottom: 22px;
    padding: 14px;

    border-radius: 12px;

    background-color: rgba(255, 255, 255, 0.7);

    font-weight: 700;
}

.descripcion-modal-animal{
    color: #435573;
    line-height: 1.65;
}

.accion-modal-adopcion{
    margin-top: 26px;
}

.accion-modal-adopcion .boton-adoptame{
    padding: 13px 23px;
}

.historial-modal-animal{
    padding: 32px 38px 38px;
}

.titulo-historial-modal{
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}

.titulo-historial-modal span{
    color: #315eae;

    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.titulo-historial-modal h3{
    margin: 5px 0 0;
    font-size: 28px;
}

.titulo-historial-modal > i{
    color: #315eae;
    font-size: 29px;
}

.lista-historial-modal{
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.registro-historial-modal{
    padding: 20px;

    border-left: 5px solid #315eae;
    border-radius: 13px;

    background-color: rgba(255, 255, 255, 0.72);
}

.registro-historial-modal h4{
    margin: 0 0 13px;
}

.detalles-historial-modal{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detalles-historial-modal p{
    margin: 0;

    color: #465875;
    line-height: 1.5;
}

.detalles-historial-modal strong{
    display: block;

    margin-bottom: 3px;
    color: #172345;
}


/* Responsive */

@media (max-width: 1000px){

    .catalogo-adopciones{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px){

    .catalogo-adopciones{
        grid-template-columns: 1fr;
    }

    .tarjeta-adopcion{
        width: min(500px, 100%);
        margin: 0 auto;
    }

    .cabecera-modal-animal{
        grid-template-columns: 1fr;
    }

    .foto-modal-animal{
        min-height: 360px;
        max-height: 450px;
    }
}

@media (max-width: 520px){

    .pagina-adopciones{
        width: 92%;
    }

    .filtros-adopciones{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .filtro-adopcion{
        padding: 9px 7px;
        font-size: 13px;
    }

    .imagen-adopcion{
        height: 250px;
    }

    .acciones-tarjeta-adopcion{
        grid-template-columns: 1fr;
    }

    .informacion-modal-animal,
    .historial-modal-animal{
        padding: 28px 21px;
    }

    .detalles-historial-modal{
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   CHAT
   ====================================================== */

.boton-chat{
    position: fixed;
    right: 30px;
    bottom: 30px;

    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #172345;
    color: white;

    border-radius: 50%;
    text-decoration: none;
    font-size: 28px;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);

    z-index: 1000;

    transition:
        transform 0.3s ease,
        background-color 0.3s ease;
}

.boton-chat:hover{
    background-color: #2b427a;
    transform: scale(1.1);
}

.notificacion-chat{
    position: absolute;
    top: -3px;
    right: -3px;

    width: 23px;
    height: 23px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #e63946;
    color: white;

    border: 2px solid white;
    border-radius: 50%;

    font-size: 12px;
    font-weight: bold;
}

.texto-chat{
    position: absolute;
    right: 78px;

    width: max-content;
    padding: 8px 13px;

    background-color: #172345;
    color: white;

    border-radius: 8px;

    font-size: 14px;

    opacity: 0;
    visibility: hidden;

    transition: 0.3s ease;
}

.boton-chat:hover .texto-chat{
    opacity: 1;
    visibility: visible;
}

.chat-burbuja{
    position: fixed;
    right: 28px;
    bottom: 28px;

    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background-color: #172345;
    color: white;

    font-size: 27px;
    cursor: pointer;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);

    z-index: 1100;

    transition: 0.3s ease;
}

.chat-burbuja:hover{
    transform: scale(1.08);
    background-color: #294077;
}

.chat-ventana{
    position: fixed;
    right: 28px;
    bottom: 105px;

    width: 380px;
    height: 540px;

    display: none;
    flex-direction: column;

    overflow: hidden;

    border-radius: 18px;
    background-color: #f4f8fc;

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);

    z-index: 1099;
}

.chat-ventana.activo{
    display: flex;
}

.chat-header{
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 18px;

    background-color: #172345;
    color: white;
}

.chat-identidad{
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar{
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background-color: white;
    color: #172345;

    font-size: 21px;
}

.chat-identidad h3{
    margin: 0;
    font-size: 17px;
}

.chat-identidad span{
    font-size: 12px;
    opacity: 0.8;
}

.cerrar-chat{
    border: none;
    background: transparent;
    color: white;

    font-size: 22px;
    cursor: pointer;
}

.chat-mensajes{
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 18px;
    overflow-y: auto;
}

.mensaje{
    max-width: 80%;
    padding: 11px 14px;

    border-radius: 14px;

    font-size: 14px;
    line-height: 1.4;
}

.mensaje.recibido{
    align-self: flex-start;

    background-color: white;
    color: #252525;

    border-bottom-left-radius: 4px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mensaje.enviado{
    align-self: flex-end;

    background-color: #93b4ff;
    color: #10204d;

    border-bottom-right-radius: 4px;
}

.mensaje img{
    width: 100%;
    max-width: 220px;

    display: block;

    border-radius: 10px;
    margin-top: 8px;
}

.chat-herramientas{
    display: flex;
    gap: 10px;

    padding: 8px 15px 0;
}

.chat-opcion{
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background-color: #dce8ff;
    color: #172345;

    font-size: 17px;
    cursor: pointer;

    transition: 0.2s ease;
}

.chat-opcion:hover{
    background-color: #bfd2ff;
}

.chat-formulario{
    display: flex;
    align-items: flex-end;
    gap: 10px;

    padding: 12px 15px 15px;
}

.chat-formulario textarea{
    flex: 1;
    min-height: 45px;
    max-height: 100px;

    resize: none;

    padding: 12px 14px;

    border: 1px solid #ccd5e0;
    border-radius: 14px;

    font-family: inherit;
    font-size: 14px;

    outline: none;
}

.chat-formulario textarea:focus{
    border-color: #6c96ef;
}

.enviar-mensaje{
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background-color: #172345;
    color: white;

    font-size: 18px;
    cursor: pointer;
}

.vista-previa,
.ubicacion-seleccionada{
    display: none;
    align-items: center;
    gap: 10px;

    margin: 8px 15px 0;
    padding: 8px 10px;

    border-radius: 10px;
    background-color: #e8f0ff;
}

.vista-previa.activo,
.ubicacion-seleccionada.activo{
    display: flex;
}

.vista-previa img{
    width: 60px;
    height: 60px;

    object-fit: cover;
    border-radius: 8px;
}

.vista-previa button,
.ubicacion-seleccionada button{
    margin-left: auto;

    border: none;
    background: transparent;

    color: #a00000;
    cursor: pointer;
}

@media (max-width: 480px){

    .chat-ventana{
        right: 10px;
        bottom: 90px;

        width: calc(100% - 20px);
        height: 70vh;
    }

    .chat-burbuja{
        right: 18px;
        bottom: 18px;
    }
}

.pie{

    background-color: rgb(22, 32, 66);
    margin-right: 35px;
    margin-left: 35px;
    min-height: 100px;
    padding: 15px 30px;
    border-radius: 0 0 20px 20px;
    color: #fff;

    display: flex;
    align-items: center;

}

.solo-admin{
    display: none;
}

.solo-admin.visible{
    display: block;
}