/* Tema chiaro – frontend e backend */
:root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-alt: #f1f5f9;
    --color-border: #e2e8f0;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-brand: #ea580c;
    --color-brand-hover: #c2410c;
    --font: 'Outfit', system-ui, sans-serif;
    --radius: 12px;
    --header-h: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    overflow-wrap: break-word;
}

@media (min-width: 1024px) {
    .container {
        max-width: 1100px !important;
    }
    .page-home .container {
        max-width: 1300px !important;
    }
    .header-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1.5rem;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
        overflow-wrap: break-word;
    }
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-ospite {
    color: #0f172a;
}

.logo-smart {
    color: var(--color-brand);
}

.logo .logo-ospite {
    color: #0f172a;
}

.logo .logo-smart {
    color: var(--color-brand);
}

.logo:hover .logo-ospite {
    color: #0f172a;
}

.logo:hover .logo-smart {
    color: var(--color-brand-hover);
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.4rem;
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--color-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--color-text);
}

.public-lang-switch-sep {
    opacity: 0.7;
}

.public-lang-active {
    color: var(--color-brand) !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Public language dropdown (ITA/ENG) */
.public-lang-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.public-lang-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.public-lang-dropdown-toggle:focus-visible {
    outline: 2px solid rgba(0, 102, 255, 0.35);
    outline-offset: 2px;
}

.public-lang-dropdown-toggle:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

.public-lang-flag {
    font-size: 1.05rem;
}

.public-lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 170px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 250;
}

.public-lang-dropdown-menu.is-open {
    display: block;
}

.public-lang-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    color: var(--color-text);
    text-decoration: none;
    background: transparent;
}

.public-lang-option:hover {
    background: rgba(234, 88, 12, 0.08);
}

.public-lang-option.is-active {
    color: var(--color-brand);
    font-weight: 700;
}

@media (max-width: 768px) {
    .public-lang-dropdown-menu {
        min-width: 190px;
        right: 0;
        left: auto;
    }
}

.nav a.btn-primary {
    background: var(--color-brand);
    color: #fff !important;
}
.nav a.btn-primary:hover {
    background: var(--color-brand-hover);
    color: #fff !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: auto;
        z-index: 99;
        background: var(--color-surface);
        flex-direction: column;
        justify-content: flex-start;
        padding: 1.25rem 1.5rem 2rem;
        padding-top: 20px;
        gap: 1rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        max-height: 60vh;
        overflow-y: auto;
    }
    .nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 101;
    }
    body.menu-open {
        overflow: hidden;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--color-brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-brand-hover);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover {
    background: var(--color-surface-alt);
    border-color: var(--color-muted);
}

/* Hero */
.hero {
    position: relative;
    min-height: 92vh;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.50) 0%, rgba(255, 255, 255, 0.54) 35%, rgba(255, 255, 255, 0.66) 100%),
        url('../img/Header_Ospite_Smart.png') center top / cover no-repeat;
    pointer-events: none;
}
.hero-img-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.hero-img {
    position: absolute;
    right: 0;
    bottom: -5%;
    width: 60%;
    max-width: 680px;
    height: auto;
    object-fit: cover;
    border-radius: 28px;
    opacity: 0.45;
    filter: saturate(0.95);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.55);
}
@media (min-width: 900px) {
    .hero-img { right: 2%; bottom: -5%; width: 48%; opacity: 0.4; }
}
@media (max-width: 768px) {
    .hero {
        min-height: 110vh;
    }
    .hero-img-wrap { display: none; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-brand);
    background: rgba(234, 88, 12, 0.12);
    border-radius: 9999px;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.hero-title em {
    color: var(--color-brand);
    font-style: normal;
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--color-text);
    margin: 0 0 1.25rem;
    max-width: 520px;
}

.hero-benefits {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    font-size: 1.05rem;
    color: var(--color-text);
}

.hero-benefits li {
    padding: 0.25rem 0 0 1.5rem;
    position: relative;
}

.hero-benefits li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-brand);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-visual {
    display: none;
}

.phone-mockup {
    width: 300px;
    aspect-ratio: 9/19;
    background: radial-gradient(circle at 20% 0%, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 1));
    border: 2px solid rgba(15, 23, 42, 0.9);
    border-radius: 2.4rem;
    padding: 12px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.55);
    position: relative;
    transform: rotate(-8deg);
    transform-origin: center bottom;
}

.phone-mockup::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 1.9rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    pointer-events: none;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 1.8rem;
    overflow: hidden;
    position: relative;
    padding: 6px 4px;
}

