﻿:root {
    --blue-950: #06254a;
    --blue-900: #083665;
    --blue-800: #0b4d87;
    --blue-700: #086aa8;
    --blue-600: #0789c9;
    --blue-500: #16a6dc;
    --blue-100: #eaf7fc;
    --blue-050: #f5fbfe;
    --white: #ffffff;
    --text: #18324a;
    --muted: #60788e;
    --border: #d9e8f1;
    --shadow: 0 18px 50px rgba(7, 55, 96, 0.10);
    --radius: 24px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.container {
    width: min(calc(100% - 48px), var(--container));
    margin: 0 auto;
}

/* HEADER */

.site-header {
    position: relative;
    z-index: 20;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
}

.header-content {
    min-height: 84px;
    display: flex;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: auto;
    height: 54px;
    object-fit: contain;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    color: var(--blue-900);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    line-height: 1.25;
    white-space: nowrap;
}

.brand-tagline {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.3;
}

/* INTRO */

.medical-hero {
    position: relative;
    overflow: hidden;
    padding: 44px 0 40px;
    background:
        radial-gradient(circle at 88% 18%, rgba(22, 166, 220, 0.16), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f3fbff 58%, #e9f7fd 100%);
    border-bottom: 1px solid var(--border);
}

.medical-hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -120px;
    bottom: -175px;
    border: 36px solid rgba(8, 137, 201, 0.07);
    border-radius: 50%;
}

.medical-intro {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--blue-700);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1,
h2 {
    color: var(--blue-950);
    line-height: 1.12;
}

h1 {
    margin-bottom: 16px;
    font-size: clamp(2.7rem, 5vw, 4.7rem);
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    letter-spacing: -0.035em;
}

.lead {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.12rem;
}

/* ACCESSO / REGISTRAZIONE */

.access-area {
    padding: 42px 0 72px;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}

.access-card,
.registration-panel {
    padding: 34px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.register-card,
.registration-panel {
    background:
        linear-gradient(180deg, rgba(234, 247, 252, 0.65), rgba(255,255,255,1) 42%);
}

.registration-panel {
    margin-top: 28px;
}

.card-heading {
    margin-bottom: 26px;
}

.card-heading p:last-child,
.hint {
    margin-bottom: 0;
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field {
    min-width: 0;
}

.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 7px;
    color: var(--blue-950);
    font-size: 0.9rem;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    color: var(--text);
    background: var(--white);
    border: 1px solid #b9cfdd;
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(7,137,201,0.12);
}

.primary,
.secondary {
    min-height: 50px;
    padding: 13px 22px;
    border: 2px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    cursor: pointer;
}

.primary {
    width: 100%;
    margin-top: 22px;
    color: var(--white);
    background: var(--blue-700);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary:hover:not(:disabled) {
    background: var(--blue-800);
    box-shadow: 0 10px 24px rgba(7,55,96,0.16);
    transform: translateY(-1px);
}

.primary:disabled,
.secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.secondary {
    margin-top: 10px;
    color: var(--blue-800);
    background: var(--blue-100);
    border-color: var(--border);
}

.secondary:hover {
    background: #dceff8;
}

.step {
    margin-bottom: 10px;
    color: var(--blue-700);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.hint {
    margin-bottom: 24px;
}

.specialty {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.specialty input {
    flex: 1;
}

.remove {
    min-width: 44px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--blue-900);
    background: var(--blue-050);
    cursor: pointer;
}

.money {
    position: relative;
}

.money::before {
    content: "€";
    position: absolute;
    left: 14px;
    top: 12px;
    z-index: 2;
    color: var(--blue-950);
    font-weight: 700;
}

.money input {
    padding-left: 35px;
}

.msg {
    display: none;
    margin-top: 18px;
    padding: 14px 16px;
    color: #842626;
    background: #fff1f1;
    border: 1px solid #f0caca;
    border-radius: 10px;
}

.hidden {
    display: none !important;
}

/* TABLET */

@media (max-width: 900px) {
    .access-grid {
        grid-template-columns: 1fr;
    }

    .access-card,
    .registration-panel {
        padding: 30px;
    }
}

/* MOBILE */

@media (max-width: 600px) {
    .container {
        width: min(calc(100% - 32px), var(--container));
    }

    .header-content {
        min-height: 74px;
    }

    .brand {
        gap: 11px;
    }

    .brand-logo {
        height: 44px;
        flex: 0 0 auto;
    }

    .brand-title {
        font-size: 0.68rem;
        letter-spacing: 0.04em;
        white-space: normal;
    }

    .brand-tagline {
        font-size: 0.7rem;
    }

    .medical-hero {
        padding: 36px 0 34px;
    }

    h1 {
        font-size: clamp(2.55rem, 13vw, 3.45rem);
    }

    .lead {
        font-size: 1rem;
    }

    .access-area {
        padding: 34px 0 56px;
    }

    .access-grid {
        gap: 20px;
    }

    .access-card,
    .registration-panel {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .registration-panel {
        margin-top: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .full {
        grid-column: auto;
    }

    .specialty {
        align-items: stretch;
    }

    .primary,
    .secondary {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* RIFINITURA PULSANTI MOBILE */
@media (max-width: 600px) {
    .primary,
    .secondary {
        font-size: 0.76rem;
        letter-spacing: 0.035em;
    }
}

/* =========================================================
   AREA MEDICA - NAVIGAZIONE VERSO HOME CSD
   ========================================================= */

.header-content {
    justify-content: space-between;
    gap: 24px;
}

.home-link {
    flex: 0 0 auto;
    padding: 10px 14px;
    color: var(--blue-950);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.home-link:hover {
    color: var(--blue-700);
    background: var(--blue-050);
}

@media (max-width: 600px) {
    .header-content {
        min-height: 0;
        padding-top: 10px;
        padding-bottom: 10px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .brand {
        width: 100%;
    }

    .home-link {
        padding: 8px 0;
        font-size: 0.70rem;
    }
}
