/* =========================================================
   COLORI ISTITUZIONALI
   ========================================================= */

:root {

    --primary: #00667F;
    --primary-dark: #004D5F;
    --primary-light: #EAF3F5;

    --background: #F5F7F8;
    --surface: #FFFFFF;
    --surface-soft: #EEF5F7;

    --text: #263238;
    --text-secondary: #607078;

    --border: #DCE5E8;

    --radius: 10px;

    --shadow-sm:
        0 2px 8px rgba(0, 0, 0, .06);

    --shadow-md:
        0 8px 20px rgba(0, 0, 0, .10);
}


/* =========================================================
   LAYOUT GENERALE
   ========================================================= */

.layout-body {

    overflow-x: hidden;

    display: flex;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    background: var(--background);
}


.main-layout {

    display: flex;

    flex-direction: column;

    width: 100%;
    max-width: 1440px;

    min-height: 100vh;
    min-height: 100dvh;

    margin: 0 auto;

    background: var(--background);

    flex: 1;
}


/* =========================================================
   HEADER
   ========================================================= */

.layout-header {

    flex-shrink: 0;

    background: var(--surface);

    border-bottom: 1px solid var(--border);

    box-shadow: var(--shadow-sm);

    position: relative;

    z-index: 10;
}


/* TOP HEADER */

.header-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    min-height: 82px;

    padding: .75rem 1.5rem;

    background: var(--surface);
}


.header-logo {

    display: flex;

    align-items: center;

    min-width: 0;
}


.header-logo img {

    display: block;

    max-width: min(430px, 100%);

    height: auto;
}


.header-tools {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    margin-left: 1rem;
}


/* =========================================================
   HEADER HERO
   ========================================================= */

.header-hero {

    position: relative;

    height: 126px;

    background-image:
        url('https://www.pusc.it/sites/default/files/field/image/UNIV_testatina_web_18_0.jpg');

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

    overflow: hidden;
}


.header-hero::after {

    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.92) 0%,
            rgba(255,255,255,.72) 42%,
            rgba(255,255,255,.18) 100%
        );
}


.header-hero-overlay {

    position: relative;

    z-index: 1;

    height: 100%;

    display: flex;

    align-items: center;

    padding: 0 1.5rem;
}


