/* ===== Reset básico ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #121212;
  color: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.5;
  width: 100%;
  min-height: 100vh;
  padding: 1rem;
}

/* ===== Encabezado premium ===== */
#introFotos {
  width: 100%;
  max-width: 900px;
  margin: 2rem auto 1.5rem auto; 
  text-align: center;
  padding: 2rem 1.5rem;
  backdrop-filter: blur(6px);
  border-radius: 12px;
}

.intro-container {
  max-width: 700px;
  margin: 0 auto;
}

.intro-container h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff; 
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  animation: fadeIn 1s ease forwards;
}

.intro-container p {
  font-size: 0.95rem;
  font-weight: 400;
  color: #ffffff; 
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  margin: 0;
  animation: fadeIn 1.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Formulario de subida - corrección inputs y file ===== */
form#fotoForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  width: 100%;          /* asegura que el contenido ocupe todo el contenedor */
}

form#fotoForm input[type="text"],
form#fotoForm input[type="file"] {
  width: 100%;           /* que ocupe todo el ancho del contenedor */
  padding: 12px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #444;
  background-color: #2a2a2a;
  color: #eee;
  box-sizing: border-box; /* asegura que padding no rompa el ancho */
}

form#fotoForm input::placeholder {
  color: #aaa;
}

form#fotoForm button {
  width: 100%;           /* que el botón tenga el mismo ancho que los inputs */
  padding: 12px;
  font-size: 1rem;
  background-color: #bd4c1c;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s, box-shadow 0.3s;
}

form#fotoForm button:hover {
  background-color: #a43f16;
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(189,76,28,0.5);
}


#mensajeExito {
  margin-top: 1rem;
  color: #4caf50;
  font-weight: 600;
  display: none;
}

/* ===== Galería / Swiper ===== */
#galeria {
  max-width: 1000px;
  width: 90%;
  margin: 2rem auto 4rem auto;
  text-align: center;
}

#galeria h3 {
  color: #bd4c1c;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  text-align: center;
}

/* Swiper slides */
.swiper-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  width: 100%; /* Swiper controla el tamaño */
}

.swiper-slide img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border-radius: 20px;
  box-sizing: border-box;
}

/* Overlay del nombre en esquina superior derecha */
.swiper-slide .nombre-overlay,
.swiper-slide p.nombre-overlay {
  position: absolute;
  top: 8px;
  right: 10px;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  display: inline-block;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.9;
  z-index: 12;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.swiper-slide:hover .nombre-overlay,
.swiper-slide:hover p.nombre-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Swiper controles */
.swiper-button-next,
.swiper-button-prev {
  color: #bd4c1c;
  transition: color 0.3s, transform 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  color: #a43f16;
  transform: scale(1.2);
}

.swiper-pagination-bullet {
  background-color: #bd4c1c;
  opacity: 0.8;
}

.swiper-pagination-bullet-active {
  background-color: #a43f16;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  #introFotos { padding: 1.8rem 1rem; }
  .swiper-slide img { max-height: 250px; }
}

@media (max-width: 768px) {
  #introFotos { padding: 1.5rem 1rem; }
  .swiper-slide img { max-height: 220px; }
}

@media (max-width: 480px) {
  #introFotos { padding: 1rem 0.8rem; }
  #subeFoto { padding: 1.5rem 1rem; }
  .swiper-slide img { max-height: 180px; }
  .intro-container h1 { font-size: 1.3rem; }
  .intro-container p { font-size: 0.9rem; }
}


 /* Botones flotantes modificados */
    .floating-socials {
      position: fixed;
      top: 50%;
      right: 10px;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 9999;
    }

    .floating-socials a img {
      width: 32px;
      height: 32px;
      transition: transform 0.3s ease, filter 0.3s ease;
    }

    .floating-socials a img:hover {
      transform: scale(1.2);
      filter: brightness(1.3);
    }

    @media (max-width: 480px) {
      .floating-socials {
        top: auto;
        bottom: 15px;
        right: 10px;
        flex-direction: row;
        transform: none;
      }
      .floating-socials a img {
        width: 28px;
        height: 28px;
      }
    }

    
    /* ===== Galería estilo Instagram ===== */
#galeria {
  max-width: 1200px;
  width: 90%;
  margin: 3rem auto 5rem auto;
}

#galeria h3 {
  color: #bd4c1c;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 1px;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.foto-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #222;
}

.foto-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.foto-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

/* Nombre del usuario */
.foto-item .nombre {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .galeria-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .galeria-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
  }
  .foto-item .nombre {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
}

/* ===== Redes flotantes adaptadas ===== */
.floating-socials {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.floating-socials a img {
  width: 30px;
  height: 30px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.floating-socials a img:hover {
  transform: scale(1.15);
  filter: brightness(1.3);
}

@media (max-width: 480px) {
  .floating-socials {
    top: auto;
    bottom: 15px;
    right: 10px;
    flex-direction: row;
    transform: none;
  }

  .floating-socials a img {
    width: 26px;
    height: 26px;
  }
}
