/* ==========================
   RESET
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    display:flex;
    font-family:"Segoe UI",sans-serif;
    background:#f5f7fa;
    color:#333;
}

/* ==========================
   CONTENITORE LOGO + SIDEBAR
========================== */

.allineamento{
    display:flex;
    flex-direction:column;
    width:260px;
    transition:width .3s ease;
}

/* ==========================
   LOGO
========================== */

.img{
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px 10px;
    background:#ffffff;
}

.img img{
    width:220px;
    max-width:100%;
    height:auto;
    transition:.3s;
}

/* ==========================
   SIDEBAR
========================== */

.sidebar {
    width: 250px;
    transition: width 0.3s ease;
    overflow: hidden;
}

/* Sidebar chiusa */
.sidebar.collapsed {
    width: 70px;
}

/* Nasconde i testi */
.sidebar.collapsed .menu-text {
    display: none;
}

/* Centra le icone quando è chiusa */
.sidebar.collapsed > a,
.sidebar.collapsed .dropdown-btn {
    justify-content: center;
}

/* Nasconde la freccia dei menu */
.sidebar.collapsed .arrow {
    display: none;
}

/* ==========================
   SIDEBAR
========================== */

.sidebar{

    width:260px;
    height:100%;

    background:#ffffff;

    border-right:1px solid #dddddd;

    overflow:hidden;

    transition:.3s;

}

/* Sidebar chiusa */

.sidebar.collapsed{

    width:70px;

}

/* Riduce anche il contenitore */

.sidebar.collapsed + main{
    margin-left:0;
}

/* ==========================
   BOTTONE
========================== */

.logo{

    display:flex;

    justify-content:center;

    align-items:center;

    padding:15px;

}

#toggleSidebar{

    border:none;

    background:none;

    cursor:pointer;

    font-size:24px;

    color:#333;

}

/*======TASTO RITORNO======*/

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 20px;

    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;

    transition: all 0.25s ease;

}

.back-home span {
    text-decoration: underline;
    
}

.back-home i {
    font-size: 28px;
    transition: transform 0.25s ease;
}

.back-home {
    color: #198754;
}

.back-home i {
    transform: translateX(-4px);
}

/* ========================== MENU A TENDINA ========================== */
.menu-dropdown {
    width: 100%;
    position: relative;
}

/* ========================== BOTTONE PRINCIPALE ========================== */
.dropdown-btn {
    width: calc(100% - 20px);
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 8px 10px;
    padding: 14px 18px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    background: #ffffff;
    color: #333;
    font-family: "Segoe UI", sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all .25s ease;
    text-align: left;
}

/* Icona */
.dropdown-btn>i:first-child {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

/* Freccia */
.dropdown-btn .arrow {
    margin-left: auto;
    width: auto;
    font-size: 13px;
    transition: transform .3s ease;
}

/* Hover */
.dropdown-btn:hover {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

/* ========================== SOTTOMENU ========================== */
.dropdown-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0 10px;
    transition: max-height .35s ease, opacity .25s ease;
}

/* ========================== SOTTOMENU APERTO ========================== */
.menu-dropdown.open .dropdown-content {
    max-height: 500px;
    opacity: 1;
}

/* ========================== ROTAZIONE FRECCIA ========================== */
.menu-dropdown.open .arrow {
    transform: rotate(180deg);
}

/* ========================== LINK DEL SOTTOMENU ========================== */
.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 5px 0;
    padding: 11px 15px 11px 35px;
    background: #f8fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #333;
    text-decoration: none;
    transition: all .25s ease;
}

/* Icone sottomenu */
.dropdown-content a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

/* Hover sottomenu */
.dropdown-content a:hover {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
    transform: translateX(4px);
}

/* ========================== SIDEBAR CHIUSA ========================== */
.sidebar.collapsed .dropdown-btn {
    width: 50px;
    justify-content: center;
    padding: 14px 0;
}

.sidebar.collapsed .dropdown-btn .arrow {
    display: none;
}

.sidebar.collapsed .dropdown-content {
    display: none;
}

.sidebar.collapsed .dropdown-btn .menu-text {
    display: none;
}

/* ==========================
   MENU
========================== */



