/*
Theme Name: MBytes 2026
Author: MBytes - Mirko Benoni
Author URI: https://www.mbytes.it
*/

@import url('https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');


:root {
    --primary-color: #2F196B;
    --secondary-color: #8B02A8;
    --tertiary-color: #553B9C;
}

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Work Sans';
    font-size: 18px;
    color: #111118;
    line-height: 1.4;

    width: 100%;
    padding: 0;
    margin: 0;


    background-color: #FDFDFD;
}


span.icon {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

.bg-gradiente {
  background: linear-gradient(135deg, var(--tertiary-color) 0%, var(--primary-color) 100%);
}

.bg-gradiente * {
  color: #fff;
}


.container.bg-gradiente {
  border-radius: 10px;
  padding: 40px 40px;
  box-shadow: 0px 4px 35px 20px rgba(47,25,107,.21);
}

.bg-bianco {
  background-color: #fff;
  border-radius: 10px;
  padding: 40px 40px;
  box-shadow: 0px 4px 35px 20px rgba(0,0,0,.21);
}



.cta-secondaria a{
  text-decoration: none;
  font-weight: 600;
}


.border-radius:not(figure.border-radius) {
  border-radius: 10px;
}


.box-shadow:not(figure.box-shadow) {
  box-shadow: 0px 4px 35px 20px rgba(47,25,107,.21);
}

figure.border-radius img {
  border-radius: 10px;
}

figure.box-shadow img{
  box-shadow: 0px 4px 35px 20px rgba(47,25,107,.21);
}

.small-shadow {
  box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.15);
}


.tight {
  max-width: 920px;
}



/* -------------------------------------------------------------------------- */
/*                                  CONTAINER                                 */
/* -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width:1440px;
  
  margin: 0 auto;
}

.container.small {
  max-width: 750px;
}



/* -------------------------------------------------------------------------- */
/*                                     NAV                                    */
/* -------------------------------------------------------------------------- */

header {
  margin-top: 30px;
  margin-bottom: 30px;
  padding-left: 20px;
  padding-right: 20px;
  
}

header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding-bottom: 15px;
  background-color: #fff;
  box-shadow: 0px 10px 30px 0px rgba(0,0,0,0.2);
  padding: 10px 20px;
  border-radius: 20px;
}

header a.logo {
  max-height: 60px;
  position: relative;
  z-index: 999;
}

header a.logo img {
  max-height: 60px;
}

header nav ul li {
  position: relative;
  text-align: center;
}

header nav ul li a {
  color: #333;
  text-decoration: none;
  text-align: left;
}

header nav ul li button {
  background-color: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}


header .hamburger {
  margin-left:20px;
  position: relative;
  z-index: 999;
}

header nav {
  position: fixed;
  top: 0px;
  right: 0;
  transform: translateX(100%);
  z-index: 998;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  padding: 140px 24px 24px 24px;
  transition: .5s cubic-bezier(0.56, 0.51, 0.35, 0.99);
}


header nav.aperta {
  transform: translateX(0%);
}

header nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin-left: 0;
  padding-left: 0;
  list-style-type: none;
}

header nav .sub-menu {
  align-items: center;
  gap: 40px;
}

.sub-menu {
        position: static;
        height: 0;
        overflow: hidden;

        padding: 0;
        margin: 0;

        opacity: 1;
        visibility: visible;
        transform: none;

        background: transparent;
        box-shadow: none;

        transition: height .3s ease;
    }

    .sub-menu li:first-child {
        padding-top: 40px;
    }

header a.cta {
  position: relative;
  z-index: 999;
}
 
