/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #DC143C;
    --dark: #000000;
    --light: #FFFFFF;
    --gray: #F5F5F5;
    --text: #333333;
    --border: #E0E0E0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== UTILITY ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== HEADER/NAVBAR ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--dark);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    height: 70px;
    display: flex;
    align-items: center;
}

.navbar-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--light);
    font-weight: bold;
    font-size: 1.2rem;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    width: 45px;
    height: 45px;
}

.logo-text {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-menu a {
    color: var(--light);
    font-size: 0.95rem;
    transition: color 0.3s;
    opacity: 0.9;
}

.nav-menu a:hover {
    opacity: 1;
    color: var(--primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--light);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ==================== HERO SECTION ==================== */
.hero {
    margin-top: 70px;
    background: linear-gradient(135deg, var(--light) 0%, var(--gray) 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: calc(100vh - 70px);
    position: relative;
    padding-left: 20%;
    
}

.hero-content {
    padding: 0 24px;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 500px;
}

.cta-button {
    display: inline-block;
    background: var(--primary);
    color: var(--light);
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.cta-button:hover {
    background: #a00e18;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.hero-image-wrapper {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.hero-image {
    right: 0;
    top: 50%;
    width: 500px;
    height: 700px;
    object-fit: contain;
    z-index: 1;
}

/* ==================== SECTIONS GENERAL ==================== */
section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--dark);
    margin-bottom: 16px;
    font-weight: 700;
    text-align: center;
}

.section-subtitle {
    font-size: 1rem;
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== SERVIZI SECTION ==================== */
#servizi {
    background: var(--gray);
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--light);
    padding: 30px;
    border-radius: 10px;
    border-top: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 600;
}

.service-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
}

/* ==================== AZIENDA SECTION ==================== */
#azienda {
    background: var(--light);
}

.azienda-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.azienda-text h3 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 700;
}

.azienda-text p {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

.azienda-text strong {
    color: var(--primary);
}

.azienda-text h4 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: 600;
}

.values-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.values-list li {
    font-size: 0.95rem;
    color: #555;
    padding-left: 28px;
    position: relative;
}

.values-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.azienda-image img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    height: 350px;
}

/* ==================== GALLERIA SECTION ==================== */
#galleria {
    background: var(--gray);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
}

/* Effetto fade sui bordi */
.carousel-wrapper::before,
.carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 5;
}

.carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(245, 245, 245, 1), transparent);
    pointer-events: none;
}

.carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(245, 245, 245, 1), transparent);
    pointer-events: none;
}

.carousel {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    min-width: 100%;
    transition: transform 0.5s ease-in-out;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    height: 280px;
    aspect-ratio: 1;
    flex-shrink: 0;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Carosello Controlli */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(220, 20, 60, 0.95);
    border: none;
    color: var(--light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 20;
    pointer-events: auto;
}

.carousel-control:hover {
    background: rgba(220, 20, 60, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 6px;
}

.carousel-dots:after {
    margin:1px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(220, 20, 60, 0.3);
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--primary);
    color: var(--light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lightbox-close:hover {
    background: #a00e18;
    transform: scale(1.1);
}

/* ==================== CONTATTI SECTION ==================== */
#contatti {
    background: var(--light);
}

.contatti-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-info h3 {
    font-size: 1.4rem;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.info-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.info-item strong {
    display: block;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-item span,
.info-item a {
    color: #666;
    font-size: 1rem;
}

.info-item a:hover {
    color: var(--primary);
}

address {
    font-style: normal;
    line-height: 1.8;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form h3 {
    font-size: 1.4rem;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: #fafafa;
    transition: all 0.3s;
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--light);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-note {
    font-size: 0.85rem;
    color: #999;
    margin-top: -10px;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--light);
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-section p,
.footer-section ul {
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .logo-text {
        display: inline;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--dark);
        padding: 20px;
        gap: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        margin-left: 10px;
    }

    .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(8px, -8px);
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 40px 0;
        min-height: auto;
        gap: 30px;
    }

    .hero-content {
        padding: 0 24px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .azienda-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contatti-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .servizi-grid {
        grid-template-columns: 1fr;
    }
image-wrapper {
        height: 350px;
        position: relative;
    }

    .hero-image {
        width: 100%;
        height: 350px;
        right: auto;
        left: 0;
        top: auto;
        transform: none;
    }

    .hero-content {
        padding: 0 24px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .azienda-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contatti-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .servizi-grid {
        grid-template-columns: 1fr;
    }

    .carousel {
        gap: 16px;
    }

    .gallery-item {
        flex: 0 0 calc(50% - 8px);
        min-width: calc(50% - 8px);
        max-width: calc(50% - 8px);
        height: 240px;
    }

    .carousel-control {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .carousel-control.prev {
        left: 10px;
    }

    .carousel-control.next {
        right: 10px;
    }

    .carousel-dots {
        gap: 8px;
        margin-top: 25px;
    }


/* ==================== MODALE DI SUCCESSO INVIO ==================== */
/* modal removed */
    .dot {
        width: 10px;
        height: 10px;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .header {
        height: auto;
    }

    .navbar {
        height: auto;
        padding: 16px 0;
    }

    .hero {
        padding: 20px 0;
    }

    .hero-image-wrapper {
        height: 250px;
    }

    .hero-image {
        height: 250px;
    }

    .carousel {
        gap: 12px;
        padding-bottom: 10px;
    }

    .gallery-item {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        height: 240px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 18px;
        z-index: 20;
    }

    .carousel-control.prev {
        left: 10px;
    }

    .carousel-control.next {
        right: 10px;
    }

    .carousel-dots {
        gap: 12px;
        margin-top: 20px;
        position: relative;
        z-index: 20;
    }

    .dot {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }

    .dot.active {
        transform: scale(1.5);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .footer-content {
        gap: 20px;
    }
}

/* ==================== BANNER COOKIE INFORMATIVO ==================== */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 18px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 9999;
    font-size: 0.95rem;
}
.cookie-banner .cb-text { color: #333; flex: 1; }
.cookie-banner .cb-actions { display: flex; gap: 8px; }
.cookie-banner .cb-btn {
    padding: 10px 14px; border-radius: 8px; border: none; cursor: pointer; font-weight: 700;
}
.cookie-banner .cb-accept { background: var(--primary); color: var(--light); }
.cookie-banner .cb-accept:hover { background: #a00e18; }
.cookie-banner .cb-reject { background: transparent; color: #555; border: 1px solid rgba(0,0,0,0.08); }
.cookie-banner .cb-close { background: transparent; color: #777; border: none; font-size: 1.1rem; padding: 6px; }

@media (max-width: 640px) {
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
    .cookie-banner .cb-actions { justify-content: flex-end; }
}