/* ================================================================
   Tema scuro unificato — ServiziTLC @ Università Roma Tre
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Atkinson Hyperlegible', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    background: #0d1017;
    color: #e8eaf0;
    -webkit-font-smoothing: antialiased;
}

/* === Layout === */
.page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2.5rem 1rem 3rem;
}

/* === Card === */
.card {
    background: #151821;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

/* === Card ampia (per pagine con testo lungo) === */
.card--wide {
    max-width: 680px;
    text-align: left;
}

/* === Logo === */
.logo {
    display: block;
    margin: 0 auto 1rem;
    height: 64px;
    width: auto;
}

/* === Titoli === */
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: .5rem;
}
h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-top: 1.5rem;
    margin-bottom: .5rem;
}
h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-top: 1rem;
    margin-bottom: .4rem;
}

/* === Testi generali === */
.subtitle {
    font-size: 14px;
    color: #b0b8cc;
    margin-bottom: 2rem;
}

p {
    font-size: 15px;
    color: #c8cdd8;
    line-height: 1.75;
    margin-bottom: 1rem;
}

/* === Link === */
a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; }
a:hover, a:focus { color: #bdd7fc; outline: none; }

/* === Separatore === */
hr,
.divider {
    height: 1px;
    border: none;
    background: rgba(255,255,255,.08);
    margin: 1.75rem 0;
}

/* === Etichetta sezione === */
.hint {
    font-size: 13px;
    color: #8891a4;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .75rem;
    text-align: left;
}

/* === Lista servizi === */
.services { margin-top: .25rem; }

.services ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services ul li {
    margin: 6px 0;
}

.services ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: rgba(255,255,255,.02);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.services ul li a:hover {
    border-color: rgba(147,197,253,.3);
    background: rgba(0,40,85,.2);
}

.service-text {
    flex: 1;
    text-align: left;
}

.service-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.service-desc {
    display: block;
    font-size: 14px;
    color: #b0b8cc;
    margin-top: 2px;
}

/* Freccia CSS puro */
.services ul li a::after {
    content: '→';
    font-size: 18px;
    color: #8891a4;
    flex-shrink: 0;
    margin-left: 12px;
    transition: color .15s, transform .15s;
}

.services ul li a:hover::after {
    color: #93c5fd;
    transform: translateX(3px);
}

/* === Box notice (avvisi, informazioni importanti) === */
.notice {
    background: rgba(147,197,253,.06);
    border: 1px solid rgba(147,197,253,.15);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.notice h3 {
    font-size: .875rem;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-top: 0;
    margin-bottom: .5rem;
}

.notice p {
    font-size: 14px;
    color: #b0b8cc;
    margin-bottom: 0;
}

/* === Link di aiuto === */
.help-links {
    text-align: left;
    margin-bottom: 1.25rem;
}

.help-links a {
    display: block;
    font-size: 14px;
    padding: 8px 0;
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 3px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: color .15s;
}

.help-links a:last-child {
    border-bottom: none;
}

.help-links a:hover { color: #bdd7fc; }

/* === Footer === */
.footer-links {
    font-size: 13px;
    color: #8891a4;
}

.footer-links a {
    color: #8891a4;
    text-decoration: none;
}

.footer-links a:hover { color: #b0b8cc; }

/* === Immagine work in progress === */
.wip-img {
    float: left;
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0 1.5rem 1rem 0;
}

/* Clearfix per il float */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* === Spinner centrato === */
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: #93c5fd;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 1.5rem auto;
    display: block;
}

/* === Spinner inline (nel mezzo di una frase) === */
.spinner-inline {
    display: inline-block;
    vertical-align: middle;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.15);
    border-top-color: #93c5fd;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 0 4px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Messaggi === */
.msg-error   { font-size: 14px; color: rgba(248,113,113,.9); line-height: 1.6; }
.msg-error a { color: #93c5fd; }
.msg-success { font-size: 14px; color: rgba(74,222,128,.9); line-height: 1.6; }
.msg-info    { font-size: 14px; color: #c8cdd8; line-height: 1.6; }

/* === Credit tecnico === */
.credit { color: #0d1017; font-size: 1px; user-select: none; margin-top: 1rem; text-align: center; }
.credit a { color: #0d1017; text-decoration: none; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d1017; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

/* === Responsive === */
@media (max-width: 600px) {
    .card { padding: 2rem 1.25rem; border-radius: 12px; }
    .logo { height: 50px; }
    h1 { font-size: 1.25rem; }
    h2 { font-size: 1.05rem; }
    .wip-img {
        float: none;
        display: block;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
}
