/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-media video,
.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    padding: 0 2rem;
    margin-top: 55vh;
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-btn {
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-scroll {
    position: absolute;
    bottom: 8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    animation: bounce 2s infinite;
}

.hero-scroll span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background-color: #ffffff;
}

/* Chi Siamo Section */
.chi-siamo {
    background-color: #ffffff;
    padding: 6rem 0;
}

.chi-siamo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.chi-siamo-text h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-secondary);
}

.chi-siamo-text p {
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.chi-siamo-text .btn {
    margin-top: 1rem;
}

.chi-siamo-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.chi-siamo-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.chi-siamo-image:hover img {
    transform: scale(1.05);
}

/* Gallery Section */
.gallery {
    padding: 4rem 0;
    background-color: #f8f8f8;
    position: relative;
    overflow: hidden;
}

.gallery-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gallery-title {
    font-size: 3rem;
    text-align: center;
    color: var(--color-secondary);
    margin-bottom: 3rem;
    position: relative;
    z-index: 5;
}

.gallery-masonry {
    column-count: 5;
    column-gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 8px;
    background-color: #ffffff;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Dimensioni diverse per orientamenti */
.gallery-item-horizontal img {
    aspect-ratio: 16 / 9; /* 16:9 - orizzontale */
}

.gallery-item-vertical img {
    aspect-ratio: 9 / 16; /* 9:16 - verticale */
}

.gallery-item-square img {
    aspect-ratio: 1 / 1; /* quadrata */
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(212, 175, 55, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-icon {
    font-size: 3rem;
    color: #ffffff;
    font-weight: 300;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Gallery Lightbox */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    z-index: 10;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 3rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 11;
}

.lightbox-close:hover {
    color: var(--color-primary);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    z-index: 11;
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

/* Servizi Section */
.servizi-home {
    padding: 6rem 0;
    background-color: #f8f8f8;
}

.servizi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.servizi-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.servizi-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.servizi-image:hover img {
    transform: scale(1.05);
}

.servizi-text h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-secondary);
}

.servizi-text > p {
    color: var(--color-text);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.servizi-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.servizi-list li {
    margin-bottom: 2rem;
    padding-left: 2rem;
    position: relative;
}

.servizi-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: 50%;
}

.servizi-list h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.servizi-list p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #c19b2e 100%);
    padding: 5rem 0;
    text-align: center;
}

.cta-content h2 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-content .btn-primary {
    background-color: #ffffff;
    color: var(--color-primary);
}

.cta-content .btn-primary:hover {
    background-color: var(--color-secondary);
    color: #ffffff;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive - Tablet */
@media screen and (max-width: 1024px) {
    .chi-siamo-grid,
    .servizi-grid {
        gap: 3rem;
    }
    
    .gallery-masonry {
        column-count: 3;
        column-gap: 12px;
    }
    
    .gallery-item {
        margin-bottom: 12px;
    }
}

/* Responsive - Mobile */
@media screen and (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* Sposta il pulsante "Scopri di Più" verso l'alto di 80px su mobile */
    .hero-btn {
        position: relative;
        top: -80px;
    }
    
    /* Lightbox mobile */
    .lightbox-prev,
    .lightbox-next {
        left: 10px;
        right: auto;
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .lightbox-next {
        left: auto;
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 2.5rem;
    }
    
    .lightbox-counter {
        bottom: 10px;
        font-size: 0.9rem;
    }
    
    .chi-siamo {
        padding: 4rem 0;
    }
    
    .chi-siamo-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .chi-siamo-text h2 {
        font-size: 2.5rem;
    }
    
    .gallery-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }
    
    .gallery-masonry {
        column-count: 2;
        column-gap: 10px;
    }
    
    .gallery-item {
        margin-bottom: 10px;
    }
    
    .servizi-home {
        padding: 4rem 0;
    }
    
    .servizi-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .servizi-grid .servizi-image {
        order: -1;
    }
    
    .servizi-text h2 {
        font-size: 2.5rem;
    }
    
    .cta-content h2 {
        font-size: 2.2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .chi-siamo-text h2,
    .servizi-text h2 {
        font-size: 2rem;
    }
    
    .gallery-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .gallery-masonry {
        column-count: 1;
    }
    
    .gallery-item {
        margin-bottom: 8px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
}

