/* ==========================================================================
   Design System - Doors Sistem 2026
   ========================================================================== */

   :root {
    /* Palette Neutrale & Premium */
    --color-bg: #0d0f12; /* Sfondo principale molto scuro, antracite */
    --color-surface: #1a1d21; /* Sfondo per card, leggermente più chiaro */
    --color-surface-glass: rgba(26, 29, 33, 0.6); /* Effetto vetro */
    --color-text: #e0e0e0;
    --color-text-muted: #9ba0a8;
    
    /* Accento verde elegante (ispirato al logo originale ma modernizzato) */
    --color-accent: #2e8b57; /* Sea Green elegante */
    --color-accent-hover: #3cb371;
    
    /* Tipografia (Font caricati nel head) */
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-heading: 'Outfit', system-ui, sans-serif;
    
    /* Transizioni e Spaziature */
    --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --border-radius: 12px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.accent {
    color: var(--color-accent);
}

/* ==========================================================================
   Animazioni Page Transition (Sliding Doors)
   ========================================================================== */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    display: flex;
}

.door {
    width: 50%;
    height: 100%;
    background-color: #000;
    transition: transform 1.2s cubic-bezier(0.8, 0, 0.2, 1);
}

/* Al caricamento della pagina, le porte si aprono lateralmente */
.page-loaded .door-left {
    transform: translateX(-100%);
}

.page-loaded .door-right {
    transform: translateX(100%);
}

/* Reveal Text Animation */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.8rem 0;
    background: rgba(13, 15, 18, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: padding var(--transition-smooth);
}

.main-header.scrolled {
    padding: 0.5rem 0;
}

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

/* Card Badge Fluttuante Stile Architettura Moderna */
.logo-floating-badge {
    position: relative;
    background: rgba(18, 22, 27, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(46, 139, 87, 0.35);
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding: 0.6rem 1.2rem 0.6rem;
    margin-top: -0.8rem;
    margin-bottom: -1.2rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 22px rgba(46, 139, 87, 0.2);
    transition: all var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.logo-floating-badge:hover {
    border-color: var(--color-accent);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 30px rgba(46, 139, 87, 0.35);
    transform: translateY(2px);
}

.floating-logo-img {
    height: 60px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: height var(--transition-smooth);
}

.main-header.scrolled .floating-logo-img {
    height: 48px;
}

.desktop-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    white-space: nowrap;
}

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

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

/* ==========================================================================
   Dropdown / Mega Menu
   ========================================================================== */
.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -100px;
    width: 680px;
    background: rgba(18, 20, 24, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 15px rgba(46, 139, 87, 0.15);
    z-index: 1000;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition-smooth);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transform: translateX(4px);
}

.dropdown-item i {
    color: var(--color-accent);
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Bottoni */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: white;
    color: white;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Utilizzo un gradiente elegante al posto dell'immagine per ora */
    background: radial-gradient(circle at 70% 30%, rgba(46,139,87,0.15) 0%, rgba(13,15,18,1) 50%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5.5rem);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   Features Section (Glassmorphism)
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.glass-effect {
    background: var(--color-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(46, 139, 87, 0.5);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.cta-text {
    flex: 1;
    min-width: 300px;
}

.cta-form {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.input-field {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-family: var(--font-sans);
}

.input-field:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    background-color: #08090a;
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Media Queries Responsive per Header & Tablet
   ========================================================================== */
@media (max-width: 1200px) {
    .desktop-nav {
        gap: 1.2rem;
    }
    .floating-logo-img {
        height: 55px !important;
    }
    .nav-link {
        font-size: 0.88rem;
    }
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .desktop-nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(13, 15, 18, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2.5rem 1.5rem;
        gap: 1.5rem;
        overflow-y: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
    }
    .desktop-nav.mobile-active {
        display: flex !important;
    }
    .mobile-menu-btn {
        display: block;
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 1.6rem;
        cursor: pointer;
        padding: 0.5rem;
    }
    .dropdown-menu {
        position: static;
        width: 100%;
        max-width: 400px;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        grid-template-columns: 1fr;
        background: rgba(255, 255, 255, 0.03);
    }
    .cta-container {
        flex-direction: column;
        text-align: center;
    }
    .cta-form {
        width: 100%;
        flex-direction: column;
    }
    .hero-actions {
        flex-direction: column;
    }
}
