:root {
    --primary-green: #2E7D32; /* Darker green for text/headings */
    --secondary-green: #4CAF50; /* Lighter green for accents */
    --light-green-bg: #F1F8E9;
    --text-color: #333;
    --light-text: #666;
    --white: #ffffff;
    --dark-bg: #1a1a1a;
    --font-main: 'Outfit', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 80px 0;
}

.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.bg-light { background-color: var(--light-green-bg); }
.bg-dark { background-color: var(--primary-green); color: var(--white); }

/* BUTTONS */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-green);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.btn-primary:hover {
    background-color: var(--secondary-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.btn-contact {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
}

.btn-contact:hover {
    background-color: var(--secondary-green);
}

/* HEADER */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px; /* Adjust based on actual logo aspect ratio */
}

nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    font-family: var(--font-main);
    font-weight: 500;
    color: var(--text-color);
}

nav a:hover {
    color: var(--primary-green);
}

/* HERO SECTION */
#hero {
    height: 100vh;
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1464226184884-fa280b87c399?q=80&w=2070&auto=format&fit=crop'); /* Placeholder nature image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 0; /* Reset if needed */
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* SECTIONS GENERAL */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background-color: var(--secondary-green);
    margin-top: 10px;
}

.text-center .section-title::after {
    margin: 10px auto 0;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 3rem;
}

/* IL GRUPPO */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.col-text, .col-image {
    flex: 1;
    min-width: 300px;
}

.lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
}

.vision-box {
    background-color: var(--light-green-bg);
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-green);
    margin-top: 30px;
}

.feature-image {
    border-radius: 10px;
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.1); */
    max-height: 400px;
    margin: 0 auto;
}

/* SERVIZI */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Service card link wrapper */
.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-top: 3px solid transparent;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    border-top-color: var(--secondary-green);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.icon-wrapper {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.compact-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.compact-list li::before {
    content: '•';
    color: var(--secondary-green);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.full-width {
    grid-column: 1 / -1;
}

.content-flex {
    display: flex;
    align-items: center;
    gap: 30px;
}

.big-icon {
    font-size: 5rem;
    opacity: 0.2;
}

/* Service detail page */
.service-detail h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.service-detail h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--secondary-green);
}

.service-detail p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.service-detail ul {
    margin-bottom: 20px;
}

.service-content {
    max-width: 900px;
    margin: 0 auto;
}

/* RESPONSABILITA */
.reverse-mobile {
    flex-direction: row;
}

/* CONTATTI */
.contact-info {
    margin: 40px 0;
    font-size: 1.5rem;
}

.contact-item a {
    color: var(--white);
    text-decoration: underline;
}

.footer-logo img {
    height: 60px;
    margin: 0 auto;
    opacity: 0.8;
}

/* FOOTER */
footer {
    background-color: #111;
    color: #888;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ANIMATIONS */
.fade-in, .fade-in-left, .fade-in-right, .fade-in-up {
    opacity: 0;
    transition: opacity 0.3s ease-out, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.fade-in { transform: translateY(80px); }
.fade-in-left { transform: translateX(-120px); }
.fade-in-right { transform: translateX(120px); }
.fade-in-up { transform: translateY(120px); }

.visible {
    opacity: 1;
    transform: none;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.5rem; }
    
    .header-content { padding: 0 20px; }
    
    nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }
    
    nav.active {
        transform: translateY(0);
    }
    
    nav ul {
        flex-direction: column;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: block;
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--primary-green);
        position: absolute;
        transition: 0.3s;
    }
    
    .mobile-menu-toggle span:nth-child(1) { top: 0; }
    .mobile-menu-toggle span:nth-child(2) { top: 9px; }
    .mobile-menu-toggle span:nth-child(3) { top: 18px; }
    
    .reverse-mobile {
        flex-direction: column-reverse;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle { display: none; }
}

/* SERVICE HERO VIDEO */
#service-hero {
    position: relative;
    overflow: hidden;
}

.video-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(3, 102, 114, 0.7) 0%, rgba(4, 155, 172, 0.7) 100%);
    z-index: 2;
}

#service-hero .container {
    position: relative;
    z-index: 3;
}
