:root{
    --primario: #EF7E25;
    --primario0scuro: #E05711;
    --secundario: #515250;
    --blanco: #fff;
    --negro: #000;
    --fuente: "Poppins", sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.height{
 max-width: 110rem;
 margin: auto;
}
.fat{
    padding: 80px;
}
.legi-nos h1{
    text-align: center;
    font-size: 6rem;
    margin-top: 4rem;
}
.legi-nos h2{
    text-align: center;
    font-size: 3.5rem;
    color: var(--primario);
}
.legi-nos p{
    text-align: justify;
    margin-top: 2rem;
    font-size: 2.5rem;
}

/**caja 1*/
.seccion-nosotros {
 background: var(--primario);
  padding: 90px;
  margin-top: 40px;
  display: flex;
  padding: 80px;
}

.titulo {
  text-align: center;
  font-size: 48px;
  margin-bottom: 50px;
  color: var(--blanco);
}

.contenido {
  display: flex;
  align-items: center;
}
/* TARJETAS */
.tarjetas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  justify-items: center;}

.tarjeta {
  background: var(--blanco);
  width: 100%;
  max-width: 280px;
  min-height: 300px;
  padding: 2rem;
  transform: skew(-8deg);
}

.tarjeta > * {
  transform: skew(8deg);
}

.tarjeta img {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  display: block;
  object-fit: contain;
}

.tarjeta h3 {
  margin-bottom: 20px;
  font-size: 18px;
}

.tarjeta p {
  font-size: 14px;
  line-height: 1.5;
}

/**fin de caja 1*/
/**caja 2*/
.valo-es{
    background-color: var(--primario0scuro);
     padding: 80px;
}
.valo-es h2{
    color: var(--blanco);
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 2rem;
}
.valo-es h3{
    color: var(--blanco);
    text-align: center;
    font-size: 2.2rem;
    min-height: 5.4rem; /* fuerza alineación */
    display: flex;
    align-items: center;
    justify-content: center;
}
.value-flex{
    display: flex;
    gap: 5rem;
    justify-content: space-evenly;
    align-items: flex-start;
}
.flex-value{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}
.flex-value img{
    width: 10rem;
    height: 10rem;
    object-fit: contain;
}
/**cotiza*/
.cta-proyecto{
  background-color: var(--secundario); /* tu naranja */
  padding: 5rem 2rem;
  text-align: center;
}