header a.cta, footer .contatti a, .cta a {
  text-decoration: none;
  position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: auto;
    padding: 12px 22px;
    border-radius: 999px;

    color: #fff;
    text-decoration: none;
    font-weight: 600;

    background: linear-gradient(135deg, #8B02A8 0%, #2F196B 100%);
    overflow: hidden;
    isolation: isolate;
}

.cta.trasparente a {
  background: transparent;
  color: var(--tertiary-color);
  border: 1px solid var(--tertiary-color);
}

.cta.bianca a {
  background: #fff;
  color: var(--primary-color);
}



header a.cta::before, footer .contatti a::before, .cta:not(.cta.trasparente):not(.cta.bianca) a::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 30%,
        rgba(255, 255, 255, 0.22) 45%,
        rgba(139, 2, 168, 0.55) 52%,
        transparent 70%,
        transparent 100%
    );

    transform: translateX(-120%);
    animation: navCtaGlow 3.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes navCtaGlow {
    0% {
        transform: translateX(-120%);
    }

    45% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(120%);
    }
}

@media(min-width:992px) {

  header .hamburger {
    display: none;
  }

  header nav {
    margin-left: auto;
    transform: none;
    width: auto;
    height: auto;
    position: relative;
    top:0;
    padding: 0;
  }

  header nav > ul{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: 0;
    padding-left: 0;
    list-style-type: none;
    gap:40px;
  }

  header nav .sub-menu {
    align-items: flex-start;
    gap: 20px;
  }

  header nav .sub-menu {
    display: none;
    opacity: 0;
    height: auto;
    position: absolute;
    top: 100%;
    left: -10px;
    background-color: #fff;
    padding: 38px 10px 10px 10px;
    box-shadow: 0px 28px 30px 0px rgba(0,0,0,0.2);
    transform: translateY(-20px);
    min-width: 220px;
    transition: all 2s ease;
  }

  .has-dropdown:hover > .sub-menu,
  .has-dropdown:focus-within > .sub-menu {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }

  .sub-menu li:first-child {
        padding-top: 0px;
  }

  header a.cta {
    margin-left:40px;
  }
}


/* -------------------------------------------------------------------------- */
/*                                   FOOTER                                   */
/* -------------------------------------------------------------------------- */


footer {
  margin-top: 30px;
  margin-bottom: 0px;
  color: #fff;

  padding-top: 110px;
  position: relative;

  background: linear-gradient(180deg, var(--tertiary-color) 0%, var(--primary-color) 100%);
}

.footer-wave {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 90px;
    line-height: 0;
    z-index: 1;
    pointer-events: none;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

.footer-wave path {
    fill: #FDFDFD; 
}

footer .container {
  padding: 15px 15px;
  border-bottom: .5px solid #fff;
}


footer .logo img {
  max-height: 80px;
}

footer a {
   text-decoration: none;
}

footer nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px
}

footer .contatti {
  padding-top: 20px;
}

footer nav ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

footer nav ul li {
  margin-bottom: 10px;
}

footer nav ul a {
  color: #fff;
}

footer .container.due {
  padding-top: 0;
  padding-bottom: 15px;
  border-bottom: 0;
}

footer .container.due a {
    color: #fff;
}

footer .container.due .credits a {
  color: var(--primary-color);
}


@media (min-width:992px) {
  footer .container {
    display: flex;
    flex-direction: row;
  }

  footer nav {
    flex-direction: row;
    gap: 70px;
    margin-left: auto;
    margin-right: 70px;
    margin-bottom: 0;
  }

  footer p.titolo {
    margin-top: 0px;
  }

  footer .contatti {
    padding-left: 70px;
    border-top: none;
    padding-top: 0;
  }


  footer .container.due {
    column-gap:20px;
    flex-wrap: wrap;
  }

  footer .container.due p {
    margin-bottom: 0;
  }

  

  footer .container.due .copyrights {
    margin-left: auto;
  }

  footer .container.due .credits {
    width: 100%;
    text-align: right;
  }

}


/* -------------------------------------------------------------------------- */
/*                                    MAIN                                    */
/* -------------------------------------------------------------------------- */

main {
  padding-left: 20px;
  padding-right: 20px;
}


/* -------------------------------------------------------------------------- */
/*                                   TITOLI                                   */
/* -------------------------------------------------------------------------- */

h1,
.h1 {
    font-size: clamp(1.78rem, 1.25rem + 2.5vw, 2.5rem);
    line-height: 1;
    margin-top:20px;
    margin-bottom: 30px;
    font-weight: 900;
}

