/* ===================================
   RESET E BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #e8f5f1 0%, #f5faf9 40%, #ffffff 100%);
    color: #333;
    line-height: 1.6;
}

/* ===================================
   HEADER
   =================================== */
header {
    background: #ffffff;
    border-bottom: 1px solid #d0d0d0;
    padding: 0;
    margin: 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
}

.logo-kontosalute {
    height: 60px;
    width: auto;
    display: block;
}

/* ===================================
   MAIN CONTAINER
   =================================== */
.main-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-wrapper {
    background: linear-gradient(135deg, #e8f5f1 0%, #f5faf9 40%, #ffffff 100%);
    padding: 40px 40px;
    box-shadow: none;
}

/* ===================================
   BUTTONS CONTAINER - Layout a 2 colonne
   =================================== */
.buttons-container {
    display: grid;
    grid-template-columns: 700px 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 0;
}

/* Contenuto sinistra: titolo + bottoni + loghi */
.left-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 700px;
}

/* Titolo e sottotitolo */
.login-header {
    text-align: left;
    margin-bottom: 0;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Container per i tre bottoni */
.buttons-row {
    display: flex;
    gap: 50px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
}

/* Ogni colonna bottone */
.button-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 0 auto;
}


.button-column:nth-child(2) {
    align-items: center;
}

/* Wrapper per bottone + punto interrogativo */
.button-with-info {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-start;
    width: 100%;
}

.button-title {
    display: none !important;
}


.button-column:nth-child(3) {
    flex-basis: 100%;
    align-items: flex-start;
    padding-left: 0 !important;
    margin-left: 0 !important;
    margin-top: -15px;
}

.button-column:nth-child(3) .alt-access-button {
    align-self: flex-start;
    margin-left: 0 !important;
    text-align: left !important;
}

/* ===================================
   IMMAGINE ILLUSTRATIVA - Colonna destra
   =================================== */
.right-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.image-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login-illustration {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
}

/* ===================================
   LOGHI SPID/AGID
   =================================== */
.spid-logos-section {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 80px;
}

.spid-agid-logo {
    height: 45px;
    width: auto;
}

/* ===================================
   SPID COLUMN
   =================================== */
.spid-column {
    flex: 1;
    width: 100%;
}

.spid-section h3 {
    display: none;
}

/* Punto interrogativo con popover */
.info-trigger {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
}

.info-trigger:hover {
    background-color: #0052a3;
}


/* Menu dropdown SPID */
.spid-idp-button .spid-idp-button-menu li > a {
    text-align: left !important;
    padding: 14px 22px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.spid-idp-button .spid-idp-button-menu li > a img {
    height: 45px !important;
}

/* Bottone Altra modalità */
.alt-access-button {
    background-color: #0066cc !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 20px !important;
    font-size: 20px;
    width: 280px;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: background-color 0.3s ease !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    height: 58px !important;
    min-height: 58px !important;
}


.alt-access-button:hover {
    background-color: #0052a3 !important;
}

/* ===================================
   AUTHENTICATED CONTENT
   =================================== */
.authenticated-content {
    padding: 20px;
}

.authenticated-content p {
    margin-bottom: 12px;
    font-size: 14px;
}

.authenticated-content hr {
    margin: 24px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.authenticated-content a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.authenticated-content a:hover {
    text-decoration: underline;
}

/* ===================================
   FOOTER
   =================================== */
footer {
    background: #ffffff;
    border-top: 1px solid #d0d0d0;
    margin-top: 60px;
    padding: 40px 0 20px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #0d8a5e;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.footer-section p,
.footer-section a {
    font-size: 13px;
    line-height: 1.8;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.footer-section a:hover {
    color: #0d8a5e;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #d0d0d0;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.footer-bottom a {
    color: #0d8a5e;
    text-decoration: none;
    margin: 0 10px;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #0d8a5e;
    font-size: 18px;
    text-decoration: none;
}

.social-links a:hover {
    opacity: 0.7;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 968px) {
    .buttons-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .right-content {
        order: -1;
    }
    
    .buttons-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .button-column {
        width: 100%;
        max-width: 300px;
    }
    
    .login-illustration {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 15px 20px;
    }
    
    .main-container {
        margin: 30px auto;
        padding: 0 20px;
    }
    
    .content-wrapper {
        padding: 30px 25px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
