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

body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    font-weight: 400;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: #1a1a1a;
    border-bottom: 1px solid #404040;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-brand h1 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #cccccc;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff6b35;
}

/* Hero Section */
.hero {
    padding: 8rem 5% 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.05;
}

.accent {
    color: #ff6b35;
}

/* Descrizione Hero */
.description {
    margin: 2rem 0 3rem 0;
    max-width: 600px;
}

.description p {
    margin-bottom: 1.2rem;
    color: #cccccc;
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.description p:last-child {
    margin-bottom: 2rem;
    font-weight: 500;
    color: #ffffff;
}

/* CTA Button */
.cta-button {
    background-color: #ff6b35;
    color: #1a1a1a;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    letter-spacing: -0.01em;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 75%;
    max-width: 380px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.02);
}

/* Footer */
footer {
    background-color: #2d2d2d;
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid #404040;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.email-link {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: #ff8c5a;
    text-decoration: underline;
}

footer p {
    margin-bottom: 0.5rem;
    color: #cccccc;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }
    
    .nav-menu {
        display: none; /* Per menu mobile */
    }
    
    .hero {
        padding: 6rem 5% 2rem;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .description {
        margin: 1.5rem 0 2rem 0;
    }
    
    .description p {
        font-size: 1rem;
        text-align: left;
        margin-bottom: 1rem;
    }
    
    .hero-image img {
        width: 70%;
        max-width: 300px;
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }
}

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

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-accent {
    color: #ff6b35;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Scrollbar personalizzata (opzionale) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff8c5a;
}

/* Showroom Styles */
.showroom-hero {
    padding: 8rem 5% 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    text-align: center;
}

.showroom-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.showroom-hero p {
    font-size: 1.2rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
}

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

/* Projects Selection */
.projects-selection {
    padding: 2rem 0;
    background-color: #1a1a1a;
    border-bottom: 1px solid #404040;
}

.projects-nav {
    overflow-x: auto;
    padding: 1rem 0;
	display: flex;
    justify-content: center;
}

.nav-scroll {
    display: flex;
    gap: 1rem;
    min-width: max-content;
	padding: 0 20px;
	margin: 0 auto
}

.project-tab {
    background: none;
    border: 2px solid #404040;
    color: #cccccc;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

.project-tab:hover {
    border-color: #ff6b35;
    color: #ff6b35;
}

.project-tab.active {
    background-color: #ff6b35;
    border-color: #ff6b35;
    color: #1a1a1a;
}

/* Projects Gallery */
.projects-gallery {
    padding: 4rem 0;
    background-color: #2d2d2d;
    min-height: 60vh;
}

.project-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.project-content.active {
    display: block;
}

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

/* Gallery Container - MODIFICATO */
.gallery-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto 3rem;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
    padding: 2rem;
    border: 1px solid #404040;
}

.gallery-track {
     display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    /* Forza il rendering GPU */
    will-change: transform;
}

.gallery-slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-radius: 8px;
    padding: 1.5rem;
    box-sizing: border-box;
    /* Assicura che non ci siano spazi */
    margin: 0;
}

/* IMMAGINI GALLERIA - MODIFICATO PER ADATTAMENTO COMPLETO */
.gallery-slide img {
     max-width: 95%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid #404040;
}

/* Zoom opzionale al hover */
.gallery-slide img:hover {
    transform: scale(1.02);
}

/* Per immagini molto piccole o grandi */
.gallery-slide img {
    max-width: min(100%, 800px);
    max-height: min(80vh, 500px);
}

/* Gallery Navigation */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 107, 53, 0.9);
    border: none;
    color: #1a1a1a;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: #ff6b35;
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

/* Project Description */
.project-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.project-description h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.project-description p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #cccccc;
    margin-bottom: 2rem;
}

.project-tech {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: #404040;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Showroom - MODIFICATO */
@media (max-width: 768px) {
    .showroom-hero {
        padding: 6rem 5% 1rem;
    }
    
    .showroom-hero h1 {
        font-size: 2.2rem;
    }
    
    .gallery-container {
        padding: 1rem;
    }
    
    .gallery-slide {
        padding: 0.5rem;
    }
    
    .gallery-slide img {
        max-height: 300px;
        max-width: 95%;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .project-tab {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .project-description h3 {
        font-size: 1.5rem;
    }
	
	.projects-nav {
        justify-content: flex-start;
    }
	
	.nav-scroll {
        justify-content: flex-start;
        padding: 0 15px;
    }
	
}

@media (max-width: 480px) {
    .gallery-slide img {
        max-height: 250px;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .gallery-prev {
        left: 0.5rem;
    }
    
    .gallery-next {
        right: 0.5rem;
    }
}

/* Modal per zoom avanzato (opzionale) */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover {
    color: #ff6b35;
}
