/* ===========================
   FICHAS TÉCNICAS Y RECETARIO
   =========================== */

/* Smooth scrolling para navegación */
html {
  scroll-behavior: smooth;
}

/* Estilos generales para las secciones */
#fichas-tecnicas,
#recetario-dinamico {
  scroll-margin-top: 80px; /* Compensa la navbar fixed */
}

/* Animaciones personalizadas */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mejoras en la navegación del dropdown */
.dropdown-menu {
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-radius: 8px;
  margin-top: 8px;
}

.dropdown-item {
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: #dc241c;
  color: white;
  transform: translateX(5px);
}

/* Estilos para cards de productos */
.product-card {
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.product-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Efectos para imágenes de productos */
.product-card img {
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.08);
}

/* Estilo para badges */
.badge {
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Modales responsivos */
@media (max-width: 992px) {
  .modal-xl {
    max-width: 90%;
  }
  
  .modal-body .row {
    flex-direction: column;
  }
  
  .modal-body .col-md-5,
  .modal-body .col-md-7 {
    max-width: 100%;
    flex: 0 0 100%;
  }
}

/* Navegación de tabs mejorada */
.nav-pills .nav-link {
  border-radius: 25px;
  margin: 0 8px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-pills .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.nav-pills .nav-link:hover::before {
  left: 100%;
}

/* Efectos de loading para imágenes */
.recipe-image,
.product-card img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Mejoras en los pasos de recetas */
.step-item {
  position: relative;
  padding-left: 60px;
}

.step-number {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #dc241c, #ff4444);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(220, 36, 28, 0.3);
}

/* Animación para ingredientes */
.ingredient-item {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.ingredient-item:nth-child(1) { animation-delay: 0.1s; }
.ingredient-item:nth-child(2) { animation-delay: 0.2s; }
.ingredient-item:nth-child(3) { animation-delay: 0.3s; }
.ingredient-item:nth-child(4) { animation-delay: 0.4s; }
.ingredient-item:nth-child(5) { animation-delay: 0.5s; }

/* Tooltip personalizado */
[data-bs-toggle="tooltip"] {
  position: relative;
}

/* Botones de compartir mejorados */
.btn-social {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-social::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.btn-social:hover::before {
  width: 100%;
  height: 100%;
}

/* QR Code styling */
#qr-code img {
  border: 3px solid #dc241c;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

#qr-code img:hover {
  transform: scale(1.1);
}

/* Mejoras en responsive */
@media (max-width: 768px) {
  .recipe-nav .nav-link {
    font-size: 0.85rem;
    padding: 8px 16px;
    margin: 2px;
  }
  
  .step-item {
    padding-left: 50px;
  }
  
  .step-number {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .modal-footer .btn {
    font-size: 0.85rem;
    padding: 8px 12px;
    margin: 2px;
  }
}

/* Efectos de parallax suave */
#recetario-dinamico {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Mejoras en accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible para navegación con teclado */
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid #dc241c;
  outline-offset: 2px;
}

/* Animación de carga para modales */
.modal.fade .modal-dialog {
  transform: translate(0, -50px);
  transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
  transform: translate(0, 0);
}

/* Estilos para impresión */
@media print {
  .modal,
  .btn,
  .nav-pills {
    display: none !important;
  }
  
  .recipe-content {
    page-break-inside: avoid;
  }
}

