/* root variables */
:root {
  /* ENERMI Brand Colors */
  --primary: #1EA941;
  --secondary: #74DA63;
  --accent: #F6C15E;
  
  --bg-main: #FFFFFF;
  --bg-alt: #F8FAFC; 
  --bg-footer: #061A0C; 
  
  --text-dark: #0F172A; 
  --text-main: #334155; 
  --text-muted: #64748B; 
  
  --border-light: #E2E8F0;
  
  --shadow-sm: 0 4px 10px rgba(30, 169, 65, 0.08); 
  --shadow-md: 0 10px 25px rgba(30, 169, 65, 0.12);
  --shadow-lg: 0 20px 40px rgba(30, 169, 65, 0.2); 
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body { font-family: 'Outfit', sans-serif; background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; color: var(--text-dark); }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 20px; }

.text-gradient { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 20px; }
.section-title { text-align: center; max-width: 800px; margin: 0 auto 50px auto; }
.section-title p { color: var(--text-muted); font-size: 1.15rem; }

.badge { display: inline-block; background: rgba(116, 218, 99, 0.15); color: var(--primary); padding: 8px 18px; border-radius: 50px; font-weight: 700; font-size: 0.95rem; margin-bottom: 25px; border: 1px solid rgba(116, 218, 99, 0.3); }

/* Buttons */
.btn-primary { display: inline-block; padding: 14px 32px; background: linear-gradient(45deg, var(--primary), var(--secondary)); color: white; border-radius: 50px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 10px 25px rgba(30, 169, 65, 0.4); position: relative; overflow: hidden; z-index: 1; transition: var(--transition); border: none; cursor: pointer; text-align: center; }
.btn-primary::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, var(--secondary), var(--primary)); z-index: -1; transition: opacity 0.3s ease; opacity: 0; }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(30, 169, 65, 0.5); color: white; }

.btn-outline { display: inline-block; padding: 12px 30px; background: white; color: var(--primary); border: 2px solid var(--primary); border-radius: 50px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: var(--transition); cursor: pointer; text-align: center; box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--primary); color: white; box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; width: 100%; padding: 20px 0; z-index: 1000; transition: var(--transition); background: transparent; }
.navbar.scrolled { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); padding: 15px 0; border-bottom: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; cursor: pointer; }
.brand-logo { height: 48px; width: auto; transition: transform 0.3s ease; }
.brand-logo:hover { transform: scale(1.05); }

.nav-links { display: flex; gap: 35px; }
.nav-links a { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); position: relative; }
.nav-links a:hover { color: var(--primary); }
.nav-links a::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 0%; height: 2px; background: var(--primary); transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }

/* Hero Section (Split Layout for foolproof responsive image) */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 80px; overflow: hidden; background-color: var(--bg-alt); }
.hero-bg-accent { position: absolute; top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(116, 218, 99, 0.15) 0%, transparent 70%); border-radius: 50%; z-index: 0; pointer-events: none; }

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; position: relative; z-index: 10; width: 100%; }

.hero-content { position: relative; z-index: 10; max-width: 650px; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-main); margin-bottom: 40px; font-weight: 500; line-height: 1.6; }
.hero-actions { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 30px; }

/* The Hero Image Box */
.hero-image-container { position: relative; width: 100%; border-radius: 30px; margin-top: 20px; }
/* Rimosso aspect-ratio e object-fit per mostrare l'immagine al 100% delle sue dimensioni originali senza tagli */
.hero-main-img { width: 100%; height: auto; border-radius: 30px; box-shadow: var(--shadow-lg); display: block; animation: floatImage 8s ease-in-out infinite; }

/* Floating Badges pinned exactly to the image */
.floating-badge { position: absolute; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 15px 25px; border-radius: 16px; display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.8); z-index: 20; }
.floating-badge .icon { font-size: 1.8rem; }
.floating-badge strong { display: block; color: var(--primary); font-size: 1.1rem; }
.floating-badge small { color: var(--text-muted); font-weight: 500; }

.badge-1 { bottom: -20px; left: -20px; animation: floatBadge 6s ease-in-out infinite alternate; }
.badge-2 { top: -20px; right: -20px; animation: floatBadge 7s ease-in-out infinite alternate-reverse; padding: 12px 20px; }

@keyframes floatBadge { 0% { transform: translateY(0); } 100% { transform: translateY(-20px); } }
@keyframes floatImage { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

section { padding: 100px 0; position: relative; z-index: 10; }
.section-white { background-color: var(--bg-main); }
.section-light { background-color: var(--bg-alt); }

/* Cards Grid (Image Integration) */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

.glass-card { background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,1); border-radius: 20px; padding: 0; transition: var(--transition); box-shadow: 0 10px 30px rgba(30, 169, 65, 0.08); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.glass-card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary)); opacity: 1; z-index: 5; }
.glass-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(30, 169, 65, 0.18); }

