* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  scroll-behavior: smooth;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 1000;
  flex-wrap: wrap;
}

header .logo img {
  max-height: 60px;
  height: auto;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

header nav a {
  color: rgb(0, 0, 0);
  text-decoration: none;
  font-weight: 600;
}

.hero {
  height: 100vh;
  overflow: hidden;
  position: relative;
  margin-top: 80px; /* espacio por header fijo */
}

.slider {
  position: relative;
  height: 100%;
  width: 100%;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 3s ease;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caption {
  position: absolute;
  bottom: 20%;
  left: 10%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: 2rem; /* tamaño para escritorio */
  white-space: nowrap;
}

.section {
  padding: 4rem 2rem;
  text-align: center;
  margin-top: 2rem;
}

.cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px;
}

.card {
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 280px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
  background-color: #ffffff;
}

.gallery img {
  width: 100%;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

.gallery-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.gallery-item {
  position: relative;
  width: 350px;
  height: 250px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.overlay {
  position: absolute;
  bottom: 50%;
  left: 0;
  width: 100%;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px 0;
  transform: translateY(50%);
  font-weight: bold;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

footer {
  background: #111;
  color: white;
  text-align: center;
  padding: 2rem;
}

footer a {
  color: #f9c349;
  margin: 0 0.5rem;
  text-decoration: none;
  font-size: 1.2rem;
}

/* BOTONES FLOTANTES - WHATSAPP, FACEBOOK, INSTAGRAM */
.whatsapp-float,
.facebook-float,
.instagram-float {
  position: fixed;
  right: 20px;          /* alineados a la derecha */
  width: 50px;
  height: 50px;
  z-index: 1000;
  transition: transform 0.3s ease;
  margin-bottom: 10px;  /* espacio entre botones */
}

.whatsapp-float {
  bottom: 20px;
}

.facebook-float {
  bottom: 80px; /* 20 + 50 + 10 */
}

.instagram-float {
  bottom: 140px; /* 80 + 50 + 10 */
}

.social-float img,
.whatsapp-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.social-float:hover,
.whatsapp-float img:hover {
  transform: scale(1.1);
}

/* FORMULARIO CONTACTO */
.contacto form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contacto input,
.contacto textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contacto button {
  padding: 0.8rem;
  background-color: #222;
  color: white;
  border: none;
  border-radius: 5px;
}

/* ======== RESPONSIVE STYLES ======== */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .caption {
    font-size: 1rem !important;       /* texto más pequeño en móvil */
    left: 5% !important;
    bottom: 8% !important;
    padding: 0.3rem 0.6rem !important;
    max-width: 90vw !important;       /* no sobrepasa ancho de pantalla */
    white-space: normal !important;   /* permite saltos de línea */
  }

  .gallery-item {
    width: 100%;
    height: auto;
  }

  .gallery-cards {
    padding: 10px;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  .section {
    padding: 2rem 1rem;
  }

  /* Ajuste botones flotantes en móvil */
  .whatsapp-float,
  .facebook-float,
  .instagram-float {
    width: 40px;
    height: 40px;
    right: 10px;
    margin-bottom: 8px;
  }

  .whatsapp-float {
    bottom: 15px;
  }

  .facebook-float {
    bottom: 63px; /* 15 + 40 + 8 */
  }

  .instagram-float {
    bottom: 111px; /* 63 + 40 + 8 */
  }

  .hero {
    height: 60vh;
  }

  .slide img {
    object-position: center top;
  }
  /* ===== BOTONES FLOTANTES UNIVERSALES ===== */
.social-float {
  position: fixed;
  right: 15px;
  width: 50px;
  height: 50px;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.social-float img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Posición individual de cada botón en escritorio */
.instagram-float { bottom: 140px; }
.facebook-float  { bottom: 80px; }
.whatsapp-float  { bottom: 20px; }

/* ===== AJUSTES RESPONSIVOS PARA MÓVILES ===== */
@media (max-width: 768px) {
  .social-float {
    right: 10px;
    width: 45px;
    height: 45px;
  }

  .instagram-float { bottom: 110px; }
  .facebook-float  { bottom: 60px; }
  .whatsapp-float  { bottom: 10px; }
}
}
