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

.site-header {
    width: 100%;
    position: relative;
    z-index: 20;
}


/* ==========================================================
   TOP BAR
   ========================================================== */

.topbar {
    background:
        linear-gradient(
            90deg,
            #021d3c 0%,
            #063d75 100%
        );

    color: #ffffff;

    font-size: 0.9rem;
}

.topbar-inner {
    min-height: 46px;

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

    gap: 20px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-left strong {
    color: #ffd336;
}

.topbar-icon {
    font-size: 1.15rem;
}

.topbar-facebook {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    font-weight: 700;

    transition:
        opacity var(--transition);
}

.topbar-facebook:hover {
    opacity: 0.88;
}

.facebook-circle {
    width: 24px;
    height: 24px;

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

    border-radius: 50%;

    background: #1877f2;
    color: #ffffff;

    font-weight: 900;
}


/* ==========================================================
   HERO BANNER
   ========================================================== */

.hero-banner {
    width: 100%;
    height: clamp(330px, 34vw, 500px);
    overflow: hidden;
    line-height: 0;
    background: #1687e9;
}

.hero-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}


/* TABLET / MOBILE */
@media (max-width: 900px) {

    .hero-banner {
        height: auto;
    }

    .hero-banner img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

}


/* ==========================================================
   NAVBAR
   ========================================================== */

.main-nav {
    width: 100%;

    background:
        linear-gradient(
            90deg,
            #011d3b 0%,
            #022c56 55%,
            #012143 100%
        );

    color: #ffffff;

    box-shadow:
        0 6px 20px
        rgba(0, 0, 0, 0.14);
}

.nav-inner {
    min-height: 88px;

    display: flex;
    align-items: center;

    gap: 26px;
}


/* ==========================================================
   NAVBAR DESKTOP - CONTENITORE PIÙ AMPIO
   ========================================================== */

@media (min-width: 901px) {

    .main-nav .nav-inner {
        width: min(
            calc(100% - 32px),
            1500px
        );

        max-width: none;
    }
}


/* ==========================================================
   BRAND
   ========================================================== */

.nav-brand {
    flex-shrink: 0;

    display: flex;
    align-items: center;

    gap: 12px;
}

.nav-brand-icon {
    font-size: 2rem;
    line-height: 1;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
}

.nav-brand-text strong {
    font-size: 1rem;
    line-height: 1.15;

    color: #ffffff;
}

.nav-brand-text strong span {
    display: block;

    color: #ffd336;
}

.nav-brand-text small {
    margin-top: 4px;

    font-size: 0.63rem;
    font-weight: 700;

    letter-spacing: 0.03em;

    color: rgba(255, 255, 255, 0.74);
}


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

.nav-menu {
    flex: 1;

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

    gap: 28px;
}

.nav-links {
    display: flex;
    align-items: stretch;

    min-height: 88px;
}

.nav-link {
    position: relative;

    min-width: max-content;

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

    gap: 8px;

    padding: 0 20px;

    font-weight: 700;

    color: rgba(255, 255, 255, 0.92);

    transition:
        color var(--transition),
        background var(--transition);
}

.nav-link:hover {
    color: #ffffff;

    background:
        rgba(
            255,
            255,
            255,
            0.05
        );
}

.nav-link.active {
    color: #ffd336;
}

.nav-link.active::after {
    content: "";

    position: absolute;

    bottom: 0;
    left: 18px;
    right: 18px;

    height: 3px;

    border-radius:
        3px 3px 0 0;

    background: #ffd336;
}

.nav-link-icon {
    font-size: 1.15rem;
}

/* ==========================================================
   USER PRIZE BADGE
   ========================================================== */

.nav-user-prize-badge {
    min-width: 20px;
    height: 20px;

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

    padding: 0 6px;

    border-radius: 999px;

    background: #e53935;
    color: #ffffff;

    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1;

    box-shadow:
        0 2px 6px
        rgba(0, 0, 0, 0.22);
}

/* ==========================================================
   ADMIN NOTIFICATIONS
   ========================================================== */

.nav-admin-notifications {
    position: relative;

    width: 52px;
    min-width: 52px;
    min-height: 88px;

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

    color: rgba(255, 255, 255, 0.92);

    border-radius: 12px;

    transition:
        color var(--transition),
        background var(--transition);
}

.nav-admin-notifications:hover {
    color: #ffffff;

    background:
        rgba(
            255,
            255,
            255,
            0.08
        );
}

.nav-admin-notifications-icon {
    display: block;

    font-size: 1.35rem;
    line-height: 1;
}


