/* Custom Styles for Coarpack */
/* Colores corporativos: Azules + Teal + Gris */

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Custom Gradient Text - Coarpack colors */
.gradient-text {
  background: linear-gradient(135deg, #1e40af 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #14b8a6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Custom Button Styles - Coarpack teal */
.btn-primary {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(20, 184, 166, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.3);
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

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

/* Coarpack Brand Accents */
.border-accent {
  border-color: #14b8a6;
}

.text-accent {
  color: #14b8a6;
}

.bg-accent {
  background-color: #14b8a6;
}

/* Pulse Animation for CTA */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.pulse-animate {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Typography */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* Print styles for labels */
@media print {
  nav, footer {
    display: none;
  }
  body {
    background: white;
  }
}

/* Lazy Loading Styles */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

img[data-src].loaded,
img:not([data-src]) {
  opacity: 1;
}

/* Placeholder mientras carga */
img[data-src]::before {
  content: '';
  display: block;
  padding-bottom: 66.67%; /* Aspect ratio 3:2 */
  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; }
}

/* Lightbox Styles */
#lightbox {
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
}

#lightbox img {
  animation: zoomIn 0.3s ease;
}

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

#lightbox button {
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-center;
}

#lightbox button:hover {
  background: rgba(20, 184, 166, 0.8);
  transform: scale(1.1);
}

/* Gallery hover cursor */
.gallery-image,
#galeria .group img {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover,
#galeria .group img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
