/* ===== Ufficio UCP - Stile professionale ===== */
:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --accent: #ed8936;
    --accent-hover: #dd6b20;
    --text: #2d3748;
    --text-muted: #718096;
    --bg: #f7fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}

.nav a:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    margin: 4px 0;
}

/* Hero */
.hero {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: .5;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    text-align: center;
}

.hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.hero-sub {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: .95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: .75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Services */
.services-preview {
    padding: 4rem 0;
}

.services-preview h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--primary);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s;
}

.card:hover {
    transform: translateY(-4px);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--primary);
    margin-bottom: .5rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.link {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* About */
.about {
    padding: 4rem 0;
    background: var(--white);
}

.about h2 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.about p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.check-list {
    list-style: none;
}

.check-list li::before {
    content: '✓ ';
    color: var(--accent);
    font-weight: 700;
}

.check-list li {
    margin: .5rem 0;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    font-size: 1.25rem;
}

.stat strong {
    color: var(--accent);
    font-size: 2rem;
}

/* CTA */
.cta {
    padding: 4rem 0;
    background: var(--primary);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    margin-bottom: .5rem;
}

.cta p {
    margin-bottom: 1.5rem;
    opacity: .9;
}

/* Footer */
.footer {
    padding: 2rem 0;
    background: var(--primary);
    color: var(--white);
}

.footer-grid {
    display: flex;
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.footer a {
    color: var(--white);
    opacity: .9;
    display: block;
    margin-top: .25rem;
}

.footer-copy {
    font-size: .875rem;
    opacity: .7;
}

/* Chat widget */
.chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
}

.chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform .2s;
}

.chat-toggle:hover {
    transform: scale(1.05);
}

.chat-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    max-height: 450px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
    display: none;
}

.chat-panel.open {
    display: block;
}

.chat-header {
    padding: 1rem;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 1.5rem;
    min-height: 120px;
}

.chat-placeholder {
    color: var(--text-muted);
    font-size: .9rem;
}

/* Alias per pagine interne */
.site-header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.site-footer { padding: 2rem 0; background: var(--primary); color: var(--white); text-align: center; }
.site-footer .container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* Pagine interne: hero piccolo */
.hero-sm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 2.5rem 0;
    text-align: center;
}
.hero-sm h1 { font-size: 1.75rem; margin-bottom: .5rem; }
.hero-sm p { opacity: .9; }

.page-content { min-height: 50vh; }

/* Servizi dettaglio */
.services-detail { padding: 3rem 0; }
.service-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s;
}
.service-card:hover { transform: translateY(-4px); }
.service-icon { font-size: 2rem; margin-bottom: 1rem; }
.service-card h3 { color: var(--primary); margin-bottom: .5rem; }
.service-card p { color: var(--text-muted); margin-bottom: 1rem; }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* Contatti */
.contact-section { padding: 3rem 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 900px; margin: 0 auto; }
.contact-info h2, .contact-form h2 { margin-bottom: 1rem; color: var(--primary); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label { font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea {
    padding: .75rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    font-family: inherit;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }


/* Hero pagina interna */
.hero-sm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}
.hero-sm h1 { font-size: 2rem; margin-bottom: .5rem; }
.hero-sm p { opacity: .9; }

/* Servizi pagina dettaglio */
.services-detail { padding: 3rem 0; }
.service-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
}
.service-icon { font-size: 2rem; margin-bottom: 1rem; }
.service-card h3 { color: var(--primary); margin-bottom: .5rem; }
.service-card p { color: var(--text-muted); margin-bottom: 1rem; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* Contatti */
.contact-section { padding: 3rem 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 900px; margin: 0 auto; }
.contact-info h2, .contact-form h2 { color: var(--primary); margin-bottom: 1rem; }
.contact-form label { display: block; margin-top: 1rem; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: .75rem;
    margin-top: .25rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
}
.contact-form button { margin-top: 1rem; }

/* Pacchetti */
.packages-section { padding: 3rem 0; }
.packages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.package-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    border: 2px solid transparent;
}
.package-card.featured { border-color: var(--accent); }
.package-card .badge { position: absolute; top: -10px; right: 1rem; background: var(--accent); color: white; padding: .25rem .5rem; font-size: .75rem; border-radius: 4px; }
.package-card h3 { color: var(--primary); margin-bottom: .5rem; }
.package-price { font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: 1rem; }
.package-card ul { list-style: none; margin: 1rem 0; }
.package-card ul li::before { content: '✓ '; color: var(--accent); }
.packages-note { text-align: center; color: var(--text-muted); font-size: .9rem; }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem;
    }

    .chat-panel {
        width: calc(100vw - 2rem);
        right: -0.5rem;
    }
}
