/* --- RESET E SETUP --- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* --- HEADER --- */
header {
    background: rgba(0, 0, 0, 0.95);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #1a1a1a;
}

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

.logo img { height: 40px; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover { color: #00a8ff; }

/* --- DROPDOWN MENU --- */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.dropdown-toggle .fa-chevron-down {
    transition: transform 0.3s;
}

.dropdown.open .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

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

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: #ccc !important;
    font-size: 0.82rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: all 0.2s;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #1a1a1a;
    color: #00a8ff !important;
}

.dropdown-menu a.active {
    color: #00a8ff !important;
    background: rgba(0, 168, 255, 0.08);
}

.dropdown-lang {
    min-width: 170px;
}

/* --- HESTIABOT ICON --- */
.hestiabot-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 2px;
    border-radius: 3px;
}

.dropdown-menu .hestiabot-icon {
    width: 18px;
    height: 18px;
}

/* --- HAMBURGER MOBILE --- */
.hamburger {
    display: none;
    background: none;
    border: 1px solid #333;
    color: #fff;
    font-size: 1.2rem;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.hamburger:hover {
    border-color: #00a8ff;
}

/* --- MOBILE MENU --- */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: #0a0a0a;
    border-top: 1px solid #1a1a1a;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.mobile-menu.open {
    max-height: 500px;
    padding: 15px 25px;
}

.mobile-menu a {
    color: #fff;
    text-decoration: none;
    padding: 12px 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover {
    color: #00a8ff;
}

.mobile-lang-switcher {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    margin-top: 5px;
    border-top: 1px solid #1a1a1a;
}

.mobile-lang-switcher .lang-btn {
    padding: 8px 14px !important;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 0.8rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.mobile-lang-switcher .lang-btn.active {
    border-color: #00a8ff;
    color: #00a8ff;
}

/* --- HERO --- */
.hero {
    height: 90vh;
    background: url('hero_background.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0, 0, 0, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.hero h1 span { color: #00a8ff; }
.subtitle { font-size: 1.5rem; font-weight: 300; margin-bottom: 15px; }
.main-desc { max-width: 700px; margin: 0 auto 30px; opacity: 0.8; }

.btn-main {
    background: #ffffff;
    color: #000;
    padding: 15px 40px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.4s ease;
}

.btn-main:hover { background: #00a8ff; color: #fff; transform: translateY(-3px); }

/* --- SERVIZI --- */
.services { padding: 100px 0; background: #0a0a0a; }

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 60px;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.service-card {
    background: #111;
    border: 1px solid #222;
    padding-bottom: 20px;
    transition: 0.4s;
    text-align: center;
}

.service-card:hover { border-color: #00a8ff; transform: translateY(-10px); }

.img-zoom { overflow: hidden; height: 220px; }
.img-zoom img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.service-card:hover img { transform: scale(1.1); }

.service-card h3 { font-size: 1.1rem; padding: 20px 15px 10px; }
.service-card p { font-size: 0.9rem; padding: 0 15px; opacity: 0.7; height: 50px; }
.duration { display: block; margin-top: 15px; font-size: 0.8rem; color: #555; }

/* --- PROGETTI --- */
.projects { padding: 100px 0; background: #000; }

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

.project-item {
    border-left: 3px solid #00a8ff;
    padding-left: 20px;
    margin-bottom: 20px;
}

.project-item h3 { color: #00a8ff; margin-bottom: 10px; }
.project-item p { opacity: 0.8; font-size: 0.95rem; }

.projects-cta { text-align: center; margin-top: 50px; }
.btn-outline {
    border: 1px solid #fff;
    padding: 12px 30px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}
.btn-outline:hover { background: #fff; color: #000; }

/* --- FOOTER --- */
footer {
    background: #050505;
    padding: 80px 0 20px;
    border-top: 1px solid #1a1a1a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 { margin-bottom: 15px; color: #00a8ff; }
.footer-brand a { color: #fff; text-decoration: none; }

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
    border-top: 1px solid #111;
    padding-top: 20px;
}

.footer-bottom a {
    color: #fff;
    text-decoration: none;
}

/* Stile per il Form nel Footer */
.footer-form-container {
    flex: 1;
    max-width: 450px;
}

.footer-form-container h3 {
    margin-bottom: 20px;
    color: #00a8ff;
    font-size: 1.2rem;
    text-transform: uppercase;
}

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

.footer-contact-form input, 
.footer-contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.footer-contact-form input:focus, 
.footer-contact-form textarea:focus {
    border-color: #00a8ff;
    outline: none;
}

.footer-contact-form .btn-main {
    align-self: flex-start;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
}

/* --- MODALE CUSTOM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #111;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #00a8ff;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 50px;
    color: #00a8ff;
    margin-bottom: 20px;
}

.modal-icon.error {
    color: #ff4444;
}

.modal-content h2 {
    margin-bottom: 15px;
    color: #fff;
}

.modal-content p {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.modal-content .btn-main {
    border: none;
    cursor: pointer;
    width: 100%;
}

/* --- HONEYPOT ANTI-BOT --- */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .mobile-menu {
        display: flex;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-form-container {
        max-width: 100%;
    }
}
