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

:root {
    --primary-color: #2c5530;
    --secondary-color: #8fbc8f;
    --accent-color: #d4a574;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --black: #000000;
    --gradient-primary: linear-gradient(135deg, #2c5530 0%, #8fbc8f 100%);
    --gradient-secondary: linear-gradient(45deg, #d4a574 0%, #f4e4bc 100%);
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

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

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-logo img {
    width: 50% !important;
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.text-center {
    text-align: center;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

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

.section-title.white {
    color: var(--white);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 300;
}

.section-subtitle.white {
    color: rgba(255,255,255,0.9);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    z-index: 1000;
    transition: var(--transition), transform 0.3s ease;
    transform: translateY(0);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(255,255,255,0.98);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 80px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(44, 85, 48, 0.8),
        rgba(143, 188, 143, 0.6)
    ),
    url('images/massaggi-trento-natura-benessere3.jpg') center/cover no-repeat;
    z-index: -2;
}

.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: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    margin-bottom: 30px;
}

.hero-name {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease 0.5s both;
}

.hero-subtitle {
    display: block;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-color);
    animation: fadeInUp 1s ease 0.7s both;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.9s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease 1.1s both;
}

.hero-title,
.hero-description {
    will-change: transform;
    transform: translateY(0);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    animation: fadeInUp 1s ease 1.3s both;
    flex-wrap: nowrap;
    position: relative;
    z-index: 10;
    transform: translateY(0px);
}

.stat-item {
    text-align: center;
    flex-shrink: 0;
    min-width: 0;
}

/* Animazione contatori */
.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.stat-number.animating {
    animation: counterPulse 0.1s ease-in-out;
}

@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid var(--white);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

@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);
    }
}

/* About Section */
.about {
    padding: 120px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

.image-wrapper img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: var(--transition);
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(44, 85, 48, 0.8), rgba(143, 188, 143, 0.6));
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper:hover .image-overlay {
    opacity: 1;
}

.experience-badge {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-medium);
    position: absolute;
    top: 20px;
    right: 20px;
}

.badge-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.badge-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.about-text {
    padding-left: 20px;
}

.about-description p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(143, 188, 143, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(143, 188, 143, 0.2);
    transform: translateX(10px);
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Services Section */
.services {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    margin: 0;
}

.services-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 0, 0, 0.7),
        rgba(0, 0, 0, 0.5)
    ),
    url('images/massaggi-trento-schiena.jpg') center/cover no-repeat;
    z-index: -1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.service-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 85, 48, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover .service-overlay {
    opacity: 1;
}

.service-overlay i {
    color: var(--white);
    font-size: 3rem;
}

.service-content {
    padding: 30px;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-benefits {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-benefits span {
    font-size: 0.9rem;
    color: var(--text-light);
}

.additional-service {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.additional-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 600px;
    transition: var(--transition);
}

.additional-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.additional-icon {
    background: var(--gradient-primary);
    padding: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.additional-icon i {
    color: var(--white);
    font-size: 2rem;
}

.additional-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Gallery Section */
.gallery {
    padding: 120px 0;
    background: #f8f9fa;
    margin: 0;
}

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

.gallery-item {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 85, 48, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.gallery-modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    border-radius: var(--border-radius);
}

.gallery-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-close:hover {
    color: var(--accent-color);
}

.gallery-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--white);
    padding: 10px 0;
    height: 150px;
}

/* Contact Section */
.contact {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    min-height: auto;
    margin: 0;
    background: var(--text-dark); /* Fallback background scuro */
}

.contact-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 0, 0, 0.8),
        rgba(0, 0, 0, 0.6)
    ),
    url('images/massaggi-trento-relax-acqua.jpg') center/cover no-repeat;
    z-index: -1;
}

/* Assicura che il testo sia sempre visibile */
.contact .section-title,
.contact .section-subtitle,
.contact-text,
.contact-text p,
.contact-item,
.contact-details h4,
.contact-details p {
    color: var(--white) !important;
}

.contact-details a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
}

.contact-details a:hover {
    color: var(--accent-color) !important;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-text {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--white) !important;
}

.contact-item i {
    background: var(--gradient-secondary);
    padding: 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-dark);
    flex-shrink: 0;
}

.contact-details h4 {
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--white) !important;
}

.contact-details p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.contact-details a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--accent-color) !important;
}

/* Contact Form */
.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.2);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group select:focus + label,
.form-group select:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    color: var(--accent-color);
    background: rgba(44, 85, 48, 0.8);
    padding: 0 10px;
    border-radius: 4px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

