* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #1f2440;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(10, 18, 58, 0.16);
}

.barranavegacion {
    background-color: rgb(32, 36, 102);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
    padding: 10px clamp(16px, 4vw, 54px);
}

.barranavegacion > div:first-child {
    flex: 0 0 auto;
}

.logo {
    display: block;
    width: clamp(118px, 15vw, 178px);
    margin: 0;
}

.list {
    list-style-type: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: #fff;
    font-size: clamp(15px, 1.3vw, 19px);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.list > li {
    position: relative;
    margin: 0;
}

.opcbarra {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    transition: background-color .2s ease, color .2s ease;
}

.opcbarra:hover,
.opcbarra:focus-visible {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.14);
    outline: none;
}

#despliegamenu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 32px));
    margin: 0;
    padding: 10px;
    background-color: rgba(32, 36, 102, 0.97);
    border-radius: 0 0 14px 14px;
    text-align: left;
    box-shadow: 0 18px 38px rgba(10, 18, 58, 0.24);
}

#despliegamenu ul {
    display: grid;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.list > li:hover #despliegamenu,
.list > li:focus-within #despliegamenu,
#despliegamenu:hover {
    display: block;
}

.abierto {
    display: block;
    text-decoration: none;
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.25;
}

.abierto:hover,
.abierto:focus-visible {
    background-color: rgba(255, 255, 255, 0.14);
    color: #fff;
    outline: none;
}

.redes {
    position: fixed;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    gap: 10px;
    z-index: 900;
}

.icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(10, 18, 58, 0.18);
}

.icon img {
    width: 28px;
    object-fit: cover;
    transition: transform .25s ease;
}

.red {
    margin: 0;
}

.icon:hover img {
    transform: scale(1.12);
}

@media screen and (max-width: 760px) {
    .barranavegacion {
        justify-content: center;
        gap: 12px;
        padding: 12px;
    }

    .logo {
        width: 124px;
    }

    .list {
        width: 100%;
        justify-content: center;
        gap: 6px;
    }

    .opcbarra {
        min-height: 38px;
        padding: 8px 10px;
        font-size: 14px;
    }

    #despliegamenu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        top: calc(100% + 6px);
        width: min(300px, calc(100vw - 24px));
    }

    .redes {
        top: auto;
        right: 12px;
        bottom: 82px;
        transform: none;
    }

    .icon {
        width: 40px;
        height: 40px;
    }

    .icon img {
        width: 25px;
    }
}