.phone-screen-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: #000;
}

@media (max-width: 768px) {
    .phone-mockup {
        width: 260px;
        transform: none;
        margin: 0 auto;
    }
}

/* Sections */
.section {
    padding: 5rem 1.5rem;
}

.section-title {
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.section-lead {
    text-align: center;
    color: var(--color-muted);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    font-size: 1.15rem;
    line-height: 1.6;
}

.section-alt {
    background: var(--color-surface-alt);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step-card {
    padding: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color 0.2s, transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.step-card:hover {
    border-color: rgba(234, 88, 12, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--color-brand);
    background: rgba(234, 88, 12, 0.12);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.step-card h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}

.step-card p {
    margin: 0;
    padding-bottom: 0;
    color: var(--color-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.audience-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.audience-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.audience-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.audience-card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
}

.audience-card p {
    margin: 0;
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.5;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem 2rem;
    margin-top: 2rem;
}

.benefit-item {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem;
    border: 1px solid var(--color-border);
}

.benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.08);
    color: var(--color-brand);
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
}

.benefit-item strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--color-text);
    font-size: 1.1rem;
}

.benefit-item p {
    margin: 0;
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.5;
}

/* Demo platforms */
.demo-platform-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
    margin-top: 1.75rem;
}

.demo-platform-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: calc(var(--radius) + 6px);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    text-align: left;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.demo-platform-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.demo-platform-card-body {
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.demo-platform-image {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
}

.demo-platform-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--color-text);
    line-height: 1.25;
}

.demo-platform-text {
    margin: 0;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.demo-platform-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.demo-platform-badge {
    font-size: 0.86rem;
    padding: 0.38rem 0.65rem;
    border-radius: 999px;
    background: var(--demo-accent-bg, rgba(234, 88, 12, 0.08));
    color: var(--demo-accent, var(--color-brand));
    border: 1px solid var(--demo-accent-border, rgba(234, 88, 12, 0.25));
}

.demo-platform-card--hotel {
    --demo-accent: #ea580c;
    --demo-accent-bg: rgba(234, 88, 12, 0.08);
    --demo-accent-border: rgba(234, 88, 12, 0.25);
}
.demo-platform-card--casa {
    --demo-accent: #2563eb;
    --demo-accent-bg: rgba(37, 99, 235, 0.08);
    --demo-accent-border: rgba(37, 99, 235, 0.25);
}
.demo-platform-card--agri {
    --demo-accent: #16a34a;
    --demo-accent-bg: rgba(22, 163, 74, 0.08);
    --demo-accent-border: rgba(22, 163, 74, 0.25);
}

.btn-demo-open {
    margin-top: auto;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .demo-platform-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .demo-platform-grid {
        grid-template-columns: 1fr;
    }
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    padding: 1.75rem 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.testimonial-rating {
    color: #fbbf24;
    font-size: 1rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.testimonial-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--color-text);
}

.testimonial-text {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Pricing */
.cta-section {
    padding-bottom: 6rem;
}

.pricing-card {
    max-width: 420px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pricing-card .price {
    font-size: 2.5rem;
    margin: 0 0 0.25rem;
}

.pricing-card .price span {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--color-muted);
}

.price-desc {
    font-size: 1.05rem;
    color: var(--color-muted);
    margin: 0 0 1rem;
    line-height: 1.6;
}

.price-includes {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    text-align: left;
    font-size: 1.05rem;
    color: var(--color-text);
}

.price-includes li {
    padding: 0.35rem 0 0 1.5rem;
    position: relative;
}

.price-includes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-brand);
    font-weight: 700;
}

.btn-cta-main {
    margin-bottom: 0.5rem;
}

.price-note {
    font-size: 0.95rem;
    color: var(--color-muted);
    margin: 0;
}

.price-note a {
    color: var(--color-brand);
}

.cta-strip {
    background: var(--color-brand);
    color: #fff;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.cta-strip .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cta-strip-text {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.cta-strip .btn {
    background: #fff;
    color: var(--color-brand);
}

.cta-strip .btn:hover {
    background: var(--color-surface-alt);
    color: var(--color-brand-hover);
}

/* Testimonial popup */
.testimonial-popup {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9000;
    max-width: 320px;
    width: 100%;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
    border: 1px solid var(--color-border);
    padding: 1rem 1.1rem 1.1rem;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.testimonial-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.testimonial-popup-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: transparent;
    color: var(--color-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
}

.testimonial-popup-close:hover {
    color: var(--color-text);
}

.testimonial-popup-content {
    padding-right: 1.2rem;
}

.testimonial-popup-rating {
    color: #fbbf24;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.25rem;
}

.testimonial-popup-text {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--color-text);
}

