/* ===========================================================
   COMPANY PAGE
=========================================================== */

.company-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 72vh;
    padding: 10rem 0 6rem;
    color: #ffffff;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 78% 24%,
            rgba(243, 163, 18, 0.14),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #071820 0%,
            #0b1f2a 54%,
            #123442 100%
        );
}

.company-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.34;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        );
    background-size: 48px 48px;
}

.company-hero::after {
    content: "";
    position: absolute;
    right: -12rem;
    bottom: -18rem;
    width: 42rem;
    height: 42rem;
    border: 6rem solid rgba(243, 163, 18, 0.07);
    border-radius: 50%;
}

.company-hero__content {
    position: relative;
    z-index: 2;
    max-width: 980px;
}

.company-hero h1 {
    max-width: 980px;
    margin: 1.2rem 0 1.5rem;
    font-size: clamp(2.9rem, 4.8vw, 5rem);
    line-height: 1;
}

.company-hero p {
    max-width: 760px;
    margin: 0;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    color: rgba(255, 255, 255, 0.76);
}


/* ===========================================================
   SECTIONS
=========================================================== */

.company-section {
    padding: 7rem 0;
}

.company-section--soft {
    background: var(--si-paper);
}

.company-section--dark {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #071820 0%,
            #0b1f2a 100%
        );
}

.company-title {
    max-width: 720px;
    margin: 0.7rem 0 0;
    font-size: clamp(2.1rem, 3.6vw, 3.75rem);
    line-height: 1.08;
}

.company-title--wide {
    max-width: 980px;
}

.company-copy {
    max-width: 760px;
    margin-left: auto;
}

.company-copy p {
    margin-bottom: 1.5rem;
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--si-muted);
}

.company-copy p:last-child {
    margin-bottom: 0;
}

.company-section--dark .company-copy p {
    color: rgba(255, 255, 255, 0.68);
}


.company-copy--innovation {
    margin-top: 2.25rem;
    margin-left: 0;
}


/* ===========================================================
   MISSION
=========================================================== */

.company-mission {
    max-width: 780px;
    font-family: "Manrope", Inter, sans-serif;
    font-size: clamp(1.3rem, 1.8vw, 1.85rem);
    line-height: 1.38;
    color: rgba(255, 255, 255, 0.92);
}

.company-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}

.company-benefit {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.035);
}

.company-benefit span {
    flex: 0 0 auto;
    font-family: "Manrope", Inter, sans-serif;
    font-weight: 800;
    color: var(--si-orange);
}

.company-benefit p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
}


/* ===========================================================
   COMPETENCE CARDS
=========================================================== */

.company-card {
    height: 100%;
    padding: 2rem;
    border: 1px solid var(--si-border);
    border-radius: var(--si-radius);
    background: #ffffff;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.company-card:hover {
    transform: translateY(-7px);
    border-color: transparent;
    box-shadow: var(--si-shadow);
}

.company-card__number {
    display: block;
    margin-bottom: 1.4rem;
    font-family: "Manrope", Inter, sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(21, 83, 106, 0.14);
}

.company-card h3 {
    margin-bottom: 1rem;
    font-size: 1.45rem;
}

.company-card p {
    margin: 0;
    color: var(--si-muted);
}


/* ===========================================================
   MIS / TIS DUAL PANEL
=========================================================== */

.company-dual {
    display: grid;
    gap: 1rem;
}

.company-dual__item {
    padding: 2rem;
    border: 1px solid var(--si-border);
    border-radius: var(--si-radius);
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(11, 31, 42, 0.08);
}

.company-dual__label {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #111111;
    background: var(--si-orange);
}

.company-dual__item h3 {
    margin-bottom: 0.8rem;
}

.company-dual__item p {
    margin: 0;
    color: var(--si-muted);
}


/* ===========================================================
   API CARD
=========================================================== */

.company-api {
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--si-radius);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.07),
            rgba(255, 255, 255, 0.025)
        );
}

.company-api__label {
    display: block;
    margin-bottom: 1rem;
    font-family: "Manrope", Inter, sans-serif;
    font-size: clamp(2.2rem, 4vw, 4rem);
    font-weight: 800;
    color: var(--si-orange);
}

.company-api p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}


/* ===========================================================
   TIMELINE
=========================================================== */

.company-timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(170px, auto));
    gap: 1.25rem;
    margin-top: 3rem;
}

.company-timeline__item {
    position: relative;
    min-height: 170px;
    padding: 1.4rem;
    border: 1px solid var(--si-border);
    border-radius: 1rem;
    background: #ffffff;
    z-index: 1;
}

/* Prima riga: collegamenti da sinistra verso destra */
.company-timeline__item:nth-child(1)::after,
.company-timeline__item:nth-child(2)::after,
.company-timeline__item:nth-child(3)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 1.25rem;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--si-orange),
        var(--si-blue)
    );
}