/* Titoli di sezione */
h2,
.h2 {
    font-size: clamp(1.44rem, 1.1rem + 1.8vw, 2rem);
    line-height: 1;
    margin-top:20px;
    margin-bottom: 30px;
    font-weight: 900;

}

/* Titoli di sottosezione */
h3,
.h3 {
    font-size: clamp(1.22rem, 1.05rem + 1vw, 1.56rem);
    line-height: 1;
    margin-top:20px;
    margin-bottom: 25px;
    font-weight: 600;

}

/* Titoli minori */
h4,
.h4 {
    font-size: clamp(1.11rem, 1rem + 0.6vw, 1.28rem);
    line-height: 1;
    margin-top:20px;
    margin-bottom: 20px;
    font-weight: 600;

}


/* -------------------------------------------------------------------------- */
/*                                  PRETITLE                                  */
/* -------------------------------------------------------------------------- */

.pretitolo {
  font-size: 24px;
  font-weight: 700;
}


/* -------------------------------------------------------------------------- */
/*                               TESTO GRADIENTE                              */
/* -------------------------------------------------------------------------- */

.txt-gradiente {
    color: var(--primary-color); /* fallback */
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .txt-gradiente {
        background: linear-gradient(90deg, var(--tertiary-color) 0%, var(--primary-color) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}


/* -------------------------------------------------------------------------- */
/*                                    CHIP                                    */
/* -------------------------------------------------------------------------- */

.chip {
  display: inline;
  font-size: 16px;
  padding: 5px 15px;
  border-radius: 15px;
  border: 1px solid #111118;
}

.chip.viola {
  border-color: var(--secondary-color);
}

.elenco-chip {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap:20px;
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.elenco-chip.viola li {
  padding: 12px;
  border-radius: 6px;
  border: 1.5px solid var(--secondary-color);
  color: var(--secondary-color);
  background-color: rgba(139, 2, 168, .1);
  font-weight: 600;
  margin-right: 10px;
  display: block;
  width: auto;
}


/* -------------------------------------------------------------------------- */
/*                            GRIGLIA A DUE COLONNE                           */
/* -------------------------------------------------------------------------- */

.griglia-2-colonne {
  gap:80px;
}

@media(max-width:768px) {
  .griglia-2-colonne {
    gap:60px;
    display: flex !important;
    flex-direction: column;
  }
}



/* -------------------------------------------------------------------------- */
/*                              GRIGLIA PORTFOLIO                             */
/* -------------------------------------------------------------------------- */

/* =========================================================
   PORTFOLIO BENTO
   Classe .portfolio-bento sul blocco "Template articolo"
   ========================================================= */

/* Applica il layout solo al Query Loop impostato in modalità Griglia */
.wp-block-post-template.is-layout-grid.portfolio-bento {
	display: grid !important;
	grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
	grid-auto-rows: 34px;
	gap: 20px;

	margin: 0;
	padding: 0;
	list-style: none;
}

/* Ogni elemento del Query Loop deve riempire il suo spazio grid */
.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post {
	display: block;
	min-width: 0;
	min-height: 0;
	height: 100%;
	margin: 0 !important;
  border-radius: 10px;
}

/* Card principale */
.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(1) {
	grid-column: span 7;
	grid-row: span 12;
}

/* Card laterali superiori */
.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(2),
.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(3) {
	grid-column: span 5;
	grid-row: span 6;
}

/* Card inferiori */
.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(4),
.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(5) {
	grid-column: span 6;
	grid-row: span 8;
}

/* =========================================================
   CARD
   ========================================================= */

.wp-block-post-template.is-layout-grid.portfolio-bento .portfolio-card {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	overflow: hidden;
  border-radius: 10px;
}

/*
 * L'immagine viene tolta dal flusso:
 * non aumenta l'altezza della card e occupa tutto lo spazio disponibile.
 */
.wp-block-post-template.is-layout-grid.portfolio-bento .wp-block-post-featured-image,
.wp-block-post-template.is-layout-grid.portfolio-bento .wp-block-post-featured-image a,
.wp-block-post-template.is-layout-grid.portfolio-bento .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

.wp-block-post-template.is-layout-grid.portfolio-bento .wp-block-post-featured-image {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.wp-block-post-template.is-layout-grid.portfolio-bento .wp-block-post-featured-image a {
	height: 100%;
}

.wp-block-post-template.is-layout-grid.portfolio-bento .wp-block-post-featured-image img {
	object-fit: cover;
	object-position: top center;
}

/*
 * Il contenuto resta sempre dentro alla card.
 * Cambia padding, colori, gradienti ecc. come preferisci.
 */
.wp-block-post-template.is-layout-grid.portfolio-bento .portfolio-card__content {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;

	margin: 0;
	padding: 24px;

	background: linear-gradient(
		to top,
		rgba(20, 10, 55, 0.88) 0%,
		rgba(20, 10, 55, 0.52) 72%,
		rgba(20, 10, 55, 0) 100%
	);
}

/* Evita margini Gutenberg che possono far uscire testi dalla card */
.wp-block-post-template.is-layout-grid.portfolio-bento
	.portfolio-card__content
	> :first-child {
	margin-top: 0;
}

.wp-block-post-template.is-layout-grid.portfolio-bento
	.portfolio-card__content
	> :last-child {
	margin-bottom: 0;
}

/* Il titolo non deve avere margini enormi ereditati dal tema */
.wp-block-post-template.is-layout-grid.portfolio-bento .wp-block-post-title {
	margin: 0;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {
	.wp-block-post-template.is-layout-grid.portfolio-bento {
		grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
		grid-auto-rows: 32px;
		gap: 16px;
	}

	.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(1) {
		grid-column: span 6;
		grid-row: span 10;
	}

	.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(2),
	.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(3),
	.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(4),
	.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(5) {
		grid-column: span 3;
		grid-row: span 7;
	}

	.wp-block-post-template.is-layout-grid.portfolio-bento .portfolio-card__content {
		padding: 20px;
	}
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {
	.wp-block-post-template.is-layout-grid.portfolio-bento {
		grid-template-columns: minmax(0, 1fr) !important;
		grid-auto-rows: auto;
		gap: 16px;
	}

	.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post,
	.wp-block-post-template.is-layout-grid.portfolio-bento > .wp-block-post:nth-child(n) {
		grid-column: 1 / -1;
		grid-row: auto;
		height: auto;
	}

	.wp-block-post-template.is-layout-grid.portfolio-bento .portfolio-card {
		aspect-ratio: 16 / 10;
		min-height: 0;
	}

	.wp-block-post-template.is-layout-grid.portfolio-bento .portfolio-card__content {
		padding: 18px;
	}
}


.portfolio-bento .portfolio-card__content a {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}


.portfolio-bento .portfolio-card__content .portfolio-tipologie {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.portfolio-bento .portfolio-card__content .portfolio-tipologie .tipo {
  color: #fff;
  padding: 5px 15px;
  border-radius: 15px;
  border: 1px solid #fff;
}

.portfolio-bento .portfolio-card__content .portfolio-risultati {
  color: #fff;
  margin-top: 15px;
}


/* -------------------------------------------------------------------------- */
/*                                  STEPLINE                                  */
/* -------------------------------------------------------------------------- */

.fixed {
  position: sticky;
  top:55vh;
}

.stepline {
  counter-reset:  numero;
  position: relative;
}

@media(max-width:768px) {
  .stepline {
    margin-top: 30px !important;
  }
}

.stepline::before {
  content: ' ';
  position: absolute;
  height: calc(100% + 50px);
  width: .5px;
  left: 0;
  top: 0;
  transform: translate(104.5px, -25px);
  background-color: var(--tertiary-color);
}

.stepline > .wp-block-group {
  position: relative;
  padding: 15px;
  background-color: #fff;
  border-radius: 10px;
  margin-bottom: 30px;

  box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.15);

  max-width: calc(100% - 150px);
  margin-left: auto;

  counter-increment: numero;
}

.stepline > .wp-block-group::before {
  position: absolute;
  content: counter(numero, decimal-leading-zero);
  font-size: 35px;
  font-weight: 500;
  color: var(--tertiary-color);
  left: 0;
  top: 25px;
  transform: translateX(-120px);
}

.stepline > .wp-block-group::after{
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--tertiary-color);
  left: 0;
  top: 43px;
  transform: translateX(-50px);
  border-radius: 100%;
}


/* -------------------------------------------------------------------------- */
/*                                   CTA BOX                                  */
/* -------------------------------------------------------------------------- */

.cta-box .contenuto .wp-block-group__inner-container {
  display: flex;
  flex-direction: column;
}

@media(min-width:769px) {
  .cta-box .contenuto .wp-block-group__inner-container {
    flex-direction: row;
    gap: 40px;
    justify-content: space-between;
    align-items: center;
  }

  .cta-box .contenuto .wp-block-group__inner-container > * {
    /*width: calc(33.33% - 40px);*/
  }
}

.cta-box .punti-chiave .wp-block-group__inner-container {
  display: flex;
  flex-direction: column;
  font-size: 21px;
}

.cta-box .punti-chiave .wp-block-group__inner-container .icon {
  font-size: 31px;
}

.cta-box .punti-chiave .wp-block-group__inner-container > * {
    
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
  }

@media(min-width:769px) {
  .cta-box .punti-chiave .wp-block-group__inner-container {
    flex-direction: row;
    gap: 40px;
    justify-content: space-between;
  }

  
}


/* -------------------------------------------------------------------------- */
/*                                     FAQ                                    */
/* -------------------------------------------------------------------------- */


.faqs {
    max-width: 800px;
    margin: 0 auto;
}

.faqs .faq {
    box-shadow: 0px 4px 23px 0px rgba(51, 51, 51, 0.25);
    border-radius: 10px;
    padding: 20px 20px;
    margin-bottom: 30px;
}

.faqs .faq .domanda {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    
}

.faqs .faq .domanda .icon{
    transition: .5s all ease-in-out;
}

.faqs .faq.aperta .domanda .icon {
    transform: rotate(-180deg);
}

.faqs .faq .domanda h3{
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 0;
    margin-top: 0;
}


.faqs .faq .risposta {
    display: none;
    padding-top: 20px;
}


/* -------------------------------------------------------------------------- */
/*                                  ICON BOX                                  */
/* -------------------------------------------------------------------------- */
.icon.icon-box {
  padding: 12px;
  border-radius: 6px;
  border: 1.5px solid var(--secondary-color);
  color: var(--secondary-color);
  background-color: rgba(139, 2, 168, .1);
  font-weight: 600;
  margin-right: 10px;
}


/* -------------------------------------------------------------------------- */
/*                                CONTACT FORM                                */
/* -------------------------------------------------------------------------- */

div.wpcf7 {
    width: 100%;
}

.wpcf7-form-control:not(input[type="submit"]) {
    width: 100%;
    padding: 10px 0;
    background-color: transparent;
    color: #fff;
    border: none;
    border-bottom: .5px solid rgba(255,255,255,.3);
    outline: none;
}

.wpcf7-radio, .wpcf7-acceptance, .wpcf7-form-control.wpcf7-radio  {
    border-bottom: none !important;
}

.wpcf7-form input[type="radio"], .wpcf7-form input[type="checkbox"] {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    transition: all 0.4s ease;
    
}

.wpcf7-form input[type="radio"]:checked, .wpcf7-form input[type="checkbox"]:checked {
    background-color: var(--secondary-color);
}

.wpcf7 input[type="submit"] {
  color: #fff;
  background-color: var(--secondary-color);
      font-size: 21px;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    margin-top: 20px;
}



/* ========================================
   MBYTES - ARCHIVIO PORTFOLIO
======================================== */

.mbytes-work-archive {
    padding: 80px 0 100px;
}

/* INTRODUZIONE */

.mbytes-work-archive__intro {
    max-width: 850px;
    margin: 0 auto 55px;
    text-align: center;
}

.mbytes-work-archive__intro h1 {
    margin: 15px 0 25px;
}

.mbytes-work-archive__intro > p:last-child {
    margin-bottom: 0;
}

/* ========================================
   BENTO GRID
======================================== */

.mbytes-work-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: row dense;
    grid-auto-rows: clamp(210px, 20vw, 290px);
    gap: 18px;

    padding: 0;
    margin: 0;
    list-style: none;
}

/* RESET CARD */

.mbytes-work-grid > .mbytes-work-card {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;

    overflow: hidden;
    border-radius: 12px;
    isolation: isolate;
}

/* 
   SCHEMA BENTO:
   1 = Grande a sinistra
   2 = Piccola destra alta
   3 = Piccola destra bassa
   4 = Mezza larghezza
   5 = Mezza larghezza
*/

/* Card principale */

.mbytes-work-card:nth-child(5n + 1) {
    grid-column: span 4;
    grid-row: span 2;
}

/* Due card a destra */

.mbytes-work-card:nth-child(5n + 2),
.mbytes-work-card:nth-child(5n + 3) {
    grid-column: span 2;
    grid-row: span 1;
}

/* Ultime due card */

.mbytes-work-card:nth-child(5n + 4),
.mbytes-work-card:nth-child(5n + 5) {
    grid-column: span 3;
    grid-row: span 2;
}

/* ========================================
   SINGOLA CARD
======================================== */

.mbytes-work-card__link {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}

.mbytes-work-card__link:hover,
.mbytes-work-card__link:focus {
    color: #fff;
}

.mbytes-work-card__link:focus-visible {
    outline: 3px solid #b7a2ff;
    outline-offset: -3px;
}

.mbytes-work-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #25163f;
}

.mbytes-work-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;

    transition: transform 0.5s ease;
}

@media (hover: hover) {
    .mbytes-work-card:hover .mbytes-work-card__img {
        transform: scale(1.05);
    }
}

/* ========================================
   GRADIENTE SULL'IMMAGINE
======================================== */

.mbytes-work-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background: linear-gradient(
        to bottom,
        rgba(25, 12, 45, 0) 35%,
        rgba(25, 12, 45, 0.20) 55%,
        rgba(25, 12, 45, 0.85) 100%
    );

    pointer-events: none;
}

/* ========================================
   CONTENUTI IN SOVRAIMPRESSIONE
======================================== */

.mbytes-work-card__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;

    padding: 24px;
    color: #fff;
}

