html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}


/***************************************/
/*************** HEADER ****************/
/***************************************/

.nav-container {
    width: 100%;
    background-color: #0066cc;
    font-family: "Titillium Web", Arial, sans-serif;
    height: 70px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    border-bottom: 1px solid #000000;
}

nav {
    color: white;
    width: 100%;
    height: 100%;
}

a {
    color: white;
    text-decoration: none;
}

.nav-desktop {
    display: none;
}

.nav-inner {
    width: 100%;
    height: 100%;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.nav-left {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-left a {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-left img {
    max-height: 48px;
    width: auto;
    display: block;
}

/***************************************/
/*************** FOOTER ****************/
/***************************************/

.footer {
    background: #ffffff;
    padding: 20px 40px;
    margin-top: auto;
    border-top: none;
    height: auto;
    box-sizing: border-box;
    font-family: "Titillium Web", sans-serif;
}

.footer-bottom {
    background: transparent;
    color: #0066cc;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
}

.footer-bottom-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-left: 0;
}

.footer-links a {
    color: #0066cc;
    text-decoration: underline;
    font-family: "Titillium Web", sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 16px;
    padding-right: 0;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #004685;
}

.text-diritti {
    font-family: "Titillium Web", sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 16px;
    letter-spacing: 0;
    color: #0066cc;
}

/* Responsive */
@media (max-width: 767px) {
    .footer {
        padding: 20px 20px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .border-custom {
        padding: 24px 20px !important;
        min-height: 600px !important;
    }

    .padding-custom {
        padding: 15px 10px !important;
    }

    #kc-current-locale-link {
        color: transparent !important;
        text-shadow: none !important;
        font-size: 0 !important;
        border: none !important;
        background-color: transparent !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: 24px 24px !important;
        width: 24px !important;
        height: 24px !important;
        padding: 0 !important;
        display: inline-block !important;
    }

    #kc-current-locale-link::after {
        display: none !important;
    }

    .nav-inner {
        padding: 0 20px !important;
    }
}

/* ==========================================================================
   POPUP INFORMATIVA COOKIE
   ========================================================================== */
.cookie-modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.cookie-modal-card {
    background-color: #ffffff;
    border: 3px solid #004685;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cookie-modal-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eef2f5;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a1a1a;
    font-weight: 600;
}

.cookie-modal-close {
    color: #666;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    border: none;
    background: none;
}

.cookie-modal-close:hover {
    color: #000;
}

.cookie-modal-body {
    padding: 20px;
    font-size: 0.95rem;
    color: #333333;
    line-height: 1.5;
    max-height: 450px;
    overflow-y: auto;
}

.cookie-modal-body p {
    margin-top: 0;
    margin-bottom: 16px;
}

.cookie-modal-body p:last-child {
    margin-bottom: 0;
}

.cookie-modal-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    background-color: #ffffff;
}

.cookie-modal-btn {
    background-color: #004685;
    color: white;
    border: none;
    padding: 8px 22px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cookie-modal-btn:hover {
    background-color: #0066cc;
}

/* ==========================================================================
   SOLID BACKGROUND OVERRIDES & PAGE GRID LAYOUT
   ========================================================================== */
html.login-pf,
html.login-pf body,
.login-pf-page {
    background-color: #0066cc !important;
    background-image: none !important;
}

.login-pf-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
    box-sizing: border-box;
}

.card-pf {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
    border: none;
}

/* ==========================================================================
   LANGUAGE DROPDOWN SELECTOR (NAVBAR RIGHT)
   ========================================================================== */
.nav-right {
    display: flex;
    align-items: center;
    height: 100%;
}

#kc-locale {
    position: relative;
    font-family: "Titillium Web", sans-serif;
    font-size: 14px;
    z-index: 999;
}

#kc-current-locale-link {
    color: #ffffff !important;
    text-transform: uppercase;
    font-weight: 600;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

#kc-current-locale-link::after {
    content: "▼";
    font-size: 9px;
    margin-left: 4px;
    color: rgba(255, 255, 255, 0.7);
}

#kc-current-locale-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

#kc-locale-dropdown {
    position: relative;
}

#kc-locale-dropdown ul {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    min-width: 120px;
    z-index: 1000;
}

#kc-locale-dropdown:hover ul {
    display: block;
}

#kc-locale-dropdown ul li {
    padding: 0;
    margin: 0;
}

#kc-locale-dropdown ul li a {
    color: #333333 !important;
    padding: 8px 16px;
    display: block;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.2s;
    text-align: left;
}

#kc-locale-dropdown ul li a:hover {
    background-color: #f4f6fa;
    color: #0066cc !important;
}

/* ==========================================================================
   CARD LOGO HEADERS AND STYLES
   ========================================================================== */
.card-header-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 24px;
}

.spid-card-logo {
    height: 54px;
    width: auto;
    margin: 10px auto 20px auto;
    display: block;
}

.cie-card-logo {
    height: 54px;
    width: auto;
    margin: 10px auto 20px auto;
    display: block;
}

.card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
    text-align: left;
    margin: 0;
    font-family: "Titillium Web", sans-serif;
    font-weight: 400;
}

.card-desc a {
    color: #0066cc !important;
    text-decoration: underline !important;
    font-weight: 600;
}

.card-desc a:hover {
    color: #004685 !important;
}

.nota-minorenni {
    font-size: 11px !important;
    line-height: 1.4 !important;
    color: #718096 !important;
    margin-top: 15px !important;
    text-align: left !important;
}

.cookie-trigger-container {
    margin-top: 25px;
    text-align: center;
}

.cookie-trigger-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: underline;
    font-size: 13px;
    font-family: "Titillium Web", sans-serif;
    transition: color 0.2s;
}

.cookie-trigger-link:hover {
    color: #ffffff !important;
}