.page-title {

    width: 100%;

    margin: 0;

    padding: .5rem 0 .5rem 1rem;

    border-left: 4px solid var(--primary);

    background: transparent;

    color: var(--text) !important;

    font-size: 1.85rem;

    font-weight: 500;

    line-height: 1.2;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.navigation-wrapper {

    padding: 0 1rem;

    background: var(--surface);
}


.desktop-menu {

    display: block;

    margin: 0;

    padding: 0;
}


.desktop-menu .ui-menubar {

    min-height: 52px;

    padding: 0;

    border: 0 !important;

    border-radius: 0;

    background: transparent !important;
}


.desktop-menu .ui-menubar .ui-menuitem-link {

    min-height: 52px;

    display: flex;

    align-items: center;

    gap: .45rem;

    padding: 0 1rem;

    border-radius: 6px;

    color: var(--text) !important;

    transition:
        background-color .18s ease,
        color .18s ease;
}


.desktop-menu .ui-menubar .ui-menuitem-link:hover {

    background: var(--primary-light) !important;

    color: var(--primary) !important;
}


.desktop-menu .ui-menubar .ui-menuitem-link .ui-menuitem-icon {

    color: var(--primary);

    font-size: .95rem;
}


.desktop-menu .ui-menubar .ui-menuitem-text {

    font-weight: 500;
}


/* =========================================================
   ACCOUNT BUTTON
   ========================================================= */

.accountButton {

    position: relative;
    top: .5rem;
    
    width: 190px !important;

    height: 40px !important;

    margin-left: .75rem;

    border: 0 !important;

    border-radius: 8px !important;

    background: var(--primary) !important;

    color: #fff !important;

    box-shadow: none !important;

    font-weight: 500 !important;

    transition:
        background-color .18s ease,
        transform .18s ease;
}


.accountButton:hover {

    background: var(--primary-dark) !important;

    transform: translateY(-1px);
}


.accountButton .ui-button-icon-left {

    color: #fff !important;
}


/* =========================================================
   MOBILE MENU
   ========================================================= */

.mobile-menu {

    display: none;
}


.mobile-menu-button {

    width: 42px !important;

    height: 42px !important;

    padding: 0 !important;

    display: flex !important;

    align-items: center;

    justify-content: center;

    border: 0 !important;

    border-radius: 8px !important;

    background: var(--primary) !important;

    color: #fff !important;

    box-shadow: none !important;
}


/* =========================================================
   CONTENT
   ========================================================= */

.layout-content {

    flex: 1;

    min-height: 0;

    display: flex;

    flex-direction: column;

    overflow: hidden;

    background: var(--background);
}


.container {

    width: 100%;

    max-width: 1440px;

    height: 100%;

    min-height: 0;

    padding: 1rem;

    display: flex;

    flex-direction: column;

    background: var(--background);
}


/* =========================================================
   FOOTER
   ========================================================= */

.layout-footer {

    flex-shrink: 0;

    min-height: 42px;

    padding: .65rem 1.25rem;

    background: var(--primary-dark);

    color: rgba(255,255,255,.88);

    font-size: .78rem;

    border-top: 3px solid var(--primary);
}


.footer-content {

    min-height: 28px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 1rem;
}


.footer-institution,
.footer-email {

    display: flex;

    align-items: center;

    gap: .45rem;
}


.footer-institution i,
.footer-email i {

    color: rgba(255,255,255,.72);
}


.footer-email {

    color: rgba(255,255,255,.88) !important;

    text-decoration: none;

    transition: color .18s ease;
}


.footer-email:hover {

    color: #fff !important;
}


/* =========================================================
   GROWL
   ========================================================= */

.ui-growl {

    width: 350px !important;

    left: 50% !important;

    right: auto !important;

    transform: translateX(-50%);
}


/* =========================================================
   DIALOG
   ========================================================= */

.dialog-confirm {

    text-align: center;

    margin-top: 25px;
}


.dialog-confirm-button {

    height: 40px !important;

    min-width: 120px;

    border-radius: 7px !important;

    background: var(--primary) !important;

    border-color: var(--primary) !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

    .header-top {

        min-height: auto;

        flex-direction: column;

        gap: .75rem;

        padding: .8rem 1rem;
    }


    .header-logo {

        width: 100%;

        justify-content: center;
    }


    .header-logo img {

        max-width: min(360px, 90vw);
    }


    .header-tools {

        width: 100%;

        justify-content: center;

        margin-left: 0;
    }


    .header-hero {

        height: 95px;
    }


    .header-hero-overlay {

        justify-content: center;

        padding: 0 1rem;
    }


    .header-hero::after {

        background:
            rgba(255,255,255,.82);
    }


    .page-title {

        text-align: center;

        font-size: 1.25rem;

        border-left: 0;

        border-top: 3px solid var(--primary);

        padding: .5rem 0;
    }


    .navigation-wrapper {

        padding: 0 1rem;
    }


    .desktop-menu {

        display: none;
    }


    .mobile-menu {

        display: flex;

        justify-content: flex-start;

        padding: .75rem 0;
    }


    .layout-footer {

        display: none;
    }


    .container {

        padding: .75rem;
    }


    .ui-growl {

        width: 90vw !important;

        left: 5vw !important;

        right: 5vw !important;

        transform: none;
    }
}


@media (max-width: 480px) {

    .header-top {

        padding: .65rem .75rem;
    }


    .header-logo img {

        max-width: 88vw;
    }


    .header-hero {

        height: 85px;
    }


    .page-title {

        font-size: 1.1rem;
    }


    .footer-content {

        flex-direction: column;

        align-items: flex-start;
    }
}

/* =========================================================
   MOBILE NAVIGATION SIDEBAR
   ========================================================= */

.mobile-navigation-sidebar {
    width: min(360px, 90vw) !important;
    background: #F5F7F8 !important;
    border-right: 1px solid #DCE5E8 !important;
    box-shadow: 8px 0 30px rgba(0, 0, 0, .12) !important;
}

/* Header */

.mobile-navigation-header {
    display: flex;
    align-items: center;
    gap: .9rem;

    padding: 1.35rem 1.4rem;

    background: #FFFFFF;
    border-bottom: 1px solid #DCE5E8;
}

.mobile-navigation-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #EAF3F5;
    color: #00667F;

    font-size: 1.1rem;
}

.mobile-navigation-title {
    color: #263238;
    font-size: 1.05rem;
    font-weight: 600;
}

/* Menu */

.mobile-navigation-menu {
    width: 100% !important;
    padding: .7rem !important;

    border: none !important;
    background: transparent !important;
}

/* Voci */

.mobile-navigation-menu .ui-menuitem-link {
    display: flex !important;
    align-items: center;

    min-height: 48px;

    margin: .15rem 0;
    padding: .7rem .8rem !important;

    border-radius: 7px;

    color: #37474F !important;

    transition:
        background-color .15s ease,
        color .15s ease;
}

.mobile-navigation-menu .ui-menuitem-icon {
    width: 1.5rem;

    margin-right: .65rem !important;

    color: #00667F !important;
    font-size: .95rem;
}

.mobile-navigation-menu .ui-menuitem-text {
    font-size: .85rem;
    font-weight: 500;
}

/* Hover */

.mobile-navigation-menu .ui-menuitem-link:hover {
    background: #EAF3F5 !important;
    color: #00667F !important;
}

.mobile-navigation-menu .ui-menuitem-link:hover .ui-menuitem-icon {
    color: #004D5F !important;
}

/* Separatore */

.mobile-navigation-menu .ui-separator {
    margin: .65rem .4rem !important;
    border-top: 1px solid #DCE5E8 !important;
}

/* Ultima voce: account/login/logout */

.mobile-navigation-menu .ui-menuitem:last-child .ui-menuitem-link {
    margin-top: .25rem;

    background: #FFFFFF !important;
    border: 1px solid #DCE5E8;

    font-weight: 600;
}

.mobile-navigation-menu .ui-menuitem:last-child .ui-menuitem-icon {
    color: #00667F !important;
}

.mobile-navigation-menu .ui-menuitem:last-child .ui-menuitem-link:hover {
    background: #EAF3F5 !important;
    border-color: #BFD3D8;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .mobile-navigation-sidebar {
        width: 88vw !important;
        max-width: 360px !important;
    }

    .mobile-navigation-header {
        padding: 1.15rem 1.1rem;
    }

    .mobile-navigation-menu {
        padding: .55rem !important;
    }
}