.mbytes-work-card__title {
    margin: 0;
    padding: 0;

    font-size: clamp(19px, 1.55vw, 25px);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;

    overflow-wrap: break-word;
}

/* Titolo più evidente per le card grandi */

.mbytes-work-card:nth-child(5n + 1)
.mbytes-work-card__title {
    font-size: clamp(22px, 1.8vw, 28px);
}

/* TIPOLOGIE */

.mbytes-work-card__types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.mbytes-work-card__type {
    display: inline-flex;
    align-items: center;

    padding: 7px 13px;
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 40px;

    color: #fff;
    background: rgba(30,15,50,0.25);

    font-size: 14px;
    line-height: 1.2;
}

/* RISULTATI */

.mbytes-work-card__results {
    margin: 12px 0 0;
    padding: 0;

    color: #fff;
    font-size: 15px;
    line-height: 1.5;
}

/* ========================================
   PAGINAZIONE
======================================== */

.mbytes-work-pagination {
    margin-top: 55px;
}

.mbytes-work-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    padding: 0;
    margin: 0;
    list-style: none;
}

.mbytes-work-pagination li {
    margin: 0;
    padding: 0;
}

.mbytes-work-pagination a,
.mbytes-work-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    min-height: 42px;
    padding: 8px 13px;

    border: 1px solid #e5e0ed;
    border-radius: 8px;

    text-decoration: none;
    color: #553b9c;
}

