/* Design tokens and layout shared by the UNISANNIO mobile service pages
   (aule libere, lezioni di oggi). Page-specific tokens and components live
   in each template's inline <style>. */

:root {
    --unisannio-blue: #20286d;
    --unisannio-blue-soft: #eef1ff;
    --unisannio-gold: #cf9625;
    --accent-cyan: #2584c6;
    --text: #454545;
    --muted: #455b71;
    --line: #dddddd;
    --surface: #ffffff;
    --surface-muted: #f5f5f5;
    --shadow: 0 5px 6px rgba(218, 218, 218, 0.90);
    --radius: 5px;
    --card-radius: 0 0 8px 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--surface-muted);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    color: var(--text);
    background: var(--surface-muted);
    -webkit-font-smoothing: antialiased;
}

.site-header {
    background: var(--unisannio-blue);
    color: #ffffff;
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 96px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.brand img {
    width: min(320px, 68vw);
    height: auto;
    display: block;
}

.service-label {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 56px;
}

.page-heading {
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--unisannio-blue);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1 {
    margin: 0;
    color: var(--unisannio-blue);
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: 0;
}

.heading-copy {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.toolbar {
    margin-bottom: 22px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(20, 32, 72, 0.06);
}

.search-wrap {
    position: relative;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.search-input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-size: 15px;
    outline: none;
}

.search-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(15, 159, 208, 0.16);
}

.building-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.building-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: var(--unisannio-blue);
    color: #ffffff;
    border-bottom: 4px solid var(--unisannio-gold);
}

.building-name {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
}

.building-count {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.state-card {
    grid-column: 1 / -1;
    padding: 42px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
}

.loading-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 16px;
    border: 4px solid #e8edf5;
    border-top-color: var(--unisannio-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.state-title {
    margin: 0;
    color: var(--unisannio-blue);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
}

.state-copy {
    margin: 8px auto 0;
    max-width: 520px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 78px;
        justify-content: center;
    }

    .service-label {
        display: none;
    }

    .page-shell {
        width: min(100% - 24px, 520px);
        padding-top: 30px;
    }

    .page-heading {
        margin-bottom: 18px;
    }

    .building-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}