.card-img { height: 200px; width: 100%; overflow: hidden; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.glass-card:hover .card-img img { transform: scale(1.1); }
.card-body { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.5rem; margin-bottom: 20px; color: var(--primary); }
.card-body p { color: var(--text-muted); margin-bottom: 20px; }
.card-body .btn-outline { margin-top: auto; }

/* Split Layout (Scopri) */
.split-section { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.split-image { position: relative; border-radius: 20px; overflow: hidden; align-self: stretch; }
.split-image img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; border-radius: 24px; box-shadow: var(--shadow-lg); }

.experience-badge { position: absolute; top: 30px; right: -20px; background: var(--accent); color: var(--text-dark); padding: 15px; border-radius: 16px; text-align: center; box-shadow: var(--shadow-lg); font-weight: 800; transform: rotate(10deg); border: 3px solid white; }
.experience-badge span { font-size: 2rem; display: block; line-height: 1; color: white; }
.experience-badge small { font-size: 0.8rem; text-transform: uppercase; font-weight: 700; color: white; }

.features-list { display: flex; flex-direction: column; gap: 25px; }
.feature-row { display: flex; gap: 20px; align-items: flex-start; background: white; padding: 20px; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); transition: var(--transition); }
.feature-row:hover { transform: translateX(10px); box-shadow: var(--shadow-md); border-color: rgba(30, 169, 65, 0.3); }
.feature-row .icon { font-size: 2.5rem; background: var(--bg-alt); width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; padding: 10px; }
.feature-row h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--primary); }
.feature-row p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Testimonials */
.testimonials { background: var(--bg-main); }
.testimonials-slider { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.testimonial-card { background: var(--bg-alt); padding: 45px 35px; border-radius: 24px; position: relative; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); transition: var(--transition); }
.testimonial-card:hover { box-shadow: var(--shadow-md); border-color: var(--secondary); transform: translateY(-5px); }
.quote-icon { font-size: 4rem; color: rgba(30, 169, 65, 0.1); position: absolute; top: -10px; right: 20px; font-family: Georgia, serif; }
.testimonial-card p { font-style: italic; color: var(--text-main); margin-bottom: 25px; position: relative; z-index: 10; }
.testimonial-card h4 { color: var(--primary); text-transform: uppercase; letter-spacing: 1px; }

/* FAQ */
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.support-card { display: block; background: var(--bg-main); padding: 40px 35px; border-radius: 20px; border: 1px solid var(--border-light); border-left: 4px solid var(--secondary); transition: var(--transition); box-shadow: var(--shadow-sm); cursor: pointer; }
.support-card:hover { border-left-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-md); }
.support-card h3 { margin-bottom: 15px; font-size: 1.3rem; }
.link-text { color: var(--primary); font-weight: 600; font-size: 0.95rem; display: inline-block; margin-top: 10px; }

.faq-item { background: var(--bg-main); border-radius: 15px; margin-bottom: 15px; border: 1px solid var(--border-light); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.faq-item:hover { border-color: rgba(30, 169, 65, 0.3); box-shadow: var(--shadow-md); }
.faq-question { padding: 20px 25px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--text-dark); transition: var(--transition); }
.faq-question span { font-size: 1.2rem; color: var(--primary); font-weight: bold; }
.faq-answer { padding: 0 25px; max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; color: var(--text-muted); }
.faq-item.active .faq-answer { padding: 0 25px 25px 25px; max-height: 400px; }
.faq-item.active .faq-question { color: var(--primary); }

/* CTA Section */
.cta-box { background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 30px; padding: 60px 40px; text-align: center; color: white; box-shadow: 0 20px 40px rgba(30, 169, 65, 0.3); position: relative; overflow: hidden; transition: transform 0.5s ease; }
.cta-box:hover { transform: scale(1.02); }
.cta-box::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%); animation: spin 20s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.cta-box h2 { color: white; margin-bottom: 15px; position: relative; z-index: 10; font-size: clamp(2rem, 3vw, 2.5rem); }
.cta-box p { color: rgba(255,255,255,0.9); max-width: 600px; margin: 0 auto 30px; position: relative; z-index: 10; font-size: 1.1rem; }
.cta-box .btn-primary { background: white; color: var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.1); position: relative; z-index: 10; }
.cta-box .btn-primary:hover { transform: scale(1.05); color: var(--primary); }

/* Modals */
.modal { display: flex; opacity: 0; pointer-events: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(5px); z-index: 9999; justify-content: center; align-items: center; transition: opacity 0.3s ease; }
.modal.active { opacity: 1; pointer-events: auto; }
.modal-content { background: var(--bg-main); width: 90%; max-width: 450px; border-radius: 24px; padding: 40px 30px; position: relative; transform: translateY(30px) scale(0.95); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); border: 1px solid var(--border-light); }
.modal.active .modal-content { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.3s ease; }
.modal-close:hover { color: var(--primary); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; color: var(--text-dark); text-align: left; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border-light); border-radius: 12px; font-family: inherit; font-size: 1rem; background: var(--bg-alt); transition: var(--transition); color: var(--text-main); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(30, 169, 65, 0.15); }
.w-100 { width: 100%; }

/* Footer */
.footer { background: var(--bg-footer); padding: 10px 0 30px; color: white; border-top: 5px solid var(--primary); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-brand p { color: rgba(255,255,255,0.7); margin-top: 20px; }
.footer-links h4 { color: white; margin-bottom: 20px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.7); }
.footer-links a:hover { color: var(--secondary); padding-left: 5px; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.legal-links { display: flex; gap: 20px; }
.legal-links a:hover { color: white; }

/* Advanced CSS Animations (Scroll Triggered) */
.animate-on-scroll { opacity: 0; transition: opacity 0.8s ease-out, transform 0.8s ease-out; will-change: opacity, transform; }
.fade-in-up { transform: translateY(40px); }
.fade-in-left { transform: translateX(-40px); }
.fade-in-right { transform: translateX(40px); }
.fade-in-scale { transform: scale(0.95); }

.animate-on-scroll.is-visible { opacity: 1; transform: translate(0, 0) scale(1); }

/* Responsive Adjustments */
@media (max-width: 900px) {
  .hero-grid, .split-section { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .nav-links { display: none; }
  .hero-image-wrapper { margin-top: 40px; }
  .split-image { order: -1; margin-bottom: 30px; }
  .feature-row { text-align: left; }
  .experience-badge { right: auto; left: 10px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}
