.lastoria-bg {
    position: relative; 
    min-height: 1536px; 
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lastoria-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/img/movitec-robot-sfondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7; 
    z-index: 1;
}

.lastoria-box {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}
.lastoria-box-1 {
	flex:1;
	
}
.lastoria-box-1>img {
	max-width: 400px;
}
.lastoria-box-2 {
	flex:2;
	
}
.quote {
  background-color: #f5f5f5;
  padding: 40px;
  text-align: center;
  color: #000000;
  font-size: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centers text vertically if image is taller */
}

/* FIXED: Repaired broken comment bracket from original CSS */
.quote p {
  margin-bottom: 2rem; 
}
.quote p:last-child {
  margin-bottom: 0;
}

/* --- Global Grid Item Settings --- */
.grid-item img {
  width: 100%;
  height: auto;       /* Let resized images maintain their natural height */
  display: block;
  object-fit: contain; /* Ensures zero cropping happens to the images */
}

/* Mobile First: Stacks natively in a single column */
.custom-grid-contatti {
  display: flex;
  flex-direction: column;
  gap: 20px; 
  margin-top: 150px;
  margin-bottom: 50px;
}

.dati-societari {
  background-color: #f5f5f5;
  padding: 40px;
  text-align: center;
  color: #000000;
  font-size: 1.25rem;
}

.dati-societari p {
  /* margin-bottom: 2rem; */
}
.dati-societari p:last-child {
  margin-bottom: 0;
}

.indirizzo {
	display: inline-flex;    /* Forces the wrapper to only take up as much space as needed */
  align-items: center;     /* MAGIC LINE: Vertically centers the icon and text perfectly */
  gap: 12px;
}

.icona-maps {
  display: flex;           /* Ensures the inner SVG/icon centers itself perfectly */
  color: #008080;          /* Custom icon color */
  flex-shrink: 0;          /* Prevents the icon from squishing if the text gets long */
}

.inline-text {
  margin: 0;               /* CRUCIAL: Removes default paragraph margins that ruin alignment */
  font-size: 1.1rem;
  color: #333333;
  margin-bottom: 0;
}

.indirizzo .inline-text p{
  margin-bottom: 0;
}

/* Desktop Grid (768px and wider) */
@media (min-width: 768px) {
  .custom-grid-contatti {
    display: grid;
    /* 3 Columns to perfectly achieve a 1/3 (1fr) and 2/3 (2fr) split */
    grid-template-columns: 1fr 2fr; 
    /* Let the rows scale natively based on image heights and text length */
    grid-template-rows: auto auto; 
    gap: 32px;
    margin-bottom: 100px;
  }

  /* --- ROW 1 --- */
  /* Left Column: 1/3 Width */
  .r1-img {
    grid-column: 1;
    grid-row: 1;
  }
  /* Right Column: 2/3 Width Text Box */
  .dati-societari {
    grid-column: 2;
    grid-row: 1;
  }

  /* --- ROW 2 --- */
  /* Left Column: 1/3 Width Image */
  .r2-img-1 {
    grid-column: 1/-1;
    grid-row: 2;
  }
  /* Right Column: 2/3 Width Capannone Image (Matches text width, no crop) */
  .r2-img-2 {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Mobile Clean up Override */
@media (max-width: 767px) {
  .quote {
    padding: 24px;
    font-size: 1.1rem;
  }
}

}