/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    color: #333;
    background: #f4f4f4;
}

/* Header e Navbar */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    white-space: nowrap;
}

.logo:hover {
    opacity: 0.9;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover,
nav a.active {
    opacity: 0.8;
    border-bottom: 2px solid white;
    padding-bottom: 0.5rem;
}

/* Menu toggle mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Bottoni */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    margin: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid white;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    background: #f0f0f0;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

.btn-primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-primary:hover {
    background: #764ba2;
    border-color: #764ba2;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Titoli sezione */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 2rem 80px;
    text-align: center;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    animation: slideInDown 0.8s ease;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    animation: slideInUp 0.8s ease;
}

/* Servizi Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.service-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.service-card p {
    color: #666;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.portfolio-content {
    padding: 20px;
}

.portfolio-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.portfolio-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Sezione Why Us */
.why-us-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.why-us-content h2 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.why-us-content ul {
    list-style: none;
}

.why-us-content li {
    padding: 15px 0;
    padding-left: 40px;
    position: relative;
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
}

.why-us-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 1.5rem;
}

.why-us-image {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    height: 400px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.contact-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.contact-item p {
    opacity: 0.95;
    font-size: 0.95rem;
    line-height: 1.8;
}

.contact-item a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.contact-form h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

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

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    text-align: center;
    padding: 40px 2rem;
    border-top: 1px solid #333;
}

footer p {
    opacity: 0.8;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
}

/* Breadcrumb */
.breadcrumb {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 2rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Animazioni */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Sezioni */
section {
    padding: 80px 2rem;
    animation: fadeIn 0.6s ease;
}

section:nth-child(even) {
    background: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    .why-us-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .why-us-image {
        height: 300px;
    }

    .contact-form {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    nav {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 1rem 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    nav ul.active {
        display: flex;
    }

    nav a {
        display: block;
        padding: 12px 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border: none;
        transition: background 0.3s ease;
    }

    nav a:hover {
        background: rgba(255, 255, 255, 0.1);
        border-bottom: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* Hero */
    .hero {
        padding: 100px 1rem 60px;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }

    /* Sections */
    section {
        padding: 50px 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 20px;
    }

    /* Portfolio grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Contact */
    .contact {
        padding: 50px 1rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-form {
        margin-top: 30px;
    }

    /* Why us */
    .why-us-image {
        height: 250px;
        font-size: 3rem;
    }

    .why-us-content h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .why-us-content li {
        font-size: 0.95rem;
        padding: 10px 0;
        padding-left: 30px;
    }

    /* Footer */
    footer {
        padding: 30px 1rem;
    }

    .footer-links {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .logo {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.3rem;
        padding-bottom: 15px;
    }

    .section-title::after {
        width: 60px;
        height: 3px;
    }

    .service-icon,
    .portfolio-image {
        font-size: 2rem;
    }

    .service-card h3,
    .portfolio-content h3 {
        font-size: 1rem;
    }

    .why-us-content h2 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Webkit scroll behavior */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Print styles */
@media print {
    header,
    footer,
    .menu-toggle {
        display: none;
    }

    section {
        padding: 20px 0;
    }
}
