/* Reset e Stili Globali */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 0;
}

h1, h2, h3 {
    font-weight: 700;
    color: #004080;
}

a {
    color: #007BFF;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: #0d2438;
    padding: 0.8rem 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

header h1 {
    margin: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}
.logo-link:hover {
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #007BFF;
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    margin-right: 15px;
    border: 2px solid #fff;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    line-height: 1.2;
}
.logo-line-1 {
    font-size: 0.9rem;
    font-weight: 400;
}
.logo-line-2 {
    font-size: 1.1rem;
    font-style: italic;
}

header nav {
    flex-shrink: 0;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav a {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    transition: color 0.3s, border-bottom-color 0.3s;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

header nav a:hover {
    color: #007BFF;
    border-bottom-color: #007BFF;
    text-decoration: none;
}

/* ---- MENU MOBILE ---- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}


/* ---- BLOCCO COMBINATO HERO + SERVIZI (HOMEPAGE) ---- */
#hero-combined {
    display: flex; 
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    position: relative;
    background-color: #0d2438;
}

#hero-combined::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: 
        linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(13, 36, 56, 1) 90%),
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=2070&auto-format&fit=crop') no-repeat center center/cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding-top: 5vh;
    padding-bottom: 120px; /* Valore intermedio per lo spazio */
    text-align: left;
}
.hero-content h2 { 
    font-size: 3.2rem;
    font-weight: 900; 
    line-height: 1.2; 
    color: #fff; 
    margin-bottom: 20px; 
    margin-top: 0; 
}
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; font-weight: 300; }

.cta-button {
    background: #007BFF;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s;
    display: inline-block;
}
.cta-button:hover { background: #0056b3; text-decoration: none; }


/* ---- SEZIONE SERVIZI (HOMEPAGE) A PIENO SCHERMO ---- */
.full-width-services {
    position: relative;
    z-index: 2;
}
.service-grid-colored {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.service-box {
    color: #fff;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, filter 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.service-box:hover {
    transform: translateY(-15px);
    filter: brightness(1.1);
}
.service-box .service-icon {
    margin-bottom: 20px;
    line-height: 1;
}
.service-box .service-icon img {
    width: 60px;
    height: auto;
}
.service-box h3 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.service-box p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 300px;
    flex-grow: 1; /* Forza i paragrafi ad occupare lo spazio, spingendo in basso i link */
}
.service-box .service-link {
    margin-top: 20px; /* Spazio fisso sopra il link */
    color: #fff;
    font-weight: 700;
    border: 2px solid #fff;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}
.service-box .service-link:hover {
    background-color: #fff;
    color: #0d2438;
    text-decoration: none;
}


/* ---- STILI PAGINE INTERNE GENERICI ---- */
main { background-color: #fff; }
main > .container { padding-top: 40px; padding-bottom: 40px; }
.page-header {
    background-color: #f8f9fa;
    padding: 40px 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid #dee2e6;
}
.page-header h1 { margin: 0; text-align: center; }

.page-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}
.main-content ul { list-style-type: square; padding-left: 20px; }

/* Layout 2 colonne per Chi Siamo */
.two-column-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.column h2 { border-bottom: 2px solid #007BFF; padding-bottom: 10px; }

/* ---- STILI PAGINA ANALISI ---- */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding-bottom: 60px;
}
.analysis-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}
.analysis-card:hover {
    transform: scale(1.05);
}
.analysis-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.analysis-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 40px 20px 20px 20px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}


/* ---- SIDEBAR ---- */
.sidebar { position: sticky; top: 120px; align-self: flex-start; }
.sidebar .action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin-bottom: 15px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 1rem;
}
.sidebar .action-button:hover { text-decoration: none; }
.sidebar .action-button .icon { margin-right: 10px; font-size: 1.2rem; }
.action-button.call { background-color: #6c757d; color: #fff; }
.action-button.call:hover { background-color: #5a6268; }
.action-button.maps { background-color: #fff; color: #333; border: 1px solid #ddd; }
.action-button.maps:hover { background-color: #f4f4f4; }
.action-button.whatsapp-side { background-color: #25D366; color: #fff; }
.action-button.whatsapp-side:hover { background-color: #1DA851; }
.document-links-page { display: flex; gap: 15px; }

/* ---- STILI SOCIETÀ TRASPARENTE ---- */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.transparent-button {
    background-color: #007BFF;
    color: #fff;
    padding: 20px;
    text-decoration: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-weight: 700;
    transition: all 0.3s;
    border: 2px solid #007BFF;
}
.transparent-button:hover { background-color: #0056b3; border-color: #0056b3; text-decoration: none; }
.transparent-button span { margin-right: 15px; font-size: 1.5rem; }

.disclaimer-box {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 5px solid #6c757d;
}
.disclaimer-button {
    display: inline-block;
    margin-top: 15px;
    background-color: #6c757d;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}
.disclaimer-button:hover { text-decoration: none; background-color: #5a6268; }

/* ---- STILI PAGINA CONTATTI ---- */
.contact-bar { display: flex; background-color: #f8f9fa; }
.contact-button { flex: 1; text-align: center; padding: 20px; text-decoration: none; font-weight: 700; color: #fff; transition: opacity 0.3s; }
.contact-button:hover { opacity: 0.9; text-decoration: none; }
.contact-button.call-main { background-color: #6c757d; }
.contact-button.whatsapp { background-color: #25D366; }
.contact-button.gmaps { background-color: #fff; color: #333; border: 1px solid #ddd; }

.contact-page-info { padding-top: 60px; padding-bottom: 60px; }
.contact-page-info h2 { text-align: center; margin-bottom: 40px; }
.info-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.full-width-map iframe { display: block; width: 100%; border: 0; }

/* ---- FOOTER ---- */
footer {
    background-color: #0d2438;
    color: #cdd3d8;
    padding: 60px 20px 20px 20px;
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-column h3 { color: #fff; font-size: 1.1rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #007BFF; }
.footer-column p, .footer-column li { font-size: 0.9rem; }
.footer-column ul { list-style: none; padding: 0; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul a { color: #cdd3d8; text-decoration: none; transition: color 0.3s; }
.footer-column ul a:hover { color: #007BFF; text-decoration: none; }

.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #1a3a55; font-size: 0.9rem; color: #8a9aaa; }

/* ---- RESPONSIVE DESIGN ---- */
@media (max-width: 992px) {
    .footer-grid, .info-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: nowrap;
        align-items: center;
    }
    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #0d2438;
        padding: 10px 0;
        border-top: 1px solid #1a3a55;
    }
    header nav.active {
        display: block;
    }
    header nav ul {
        flex-direction: column;
        align-items: center;
    }
    header nav ul li {
        margin: 10px 0;
    }
    .menu-toggle {
        display: flex;
        flex-shrink: 0;
    }
    
    #hero-combined { padding-top: 40px; }
    .hero-content { text-align: center; padding-bottom: 40px; }
    .hero-content h2 { font-size: 2.5rem; }

    .service-grid-colored { grid-template-columns: 1fr 1fr; }

    .two-column-layout, .page-container, .button-grid, .info-columns {
        grid-template-columns: 1fr;
    }
    .sidebar { position: static; margin-top: 40px; }
    .contact-bar { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-column h3 { display: inline-block; border-bottom-width: 2px; }
}

@media (max-width: 500px) {
    .service-grid-colored {
        grid-template-columns: 1fr;
    }
    .logo-text-container {
        display: none;
    }
}