.mbytes-work-pagination .current {
    background: #553b9c;
    border-color: #553b9c;
    color: #fff;
}

.mbytes-work-pagination a:hover {
    border-color: #553b9c;
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 1024px) {

    .mbytes-work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 270px;
        gap: 15px;
    }

    .mbytes-work-grid > .mbytes-work-card {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* Ogni quinto gruppo inizia con una card larga */
    .mbytes-work-grid >
    .mbytes-work-card:nth-child(5n + 1) {
        grid-column: span 2;
        grid-row: span 1;
    }

}

/* ========================================
   SMARTPHONE
======================================== */

@media (max-width: 600px) {

    .mbytes-work-archive {
        padding: 50px 0 70px;
    }

    .mbytes-work-archive__intro {
        margin-bottom: 35px;
    }

    .mbytes-work-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: auto;
        gap: 16px;
    }

    .mbytes-work-grid > .mbytes-work-card,
    .mbytes-work-grid >
    .mbytes-work-card:nth-child(5n + 1) {
        grid-column: 1 / -1;
        grid-row: auto;
        height: 300px;
    }

    .mbytes-work-card__content {
        padding: 22px;
    }

    .mbytes-work-card__title,
    .mbytes-work-card:nth-child(5n + 1)
    .mbytes-work-card__title {
        font-size: 21px;
    }

    .mbytes-work-card__results {
        font-size: 14px;
    }

    .mbytes-work-card__type {
        font-size: 13px;
        padding: 6px 11px;
    }

}

