:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f9f9f9;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    position: -webkit-sticky;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .logo {
    height: 100%;
}

header .logo a {
    position: relative;
    height: 100%;
    padding: 0;
    display: block;
}

header .logo a img {
    height: 100%;
    width: auto;
}

nav.network-nav {
    background-color: var(--primary-color);
    border-bottom: 1px solid white;
}

nav.network-nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

nav.network-nav ul li {
    color: white;
    font-size: .8rem;
    transform: skew(20deg);
    transition: all 0.3s;
    border: 1px solid var(--primary-color);
}

nav.network-nav ul li:hover {
    border-color: black !important;
}

nav.network-nav ul li a {
    display: block;
    transform: skew(-20deg);
    color: inherit;
    font-weight: 600;
    text-transform: uppercase;
    padding: 5px 30px;
}

nav:not(.network-nav) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    position: relative;
}

nav .logo img {
    height: 80px;
}

nav .menu {
    display: flex;
    flex-direction: row;
    margin-left: auto;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 0;
}

nav:not(.network-nav) a:not(:first-child) {
    margin-left: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

main {
    /* margin-top: 60px; */
}

section {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

section:last-child {
    border-bottom: none;
}

h1, h2, h3 {
    color: var(--secondary-color);
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 10px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--accent-color);
}

#hero {
    background-image: url('/images/avvocati-siti-web.webp');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    position: relative;
    color: white;
    text-align: center;
    padding: 6rem 0;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

#hero .container {
    position: relative;
    z-index: 2;
}

#hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.cta-button {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 20px;
    margin-bottom: 20px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #c0392b;
}

.cta-button-soluzioni {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: auto;
    margin-bottom: 0;
    align-self: center;
}

.cta-button-soluzioni:hover {
    background-color: #c0392b;
}

.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Mantiene 4 colonne su desktop */
    gap: 50px; /* Aumenta il gap tra i box a 50px per maggior separazione */
    justify-items: center;
    margin: 0 auto; /* Centra la griglia */
    max-width: 1200px; /* Imposta una larghezza massima per la griglia */
}

.feature {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    width: 100%; /* Mantiene la larghezza al 100% del contenitore */
    max-width: 280px; /* Imposta la larghezza massima dei box */
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.feature-image {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature h3 {
    margin-bottom: 10px;
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-items: center;
}

.portfolio-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    width: 100%;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.portfolio-item .image-container {
    width: 100%;
    overflow: hidden;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    max-height: 300px;
}

.portfolio-item .image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: gold;
}

.portfolio-item-content {
    padding: 20px;
}

.pricing-container {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: stretch;
    gap: 20px;
    border-radius: 15px;
    border: 2px solid var(--primary-color);
    background-color: white;
    overflow: hidden;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, .3);
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.pricing-container > div {
    padding: 15px;
}

.pricing-container .pricing-header {
    background-color: #e1e8ed;
    border-bottom: 3px solid gold;
}

.pricing-container .pricing-header h3 {
    font-size: 2rem;
    padding: 0;
    margin: 0;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
}

.pricing-container .pricing-content {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.pricing-container .pricing-content .price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.pricing-container .pricing-content .price a {
    background-color: var(--accent-color);
    padding: 5px 15px;
    border-radius: 150px;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
}

.pricing-container .pricing-content .price p {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-color);
    margin: 0;
}

.pricing-container .pricing-content .price p .currency {
    font-size: 1.5rem;
}

.pricing-container .pricing-content .features-list li::marker {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
    margin-right: 5px;
}


.pricing {
    flex: 1 1 calc(33% - 20px);
    background-color: #f3f4f6;
    padding: 0 0 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.pricing h3 {
    font-size: 1.8rem;
    background-color: #e1e8ed;
    padding: 1rem 0;
    margin: 0;
    border-bottom: 3px solid gold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.pricing p {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: bold;
    margin: 1.5rem 0;
}

.pricing ul {
    list-style-type: none;
    padding: 0 20px;
    margin-bottom: auto;
    text-align: left;
}

.pricing li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.pricing li::before {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-form {
    flex: 1;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.contact-form input[type="tel"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.contact-option-image {
    text-align: center;
    padding: 10px;
    width: 100%; /* Assicura che l'immagine occupi l'intera larghezza disponibile */
    margin-top: 2px; /* Riduce la distanza tra l'ultima opzione e l'immagine a 2px */
}

.contact-option-image img {
    max-width: 100%;
    max-height: 200px; /* Limita l'altezza massima a 200px per evitare che l'immagine sia troppo grande */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    object-fit: contain; /* Mantiene l'immagine proporzionata */
}


.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.contact-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centra gli elementi verticalmente */
    gap: 2px; /* Riduce lo spazio tra gli elementi a 2px */
}

.contact-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px; /* Riduce la distanza tra le opzioni a 2px */
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    width: 80%;
}


.contact-option:hover {
    transform: translateY(-2px);
}

.contact-option i {
    margin-right: 1rem;
    color: var(--accent-color);
}

.contact-option a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
}

section#ottimizzazione img {
    width: 70%;
    margin-left: 15%;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0, .1);
    margin-bottom: 15px;
}

section#sicurezza {
    padding-bottom: 60px;
}

section#sicurezza img {
    width: 50%;
    float: right;
    margin-left: 25px;
    border-radius: 10px;
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
}


.sib-sms-select__title {
    display: none !important;
}

/* Media Queries */
@media (max-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px; /* Distanza ridotta tra i box su schermi medi */
    }

    .portfolio {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-container {
        flex-wrap: wrap;
    }

    .pricing {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        height: 100px; /* Aumenta l'altezza del menu su mobile */
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 15px;
    }

    nav .menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 1rem;
        background-color: var(--primary-color);
        position: absolute;
        top: 75px;
        left: 0;
        z-index: 100;
    }

    nav .menu.active {
        display: flex;
    }

    nav a:not(.logo-link) {
        margin: 0.5rem 0;
        color: white;
        padding: 10px 20px;
        text-align: left;
        width: 100%;
    }

    nav:not(.network-nav) a:not(:first-child) {
        margin: 0;
    }

    .features {
        grid-template-columns: 1fr; /* Imposta una singola colonna su schermi piccoli */
        gap: 20px; /* Distanza minore tra i box su mobile */
    }

    .feature {
        max-width: 90%; /* Assicura che i box siano centrati e non tocchino i bordi */
        margin: 0 auto; /* Centra i box */
    }

    .portfolio {
        grid-template-columns: 1fr;
    }

    .pricing-container {
        width: 100%;
    }

    .pricing-container .pricing-content {
        flex-direction: column;
    }

    .pricing {
        flex: 1 1 100%;
    }

    .cta-button {
        width: calc(100% - 40px);
        max-width: 300px;
        margin: 20px auto;
        padding: 16px;
    }

    .cta-button:hover {
        background-color: #c0392b;
    }

    .contact-container {
        flex-direction: column;
    }

    section h2 {
        font-size: 2rem;
    }

    main {
        margin-top: 0;
    }

    nav.network-nav {
        display: none;
    }

    nav:not(.network-nav) {
        align-items: start;
    }

    nav.network-nav ul {
        justify-content: start;
    }

    section#ottimizzazione img {
        width: 100%;
        margin-left: 0;
    }

    section#sicurezza img {
        width: 100%;
        float: none;
        margin-left: 0;
    }
}
