/* ===========================
   VARIABILI CSS E RESET
   =========================== */

:root {
    /* Colori principali - Modifica qui per cambiare la palette */
    --primary-color: #d8222a;
    --primary-dark: #b01d23;
    --primary-light: #ff4d55;
    --secondary-color: #1a252f;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);

    /* Font */
    --font-main: 'Poppins', sans-serif;

    /* Dimensioni */
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===========================
   UTILITIES
   =========================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Bottone secondario bianco per hero section */
.hero .btn-secondary {
    color: var(--white);
    border-color: var(--white);
}

.hero .btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ===========================
   NAVBAR
   =========================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 2px 10px var(--shadow);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px var(--shadow-dark);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

/* Overlay pattern (opzionale) */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>') repeat;
    background-size: 30px 30px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero-logo img {
    width: 350px;
    height: auto;
    margin: 0 auto 15px;
    filter: brightness(0) invert(1);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 300;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 2rem;
    color: var(--white);
    opacity: 0.7;
}

/* ===========================
   SEZIONE CHI SIAMO
   =========================== */

.chi-siamo {
    padding: 100px 0;
    background: var(--white);
}

.chi-siamo-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.chi-siamo-image {
    position: relative;
}

.chi-siamo-image img {
    width: 100%;
    height: auto;
    border-radius: 25px;
    box-shadow: 0 10px 40px var(--shadow-dark);
}

.chi-siamo-content {
    text-align: left;
}

.chi-siamo-text h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.chi-siamo-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 15px;
}

.chi-siamo-features {
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: 0 3px 15px var(--shadow);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px var(--shadow-dark);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.feature-text h4 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.feature-text p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* ===========================
   SEZIONE CATALOGHI
   =========================== */

.cataloghi {
    padding: 100px 0;
    background: var(--bg-light);
}

.cataloghi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.catalogo-card {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
}

.catalogo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-dark);
}

.catalogo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
}

.catalogo-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.catalogo-card p {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.8;
}

/* ===========================
   SEZIONE GALLERIA
   =========================== */

.galleria {
    padding: 100px 0;
    background: var(--white);
}

.galleria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-dark);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(216, 34, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    font-size: 2rem;
    color: var(--white);
    display: none;
}

.product-card:hover .product-overlay {
    opacity: 0;
}

.product-info {
    padding: 25px;
    text-align: center;
}

.product-info h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.product-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    display: none;
}

.galleria-extra-text {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-top: 50px;
    font-style: italic;
}

/* ===========================
   SEZIONE CONTATTI
   =========================== */

.contatti {
    padding: 100px 0;
    background: var(--bg-light);
}

.contatti-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.contatti-info h3,
.contatti-form h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 3px 10px var(--shadow);
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.info-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Form */
.contatti-form form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.copyright {
    font-size: 0.95rem;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.footer-links a {
    color: var(--white);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ===========================
   ANIMAZIONI
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Fade-in per elementi al caricamento */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

/* Tablet */
@media screen and (max-width: 992px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .contatti-wrapper {
        grid-template-columns: 1fr;
    }

    .cataloghi-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 50px auto 0;
    }

    .chi-siamo-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .chi-siamo-text h3 {
        font-size: 1.5rem;
    }

    .feature-item:hover {
        transform: translateX(5px);
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 50px 0;
        gap: 0;
        transition: var(--transition);
        box-shadow: 0 5px 20px var(--shadow-dark);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 20px;
        border-bottom: 1px solid var(--bg-light);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-logo img {
        width: 100px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .galleria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 15px 10px;
    }

    .product-info h4 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .footer-content {
        gap: 25px;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .contatti-form form {
        padding: 25px;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        height: 40px;
    }
}