/* ACCESSIBILITÀ: RIDUZIONE ANIMAZIONI */

@media (prefers-reduced-motion: reduce) {
    .mbytes-work-card__img {
        transition: none;
    }
}


/* ======================================
   PORTFOLIO - BENTO GRID
   ====================================== */

.portfolio-bento:has(> .wp-block-group__inner-container) {
    display: block !important;
}

.portfolio-bento > .wp-block-group__inner-container,
.portfolio-bento:not(:has(> .wp-block-group__inner-container)) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 650px;
    gap: 32px;
    width: 100%;
   /* max-width: 1200px; */
    margin-left: auto;
    margin-right: auto;
    align-items: stretch;
}

.portfolio-bento .wp-block-image {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 16px;

     box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.035),
        0 12px 32px rgba(0, 0, 0, 0.07);
}

.portfolio-bento .wp-block-image > a {
    display: block;
    width: 100%;
    height: 100%;
}

.portfolio-bento .wp-block-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: top center;
}

/* Disposizione */
.portfolio-bento .bento-home {
    grid-column: span 2;
}

.portfolio-bento .bento-servizio {
    grid-column: span 1;
}

.portfolio-bento .bento-blog {
    grid-column: span 2;
}

.portfolio-bento .bento-confronto {
    grid-column: span 1;
}

/* Tablet */
@media (max-width: 900px) {
    .portfolio-bento > .wp-block-group__inner-container,
    .portfolio-bento:not(:has(> .wp-block-group__inner-container)) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 500px;
        gap: 22px;
    }

    .portfolio-bento .wp-block-image {
        grid-column: span 1 !important;
    }
}

/* Smartphone */
@media (max-width: 600px) {
    .portfolio-bento > .wp-block-group__inner-container,
    .portfolio-bento:not(:has(> .wp-block-group__inner-container)) {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: 420px;
        gap: 18px;
    }

    .portfolio-bento .wp-block-image {
        grid-column: 1 / -1 !important;
        border-radius: 12px;
    }
}


.recensione-quote {
    font-family: Georgia, serif;
    font-size: 90px;
    font-weight: 700;
    line-height: 0.1;
    margin: 50px 0 0px 0 !important;
    padding: 0;
}


.recensione-landing {
  padding-top: 10px;
  font-size: 14px;
  max-width: 600px;
  margin:auto;
}

.recensione-landing strong {
  color: var(--primary-color);
}

.recensione-landing a {
  color: var(--secondary-color)
}