.form-group select option {
    background: var(--text-dark);
    color: var(--white);
}

/* Form alternative */
.form-alternative {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.form-alternative p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.form-alternative .btn {
    width: 100%;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--text-dark);
    padding: 40px 0;
    color: var(--white);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo img {
    height: 125px;
    width: auto;
    background: white;
    border-radius: 75px;
    padding: 5px;
}

.footer-text {
    text-align: center;
    flex: 1;
}

.footer-text p {
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Parallax Effect */
.parallax {
    will-change: transform;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero {
        height: 100vh;
        min-height: 500px;
        max-height: 800px;
    }
    
    .hero-content {
        padding: 20px;
        max-width: 90%;
    }
    
    .hero-name {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 40px;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 20px;
        justify-content: space-around;
        margin: 0 -10px;
    }
    
    .stat-item {
        flex: 1;
        min-width: 0;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-text {
        padding-left: 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .additional-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 100vh;
        min-height: 450px;
        max-height: 700px;
    }
    
    .hero-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .hero-name {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 25px;
        line-height: 1.6;
    }
    
    .hero-buttons {
        gap: 12px;
        margin-bottom: 35px;
    }
    
    .hero-buttons .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .contact-form-wrapper {
        padding: 20px;
    }
    
    .hero-stats {
        gap: 15px;
        margin: 0 -5px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
    .stat-item {
        padding: 0 5px;
    }
}

/* Animation delays for staggered effects */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Fix per evitare spazi vuoti */
section {
    position: relative;
    z-index: 1;
    margin: 0 !important;
    padding: 0;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

section.hero {
    padding: 0;
}

section.about,
section.services,
section.gallery,
section.contact {
    padding: 120px 0;
}

section::before,
section::after {
    content: none;
}

/* Assicura che il footer sia attaccato al contenuto */
.footer {
    margin-top: 0;
    clear: both;
    display: block;
    width: 100%;
}

/* Rimuovi margini eccessivi */
body {
    margin: 0;
    padding: 0;
}

main {
    display: block;
    width: 100%;
}

/* Rimuovi qualsiasi spazio aggiuntivo */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}







/* Slideshow Styles */
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    height: 500px;
}

.slide {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
    animation: slideIn 0.5s ease-in-out;
}

.slide.active {
    display: block;
}

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

.slide:hover img {
    transform: scale(1.05);
}

@keyframes slideIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Controlli navigazione */
.slide-prev, .slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
    z-index: 10;
}

.slide-prev {
    left: 20px;
}

.slide-next {
    right: 20px;
}

.slide-prev:hover, .slide-next:hover {
    background: var(--primary-color, #27ae60);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

/* Indicatori */
.slide-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.indicator.active,
.indicator:hover {
    background: var(--primary-color, #27ae60);
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .slideshow-container {
        height: 350px;
    }
    
    .slide-prev, .slide-next {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .slide-prev {
        left: 10px;
    }
    
    .slide-next {
        right: 10px;
    }
    
    .experience-badge {
        padding: 15px 20px;
    }
    
    .badge-number {
        font-size: 2rem;
    }
}










/* Attestati Section */
.attestati {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

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

.attestati-text {
    text-align: center;
    margin-bottom: 50px;
}

.attestati-text p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.attestati-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    padding: 10px 0;
}

.attestato-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.attestato-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.attestato-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.attestato-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.attestato-card:hover .attestato-image img {
    transform: scale(1.05);
}

.attestato-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(39, 174, 96, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
}

.attestato-card:hover .attestato-overlay {
    opacity: 1;
}

.attestato-overlay i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.attestato-overlay span {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animazioni staggered per le card */
.attestato-card:nth-child(1) { animation-delay: 0.1s; }
.attestato-card:nth-child(2) { animation-delay: 0.2s; }
.attestato-card:nth-child(3) { animation-delay: 0.3s; }
.attestato-card:nth-child(4) { animation-delay: 0.4s; }
.attestato-card:nth-child(5) { animation-delay: 0.5s; }
.attestato-card:nth-child(6) { animation-delay: 0.6s; }
.attestato-card:nth-child(7) { animation-delay: 0.7s; }
.attestato-card:nth-child(8) { animation-delay: 0.8s; }

/* Responsive */
@media (max-width: 768px) {
    .attestati {
        padding: 60px 0;
    }
    
    .attestati-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .attestato-image {
        height: 250px;
    }
    
    .attestati-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .attestati-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .attestato-image {
        height: 200px;
    }
}