/* =========================================================
   AGENDOZ LATINO
   NAVBAR
========================================================= */

.ag-navbar,
.ag-navbar * {
    box-sizing: border-box;
}

.ag-navbar {
    position: relative;
    z-index: 1000;

    width: 100%;

    padding: 24px 0;

    font-family:
        "DM Sans",
        system-ui,
        sans-serif;
}


/* =========================================================
   CONTAINER
========================================================= */

.ag-navbar-container {
    width: min(
        calc(100% - 48px),
        1240px
    );

    min-height: 62px;

    margin: 0 auto;

    display: flex;
    align-items: center;

    gap: 18px;

    padding: 8px 12px;

    border-radius: 18px;

    background:
        rgba(255, 250, 242, .78);

    border:
        1px solid
        rgba(34, 48, 39, .07);

    backdrop-filter:
        blur(14px);

    -webkit-backdrop-filter:
        blur(14px);

    box-shadow:
        0 10px 30px
        rgba(24, 35, 29, .05);
}


/* =========================================================
   BRAND
========================================================= */

.ag-brand {
    display: inline-flex;
    align-items: center;

    flex-shrink: 0;

    gap: 11px;

    color: #18221c;

    text-decoration: none;
}

.ag-brand-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #ef9b49,
            #df7131
        );

    color: #ffffff;

    font-family:
        "Playfair Display",
        serif;

    font-size: 24px;
    font-weight: 700;

    box-shadow:
        0 8px 25px
        rgba(216, 108, 52, .22);
}

.ag-brand-text {
    white-space: nowrap;

    font-size: 17px;
    font-weight: 700;
}

.ag-brand-text strong {
    color: #df7131;
}


/* =========================================================
   LINKS
========================================================= */

.ag-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 1;

    gap: 22px;
}

.ag-nav-links a {
    position: relative;

    padding: 10px 0;

    color: #59645d;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    transition:
        color .2s ease;
}

.ag-nav-links a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 4px;

    width: 0;
    height: 2px;

    border-radius: 999px;

    background: #df7131;

    transition:
        width .2s ease;
}

.ag-nav-links a:hover {
    color: #18221c;
}

.ag-nav-links a:hover::after {
    width: 100%;
}


/* =========================================================
   ACCOUNT
========================================================= */

.ag-nav-account {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    gap: 14px;
}


/* =========================================================
   LOGGED USER
========================================================= */

.ag-user {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 5px 7px 5px 5px;

    border-radius: 999px;

    color: #18221c;

    text-decoration: none;

    transition:
        background .2s ease;
}

.ag-user:hover {
    background:
        rgba(48, 79, 62, .07);
}

.ag-user-avatar {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border: 2px solid
        rgba(216, 108, 52, .18);

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #ec8c3c,
            #dd692f
        );

    color: #ffffff;

    font-family:
        "Playfair Display",
        serif;

    font-size: 20px;
    font-weight: 700;

    box-shadow:
        0 7px 20px
        rgba(0,0,0,.10);
}

.ag-user-data {
    display: flex;
    flex-direction: column;

    min-width: 0;

    line-height: 1.2;
}

