*{

    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;
    
}

/* ======================================================
   LOGO
   ====================================================== */

.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%;
}


/* ======================================================
   NAVEGACIÓN
   ====================================================== */

.nv{
    flex: 1;

    min-width: 0;
}

.menu{
    display: flex;
    align-items: center;
    justify-content: space-evenly;

    gap: 18px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.menu li{
    margin: 0;
    padding: 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
   ====================================================== */

.perfil{
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    z-index: 1000;
}

.perfil-logueado{
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* ======================================================
   BOTÓN DEL PERFIL
   ====================================================== */

.perfil-enlace{
    position: relative;

    width: 52px;
    height: 52px;

    min-width: 52px;
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border: 2px solid white;
    border-radius: 50%;

    background-color: transparent;

    color: white;

    font-size: 22px;

    text-decoration: none;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.perfil-enlace:hover{
    background-color: white;

    color: rgb(22, 32, 66);

    transform: scale(1.05);
}


/* ======================================================
   INDICADOR DE SESIÓN ACTIVA
   ====================================================== */

.indicador-conectado{
    position: absolute;

    right: -2px;
    bottom: 0;

    width: 14px;
    height: 14px;

    display: block;

    border: 2px solid rgb(22, 32, 66);
    border-radius: 50%;

    background-color: #2fb344;

    box-sizing: border-box;
}


/* ======================================================
   MENÚ DESPLEGABLE DEL PERFIL
   ====================================================== */

.menu-perfil{
    position: absolute;

    top: calc(100% + 14px);
    right: 0;

    width: 250px;

    padding: 16px;

    border-radius: 15px;

    background-color: white;

    color: #172345;

    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.28);

    /*
       MUY IMPORTANTE:
       oculto inicialmente.
    */

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-10px);

    box-sizing: border-box;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;

    z-index: 99999;
}


/* JS coloca esta clase */

.menu-perfil.activo{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}


/* Triángulo superior */

.menu-perfil::before{
    content: "";

    position: absolute;

    top: -7px;
    right: 18px;

    width: 14px;
    height: 14px;

    background-color: white;

    transform: rotate(45deg);
}


/* ======================================================
   INFORMACIÓN DEL PERFIL
   ====================================================== */

.info-perfil{
    position: relative;

    display: flex;
    align-items: center;

    gap: 12px;

    z-index: 2;
}

.avatar-perfil{
    width: 44px;
    height: 44px;

    min-width: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background-color: rgb(22, 32, 66);

    color: white;

    font-size: 18px;
}

.datos-perfil{
    min-width: 0;

    flex: 1;
}

.datos-perfil strong{
    display: block;

    max-width: 160px;

    overflow: hidden;

    color: #172345;

    font-size: 15px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.datos-perfil span{
    display: block;

    margin-top: 3px;

    color: #71809a;

    font-size: 12px;
}


/* ======================================================
   SEPARADOR
   ====================================================== */

.separador-perfil{
    width: 100%;
    height: 1px;

    margin: 14px 0;

    background-color: #dce4ef;
}


/* ======================================================
   CERRAR SESIÓN
   ====================================================== */

.cerrar-sesion{
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 9px;

    padding: 11px 12px;

    border: none;
    border-radius: 9px;

    background-color: transparent;

    color: #b3261e;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    box-sizing: border-box;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.cerrar-sesion:hover{
    background-color: #fff0ef;

    color: #9c1c16;
}


/* ======================================================
   BOTÓN HAMBURGUESA
   ====================================================== */

.menu-toggle{
    width: 48px;
    height: 48px;

    display: none;
    align-items: center;
    justify-content: center;

    margin-left: auto;
    padding: 0;

    border: 2px solid white;
    border-radius: 12px;

    background-color: transparent;

    color: white;

    font-size: 22px;

    cursor: pointer;

    box-sizing: border-box;
}


/* ======================================================
   TABLET
   ====================================================== */

@media (max-width: 950px){

    .header{
        width: calc(100% - 30px);

        min-height: auto;

        margin-left: 15px;
        margin-right: 15px;

        padding: 12px 18px;

        flex-wrap: wrap;

        gap: 12px;
    }


    .head-logo img{
        width: 68px;
        height: 68px;
    }


    /* Botón hamburguesa */

    .menu-toggle{
        display: flex;

        margin-left: auto;
    }


    /* Perfil queda junto a hamburguesa */

    .perfil{
        margin-left: 0;
    }


    .perfil-enlace{
        width: 46px;
        height: 46px;

        min-width: 46px;
        min-height: 46px;
    }


    /*
       Nav ocupa una segunda fila.
    */

    .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: 500px;

        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;

        box-sizing: border-box;
    }


    .menu li:last-child a{
        border-bottom: none;
    }


    /*
       El menú de usuario sigue saliendo
       debajo del avatar.
    */

    .menu-perfil{
        top: calc(100% + 12px);

        right: 0;
    }
}


/* ======================================================
   CELULAR
   ====================================================== */

@media (max-width: 480px){

    .header{
        width: calc(100% - 16px);

        margin-left: 8px;
        margin-right: 8px;

        padding: 10px 12px;

        border-radius: 16px 16px 0 0;
    }


    .head-logo img{
        width: 57px;
        height: 57px;
    }


    .menu-toggle{
        width: 42px;
        height: 42px;

        font-size: 19px;
    }


    .perfil-enlace{
        width: 42px;
        height: 42px;

        min-width: 42px;
        min-height: 42px;

        font-size: 19px;
    }


    .indicador-conectado{
        width: 12px;
        height: 12px;
    }


    .menu a{
        padding: 12px 10px;

        font-size: 14px;
    }


    .menu-perfil{
        width: 225px;

        right: -2px;
    }
}

.acerca{
    padding: 20px 30px 40px;
    background-color: rgba(200, 217, 230, 0.918);
    margin-right: 35px;
    margin-left: 35px;
}

.acerca > h1{
    margin-bottom: 25px;

    color: #071c5c;
    text-align: center;
    font-size: 32px;
}

.contenido-acerca{
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    align-items: center;
    gap: 45px;
}

.texto-acerca p{
    margin: 0 0 25px;

    color: #001a88;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    text-align: justify;
}

.texto-acerca p:last-child{
    margin-bottom: 0;
}

.texto-acerca strong{
    font-weight: 800;
}

.galeria-acerca{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.foto-acerca{
    position: relative;

    height: 190px;
    margin: 0;
    overflow: hidden;

    border: 5px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;

    background-color: #dbe8f4;

    box-shadow: 0 10px 25px rgba(23, 35, 69, 0.18);
}

.foto-principal{
    grid-column: 1 / -1;
    height: 280px;
}

.foto-acerca img{
    width: 100%;
    height: 100%;

    display: block;
    object-fit: cover;

    transition: transform 0.45s ease;
}

.foto-acerca:hover img{
    transform: scale(1.07);
}

.foto-acerca::after{
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        to top,
        rgba(12, 28, 70, 0.45),
        transparent 50%
    );

    pointer-events: none;
}

.foto-acerca figcaption{
    position: absolute;
    left: 20px;
    bottom: 17px;

    z-index: 2;

    color: white;
    font-size: 18px;
    font-weight: 700;
}

@media (max-width: 950px){

    .contenido-acerca{
        grid-template-columns: 1fr;
    }

    .galeria-acerca{
        width: min(700px, 100%);
        margin: 0 auto;
    }
}

@media (max-width: 600px){

    .acerca{
        padding: 20px;
    }

    .texto-acerca p{
        font-size: 16px;
        text-align: left;
    }

    .galeria-acerca{
        grid-template-columns: 1fr;
    }

    .foto-principal{
        grid-column: auto;
    }

    .foto-acerca,
    .foto-principal{
        height: 240px;
    }
}

.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;
}

