/* REGLA GENERAL */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  padding: 0;
  margin: 0;
  background-color: rgb(199, 198, 198);
  line-height: 1.5;
  /* Asegura que los hijos fluyan uno debajo del otro */
  display: block;
}

/* UTILIDADES */
.responsive {
  max-width: 100%;
  height: auto;
  display: block;
}

.letraBlanco {
  color: #ffee00;
}

/* EFECTOS Y CONTENEDORES NO GRID */
div.transbox {
  margin: 30px auto; /* 'auto' para centrar horizontalmente */
  background-color: #ffee00;
  padding: 10px;
  border: 10px solid transparent;
  border-radius: 60px 15px;
  opacity: 0.7;
  width: 50%; /* Ancho 50% dentro del contenedor */ 
  display: flex; /* Ajusta el orden y apilamiento vertical */
  flex-direction: column; /* Apila los hijos uno debajo del otro */
  justify-content: center;
  align-items: center; /* EVIVITAR desbordamiento si el contenido es demasiado grande */
  overflow: hidden; 
}

div.transbox:hover {
  opacity: 1;
}

/* TIPOGRAFÍA */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em 0;
  width: 100%; /* Aseguramos que encabezados en transbox se ordenen */
  text-align: center;
  /* word-break: break-word; */ /* "Usar" si el texto es muy largo sin espacios */
}

/* Asignación de orden dentro de .transbox (DESKTOP) */
h6 {
  font-weight: 300;
  font-size: 1.3rem; /* Tamaño base */
  letter-spacing: 0.44em;
  order: 1; /* Primero */
}

h2 {
  font-weight: 400;
  font-size: 1.8rem; /* Tamaño base */
  color: #3f2212;
  opacity: 1;
  order: 2; /* Segundo */
}

h5 {
  font-family: 'Cardo', serif;
  font-weight: 400;
  font-size: 1.2rem; /* Tamaño base */
  color: #000000;
  order: 3; /* Tercero */
}

h4 {
  font-weight: 400;
  font-size: 1.125rem;
}

.diferente {
  font-weight: 300;
  font-size: 0.875rem;
}

.creditofoto {
  font-family: "Roboto Condensed", sans-serif;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
  text-align: center;
  font-size: 0.75rem;
  margin-top: .8rem;
}

/* ENLACES */
a {
  text-decoration: none;
  color: #3f2212;
}

a:hover {
  color: tomato;
}

/* ==================
 * UNA SOLA COLUMNA
 * =================*/

/* Contenedor principal para aplicar el orden (DEBE EXISTIR EN EL HTML) */
.main-content {
    display: flex;
    flex-direction: column; /* Apila los .grid-container verticalmente */
    width: 100%;
    max-width: 1200px; /* Limita el ancho del contenedor principal */
    margin: 0 auto;
}

/* Orden: Asigna un order-value (menor = primero). */
.grid-container-con-imagen { 
    order: -1; /* El contenedor con esta clase irá primero */
}

/* =========
 * GRID PRINCIPAL RESPONSIVO (Mantenido a una sola columna)
 * ========= */
.grid-container {
  /* Cada grid-container centrado y uno debajo del otro */
  display: grid;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 30px auto; /* centrado + separación vertical */
  grid-template-columns: minmax(0, 1fr); /* Una sola columna */
  gap: 20px;
  padding: 20px;
}

.grid-container > div {
  background-color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
}

/* =========
 * ÍTEMS CON IMAGEN DE FONDO
 * ========= */
.item-con-imagen,
.item2,
.item3,
.item4 {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;       /* mantiene proporción sin ocultar contenido */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0;
  border-radius: 10px;
  display: flex;             /* centrar cualquier texto dentro */
  justify-content: center;
  align-items: center;
  color: #fff;               /* texto encima de la imagen */
}

/* Rutas de imágenes */
.item2 {
  background-image: url("../_IMGS/_JPG/rossi_0_portada.jpg");
}

/*.item3 {
  background-image: url("../_IMGS/_JPG/ruta/a/otra/imagen.jpg");
}

.item4 {
  background-image: url("../_IMGS/_JPG/ruta/a/otra/imagen2.jpg");
}*/

/* =========
 * FOOTER Y BOTONES
 * ========= */
.footer {
  width: 100%;
  position: static;
  bottom: 0;
  left: 0;
  padding-top: 2rem;
  padding-inline: 1rem;
  background-color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.logos {
  height: 18px;
  margin-bottom: 1rem;
  max-width: 100%;
}

.footer-menu-comtainer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  list-style-type: none;
  padding: 0;
  gap: 0.5rem 1rem;
}

.menu-item {
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
  font-size: 0.875rem;
  color: #FFFFFF;
}

.menu-item a {
  color: #FFFFFF;
}

.menu-item a:hover {
  color: #a8ff33;
}

.direccion {
  color: #FFFFFF;
  text-align: center;
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
  font-size: 0.8125rem;
  padding-bottom: 20px;
  max-width: 480px;
}

.logos2 {
  height: 100px;
  margin-bottom: 1rem;
  padding-top: 45px;
  max-width: 100%;
  object-fit: contain;
}

/* Contenedor del botón de inicio */
.buttoninicio {
  width: 100%;
  position: static;
  bottom: 0;
  left: 0;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Botón */
.button {
  display: inline-block;
  border-radius: 4px;
  background-color: #E5E4E6;
  border: none;
  color: #333;
  text-align: center;
  font-size: 0.875rem;
  padding: 13px;
  width: 150px;
  transition: all 0.5s;
  cursor: pointer;
  margin: 5px;
}

.button span {
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition: 0.5s;
}

.button span:after {
  content: '\00bb';
  position: absolute;
  opacity: 0;
  top: 0;
  right: -20px;
  transition: 0.5s;
}

.button:hover span {
  padding-right: 25px;
}

.button:hover span:after {
  opacity: 1;
  right: 0;
}

/* =========
 * MEDIA QUERIES (RESPONSIVIDAD DE TEXTO)
 * ========= */

/* Dispositivos medianos y pequeños (hasta 810px) */
@media screen and (max-width: 810px) {
  .grid-container {
    padding: 15px;
    gap: 15px;
  }

  div.transbox {
    margin: 20px auto; /* Mantener centrado */
    border-radius: 40px 15px;
  }

  /* Ajuste de tamaño de fuente para encabezados */
  h6 {
    font-size: 1.1rem;
  }

  h2 {
    font-size: 1.5rem;
  }
  
  h5 {
    font-size: 1.0rem;
  }
  
  /* Otras reglas */
  .buttoninicio .casita {
    display: none !important;
  }
}

/* Móviles pequeños (hasta 480px) */
@media screen and (max-width: 480px) {
  .grid-container {
    gap: 10px;
    padding: 10px;
  }

  div.transbox {
    margin: 15px auto; /* Mantener centrado */
    padding: 8px;
    width: 85%; /* Ajuste de ancho para móviles */
  }
  
  /* Ajuste de tamaño de fuente para encabezados (más pequeño) */
  h6 {
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1.3rem;
  }
  
  h5 {
    font-size: 0.85rem;
  }

  /* Otras reglas */
  .footer {
    padding-top: 1.5rem;
  }

  .logos2 {
    height: 80px;
    padding-top: 30px;
  }

  .buttoninicio {
    padding: 1.5rem 1rem;
  }
}