.ag-user-data strong {
    max-width: 120px;

    overflow: hidden;

    color: #18221c;

    font-size: 12px;
    font-weight: 700;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.ag-user-data small {
    max-width: 120px;

    margin-top: 3px;

    overflow: hidden;

    color: #7e877f;

    font-size: 10px;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   LOGOUT
========================================================= */

.ag-logout-form {
    margin: 0;
}

.ag-logout {
    min-height: 40px;

    padding: 0 17px;

    border:
        1px solid
        rgba(34, 48, 39, .12);

    border-radius: 999px;

    background:
        rgba(48, 79, 62, .05);

    color: #304f3e;

    font-family: inherit;

    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.ag-logout:hover {
    border-color:
        rgba(48, 79, 62, .24);

    background:
        rgba(48, 79, 62, .10);

    color: #18221c;
}


/* =========================================================
   GUEST
========================================================= */

.ag-login {
    padding: 11px 6px;

    color: #59645d;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    transition:
        color .2s ease;
}

.ag-login:hover {
    color: #18221c;
}

.ag-register {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 20px;

    border-radius: 999px;

    background: #df7131;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    box-shadow:
        0 8px 25px
        rgba(216,108,52,.22);

    transition:
        transform .2s ease,
        background .2s ease;
}

.ag-register:hover {
    transform:
        translateY(-1px);

    background: #eb7d38;
}


/* =========================================================
   MOBILE BUTTON
========================================================= */

.ag-mobile-button {
    display: none;

    width: 44px;
    height: 44px;

    margin-left: auto;

    padding: 0;

    border:
        1px solid
        rgba(34, 48, 39, .12);

    border-radius: 13px;

    background:
        rgba(48, 79, 62, .05);

    cursor: pointer;
}

.ag-mobile-button span {
    display: block;

    width: 19px;
    height: 2px;

    margin: 4px auto;

    border-radius: 999px;

    background: #304f3e;

    transition:
        transform .2s ease,
        opacity .2s ease;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.ag-mobile-menu {
    display: none;
}



/* =========================================================
   DESKTOP COMPACTO
   Evita que perfil/salir se salgan cuando hay links admin
========================================================= */

@media (max-width: 1350px) and (min-width: 821px) {

    .ag-navbar-container {
        width: calc(100% - 32px);
        max-width: 1380px;
        gap: 10px;
    }

    .ag-nav-links {
        gap: 13px;
    }

    .ag-nav-links a {
        font-size: 12px;
    }

    .ag-nav-account {
        gap: 6px;
    }

    .ag-user {
        gap: 7px;
        padding-right: 4px;
    }

    .ag-user-data strong,
    .ag-user-data small {
        max-width: 92px;
    }

    .ag-logout {
        padding: 0 13px;
    }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

    .ag-nav-links {
        gap: 20px;
    }

    .ag-user-data {
        display: none;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 820px) {

    .ag-navbar {
        padding: 14px 0;
    }

    .ag-navbar-container {
        width:
            min(
                calc(100% - 24px),
                1240px
            );

        padding:
            8px 10px;
    }

    .ag-nav-links,
    .ag-nav-account {
        display: none;
    }

    .ag-mobile-button {
        display: block;
    }

    .ag-mobile-menu {
        width:
            calc(100% - 24px);

        max-height: 0;

        margin:
            8px auto 0;

        overflow: hidden;

        border:
            1px solid
            rgba(34, 48, 39, .08);

        border-radius: 20px;

        background:
            rgba(255,250,242,.98);

        opacity: 0;

        pointer-events: none;

        box-shadow:
            0 25px 60px
            rgba(0,0,0,.12);

        transition:
            max-height .3s ease,
            opacity .2s ease,
            padding .3s ease;
    }

    .ag-mobile-menu.is-open {
        display: block;

        max-height: 550px;

        padding: 16px;

        opacity: 1;

        pointer-events: auto;
    }

    .ag-mobile-menu nav {
        display: flex;
        flex-direction: column;
    }

    .ag-mobile-menu nav a {
        padding: 14px 12px;

        border-bottom:
            1px solid
            rgba(34, 48, 39, .08);

        color: #39463f;

        font-size: 14px;
        font-weight: 600;

        text-decoration: none;
    }

    .ag-mobile-account {
        padding-top: 14px;
    }

    .ag-mobile-profile {
        display: flex;
        align-items: center;

        gap: 11px;

        padding: 10px;

        color: #18221c;

        text-decoration: none;
    }

    .ag-mobile-profile > span:last-child {
        display: flex;
        flex-direction: column;
    }

    .ag-mobile-profile strong {
        font-size: 13px;
    }

    .ag-mobile-profile small {
        margin-top: 3px;

        color: #7e877f;

        font-size: 10px;
    }

    .ag-mobile-logout {
        width: 100%;

        min-height: 44px;

        margin-top: 10px;

        border:
            1px solid
            rgba(34, 48, 39, .12);

        border-radius: 12px;

        background:
            rgba(48, 79, 62, .06);

        color: #304f3e;

        font-family: inherit;
        font-weight: 700;

        cursor: pointer;
    }

    .ag-mobile-login,
    .ag-mobile-register {
        min-height: 45px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 12px;

        font-size: 13px;
        font-weight: 700;

        text-decoration: none;
    }

    .ag-mobile-login {
        border:
            1px solid
            rgba(34, 48, 39, .12);

        color: #304f3e;
    }

    .ag-mobile-register {
        margin-top: 9px;

        background: #df7131;

        color: #ffffff;
    }

}