/* ==========================================================
   ADMIN NOTIFICATIONS BADGE
   ========================================================== */

.nav-admin-notifications-badge {
    position: absolute;

    top: 19px;
    right: 4px;

    min-width: 20px;
    height: 20px;

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

    padding: 0 5px;

    border:
        2px solid
        #022c56;

    border-radius: 999px;

    background: #e53935;
    color: #ffffff;

    font-size: 0.65rem;
    font-weight: 900;

    line-height: 1;
}

.nav-admin-notifications-badge[hidden] {
    display: none !important;
}

.nav-admin-notifications-label {
    display: none;
}

.nav-admin-notifications.is-hidden {
    display: none !important;
}

/* ==========================================================
   NAVBAR — COMPACT DESKTOP
   Evita overflow con menu completo + notifiche Admin
   ========================================================== */

@media (min-width: 901px) and (max-width: 1600px) {

    .main-nav .nav-inner {
        width:
            calc(
                100% - 24px
            );

        gap: 14px;
    }

    .nav-menu {
        min-width: 0;

        gap: 12px;
    }

    .nav-links {
        min-width: 0;
    }

    .nav-link {
        padding:
            0
            10px;

        gap: 6px;

        font-size: 0.88rem;
    }

    .nav-link-icon {
        font-size: 1.05rem;
    }

    .nav-admin-notifications {
        width: 46px;
        min-width: 46px;
    }

    .nav-user {
        min-width: 175px;

        padding:
            8px
            8px;

        gap: 8px;
    }

    .nav-user-avatar {
        width: 44px;
        height: 44px;
    }

    .nav-user-info strong {
        font-size: 0.9rem;
    }

    .nav-user-info span {
        font-size: 0.7rem;
    }

}

/* ==========================================================
   ADMIN NOTIFICATIONS — TABLET
   ========================================================== */

@media (max-width: 1100px) {

    .nav-admin-notifications {
        width: 46px;
        min-width: 46px;
    }

}


/* ==========================================================
   USER AREA
   ========================================================== */

.nav-user-area {
    margin-left: auto;
}

.nav-user {
    display: flex;
    align-items: center;

    gap: 11px;

    min-width: 205px;

    padding: 8px 12px;

    border-radius: var(--radius-md);

    transition:
        background var(--transition);
}

.nav-user:hover {
    background:
        rgba(
            255,
            255,
            255,
            0.08
        );
}

.nav-user-avatar {
    width: 50px;
    height: 50px;

    flex-shrink: 0;

    border-radius: 50%;

    object-fit: cover;

    border:
        2px solid
        rgba(
            255,
            255,
            255,
            0.65
        );
}

.nav-user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    background:
        rgba(
            255,
            255,
            255,
            0.12
        );
}

.nav-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.nav-user-info strong {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 0.98rem;

    color: #ffffff;
}

.nav-user-info span {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 0.75rem;

    color:
        rgba(
            255,
            255,
            255,
            0.78
        );
}

.nav-user-arrow {
    margin-left: auto;

    color:
        rgba(
            255,
            255,
            255,
            0.85
        );
}

.nav-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 10px 18px;

    border-radius: 999px;

    background: #1877f2;

    color: #ffffff;

    font-weight: 700;

    transition:
        transform var(--transition),
        opacity var(--transition);
}

.nav-login-button:hover {
    transform: translateY(-1px);
    opacity: 0.94;
}

.nav-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 9px 12px;

    border-radius: 10px;

    color: rgba(255, 255, 255, 0.88);

    font-size: 0.78rem;
    font-weight: 800;

    transition:
        background var(--transition),
        color var(--transition);
}

.nav-logout:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-logout-icon {
    font-size: 1rem;
}

/* ==========================================================
   MOBILE QUICK ALERTS
   ========================================================== */

.nav-mobile-alerts {
    display: none;
}


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

.nav-toggle {
    display: none;

    width: 44px;
    height: 44px;

    margin-left: auto;

    border: 0;
    border-radius: var(--radius-md);

    background:
        rgba(
            255,
            255,
            255,
            0.08
        );

    cursor: pointer;
}

.nav-toggle span {
    display: block;

    width: 22px;
    height: 2px;

    margin: 5px auto;

    border-radius: 2px;

    background: #ffffff;
}


/* ==========================================================
   SITE MAIN
   ========================================================== */

