/* ====== Estilos generales ====== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #111; /* Fondo oscuro elegante */
  color: #fff;      /* Texto blanco para contraste */
}

header {
  text-align: center;
  padding: 2rem;
}

/* ====== Navegación ====== */
nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  cursor: pointer;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.nav-links li a:hover,
nav a:hover {
  color: #f39c12;
}

main {
  padding: 2rem;
}

section {
  margin-bottom: 4rem;
}

/* ====== Galería de imágenes ====== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.grid img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  /* Optimización de rendimiento */
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

.grid img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Optimización para imágenes ocultas */
[data-fancybox][style*="display:none"] img {
  display: none !important;
}

/* Lazy loading para imágenes */
.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy.loaded {
  opacity: 1;
}

/* ====== Botón flotante de WhatsApp ====== */
.whatsapp-flotante {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  animation: pulse-animation 2s infinite;
}

.whatsapp-flotante:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  background-color: #128C7E;
}

.whatsapp-flotante i {
  transition: transform 0.3s ease;
}

.whatsapp-flotante:hover i {
  transform: rotate(25deg);
}

/* Animación de pulso llamativa */
@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  
  70% {
    box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
  }
  
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Animación adicional de rebote */
@keyframes bounce-animation {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Aplicar animación de rebote cada 4 segundos */
.whatsapp-flotante {
  animation: pulse-animation 2s infinite, bounce-animation 4s infinite;
}

/* ====== Footer ====== */
.footer {
  text-align: center;
  padding: 1rem;
  background: #222;
  margin-top: 3rem;
}

.footer__texto {
  margin: 0;
  color: #aaa;
}

.footer-enlace {
  color: #f39c12;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer-enlace:hover {
  color: #fff;
  text-decoration: underline;
}

/* ====== Formulario de contacto ====== */
.contact_me,
.enviarcorreo {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: bold;
  color: #f39c12;
  letter-spacing: 1px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: #1a1a1a;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(243, 156, 18, 0.2);
}

.contact-form label {
  font-weight: bold;
  font-size: 1rem;
  color: #f39c12;
  margin-bottom: 0.3rem;
}

.contact-form input,
.contact-form textarea {
  width: 96%;
  padding: 0.9rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #222;
  color: #fff;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 5px #f39c12;
  border: 1px solid #f39c12;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

.contact-form button {
  padding: 1rem;
  font-size: 1rem;
  background: #f39c12;
  color: #111;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.contact-form button:hover {
  background: #d35400;
  transform: scale(1.03);
}

/* ====== Contenedor de botones externos ====== */
.contact-actions {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

.whatsapp-btn,
.instagram-btn {
  display: inline-block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.whatsapp-btn {
  background: #25D366;
  color: #fff;
}

.whatsapp-btn:hover {
  background: #128C7E;
  transform: scale(1.03);
}

.instagram-btn {
  background: #E1306C;
  color: #fff;
  margin-bottom: 50px;
}

.instagram-btn:hover {
  background: #C13584;
  transform: scale(1.03);
}

/* ====== Videos en galería ====== */
.grid video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.grid video:hover {
  transform: scale(1.05);
}

/* ====== Menú hamburguesa ====== */
.navbar {
  position: relative;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  width: 40px;
  height: 30px;
  margin: 0 auto;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 4px;
  background: #fff;
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0;
}

/* ====== About Section Styling ====== */
.about-section {
  padding: 2rem;
  background: #111;
  color: #fff;
}

.about-card {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-block {
  flex: 1 1 500px;
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(243, 156, 18, 0.2);
  transition: transform 0.3s ease;
}

.about-block:hover {
  transform: scale(1.02);
}

.about-block h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #f39c12;
  text-align: center;
}

.about-focus {
  font-weight: bold;
  color: #f39c12;
  text-align: center;
  margin-bottom: 0.5rem;
}

.about-description {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.about-list {
  list-style: none;
  padding: 0;
  font-size: 1rem;
  line-height: 1.8;
}

.about-list li {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

/* ======= VENTANA ABOUT Responsive Design ====== */
@media (max-width: 768px) {
  .about-card {
    flex-direction: column;
    gap: 1.5rem;
  }

  .about-block {
    padding: 1.5rem;
  }

  .about-block h2 {
    font-size: 1.6rem;
  }

  .about-description {
    font-size: 0.95rem;
  }

  .about-list {
    font-size: 0.95rem;
  }
}

/* ====== Responsive Design ====== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #111;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    gap: 1rem;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .grid img {
    height: 500px;
  }

  main {
    padding: 1rem;
  }

  .contact-form {
    width: 100%;
    padding: 0 1rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 1rem;
  }

  .contact-form button {
    width: 100%;
  }

  .whatsapp-btn,
  .instagram-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  nav a {
    font-size: 1rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .grid img {
    height: 300px;
  }

  .contact-form label {
    font-size: 0.9rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.95rem;
  }

  .contact-form button {
    font-size: 0.95rem;
  }

  .whatsapp-btn,
  .instagram-btn {
    font-size: 0.85rem;
  }
}