/* Variables */
:root {
    --primary-color: #3B6B9C;
    --primary-dark: #2D5478;
    --dark-bg: #1a1a1a;
    --light-bg: #f5f5f5;
    --text-dark: #333;
    --text-light: #fff;
    --gray: #666;
}

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

html {
    scroll-behavior: smooth;
}

.mobile-break {
    display: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    padding: 1rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s ease forwards;
    animation-delay: 0.2s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar.scrolled .logo-text {
    color: var(--text-dark) !important;
    text-shadow: none;
}

.navbar.scrolled .nav-links a {
    color: var(--text-dark);
    text-shadow: none;
}

.navbar.scrolled .nav-links a:hover {
    color: var(--primary-color);
}

.navbar.scrolled .hamburger span {
    background: var(--text-dark);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.navbar .logo .logo-text {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 3px;
    text-shadow: none;
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 3px;
    text-shadow: none;
    transition: all 0.3s ease;
}

.logo img {
    height: 110px;
    width: auto;
}

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

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    text-shadow: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:not(.cta-nav)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:not(.cta-nav):hover::after {
    width: 100%;
}

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

.cta-nav {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 0;
    transition: all 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-light);
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/foto2.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--text-light);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
}

.hero-title {
    font-size: 4rem;
    font-weight: bold;
    text-shadow: none;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
}

.hero-subtitle {
    font-size: 1.5rem;
    text-shadow: none;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.6s;
}

.cta-button {
    display: inline-block;
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
    padding: 1rem 2.5rem;
    text-shadow: none;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.9s;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--text-light);
    color: var(--text-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
}

/* Servizi Section */
.servizi {
    background: var(--light-bg);
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.servizio-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 25px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.servizio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(232, 119, 58, 0.15);
    border-color: var(--primary-color);
}

.servizio-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 22px;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(232, 119, 58, 0.3);
}

.servizio-card:hover .servizio-icon {
    transform: scale(1.1);
    border-radius: 50%;
}

.servizio-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
}

.servizio-card h3 {
    margin-top: 0.5rem;
    margin-bottom: 0.8rem;
}

.servizio-card p {
    color: var(--gray);
    line-height: 1.7;
}

.servizio-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.servizio-card p {
    color: var(--gray);
    line-height: 1.8;
}

/* Chi Siamo Section */
.chi-siamo {
    background: white;
}

.chi-siamo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.chi-siamo-centered {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.chi-siamo-centered p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--gray);
    text-align: center;
}

.chi-siamo-centered .cta-button {
    display: inline-block;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.chi-siamo-centered .cta-button:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

.chi-siamo-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--gray);
}

.chi-siamo-text .cta-button {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.chi-siamo-text .cta-button:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

.chi-siamo-image img {
    width: 100%;
    border-radius: 3px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Portfolio Section - Auto Carousel */
.portfolio {
    background: var(--light-bg);
    overflow: hidden;
}

.container-full {
    max-width: 100%;
    padding: 0 20px;
}

.auto-carousel {
    overflow: hidden;
    position: relative;
    margin-top: 2rem;
}

.auto-carousel-track {
    display: flex;
    gap: 2rem;
    animation: scroll 30s linear infinite;
}

.auto-carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-400px * 6 - 12rem));
    }
}

.auto-carousel-slide {
    min-width: 400px;
    height: 300px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.auto-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.auto-carousel-slide:hover img {
    transform: scale(1.1);
}

/* Galleria Section */
.galleria {
    background: white;
}

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

.galleria-item {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    cursor: pointer;
    height: 300px;
}

.galleria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galleria-item:hover img {
    transform: scale(1.1);
}

/* Contatti Section */
.contatti {
    background: white;
}

.contatti-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contatti-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.info-item svg {
    width: 40px;
    height: 40px;
    stroke: var(--primary-color);
    flex-shrink: 0;
}

.info-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.info-item p {
    color: var(--gray);
    font-size: 1.1rem;
}

.contatti-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contatti-form input,
.contatti-form textarea {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contatti-form input:focus,
.contatti-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contatti-form textarea {
    resize: vertical;
    border-radius: 25px;
}

.contatti-form .cta-button {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.contatti-form .cta-button:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

.contatti-cta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-call {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(232, 119, 58, 0.3);
}

.cta-call:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 119, 58, 0.4);
}

.cta-call svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-light);
}

.mappa-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 300px;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        flex-direction: column;
        background: var(--dark-bg);
        width: 70%;
        height: 100vh;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .mobile-break {
        display: block;
    }

    .logo-text {
        font-size: 1.35rem !important;
        letter-spacing: 1px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .chi-siamo-content,
    .contatti-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auto-carousel-slide {
        min-width: 300px;
        height: 250px;
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-300px * 6 - 12rem));
        }
    }

    .section-title {
        font-size: 2rem;
    }

    .galleria-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-title {
        font-size: 2rem;
    }

    .cta-button {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
}
