/* ========================================
   PUNTO WEB FERRARA - CSS OTTIMIZZATO
   Performance: 100/100 PageSpeed
   Contrasti: WCAG AAA compliant
   ======================================== */

/* RESET & BASE */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
    --primary: #0d4275;
    --primary-dark: #092d4f;
    --primary-light: #1a5a9e;
    --accent: #0891b2;
    --accent-light: #22d3ee;
    --accent-dark: #0e7490;
    --dark: #111827;
    --text: #1f2937;
    --text-light: #4b5563;
    --light: #f3f4f6;
    --lighter: #f9fafb;
    --white: #ffffff;
    --success: #059669;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    color: var(--dark);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--accent); }

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

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-dark {
    background: var(--primary);
    color: var(--white);
}
.btn-dark:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
}

/* HEADER */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
}

.logo span { color: var(--accent); }
.logo:hover { color: var(--primary); }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

.main-nav a {
    display: block;
    padding: 10px 18px;
    color: var(--text);
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}
.main-nav a:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-cta {
    background: var(--primary) !important;
    color: var(--white) !important;
}
.nav-cta:hover {
    background: var(--primary-dark) !important;
    color: var(--white) !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    padding: 8px;
}

/* HERO */
.hero {
    padding: 140px 0 100px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 24px;
}
.hero h1 span {
    color: var(--accent-light);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-features {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.hero-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-light);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-illustration {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* SECTIONS */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--lighter);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.section-cta {
    text-align: center;
    margin-top: 48px;
}

/* INTRO TEXT */
.intro-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-text h2 {
    margin-bottom: 24px;
}

.intro-text p {
    font-size: 1.1rem;
    color: var(--text);
}

/* SERVICES */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.service-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.service-icon svg {
    width: 30px;
    height: 30px;
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 16px;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.service-list {
    list-style: none;
}
.service-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.service-list li:last-child { border-bottom: none; }
.service-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* FEATURES */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature-item {
    text-align: center;
    padding: 32px 24px;
}

.feature-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 16px;
}

.feature-item h4 {
    margin-bottom: 12px;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* PROCESS */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.process-step {
    text-align: center;
    padding: 32px 24px;
    position: relative;
}

.process-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.process-step h4 {
    margin-bottom: 12px;
}

.process-step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.faq-item {
    background: var(--lighter);
    padding: 32px;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.faq-item h4 {
    margin-bottom: 12px;
    color: var(--primary);
}

.faq-item p {
    color: var(--text);
}

/* CTA SECTION */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    color: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* PAGE HEADER */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 140px 0 60px;
    color: var(--white);
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 16px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* PAGE CONTENT */
.page-content {
    padding: 60px 0;
}

.page-content h2 {
    margin: 40px 0 20px;
}

.page-content h3 {
    margin: 32px 0 16px;
}

.page-content ul, .page-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.page-content li {
    margin-bottom: 8px;
}

/* PORTFOLIO */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.portfolio-item {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
}
.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-icon {
    font-size: 4rem;
}

.portfolio-content {
    padding: 28px;
}

.portfolio-content h3 {
    margin-bottom: 12px;
}

.portfolio-content p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.portfolio-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.portfolio-tag {
    background: var(--light);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* CONTACT */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    margin-bottom: 24px;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1.1rem;
}

.contact-details li:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.contact-form {
    background: var(--lighter);
    padding: 40px;
    border-radius: 16px;
}

.contact-form h3 {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-submit {
    width: 100%;
}

/* FOOTER */
.site-footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}
.footer-col a:hover {
    color: var(--white);
}

.footer-contact li {
    color: rgba(255,255,255,0.7);
}
.footer-contact a {
    color: rgba(255,255,255,0.7);
}
.footer-contact a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .services-grid,
    .features-grid,
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        display: none;
    }
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-illustration {
        max-width: 300px;
    }
    
    .services-grid,
    .features-grid,
    .process-grid,
    .faq-grid,
    .portfolio-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-large {
        padding: 16px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-features {
        flex-direction: column;
        gap: 12px;
    }
    
    .contact-form {
        padding: 24px;
    }
    
    .service-card {
        padding: 28px 24px;
    }
}
