
/* =============================== */
/* RESET E BASE */
/* =============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Inter', 'Roboto', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: #0f6f7a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #fff;
}

main {
    flex: 1;
}

/* =============================== */
/* NAVBAR */
/* =============================== */
.navbar {
    min-height: 120px;
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 10px 0;
    position: relative;
    z-index: 1000;
}

.logo {
    height: 90px;
    width: auto;
}

.navbar .nav-link {
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.6rem;
    text-decoration: none;
    white-space: nowrap;
}

.navbar .nav-link:hover {
    color: #001f4d;
}

.navbar .nav-link.active {
    color: #6b4114 !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* =============================== */
/* HAMBURGER MENU (FIX BOOTSTRAP) */
/* =============================== */

.navbar-toggler {
    border: none;
    box-shadow: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ICONA HAMBURGER STANDARD (FIXATA) */
.navbar-toggler {
    border: none;
    box-shadow: none;
    position: relative;
}

.toggler-icon {
    width: 30px;
    height: 2px;
    background: #000;
    display: block;
    position: relative;
    transition: all 0.3s ease;
}

.toggler-icon::before,
.toggler-icon::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 2px;
    background: #000;
    left: 0;
    transition: all 0.3s ease;
}

.toggler-icon::before {
    top: -8px;
}

.toggler-icon::after {
    top: 8px;
}

/* STATO APERTO (X) */
.navbar-toggler:not(.collapsed) .toggler-icon {
    background: transparent;
}

.navbar-toggler:not(.collapsed) .toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler:not(.collapsed) .toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* =============================== */
/* CAROUSEL */
/* =============================== */
.carousel-item {
    position: relative;
    height: 70vh;
    min-height: 400px;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    filter: brightness(50%);
}

.carousel-caption-custom {
    position: absolute;
    z-index: 10;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    text-align: center;
    padding: 20px 30px;
    border-radius: 10px;
}

.carousel-caption-custom h1 {
    font-size: 2rem;
    font-weight: 700;
}

.carousel-caption-custom p {
    font-size: 1.2rem;
}

/* =============================== */
/* TEXT */
/* =============================== */
.text-paragraph {
    color: #f8f9fa;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

/* =============================== */
/* HOME */
/* =============================== */
.container-section2 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 50px;
    margin: 50px auto;
    max-width: fit-content;
}

.container-section2 .card {
    background: rgba(0, 0, 0, 0.25);
    width: 300px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 12px;
    background: transparent;
    box-shadow: 0 6px 15px rgba(0,0,0,0.35);
    transition: 0.3s;
    text-align: center;
}

.container-section2 .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}

.container-section2 .card img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.container-section2 .card h3 {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}

.card-link {
    text-decoration: none;
    display: flex;
    justify-content: center;
    width: 100%;
}

.card-link:hover h3 {
    color: #001f4d;
}

/* =============================== */
/* AZIENDA */
/* =============================== */
.azienda-section-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.azienda-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.azienda-section {
    margin-bottom: 2rem;
}

.azienda-section-card {
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    gap: 2rem;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    transition: 0.3s;
}

.azienda-section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}

.azienda-section-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.azienda-section-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    border-left: 3px solid #0d6efd;
    padding-left: 0.6rem;
    margin-bottom: 0.8rem;
}

.azienda-section-card img {
    width: 350px;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
}

/* =============================== */
/* SOLUZIONI DIGITALI / GRID */
/* =============================== */
.image-grid-square {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 600px;
    height: 480px;
    gap: 12px;
}

.image-grid-square div {
    background-color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-grid-square img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =============================== */
/* FOOTER */
/* =============================== */
.footer {
    background-image:
        linear-gradient(to bottom, rgba(255,255,255,0.05) 2px, transparent 2px),
        linear-gradient(to bottom, #A0522D, #8B4513);
    background-size: 100% 20px;
    color: #fff;
    padding: 2rem;
    font-size: 15px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 150px;
    align-items: flex-start;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a.active {
    color: #4087f0;
    font-weight: 600;
}

/* =============================== */
/* SCROLL TO TOP */
/* =============================== */
#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #001f4d);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

#scrollTopBtn.show {
    opacity: 1;
    pointer-events: auto;
}

#scrollTopBtn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* =============================== */
/* RESPONSIVE */
/* =============================== */

@media (min-width: 992px) {
    .navbar-nav {
        margin-top: 12px;
    }
}

@media (max-width: 991.98px) {

    .navbar {
        min-height: 80px;
    }

    .logo {
        height: 70px;
    }

    .navbar-collapse { 
        position: absolute !important; 
        top: 100%; 
        right: 0; 
        width: 75%; 
        max-width: 320px; 
        background-color: #d2b48c; 
        z-index: 999; 
        display: flex; 
        flex-direction: column; 
        align-items: flex-end; }

    .navbar-nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .navbar-collapse .nav-link {
        color: #1a1a1a;
        padding: 0.75rem 1.5rem;
        width: 100%;
        text-align: right;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .navbar-brand {
        margin-right: auto;
    }

    .navbar-toggler {
        margin-left: auto;
    }
}

@media (max-width: 767.98px) {

    .container-section2 {
        flex-direction: column;
        align-items: center;
    }

    .container-section2 .card {
        width: 90%;
        max-width: 320px;
        flex: none;
    }

    .azienda-section-card {
        flex-direction: column;
        text-align: center;
    }

    .azienda-section-card img {
        width: 100%;
        max-width: 350px;
        margin: auto;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
    }

    .footer-column {
        width: 100%;
        text-align: center;
    }

    .footer-nav ul {
        padding-left: 0;
        margin-bottom: 0;
    }
}