.cta-proyecto h2{
  color: var(--blanco);
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.cta-proyecto p{
  color: var(--blanco);
  font-size: 2rem;
  margin-bottom: 3rem;
}

.btn-cta{
  display: inline-block;
  background-color: var(--blanco);
  color: var(--primario);
  padding: 1.5rem 4rem;
  font-size: 2rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5rem;
  transition: all 0.3s ease;
}

.btn-cta:hover{
  background-color: transparent;
  color: var(--blanco);
  border: 2px solid var(--blanco);
}
.matpe{
  padding: 20px 0px;
}
@media (max-width: 768px) {

  /* CONTENEDORES */
  .height {
    max-width: 100%;
    padding: 0 1.5rem;
  }

  .fat {
    padding: 3rem 0;
  }

  /* SECCION NOSOTROS */
  .seccion-nosotros {
    padding: 3rem 1.5rem;
    display: block; /* 🔑 elimina flex horizontal */
  }

  .contenido {
    flex-direction: column;
    width: 100%;
  }

  /* TARJETAS */
  .tarjetas {
    flex-direction: column;
    gap: 2.5rem; /* 🔑 antes 100px */
    align-items: center;
  }

  .tarjeta {
    width: 100%;
    max-width: 300px;
    height: auto;
    transform: skew(-6deg); /* menos agresivo en mobile */
  }

  .tarjeta * {
    transform: skew(-0deg);
  }

  /* TEXTOS */
  .legi-nos h1 {
    font-size: 3.2rem;
  }

  .legi-nos h2 {
    font-size: 2.2rem;
  }

  .legi-nos p {
    font-size: 1.6rem;
    text-align: left;
  }

  .titulo {
    font-size: 2.8rem;
  }

  /* VALORES */
  .valo-es {
    padding: 3rem 1.5rem;
  }

  .value-flex {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }

  /* 🔥 Último ítem centrado */
  .value-flex .flex-value:last-child {
    grid-column: 1 / -1; /* ocupa las 2 columnas */
    justify-self: center;
  }
  .valo-es h3 {
    min-height: auto;
    font-size: 1.8rem;
  }

  /* CTA */
  .cta-proyecto {
    padding: 3rem 1.5rem;
  }

  .matpe {
    padding: 0;
  }

  .cta-proyecto h2 {
    font-size: 2.4rem;
  }

  .cta-proyecto p {
    font-size: 1.6rem;
  }
  p{
    padding: 1rem;
    text-align: center;
  }
}


@media (max-width: 360px) {
  p{
    padding: 1rem;
    text-align: center;
  }
    .value-flex {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }
}
/* Tablet */
@media (max-width: 992px){
  .tarjetas{
    grid-template-columns: repeat(2, 1fr);
  }

  /* El tercer elemento se centra */
  .tarjetas .tarjeta:nth-child(3){
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* Celular */
@media (max-width: 600px){
  .tarjetas{
    grid-template-columns: 1fr;
  }

  .tarjeta{
    transform: skew(-4deg);
  }

  .tarjeta > *{
    transform: skew(4deg);
  }
}
@media (max-width: 600px){

  .tarjetas{
    grid-template-columns: 1fr;
  }

}
.tarjeta{
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.tarjeta h3{
  margin: 1rem 0;
  font-size: 2rem;
  text-align: center;
}
.tarjeta p{
  text-align: center;
}
.matpe__bo{
  display: flex;
  justify-content: center;
  gap: 3rem; /* ← separación entre botones */
  margin-top: 2rem;
}
@media (max-width: 600px){
  .matpe__bo{
    flex-direction: column;
    align-items: center;
  }
}
/* ===== FIX TABLET 1032px - 770px ===== */
@media (max-width: 1032px){

/* ===============================
   SECCIÓN VALORES RESPONSIVE PRO
   =============================== */

.valo-es{
  background-color: var(--primario0scuro);
  padding: 80px 20px;
}

.valo-es h2{
  color: var(--blanco);
  text-align: center;
  font-size: 3.5rem;
  margin-bottom: 5rem;
}

/* GRID BASE (Desktop) */
.value-flex{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4rem;
  align-items: center;
  justify-items: center;
}

/* ITEM */
.flex-value{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: center;
}

.flex-value img{
  width: 9rem;
  height: 9rem;
  object-fit: contain;
}

.valo-es h3{
  color: var(--blanco);
  font-size: 2rem;
}}
/* =========================
   VALORES RESPONSIVE PRO
   ========================= */

.valo-es{
  background-color: var(--primario0scuro);
  padding: 80px 20px;
}

.valo-es h2{
  color: var(--blanco);
  text-align: center;
  font-size: 3.5rem;
  margin-bottom: 5rem;
}

/* ===== BASE DESKTOP (5 EN FILA) ===== */

.value-flex{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4rem;
  align-items: center;
  justify-items: center;
}

.flex-value{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: center;
}

.flex-value img{
  width: 9rem;
  height: 9rem;
  object-fit: contain;
}

.valo-es h3{
  color: var(--blanco);
  font-size: 2rem;
}

/* =========================
   VALORES RESPONSIVE LIMPIO
   ========================= */

.value-flex{
  display: grid;
  gap: 4rem;
  justify-items: center;
  align-items: center;
}

/* ===== DESKTOP (5 EN FILA) ===== */
@media (min-width: 1200px){
  .value-flex{
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== LAPTOP (5 EN FILA) ===== */
@media (min-width: 1024px) and (max-width:1199px){
  .value-flex{
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== TABLET GRANDE (3 ARRIBA - 2 ABAJO CENTRADOS) ===== */
@media (min-width: 900px) and (max-width:1023px){
  .value-flex{
    grid-template-columns: repeat(3, 1fr);
  }

  .value-flex .flex-value:nth-child(4){
    grid-column: 1 / 2;
    justify-self: end;
  }

  .value-flex .flex-value:nth-child(5){
    grid-column: 3 / 4;
    justify-self: start;
  }
}

/* ===== TABLET PEQUEÑA Y CELULAR GRANDE (2–2–1) ===== */
@media (min-width: 369px) and (max-width: 899px){
  .value-flex{
    grid-template-columns: repeat(2, 1fr);
  }

  .value-flex .flex-value:last-child{
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* ===== SOLO CELULARES MUY PEQUEÑOS (1 POR FILA) ===== */
@media (max-width: 368px){
  .value-flex{
    grid-template-columns: 1fr;
  }
}
main{
  margin-top: 100px;
}