.testimonial-popup-name {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-muted);
}

@media (max-width: 640px) {
    .testimonial-popup {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 1rem;
        max-width: none;
    }
}

/* Footer */
.site-footer {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.site-footer a:hover {
    color: var(--color-brand);
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.25rem 1.5rem;
    transform: translateY(0);
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.cookie-banner.cookie-banner--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.cookie-banner-inner {
    max-width: 900px;
    margin: 0 auto;
}
.cookie-banner-text {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.5;
}
.cookie-banner-text a {
    color: var(--color-brand);
    text-decoration: underline;
}
.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.cookie-banner-preferences {
    margin: 0;
    font-size: 0.85rem;
}
.cookie-banner-preferences a {
    color: var(--color-muted);
    text-decoration: underline;
}
.cookie-banner-preferences a:hover {
    color: var(--color-brand);
}

/* Pagine interne (contatti, privacy, ecc.) */
.main-content { min-height: calc(100vh - 72px); padding: calc(var(--header-h) + 2rem) 1.5rem 4rem; }
.page-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin: 0 0 1.5rem; }
.page-lead { color: var(--color-muted); margin-bottom: 2rem; max-width: 640px; }
.content-block { margin-bottom: 2rem; }
.content-block h2 { font-size: 1.35rem; margin: 1.5rem 0 0.75rem; }
.content-block h3 { font-size: 1.15rem; margin: 1rem 0 0.5rem; }
.content-block p { margin: 0 0 0.75rem; }
.content-block ul, .content-block ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.legal-content .content-block table.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.legal-content .legal-table th, .legal-content .legal-table td { border: 1px solid var(--color-border); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.legal-content .legal-table th { background: var(--color-surface-alt); font-weight: 600; color: var(--color-text); }
.legal-content .legal-table code { font-size: 0.85em; background: var(--color-surface-alt); padding: 0.15rem 0.35rem; border-radius: 4px; }
@media (max-width: 640px) { .legal-content .legal-table th, .legal-content .legal-table td { display: block; width: 100%; }
.legal-content .legal-table thead { display: none; }
.legal-content .legal-table tr { margin-bottom: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.legal-content .legal-table td { border: none; border-bottom: 1px solid var(--color-border); }
.legal-content .legal-table td:first-child { font-weight: 600; background: var(--color-surface-alt); }
.legal-content .legal-table td:last-child { border-bottom: none; } }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
}
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form-group input, .form-group textarea { width: 100%; padding: 0.6rem 0.85rem; border: 1px solid var(--color-border); border-radius: var(--radius); font-family: var(--font); font-size: 1rem; }
.form-group textarea { min-height: 140px; resize: vertical; }
.contact-details h3 { font-size: 1.1rem; margin: 0 0 0.75rem; }
.contact-details p { margin: 0 0 0.5rem; }
.contact-details a { color: var(--color-brand); }
.alert-success { background: rgba(34, 197, 94, 0.12); color: #166534; padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.alert-error { background: rgba(239, 68, 68, 0.1); color: #b91c1c; padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.last-update { font-size: 0.9rem; color: var(--color-muted); margin-top: 2rem; }

/* FAQ */
.faq-block { margin-bottom: 2rem; }
.faq-block .faq-q { font-size: 1.2rem; margin: 0 0 0.5rem; color: var(--color-text); }
.faq-block p { margin: 0; }

.faq-accordion {
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-toggle {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0.9rem 1rem;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.faq-toggle::after {
    content: '+';
    font-weight: 700;
    color: var(--color-muted);
    margin-left: 0.75rem;
}

.faq-toggle.is-open::after {
    content: '−';
}

.faq-answer {
    padding: 0 1rem 0.75rem;
    font-size: 0.95rem;
    color: var(--color-muted);
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

/* Pagine Accedi / Registrati (stesso layout delle altre pagine) */
.form-page-wrap { padding: 2rem 0 3rem; }
.form-box { width: 100%; max-width: 440px; margin: 0 auto; }
.form-box .page-title { margin-bottom: 0.5rem; }
.form-box .page-lead { margin-bottom: 1.5rem; }
.form-box .btn { width: 100%; margin-top: 0.5rem; }
.form-links { margin-top: 1.5rem; text-align: center; font-size: 0.95rem; }
.form-links a { color: var(--color-brand); }
.form-links a:hover { text-decoration: underline; }
.form-group input:focus { outline: none; border-color: var(--color-brand); }
/* Password strength (registrazione) */
.password-strength { margin-top: 0.5rem; height: 4px; background: var(--color-border); border-radius: 2px; overflow: hidden; }
.password-strength-bar { height: 100%; width: 0; transition: width 0.2s, background 0.2s; border-radius: 2px; }
.password-strength-bar.weak { width: 33%; background: #dc2626; }
.password-strength-bar.medium { width: 66%; background: #ca8a04; }
.password-strength-bar.strong { width: 100%; background: #16a34a; }
.password-strength-label { font-size: 0.8rem; margin-top: 0.25rem; color: var(--color-muted); }
.password-criteria { margin-top: 0.75rem; font-size: 0.85rem; color: var(--color-muted); list-style: none; padding: 0; margin-bottom: 0; }
.password-criteria li { margin: 0.25rem 0; padding-left: 1.25rem; position: relative; }
.password-criteria li::before { content: ''; position: absolute; left: 0; top: 0.4em; width: 6px; height: 6px; border-radius: 50%; background: var(--color-border); }
.password-criteria li.valid { color: #16a34a; }
.password-criteria li.valid::before { background: #16a34a; }
/* Checkbox privacy (registrazione) */
.form-group-checkbox { margin-top: 1rem; }
.form-group-checkbox .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 400;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    line-height: 1.45;
}
.form-group-checkbox .checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
}
.form-group-checkbox .checkbox-label > span {
    flex: 1;
    min-width: 0;
}
.form-group-checkbox .checkbox-label a { color: var(--color-brand); }
.form-group-checkbox .checkbox-label a:hover { text-decoration: underline; }

/* ========== Pagina Registrazione (2 colonne + step) ========== */
.main-content > .register-page {
    margin: calc(-1 * (var(--header-h, 72px) + 2rem)) -1.5rem -4rem -1.5rem;
    width: calc(100% + 3rem);
    max-width: none;
}
.register-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-h, 72px));
    margin-top: 0;
}
.register-intro {
    position: relative;
    color: #fff;
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    background: #0f172a;
    overflow: hidden;
}
.register-intro-inner {
    max-width: 420px;
    position: relative;
    z-index: 1;
}
.register-intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.75) 45%, rgba(15,23,42,0.4) 100%),
        url('../img/Header_Ospite_Smart.png') center/cover no-repeat;
    z-index: 0;
}
.register-intro-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}
.register-intro-lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0 0 1.75rem;
}
.register-intro-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}
.register-intro-benefits li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
    color: #e2e8f0;
}
.register-intro-benefits li i {
    color: var(--color-brand);
    font-size: 0.9rem;
}
.register-intro-image { display: none; }
.register-form-col {
    background: var(--color-bg);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.register-form-inner {
    width: 100%;
    max-width: 660px;
    padding-top: 100px;
}
.register-steps-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.register-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.register-step-dot.active {
    background: var(--color-brand);
    color: #fff;
}
.register-step-line {
    flex: 1;
    max-width: 48px;
    height: 2px;
    background: var(--color-border);
}
.register-steps-label {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin: 0 0 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.register-step {
    display: none;
}
.register-step.active {
    display: block;
}
.register-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--color-text);
}
.register-step-desc {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin: 0 0 1.5rem;
}
.register-step .form-group {
    margin-bottom: 1rem;
}
.register-step .form-group label {
    font-weight: 600;
    font-size: 0.9rem;
}
.register-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.register-step-actions .btn-ghost {
    order: 1;
}
.register-step-actions .btn-primary {
    flex: 1;
    min-width: 180px;
}
.btn-block { width: 100%; }
.register-page .alert-error {
    margin-bottom: 1rem;
    border-radius: 8px;
}
.register-page .form-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}
@media (max-width: 900px) {
    .main-content > .register-page {
        margin: calc(-1 * (var(--header-h, 72px) + 2rem)) -1.25rem -2rem -1.25rem;
        width: calc(100% + 2.5rem);
    }
    .register-page {
        grid-template-columns: 1fr;
        min-height: auto;
        margin-top: 0;
    }
    .register-intro {
        padding: 2rem 1.5rem;
    }
    .register-intro-title { font-size: 1.5rem; }
    .register-intro-image { max-width: 280px; }
    .register-form-col {
        padding: 2rem 1.25rem;
    }
    .benefits-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}