.site-main {
    width: 100%;

    background:
        linear-gradient(
            180deg,
            #f7f9fc 0%,
            #f2f5f9 100%
        );
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1100px) {

    .topbar-right .topbar-follow {
        display: none;
    }

    .nav-inner {
        gap: 18px;
    }

    .nav-link {
        padding:
            0 13px;

        font-size: 0.9rem;
    }

    .nav-user {
        min-width: 170px;
    }

    .nav-user-avatar {
        width: 44px;
        height: 44px;
    }
}


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

@media (max-width: 900px) {

    .topbar-inner {
        min-height: 42px;
    }

    .topbar-right {
        display: none;
    }

    .topbar-left {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 0.82rem;
    }

    .nav-inner {
        min-height: 72px;
        position: relative;

        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-brand {
        flex: 1;
        min-width: 0;
    }

    .nav-brand-text small {
        display: none;
    }
	
    .nav-mobile-alerts {
        display: flex;
        align-items: center;

        gap: 8px;

        margin-left: auto;
    }

    .nav-mobile-alert {
        position: relative;

        width: 42px;
        height: 42px;

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

        flex-shrink: 0;

        border-radius: 50%;

        background:
            rgba(
                255,
                255,
                255,
                0.09
            );

        color: #ffffff;

        transition:
            background var(--transition),
            transform var(--transition);
    }
	
    .nav-mobile-alert.is-hidden {
        display: none !important;
    }

    .nav-mobile-alert:hover {
        background:
            rgba(
                255,
                255,
                255,
                0.16
            );

        transform: translateY(-1px);
    }


    .nav-mobile-alert-icon {
        font-size: 1.2rem;
        line-height: 1;
    }

    .nav-mobile-alert-badge {
        position: absolute;

        top: -2px;
        right: -3px;

        min-width: 20px;
        height: 20px;

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

        padding: 0 5px;

        border:
            2px solid
            #022c56;

        border-radius: 999px;

        background: #e53935;
        color: #ffffff;

        font-size: 0.64rem;
        font-weight: 900;
        line-height: 1;
    }

    .nav-toggle {
        display: block;
        flex-shrink: 0;
        margin-left: 12px;
    }

    .nav-menu {
        position: absolute;

        top: 72px;
        left: 16px;
        right: 16px;

        z-index: 100;

        display: none;

        flex-direction: column;
        align-items: stretch;

        gap: 0;

        padding: 12px;

        border-radius:
            0 0
            var(--radius-lg)
            var(--radius-lg);

        background:
            linear-gradient(
                180deg,
                #01294f 0%,
                #011f3d 100%
            );

        box-shadow:
            0 18px 35px
            rgba(0, 0, 0, 0.24);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-links {
        min-height: auto;
        flex-direction: column;
    }

    .nav-link {
        width: 100%;

        min-height: 50px;

        justify-content: flex-start;

        padding: 0 14px;

        border-radius: var(--radius-sm);
    }

    .nav-link.active::after {
        display: none;
    }

    .nav-link.active {
        color: #ffd336;

        background:
            rgba(
                255,
                211,
                54,
                0.10
            );
    }
	
    .nav-user-prize-badge {
        margin-left: auto;
    }
	
    .nav-admin-notifications-label {
        display: inline;
    }
	
    .nav-admin-notifications {
        width: 100%;
        min-width: 0;
        min-height: 50px;

        justify-content: flex-start;

        gap: 10px;

        padding: 0 14px;

        border-radius: var(--radius-sm);
    }

    .nav-admin-notifications-badge {
        position: static;

        margin-left: auto;

        border-color: transparent;
    }

    .nav-user-area {
        width: 100%;

        margin: 10px 0 0;

        padding-top: 10px;

        border-top:
            1px solid
            rgba(255, 255, 255, 0.10);
    }

    .nav-user {
        width: 100%;
        min-width: 0;
    }

    .nav-user-info {
        flex: 1;
        min-width: 0;
    }

    .nav-login-button {
        width: 100%;
    }
	
    .nav-logout {
        width: 100%;

        margin-top: 8px;
        padding: 11px 14px;

        border:
            1px solid
            rgba(255, 255, 255, 0.12);

        background:
            rgba(255, 255, 255, 0.06);
    }

}


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

@media (max-width: 575px) {

    .site-container {
        width:
            calc(
                100% - 24px
            );
    }

    .topbar-left {
        font-size: 0.75rem;
    }

    .topbar-icon {
        display: none;
    }

    .nav-inner {
        min-height: 66px;
    }

    .nav-brand {
        gap: 8px;
    }

    .nav-brand-icon {
        font-size: 1.45rem;
    }

    .nav-brand-text strong {
        font-size: 0.78rem;
    }

    .nav-menu {
        top: 66px;
        left: 12px;
        right: 12px;
    }

    .nav-toggle {
        width: 42px;
        height: 42px;
    }

    .nav-link {
        font-size: 0.95rem;
    }
}

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

.site-footer {
    margin-top: 48px;

    padding:
        48px 0
        20px;

    color: #dce7f5;

    background:
        linear-gradient(
            180deg,
            #021f40 0%,
            #01172f 100%
        );
}

.footer-grid {
    display: grid;

    grid-template-columns:
        minmax(260px, 1.6fr)
        repeat(3, minmax(150px, 1fr));

    gap: 38px;

    padding-bottom: 34px;
}

.footer-brand-title {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 12px;

    font-size: 1.1rem;

    color: #ffffff;
}

.footer-brand p {
    max-width: 420px;

    margin-bottom: 0;

    color:
        rgba(
            255,
            255,
            255,
            0.72
        );

    line-height: 1.6;
}

.footer-column h3 {
    margin-bottom: 13px;

    color: #ffffff;

    font-size: 0.95rem;
}

.footer-column ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

.footer-column li + li {
    margin-top: 8px;
}

.footer-column a {
    color:
        rgba(
            255,
            255,
            255,
            0.72
        );

    transition:
        color var(--transition);
}

.footer-column a:hover {
    color: #ffd336;
}

.footer-disclaimer {
    padding:
        22px 0;

    border-top:
        1px solid
        rgba(
            255,
            255,
            255,
            0.10
        );

    border-bottom:
        1px solid
        rgba(
            255,
            255,
            255,
            0.10
        );
}

.footer-disclaimer p {
    max-width: 950px;

    margin: 0 auto;

    text-align: center;

    color:
        rgba(
            255,
            255,
            255,
            0.58
        );

    font-size: 0.78rem;

    line-height: 1.55;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-top: 20px;

    color:
        rgba(
            255,
            255,
            255,
            0.55
        );

    font-size: 0.78rem;
}


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

@media (max-width: 900px) {

    .footer-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}

@media (max-width: 575px) {

    .site-footer {
        margin-top: 34px;

        padding-top: 34px;
    }

    .footer-grid {
        grid-template-columns: 1fr;

        gap: 26px;
    }

    .footer-bottom {
        flex-direction: column;

        text-align: center;
    }
}

/* ==========================================================
   COOKIE NOTICE
   ========================================================== */

.cookie-notice {
    position: fixed;

    left: 50%;
    bottom: 18px;

    width: min(
        calc(100% - 36px),
        1200px
    );

    transform: translateX(-50%);

    z-index: 1000;

    padding: 16px 20px;

    border-radius: 16px;

    background:
        linear-gradient(
            90deg,
            #021d3c 0%,
            #063d75 100%
        );

    color: #ffffff;

border:
    1px solid
    rgba(
        255,
        255,
        255,
        0.14
    );

    box-shadow:
        0 -8px 30px
        rgba(
            0,
            0,
            0,
            0.20
        );
}


.cookie-notice-inner {
    width: min(
        calc(100% - 24px),
        1400px
    );

    margin: 0 auto;

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

    gap: 28px;
}


.cookie-notice-content {
    min-width: 0;
}


.cookie-notice-content strong {
    display: block;

    margin-bottom: 4px;

    color: #ffd336;

    font-size: 1rem;
}


.cookie-notice-content p {
    margin: 0;

    max-width: 900px;

    color:
        rgba(
            255,
            255,
            255,
            0.82
        );

    font-size: 0.88rem;
    line-height: 1.5;
}


.cookie-notice-actions {
    flex-shrink: 0;

    display: flex;
    align-items: center;

    gap: 10px;
}


.cookie-notice-actions .btn {
    min-height: 42px;

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

    white-space: nowrap;
}


/* ==========================================================
   COOKIE NOTICE — MOBILE
   ========================================================== */

@media (max-width: 700px) {

        .cookie-notice {
        bottom: 10px;

        width:
            calc(
                100% - 20px
            );

        padding:
            16px 12px
            calc(
                16px
                + env(safe-area-inset-bottom)
            );

        border-radius: 14px;
    }


    .cookie-notice-inner {
        width: 100%;

        flex-direction: column;
        align-items: stretch;

        gap: 14px;
    }


    .cookie-notice-content strong {
        font-size: 0.95rem;
    }


    .cookie-notice-content p {
        font-size: 0.82rem;
        line-height: 1.45;
    }


    .cookie-notice-actions {
        width: 100%;

        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 10px;
    }


    .cookie-notice-actions .btn {
        width: 100%;

        min-height: 44px;
    }
}