* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-blue: #0056b3;
    --secondary-blue: #003d82;
    --light-blue: #e8f1ff;
    --white: #ffffff;
    --dark-gray: #333333;
    --light-gray: #f5f5f5;
}

body {
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Header e Navigazione */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-fallback {
    background-color: var(--primary-blue);
    color: var(--white);
    width: 70px;
    height: 70px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.logo-text h1 {
    color: var(--primary-blue);
    font-size: 28px;
    letter-spacing: 1px;
}

.logo-text span {
    color: var(--secondary-blue);
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 17px;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

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

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    left: 0;
    bottom: 0;
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
}

/* Hero Section */
.hero {
    /* background: linear-gradient(rgba(0, 84, 179, 0.9), rgba(0, 61, 130, 0.9)), url('https://images.unsplash.com/photo-1517077304055-6e89abbf09b0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80'); */
	background: linear-gradient(rgba(0, 84, 179, 0.9), rgba(0, 61, 130, 0.9)), url('/assets/images/bg.avif');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 5%;
    text-align: center;
}

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

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

/* Servizi */
.services {
    padding: 100px 5%;
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.section-title p {
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    font-size: 18px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    padding: 40px 25px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary-blue);
    font-size: 32px;
}

.service-card h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 22px;
}

/* Chi Siamo */
.about {
    padding: 100px 5%;
    background-color: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: var(--primary-blue);
    font-size: 36px;
    margin-bottom: 25px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 17px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contatti */
.contact {
    padding: 100px 5%;
    background-color: var(--light-blue);
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3 {
    color: var(--primary-blue);
    font-size: 28px;
    margin-bottom: 20px;
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    background-color: var(--primary-blue);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.form-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-btn:hover {
    background-color: var(--secondary-blue);
}

/* Footer */
footer {
    background-color: var(--secondary-blue);
    color: var(--white);
    padding: 60px 5% 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.footer-logo span {
    color: #a8d0ff;
}

.footer-links h4,
.footer-services h4 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-services h4::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: var(--white);
    bottom: 0;
    left: 0;
}

.footer-links ul,
.footer-services ul {
    list-style: none;
}

.footer-links li,
.footer-services li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-services a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover,
.footer-services a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 15px;
}

.vat {
    font-weight: bold;
    color: #a8d0ff;
    font-size: 16px;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .hero h2 {
        font-size: 40px;
    }
    
    .logo-container {
        width: 60px;
        height: 60px;
    }
    
    .logo-text h1 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-container {
        padding: 15px 20px;
    }
    
    .hero {
        padding: 80px 20px;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .section-title h2 {
        font-size: 30px;
    }
    
    .services, .about, .contact {
        padding: 80px 20px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 28px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo-container {
        width: 50px;
        height: 50px;
    }
}

/* Aggiungi queste regole CSS alla sezione Footer */

/* ===== SOCIAL MEDIA STYLES ===== */

/* ===== SOCIAL MEDIA STYLES ===== */

.social-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #a8d0ff;
    font-weight: 600;
}

.social-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-start;
}

.social-icon i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.social-text {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

/* Facebook specific styles */
.social-icon.facebook {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.15), rgba(24, 119, 242, 0.08));
}

.social-icon.facebook:hover {
    background: linear-gradient(135deg, #1877F2, #0d5fbf);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
    border-color: #1877F2;
}

/* LinkedIn specific styles */
.social-icon.linkedin {
    background: linear-gradient(135deg, rgba(10, 102, 194, 0.15), rgba(10, 102, 194, 0.08));
}

.social-icon.linkedin:hover {
    background: linear-gradient(135deg, #0A66C2, #084182);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(10, 102, 194, 0.3);
    border-color: #0A66C2;
}

/* WhatsApp specific styles */
.social-icon.whatsapp {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(37, 211, 102, 0.08));
}

.social-icon.whatsapp:hover {
    background: linear-gradient(135deg, #25D366, #1da851);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    border-color: #25D366;
}

/* Social note text */
.social-note {
    font-size: 14px;
    color: #a8d0ff;
    margin-top: 15px;
    text-align: center;
    line-height: 1.5;
}

/* Animation for social icons */
@keyframes socialIconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.social-icon:hover i {
    animation: socialIconPulse 0.5s ease;
}

/* ===== RESPONSIVE STYLES ===== */

@media (max-width: 768px) {
    .social-icons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .social-icon {
        padding: 12px 20px;
        justify-content: center;
    }
    
    .social-section h4 {
        text-align: center;
    }
    
    .social-note {
        text-align: center;
        font-size: 13px;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .social-icons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 993px) {
    .social-icons {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Versione compatta per schermi piccoli */
@media (max-width: 480px) {
    .social-icon {
        padding: 10px 15px;
    }
    
    .social-text {
        font-size: 14px;
    }
}

/* Stile per i link di contatto */
.contact-link {
    color: var(--dark-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 3px;
    position: relative;
}

.contact-link:hover {
    color: var(--primary-blue);
    background-color: rgba(0, 86, 179, 0.1);
    transform: translateY(-1px);
}

.contact-link:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: var(--primary-blue);
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-link:hover:after {
    transform: scaleX(1);
}

/* Stile specifico per il link della mappa */
.contact-link[href^="https://maps"] {
    color: var(--secondary-blue);
    font-weight: 500;
}

.contact-link[href^="https://maps"]:hover {
    color: var(--primary-blue);
}

/* Stile per i numeri di telefono */
.contact-link[href^="tel"] {
    color: var(--dark-gray);
}

.contact-link[href^="tel"]:hover {
    color: #25D366; /* Colore WhatsApp per coerenza */
    background-color: rgba(37, 211, 102, 0.1);
}

/* Stile per le email */
.contact-link[href^="mailto"] {
    color: var(--dark-gray);
}

.contact-link[href^="mailto"]:hover {
    color: #EA4335; /* Colore Google/Email */
    background-color: rgba(234, 67, 53, 0.1);
}

/* Icone aggiuntive per i link */
.contact-link {
    position: relative;
    padding-right: 20px;
}

.contact-link:before {
    content: '↗';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-link:hover:before {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

/* Per numeri di telefono, mostra un'icona diversa */
.contact-link[href^="tel"]:before {
    content: '📞';
}

/* Per email, mostra un'icona diversa */
.contact-link[href^="mailto"]:before {
    content: '✉️';
}

/* Per mappa, mostra un'icona diversa */
.contact-link[href^="https://maps"]:before {
    content: '📍';
}

/* Versione alternativa più semplice */
.contact-link {
    color: var(--primary-blue);
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.3s ease;
}

.contact-link:hover {
    border-bottom: 1px dotted var(--primary-blue);
}

/* Per dispositivi mobile */
@media (max-width: 768px) {
    .contact-link {
        display: block;
        padding: 8px 10px;
        margin: 5px 0;
        background-color: rgba(0, 86, 179, 0.05);
        border-radius: 5px;
        border-left: 3px solid transparent;
    }
    
    .contact-link:hover {
        border-left: 3px solid var(--primary-blue);
        background-color: rgba(0, 86, 179, 0.1);
    }
    
    .contact-link:before {
        display: none; /* Nascondi le icone su mobile per risparmiare spazio */
    }
}

/* ===== PAGINA 404 ===== */
.error-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.error-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
}

/* Numero 404 animato */
.error-number {
    font-size: 120px;
    font-weight: 900;
    color: var(--primary-blue);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.digit {
    display: inline-block;
    animation: digitFloat 3s ease-in-out infinite;
}

.digit-4 {
    color: var(--primary-blue);
    animation-delay: 0s;
}

.digit-0 {
    color: var(--secondary-blue);
    animation-delay: 0.5s;
}

.digit-4:last-child {
    animation-delay: 1s;
}

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

/* Icona animata */
.error-icon {
    font-size: 60px;
    color: var(--secondary-blue);
    margin: 20px 0;
    animation: searchPulse 2s infinite;
}

@keyframes searchPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Messaggio di errore */
.error-message h1 {
    color: var(--dark-gray);
    font-size: 36px;
    margin-bottom: 15px;
}

.error-message p {
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.error-subtitle {
    color: var(--primary-blue) !important;
    font-weight: 500;
    font-size: 16px !important;
    margin-top: 15px !important;
}

/* Azioni */
.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--secondary-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 86, 179, 0.3);
}

.btn-secondary {
    background: var(--light-blue);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 86, 179, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--dark-gray);
    border: 2px solid #ddd;
}

.btn-outline:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* Ricerca */
.error-search {
    margin: 40px 0;
    padding: 30px;
    background: var(--light-blue);
    border-radius: 15px;
    border-left: 5px solid var(--primary-blue);
}

.error-search h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 20px;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid #ddd;
    transition: border-color 0.3s;
}

.search-input-group:focus-within {
    border-color: var(--primary-blue);
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    outline: none;
}

.search-button {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0 30px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: var(--secondary-blue);
}

/* Link utili */
.error-links {
    margin: 50px 0 40px 0;
}

.error-links h3 {
    color: var(--dark-gray);
    margin-bottom: 30px;
    font-size: 22px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark-gray);
    border: 2px solid #eee;
    transition: all 0.3s ease;
}

.link-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    color: var(--primary-blue);
}

.link-card i {
    font-size: 24px;
    color: var(--primary-blue);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-blue);
    border-radius: 50%;
}

.link-card span {
    font-weight: 500;
    flex: 1;
}

/* Statistiche */
.error-stats {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    text-align: left;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.error-stats p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-stats i {
    color: var(--primary-blue);
    width: 20px;
}

.error-stats code {
    background: #eee;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #d63384;
    margin-left: 5px;
    word-break: break-all;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .error-container {
        padding: 30px 20px;
    }
    
    .error-number {
        font-size: 80px;
    }
    
    .error-message h1 {
        font-size: 28px;
    }
    
    .error-message p {
        font-size: 16px;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .search-input-group {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-input {
        border-bottom: 1px solid #eee;
        border-radius: 12px 12px 0 0;
    }
    
    .search-button {
        padding: 15px;
        border-radius: 0 0 12px 12px;
    }
}

@media (max-width: 480px) {
    .error-number {
        font-size: 60px;
    }
    
    .error-message h1 {
        font-size: 24px;
    }
    
    .error-icon {
        font-size: 40px;
    }
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.privacy-check, .newsletter-check {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.privacy-check label, .newsletter-check label {
    font-size: 14px;
    color: #555;
}

.privacy-check a {
    color: #0056b3;
    text-decoration: underline;
}

.form-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.privacy-check,
.newsletter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.privacy-check input[type="checkbox"],
.newsletter-check input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.privacy-check label,
.newsletter-check label {
    margin: 0;
    line-height: 1.3;
}

.recaptcha-container {
    margin: 20px 0;
    padding: 10px 0;
}

.g-recaptcha {
    display: inline-block;
    margin: 0 auto;
    transform: scale(0.9);
    transform-origin: 0 0;
}

#recaptcha-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .g-recaptcha {
        transform: scale(0.85);
    }
}

@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.75);
    }
}
