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

body {
    background-color: #0a0a0a;
    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(5, 5, 5, 0.98);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #1a1a1a;
    backdrop-filter: blur(10px);
}

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

.logo img { height: 40px; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    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; }

/* --- HEADER APP (per dashboard) --- */
.header-app {
    background: #050505;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #1a1a1a;
}

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

.header-app .logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.header-app .logo-link img {
    height: 36px;
    width: 36px;
}

.header-app .logo-link span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00a8ff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-app .nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-app .user-info {
    font-size: 0.8rem;
    color: #666;
}

.header-app .user-info strong {
    color: #fff;
}

.header-app .btn-logout {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 8px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
}

.header-app .btn-logout:hover {
    border-color: #ff4757;
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

/* --- 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: #050505; }

.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 #1a1a1a;
    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: #0a0a0a; }

.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;
}

/* 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;
}

.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%;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-form-container {
        max-width: 100%;
    }

    .header-app nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .header-app .nav-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* --- 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-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%;
}

/* --- ALERT BOX (per dashboard) --- */
.alert-box {
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid #00a8ff;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 4px;
    color: #00a8ff;
}

.alert-box.error {
    background: rgba(255, 71, 87, 0.1);
    border-color: #ff4757;
    color: #ff4757;
}

.alert-box.success {
    background: rgba(76, 209, 55, 0.1);
    border-color: #4cd137;
    color: #4cd137;
}

/* --- CONFIG CARD (per dashboard) --- */
.config-card {
    background: #111;
    padding: 40px;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    max-width: 800px;
    margin: auto;
}

.config-card h2 {
    color: #fff;
    margin-bottom: 10px;
}

.config-card h3 {
    color: #00a8ff;
    margin-bottom: 15px;
}

.config-card label {
    display: block;
    margin-bottom: 8px;
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.config-card input,
.config-card textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s ease;
}

.config-card input:focus,
.config-card textarea:focus {
    border-color: #00a8ff;
    outline: none;
}

.btn-container {
    display: flex;
    gap: 15px;
}

.btn-reset {
    flex: 1;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #222;
    border-color: #444;
}

.status-bar {
    font-size: 0.75rem;
    color: #555;
    margin-top: 20px;
    text-align: center;
}