.sidebar a {
    width: calc(100% - 20px);

    display: flex;
    align-items: center;

    gap: 15px;

    margin: 8px 10px;
    padding: 14px 18px;

    border: 1px solid #dcdcdc;
    border-radius: 12px;
background: linear-gradient(to left, #22c55e3f, #ffffff);
    color: #333;

    font-family: "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 400;

    text-decoration: none;

    cursor: pointer;

    transition: all .25s ease;
}

.sidebar a:hover{
    background:#22c55e;
    color:#fff;
    border-color:#22c55e;
    transform:translateX(4px);
    box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.sidebar a.active{
    background:#22c55e;
    color:#fff;
    border-color:#22c55e;
}

/*==========================
   ICONE
===========================*/

.sidebar a i{
    width:24px;
    text-align:center;
    font-size:18px;
}

/*==============================
 MECCANIZZAZIONE
==============================*/

.automation-banner{
    width:100%;
    min-height:80vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:linear-gradient(135deg,#0f172a,#1e293b,#14532d);
    color:#fff;
    padding:80px 10%;
}

.automation-content{
    max-width:900px;
    text-align:center;
}

.section-tag{
    display:inline-block;
    background:#22c55e;
    color:#fff;
    padding:8px 18px;
    border-radius:30px;
    font-size:14px;
    font-weight:600;
    margin: 25px 10px 25px 10px;
}

.automation-content h1{
    font-size:48px;
    margin-bottom:25px;
    line-height:1.2;
}

h1 {
    margin-left: 20px;
}
h2 {
    margin-left: 20px;
}

.automation-content p{
    font-size:20px;
    line-height:1.8;
    color:#e5e7eb;
    margin-bottom:20px;
}

.btn-automation{
    display:inline-block;
    margin-top:25px;
    padding:15px 35px;
    background:#22c55e;
    color:#fff;
    text-decoration:none;
    border-radius:8px;
    font-weight:bold;
    transition:.3s;
}

.btn-automation:hover{
    background:#16a34a;
    transform:translateY(-3px);
}

/* ==========================
   TESTO MENU
========================== */

.menu-text{

    transition:.2s;

}

/* Quando la sidebar è chiusa */

.sidebar.collapsed .menu-text{

    display:none;

}

.sidebar.collapsed a{

    justify-content:center;

}

/* ==========================
   LOGO RIDOTTO
========================== */

.sidebar.collapsed ~ .img img{
    width:60px;
}

/*============================
    SCHEDE MODERNE
==========================*/

.card-container{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
    margin-top:-10px;
    padding: 20px;
}

.banner1{
    width: auto;
    max-width: 1750px;
    height: 50px;

    margin: 6px 20px 12px 20px;
    padding: 10px;
    background: #05ff0d;
    border-radius: 15px;
    padding-right: 20px;
    
    margin-bottom: 5px;
}

.iconarobot {
    width: 70px;
    height: 70px;
    object-fit: contain;
    display: block;
    margin: 0 auto 15px auto;
}
.card{
    background:#fff;
    border-radius:12px;
    padding:25px;
    box-shadow:0 3px 10px rgba(0,0,0,.1);
    transition:.3s;
    text-align:center;
    cursor: pointer;
}

.card:hover{
    transform:translateY(-5px);
    box-shadow:0 8px 20px rgba(0,0,0,.15);
}

.card i{
    color:#22c55e;
    margin-bottom:15px;
}

.card h3{
    margin-bottom:10px;
}

.card a{
    text-decoration: none;
    color: inherit;
    display: block;
}

.card a:hover{
    text-decoration: none;
    color: inherit;
}

.card a:visited{
    color: inherit;
}

/*===========================
   SCHEDE TESTO
   ========================*/

   .info-box{
    margin-top:30px;
    padding:25px;
    background:#ffffff;
    border-left:6px solid #22c55e;
    border-radius:10px;
    box-shadow:0 4px 12px rgba(0,0,0,.10);
    line-height:1.7;
    display: block;
}

.info-box h2{
    color:#1d3557;
    margin-bottom:15px;

}

.info-box h3{
    margin-top:20px;
    color:#22c55e;
}

.info-box ul{
    margin-left:25px;
}



/* ==========================
   CONTENUTO
========================== */

main{

    flex:1;

    padding:29px;

}


/* ==========================================
   SLIDER AUTOMATION BANNER
========================================== */

/*==========================================
    SLIDER
==========================================*/

.automation-banner{
    width:100%;
    margin:20px auto;
    background:linear-gradient(135deg,#22c55e00);
    border-radius:20px;
    overflow:hidden;
    position:relative;
    color:#fff;
    padding: 5px 80px 20px 80px;
}

/* =========================================
   ELENCO VANTAGGI CONTROLLI NDT
========================================= */

.ndt-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    max-width: 900px;
}

.ndt-list li {
    position: relative;
    padding: 6px 15px 6px 35px;
    margin-bottom: 2px;
    margin-left: 25px;
    background: #f8fafb00;
    border-left: 4px solid #28a745;
    border-radius: 6px;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

/* Simbolo di spunta */
.ndt-list li::before {
    content: "✓";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 18px;
    font-weight: bold;
}


/* =========================================
   SLIDER - EFFETTO QUADRETTI DIAGONALI
   ========================================= */

.slider-container{
    position: relative;
    width: 100%;
    height: 760px;
    overflow: hidden;
    isolation: isolate;
    margin-top: 10px;
    margin-bottom: 0px;
    padding: 0px;
    border-radius: 12px;
    min-height: 450px;
    box-shadow: 0px 18px 30px #22c55e30;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    z-index: 1;

    background: linear-gradient(
        135deg,
        #3cb37294,
        rgba(252, 252, 252, 0.75)
    );

    transition:
        opacity 1.8s ease-in-out,
        visibility 1.8s ease-in-out;
}

/* Slide visibile */
.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}


/* =========================================
   USCITA LENTA
   ========================================= */

.slide.fade-out {
    opacity: 0 !important;
    visibility: visible !important;
    z-index: 3;

    transition:
        opacity 1.8s cubic-bezier(.4,0,.2,1);
}




/* =========================================
   MASCHERA A QUADRETTI
   ========================================= */

.slide::before {
    content: "";
    position: absolute;
    inset: 0;

    z-index: 10;
    pointer-events: none;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.95) 0%,
            rgba(255,255,255,0.65) 35%,
            rgba(255,255,255,0.20) 70%,
            rgba(255,255,255,0) 100%
        );

    opacity: 0;
}


/* =========================================
   ENTRATA DIAGONALE
   BASSO/SINISTRA → ALTO/DESTRA
   ========================================= */

.slide.diagonal-in::before {

    opacity: 1;

    background-image:
        linear-gradient(
            135deg,
            rgba(255,255,255,1) 0%,
            rgba(255,255,255,0.85) 35%,
            rgba(255,255,255,0.15) 70%,
            rgba(255,255,255,0) 100%
        ),
        repeating-linear-gradient(
            135deg,
            rgba(255,255,255,0.95) 0px,
            rgba(255,255,255,0.95) 18px,
            rgba(255,255,255,0.15) 18px,
            rgba(255,255,255,0.15) 36px
        );

    animation: diagonalSquares 2.2s cubic-bezier(.65,0,.35,1) forwards;
}


/* =========================================
   ANIMAZIONE DIAGONALE
   ========================================= */

@keyframes diagonalSquares {

    0% {
        opacity: 1;

        clip-path: polygon(
            0% 100%,
            0% 100%,
            0% 100%
        );

        transform: translate(
            -15%,
            15%
        );
    }

    25% {
        clip-path: polygon(
            0% 100%,
            40% 60%,
            60% 80%,
            20% 100%
        );
    }

    50% {
        clip-path: polygon(
            0% 100%,
            60% 40%,
            100% 0%,
            100% 40%,
            40% 100%
        );
    }

    75% {
        clip-path: polygon(
            0% 100%,
            100% 0%,
            100% 70%,
            30% 100%
        );
    }

    100% {
        opacity: 0;

        clip-path: polygon(
            0% 100%,
            100% 0%,
            100% 100%,
            0% 100%
        );

        transform: translate(0,0);
    }
}

/* Slide visibile */

.slide.active{

    visibility:visible;

    z-index:2;

    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Slide precedente */

.slide.prev{

    opacity:0;

    visibility:hidden;

    transform:translateX(100%);

    z-index:1;
}

/*==========================
   Testi
==========================*/

.slide h2{

    font-size:2.2rem;
    margin-bottom:25px;
    padding: 10px;

}

.slide p{

    padding: 10px;

    font-size:1.05rem;
    line-height:1.8;

    color:#000000;

    margin-bottom:12px;

}

/*==========================
   Bottone
==========================*/

.btn-automation{

    display:inline-block;

    margin: 8px 10px;

    padding:15px 35px;

    background:#22c55e;

    color:#fff;

    text-decoration:none;

    border-radius:8px;

    font-weight:600;

    transition:.3s;
}

.btn-automation:hover{

    background:#16a34a;

}

/*==========================
   Frecce
==========================*/

.prev,
.next{

    position:absolute;

    top:50%;

    transform:translateY(-50%);

    width:48px;
    height:48px;

    border:none;

    border-radius:50%;

    background: #22c55e2d;

    color:#fff;

    font-size:22px;

    cursor:pointer;

    transition:.3s;

    z-index:20;
}

.prev{

    left:20px;

}

.next{

    right:20px;

}

.prev:hover,
.next:hover{

    background:#22c55e;

}

/*==========================
   Pallini
==========================*/
/*
.spostamento{

margin: 10px;
height: auto;
width: 500px;

display: flex;
justify-content: center;
align-items: center;
flex-direction: column;

}

.slider-dots{

    display:flex;

    justify-content:center;
    align-items: center;
    

    gap:12px;

    padding:20px;
    
    height: 40px;
    width: auto;

    margin: 10px;


}

.dot{

    width:14px;
    height:14px;

    border-radius:50%;

    background:#777;

    cursor:pointer;

    transition:.3s;

}

.dot.active{

    background:#22c55e;

    transform:scale(1.2);

}
*/

/* =========================================
   CONTENITORE DOTS SOTTO LE SLIDE
   ========================================= */
/*
.spostamento {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: 25px;
    position: relative;
    z-index: 10;
}
*/

/* Contenitore dei dots */

.slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 10px;

    margin-top: -700px;

    position: absolute;

}

/* Singolo dot */

.slider-dots .dot {
    display: block;

    width: 11px;
    height: 11px;

    border-radius: 50%;
    border: none;

    background: #bbb;

    cursor: pointer;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        width 0.3s ease;
}

/* Dot attivo */

.slider-dots .dot.active {
    width: 28px;
    border-radius: 10px;

    background: #00b894;

    transform: scale(1.05);
}

/* Effetto passaggio mouse */

.slider-dots .dot:hover {
    background: #008f72;
    transform: scale(1.15);
}

/* Animazione */

@keyframes fade{

    from{
        opacity:0;
        transform:translateY(15px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}

/* Responsive */

@media(max-width:900px){

.slide{

    padding:40px;

}

.slide h2{

    font-size:1.8rem;

}

.prev,
.next{

    width:42px;
    height:42px;

}

}

@media(max-width:600px){

.slide{

    padding:30px 25px;

}

.slide h2{

    font-size:1.5rem;

}

.slide p{

    font-size:.95rem;

}

.btn-automation{

    width:100%;
    text-align:center;

}

.prev,
.next{

    display:none;

}

}

.transition-grid {
    position: absolute;
    inset: 0;

    display: grid;

    grid-template-columns:
        repeat(var(--grid-columns), 1fr);

    grid-template-rows:
        repeat(var(--grid-rows), 1fr);

    z-index: 50;
    pointer-events: none;
}

.transition-square {
    background: rgba(255,255,255,0.95);

    opacity: 1;

    transform: scale(1.05);

    transition:
        opacity .55s ease,
        transform .55s ease;
}

.transition-square.hide {
    opacity: 0;
    transform: scale(.75);
}

/* ==========================
   RESPONSIVE
========================== */

@media(max-width:768px){

    .sidebar{

        position:fixed;

        left:0;

        top:0;

        z-index:1000;

    }

    main{

        padding:25px;

    }

}

/* ==========================================
   SIDEBAR COLLASSABILE
========================================== */

/* Sidebar aperta */
.allineamento {
    width: 260px;
    min-width: 260px;
    transition: width 0.3s ease;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    transition: width 0.3s ease;
}

/* Sidebar chiusa */
.allineamento.collapsed {
    width: 70px;
    min-width: 70px;
}

.sidebar.collapsed {
    width: 70px;
    min-width: 70px;
}


/* ==========================================
   LOGO
========================================== */

.allineamento.collapsed .img {
    padding: 15px 5px;
}

.allineamento.collapsed .img img {
    width: 50px;
}


/* ==========================================
   TESTI MENU
========================================== */

.sidebar.collapsed .menu-text {
    display: none;
}


/* ==========================================
   LINK SIDEBAR
========================================== */

.sidebar.collapsed > a {
    width: 50px;
    justify-content: center;
    padding: 14px 0;
}


/* ==========================================
   BOTTONI MENU A TENDINA
========================================== */

.sidebar.collapsed .dropdown-btn {
    width: 50px;
    justify-content: center;
    padding: 14px 0;
    margin-left: 10px;
}


/* ==========================================
   FRECCE
========================================== */

.sidebar.collapsed .arrow {
    display: none;
}


/* ==========================================
   SOTTOMENU
========================================== */

.sidebar.collapsed .dropdown-content {
    display: none;
}


/* ==========================================
   BOTTONE MENU
========================================== */

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

#toggleSidebar {
    width: 45px;
    height: 45px;

    display: flex;
    justify-content: center;
    align-items: center;

    border: none;
    border-radius: 10px;

    background: transparent;
    color: #333;

    cursor: pointer;

    font-size: 24px;

    transition: all 0.3s ease;
}

#toggleSidebar:hover {
    background: #22c55e51;
    color: white;
}


/* ==========================================
   CONTENUTO PRINCIPALE
========================================== */

main {
    flex: 1;
    min-width: 0;
    transition: margin-left 0.3s ease;
}

/* Stesso comportamento per le pagine articolo che usano style.css. */
@media screen and (min-width: 1025px) {
    .allineamento + main {
        transition: padding .3s ease, width .3s ease;
    }

    .allineamento + main > .pagina {
        transition: width .3s ease, max-width .3s ease, margin .3s ease;
    }

    .allineamento.collapsed + main {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        margin-left: 0;
        padding-left: 27px;
        padding-right: 27px;
    }

    .allineamento.collapsed + main > .pagina {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}

@media screen and (max-width: 1024px) {
    #toggleSidebar {
        display: none;
    }
}