/* Collegamento verticale tra quarto e quinto passaggio */
.company-timeline__item:nth-child(4)::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 2rem;
    width: 2px;
    height: 1.25rem;
    background: linear-gradient(
        180deg,
        var(--si-blue),
        var(--si-orange)
    );
}

/* Seconda riga disposta in senso inverso, come un percorso continuo */
.company-timeline__item:nth-child(5) {
    grid-column: 4;
    grid-row: 2;
}

.company-timeline__item:nth-child(6) {
    grid-column: 3;
    grid-row: 2;
}

.company-timeline__item:nth-child(7) {
    grid-column: 2;
    grid-row: 2;
}

.company-timeline__item:nth-child(8) {
    grid-column: 1;
    grid-row: 2;
}

.company-timeline__item:nth-child(5)::after,
.company-timeline__item:nth-child(6)::after,
.company-timeline__item:nth-child(7)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    width: 1.25rem;
    height: 2px;
    background: linear-gradient(
        270deg,
        var(--si-orange),
        var(--si-blue)
    );
}

.company-timeline__year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4rem;
    min-height: 2.4rem;
    margin-bottom: 1.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-family: "Manrope", Inter, sans-serif;
    font-weight: 800;
    color: #111111;
    background: var(--si-orange);
}

.company-timeline__item h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.4;
}


/* ===========================================================
   CTA
=========================================================== */

.company-cta {
    position: relative;
    padding: clamp(2.2rem, 6vw, 5.5rem);
    color: #ffffff;
    overflow: hidden;
    border-radius: 1.8rem;
    background:
        linear-gradient(
            125deg,
            var(--si-blue),
            var(--si-navy)
        );
}

.company-cta::after {
    content: "";
    position: absolute;
    top: -12rem;
    right: -8rem;
    width: 28rem;
    height: 28rem;
    border: 5rem solid rgba(243, 163, 18, 0.12);
    border-radius: 50%;
}

.company-cta > * {
    position: relative;
    z-index: 1;
}

.company-cta h2 {
    max-width: 980px;
    margin: 1rem 0 1.25rem;
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 1.02;
}

.company-cta p {
    max-width: 760px;
    margin-bottom: 1.8rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.72);
}


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

@media (max-width: 1199.98px) {

    .company-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }

    .company-timeline__item:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }

    .company-timeline__item:nth-child(n)::after {
        display: none;
    }

}

@media (max-width: 991.98px) {

    .company-hero {
        min-height: 640px;
        padding: 9rem 0 4.5rem;
    }

    .company-section {
        padding: 5rem 0;
    }

}

@media (max-width: 767.98px) {

    .company-benefits,
    .company-timeline {
        grid-template-columns: 1fr;
    }

    .company-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

}

@media (max-width: 575.98px) {

    .company-hero {
        min-height: 580px;
    }

    .company-card,
    .company-dual__item,
    .company-api {
        padding: 1.5rem;
    }

    .company-cta {
        border-radius: 1.2rem;
    }

}

/* ===========================================================
   INTRO ALIGNMENT
=========================================================== */

.company-section .row.align-items-end .company-copy {
    padding-bottom: 0.35rem;
}


/* ===========================================================
   QUALITY SECTION
=========================================================== */

.company-quality .company-title {
    margin-bottom: 2rem;
}

.company-quality .company-mission {
    max-width: 820px;
    margin-top: 0;
    line-height: 1.5;
}

.company-quality .company-api {
    margin-top: 1rem;
}

@media (min-width: 992px) {

    .company-quality .company-api {
        margin-top: 3.2rem;
    }

}

/* ===========================================================
   CORPORATE SPLIT LAYOUT
   Titolo a sinistra ancorato in basso.
   Contenuto a destra ancorato in alto.
=========================================================== */

.company-split {
    align-items: stretch;
}

.company-split > [class*="col-lg-"]:first-child {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.company-split > [class*="col-lg-"]:last-child {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    }

/* Il testo a destra deve partire dall'alto senza correzioni verticali. */
.company-split .company-copy {
    margin-top: 0;
    margin-left: auto;
    padding-bottom: 0;
}

/* La missione e la card API seguono la stessa regola. */
.company-split .company-mission,
.company-split .company-api {
    margin-top: 0;
}

/* Rimuove il precedente offset desktop della card API. */
@media (min-width: 992px) {

    .company-quality .company-api {
        margin-top: 0;
    }

}

/* Su tablet e mobile le colonne tornano al normale flusso verticale. */
@media (max-width: 991.98px) {

    .company-split > [class*="col-lg-"]:first-child,
    .company-split > [class*="col-lg-"]:last-child {
        display: block;
    }

    .company-split > [class*="col-lg-"]:first-child {
        margin-bottom: 0.5rem;
    }

}

