/* Estilos Globales */
body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40vh;
  overflow-x: hidden; /* Evita scroll horizontal */
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("patio.jpg") center/cover no-repeat;
  opacity: 0.3;
  z-index: -1;
}

/* Contenedor Adaptable */
.contenedor {
  display: flex;
  flex-wrap: wrap; /* Permite que bajen si no caben */
  justify-content: center;
  gap: 20px; /* Reducido para pantallas pequeñas */
  padding: 10px;
  width: 100%;
}

/* Banderín Optimizado */
.banderin {
  width: 140px; /* Ligeramente más estrecho para versatilidad */
  height: 450px; /* Altura más balanceada */
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid gold;
  box-shadow: 0 0 12px gold;
}

/* Colores de fondo */
/*
.banderin:nth-child(1) { background: #3177ce; }
.banderin:nth-child(2) { background: #e39422; }
.banderin:nth-child(3) { background: #3ec43e; }
*/

/* Colores de fondo diferentes */
    .banderin:nth-child(1) {
      background: #e39422; /* naranja suave */
     
    }
    .banderin:nth-child(2) {
      background: #3ec43e; /* verde pastel */
      
    }
    .banderin:nth-child(3) {
      background: #3177ce; /* azul claro */
     
    }




/* Texto Vertical */
.banderin span {
  position: absolute;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: clamp(18px, 4vw, 24px); /* Tamaño de fuente fluido */
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none; /* Evita que el texto interfiera con el hover */
}

/* Imágenes */
/*
.banderin img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inherit;
  transition: opacity 0.4s ease, transform 0.5s ease;
  opacity: 0;
  z-index: 1;
}
*/
/* ... (Mantenemos el código anterior de body y contenedor) ... */

.banderin img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  /* CLAVE: Mantiene proporción y llena el espacio */
  object-fit: cover; 
  /* Asegura que la imagen se centre dentro del banderín */
  object-position: center; 
  
  /* Recorta la imagen con la misma forma del banderín */
  clip-path: inherit; 
  
  transition: opacity 0.4s ease, transform 0.6s ease;
  opacity: 0;
  z-index: 1;
  
  /* Mejora el efecto visual al hacer zoom */
  transform-origin: center center;
}


/* ... (Mantenemos las Media Queries anteriores) ... */





/* Efectos Hover */
.banderin:hover {
  transform: translateY(15px);
  box-shadow: 0 0 25px gold;
}

.banderin:hover span {
  opacity: 0;
}

.banderin:hover img {
  opacity: 1;
  /*transform: scale(1.1); /* Efecto de zoom suave */
}

/* --- MEDIA QUERIES (RESPONSIVE) --- */

/* Tablets (pantallas medianas) */
@media (max-width: 768px) {
  .contenedor {
    gap: 15px;
  }
  .banderin {
    width: 120px;
    height: 380px;
  }
}

/* Móviles (pantallas pequeñas) */
@media (max-width: 480px) {
  .contenedor {
    gap: 10px;
  }
  .banderin {
    width: 30%; /* Tres banderines caben en una fila */
    height: 300px;
    min-width: 100px;
  }
  .banderin span {
    font-size: 16px;
    letter-spacing: -2px; /* Ajuste para textos largos */
  }
}