/* =========================
   RESET & BASE
   ========================= */

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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #fff;
}

a {
    color: #0056b3;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

/* =========================
   LAYOUT
   ========================= */

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

/* =========================
   HEADER
   ========================= */

.site-header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.logo img {
    max-height: 70px;
    width: auto;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.main-nav a {
    color: #333;
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 4px;
}

.main-nav a:hover,
.main-nav a:focus {
    background-color: #e0e0e0;
    text-decoration: none;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-phone {
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

/* =========================
   BUTTONS
   ========================= */

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary {
    background-color: #0056b3;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #004494;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #5a6268;
    text-decoration: none;
}

.btn-tertiary {
    background-color: #17a2b8;
    color: #fff;
}

.btn-tertiary:hover,
.btn-tertiary:focus {
    background-color: #138496;
    text-decoration: none;
}

/* =========================
   HERO
   ========================= */

.hero {
    padding: 40px 0;
    background-color: #fafafa;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1 1 500px;
}

.hero-text h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-text p {
    margin-bottom: 15px;
}

.hero-bullets {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.hero-bullets li {
    margin-bottom: 6px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hero-image {
    flex: 1 1 400px;
}

.hero-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* =========================
   TRUST / CERTIFICAZIONI
   ========================= */

.trust {
    padding: 40px 0;
    background-color: #fff;
}

.trust-container h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    text-align: center;
}

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

.trust-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.trust-item p {
    font-size: 0.95rem;
    color: #444;
}

/* =========================
   SEZIONI GENERICHE
   ========================= */

section {
    padding: 40px 0;
}

section h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.section-intro {
    margin-bottom: 25px;
    max-width: 800px;
}

/* =========================
   SERVIZI
   ========================= */

.services {
    background-color: #f9f9f9;
}

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

.service-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 15px;
}

.service-card img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 12px;
}

.service-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.service-card p {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 10px;
}

/* =========================
   METODOLOGIA
   ========================= */

.methodology {
    background-color: #fff;
}

.methodology-container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.methodology-text {
    flex: 1 1 500px;
}

.methodology-text h2 {
    margin-bottom: 15px;
}

.methodology-text p {
    margin-bottom: 15px;
}

.methodology-steps {
    list-style: decimal;
    padding-left: 20px;
    margin-bottom: 20px;
}

.methodology-steps li {
    margin-bottom: 6px;
}

.methodology-image {
    flex: 1 1 400px;
}

.methodology-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* =========================
   CHI SIAMO
   ========================= */

.about {
    background-color: #fafafa;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.about-text {
    flex: 1 1 500px;
}

.about-text h2 {
    margin-bottom: 15px;
}

.about-text p {
    margin-bottom: 15px;
}

.about-image {
    flex: 1 1 400px;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* =========================
   SETTORI
   ========================= */

.sectors {
    background-color: #fff;
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.sector-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eee;
}

.sector-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.sector-card p {
    font-size: 0.95rem;
    color: #444;
}

/* =========================
   CONTATTI / LINK
   ========================= */

.contact-link {
    background-color: #f5f5f5;
}

.contact-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-text {
    flex: 1 1 500px;
}

.contact-text h2 {
    margin-bottom: 15px;
}

.contact-text p {
    margin-bottom: 15px;
}

.contact-details {
    font-size: 0.95rem;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
    background-color: #222;
    color: #ddd;
    padding: 30px 0 15px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.footer-left p,
.footer-middle p,
.footer-right p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-left a,
.footer-middle a,
.footer-right a {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: #bbb;
}

/* =========================
   COOKIE BANNER & MODALE
   ========================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #222;
    color: #f5f5f5;
    padding: 15px 20px;
    z-index: 9999;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-banner-content p {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.cookie-banner-content a {
    color: #fff;
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Modale cookie */
.cookie-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal[aria-hidden="true"] {
    display: none;
}

.cookie-modal-content {
    background-color: #fff;
    color: #222;
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-modal-content h2 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.cookie-modal-content p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.cookie-category {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px;
}

.cookie-category h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.cookie-category p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.cookie-category label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.cookie-modal-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

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

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav ul {
        justify-content: center;
    }

    .header-cta {
        justify-content: center;
    }

    .hero-container,
    .methodology-container,
    .about-container,
    .contact-container {
        flex-direction: column;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
	/* =========================
   FORM CONTATTI
   ========================= */

form {
    max-width: 760px;
}

.form-group {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.form-group label {
    flex: 0 0 260px;
    font-weight: 600;
    padding-top: 10px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    flex: 1 1 360px;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font: inherit;
    background: #fff;
}

.form-group textarea {
    min-height: 160px;
    resize: vertical;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: translateY(1px);
}

.form-group label:has(input[type="checkbox"]) {
    flex: 1 1 100%;
    padding-top: 0;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.form-group p {
    flex: 1 1 100%;
    margin-left: 0;
}

.form-group button {
    margin-top: 6px;
}

@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
        gap: 8px;
    }

    .form-group label {
        flex: 1 1 100%;
        padding-top: 0;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group select,
    .form-group textarea {
        flex: 1 1 100%;
    }
}
}
/* =========================
   AVVISO DISPOSITIVO SICURO
   ========================= */

.safety-dialog {
    width: min(92vw, 620px);
    border: none;
    border-radius: 10px;
    padding: 0;
    color: #222;
    background-color: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.safety-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.72);
}

.safety-dialog-content {
    padding: 28px;
}

.safety-dialog h2 {
    margin-bottom: 14px;
    font-size: 1.45rem;
    line-height: 1.25;
}

.safety-dialog p {
    margin-bottom: 14px;
}

.safety-dialog-phone {
    display: inline-block;
    margin: 8px 0 18px;
    padding: 12px 16px;
    border: 1px solid #0056b3;
    border-radius: 5px;
    background-color: #eef6ff;
    color: #003b7a;
    font-size: 1.1rem;
    font-weight: 700;
}

.safety-dialog-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.safety-dialog-actions .btn {
    min-width: 180px;
}

@media (max-width: 600px) {
    .safety-dialog-content {
        padding: 22px;
    }

    .safety-dialog-actions .btn {
        width: 100%;
    }
}