/* =========================================================
   TECHTIPSEXPRESS7
   ARCHIVO: animations.css
   DESCRIPCIÓN:
   - Animaciones decorativas
   - Estados reveal al hacer scroll
   - Flotaciones suaves premium
   - Hover premium para tarjetas del blog
   ========================================================= */

/* =========================================================
   1. KEYFRAMES
   ========================================================= */
@keyframes floatSoft {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes floatSoftReverse {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(8px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 199, 0, 0.16);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(255, 199, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 199, 0, 0);
  }
}

@keyframes shineSweep {
  0% {
    transform: translateX(-130%) skewX(-18deg);
  }
  100% {
    transform: translateX(180%) skewX(-18deg);
  }
}

@keyframes fadeUpStatic {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes whatsappPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.65;
  }
  70% {
    transform: scale(1.18);
    opacity: 0;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   2. REVEAL BASE
   ========================================================= */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
}

.reveal-up {
  transform: translateY(36px);
}

.reveal-left {
  transform: translateX(-36px);
}

.reveal-right {
  transform: translateX(36px);
}

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* =========================================================
   3. ELEMENTOS CON ANIMACIÓN CONTINUA
   ========================================================= */
.hero-card--main {
  animation: floatSoft 6.6s ease-in-out infinite;
}

.floating-card--one {
  animation: floatSoft 5.8s ease-in-out infinite;
}

.floating-card--two {
  animation: floatSoftReverse 6.4s ease-in-out infinite;
}

.floating-card--three {
  animation: floatSoft 6.8s ease-in-out infinite;
}

.whatsapp-float {
  animation: glowPulse 2.6s infinite;
}

/* =========================================================
   4. EFECTOS PREMIUM DE BRILLO
   ========================================================= */
.btn--primary,
.service-card,
.feature-card,
.final-cta__box,
.hero-card--main,
.blog-card {
  position: relative;
  overflow: hidden;
}

.btn--primary::after,
.service-card::after,
.final-cta__box::after,
.blog-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 22%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
  opacity: 0;
  pointer-events: none;
}

.service-card:hover::after,
.final-cta__box:hover::after,
.btn--primary:hover::after,
.blog-card:hover::after {
  opacity: 1;
  animation: shineSweep 1s ease;
}

/* =========================================================
   5. ANIMACIÓN DE ENTRADA INICIAL HERO
   ========================================================= */
.hero-content .section-badge,
.hero-content .hero-title,
.hero-content .hero-text,
.hero-content .hero-points,
.hero-content .hero-actions {
  animation: fadeUpStatic 0.9s ease both;
}

.hero-content .hero-title {
  animation-delay: 0.08s;
}

.hero-content .hero-text {
  animation-delay: 0.16s;
}

.hero-content .hero-points {
  animation-delay: 0.24s;
}

.hero-content .hero-actions {
  animation-delay: 0.32s;
}

/* =========================================================
   6. ACCESIBILIDAD DE MOVIMIENTO REDUCIDO
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================================================
   7. BLOG CARDS Y ARTÍCULOS - ANIMACIONES PREMIUM
   ========================================================= */

/* Entrada suave de tarjetas */
.blog-card {
  animation: slideUp 0.5s ease-out both;
  transition:
    transform 0.4s cubic-bezier(.22, 1, .36, 1),
    box-shadow 0.4s cubic-bezier(.22, 1, .36, 1),
    border-color 0.4s ease,
    background 0.4s ease;
  will-change: transform, box-shadow;
}

.blog-card:nth-child(1) {
  animation-delay: 0.05s;
}

.blog-card:nth-child(2) {
  animation-delay: 0.1s;
}

.blog-card:nth-child(3) {
  animation-delay: 0.15s;
}

.blog-card:nth-child(4) {
  animation-delay: 0.2s;
}

.blog-card:nth-child(5) {
  animation-delay: 0.25s;
}

.blog-card:nth-child(6) {
  animation-delay: 0.3s;
}

/* Glow radial premium */
.blog-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(255, 199, 0, 0.18),
    transparent 58%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

/* Hover principal premium */
.blog-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 25px rgba(255, 199, 0, 0.12);
  border-color: rgba(255, 199, 0, 0.28);
}

.blog-card:hover::before {
  opacity: 1;
}

/* Asegurar contenido sobre capas decorativas */
.blog-card > * {
  position: relative;
  z-index: 1;
}

/* Imagen con zoom suave */
.blog-card__image,
.blog-card img {
  transition: transform 0.6s cubic-bezier(.22, 1, .36, 1);
  transform-origin: center center;
}

.blog-card:hover .blog-card__image,
.blog-card:hover img {
  transform: scale(1.06);
}

/* Categoría */
.blog-card__category {
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

.blog-card:hover .blog-card__category {
  color: #ffd95b;
}

/* Título */
.blog-card__title,
.blog-card h3 {
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.blog-card:hover .blog-card__title,
.blog-card:hover h3 {
  color: #ffc700;
}

/* Extracto */
.blog-card__excerpt {
  transition: color 0.3s ease;
}

.blog-card:hover .blog-card__excerpt {
  color: rgba(232, 234, 240, 0.92);
}

/* Link leer más */
.blog-card__link,
.blog-card a.btn,
.blog-card a[href*="blog/"] {
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.blog-card__link::after,
.blog-card a.btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: #ffc700;
  transition: width 0.3s ease;
}

.blog-card:hover .blog-card__link,
.blog-card:hover a.btn,
.blog-card:hover a[href*="blog/"] {
  color: #ffc700;
}

.blog-card:hover .blog-card__link::after,
.blog-card:hover a.btn::after {
  width: 100%;
}

/* =========================================================
   8. ARTÍCULO INDIVIDUAL - ANIMACIONES SUAVES
   ========================================================= */
.blog-post-cover__wrap {
  animation: fadeIn 0.6s ease-out forwards;
}

.blog-post-article,
.article-wrap,
.article-content {
  animation: slideUp 0.5s ease-out 0.2s both;
}

.blog-post-article h2,
.article-content h2 {
  opacity: 1;
  animation: slideUp 0.4s ease-out 0.3s both;
}

.blog-post-article p,
.article-content p {
  opacity: 1;
  animation: slideUp 0.4s ease-out 0.35s both;
}

.blog-post-article ul li,
.article-content ul li {
  opacity: 1;
  animation: slideUp 0.3s ease-out both;
}

.blog-post-article ul li:nth-child(1),
.article-content ul li:nth-child(1) {
  animation-delay: 0.4s;
}

.blog-post-article ul li:nth-child(2),
.article-content ul li:nth-child(2) {
  animation-delay: 0.42s;
}

.blog-post-article ul li:nth-child(3),
.article-content ul li:nth-child(3) {
  animation-delay: 0.44s;
}

.blog-post-article ul li:nth-child(4),
.article-content ul li:nth-child(4) {
  animation-delay: 0.46s;
}

.blog-post-article ul li:nth-child(5),
.article-content ul li:nth-child(5) {
  animation-delay: 0.48s;
}

/* CTA artículo */
.cta-block,
.blog-post-article > div[style*="background: linear-gradient"] {
  opacity: 0;
  animation: slideUp 0.5s ease-out 0.5s forwards;
}

/* Relacionados */
.related-section,
.related-articles {
  opacity: 0;
  animation: fadeIn 0.4s ease-out 0.6s forwards;
}

.related-card,
.related-grid li a {
  opacity: 0;
  animation: slideUp 0.4s ease-out both;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.related-card:nth-child(1),
.related-grid li:nth-child(1) a {
  animation-delay: 0.7s;
}

.related-card:nth-child(2),
.related-grid li:nth-child(2) a {
  animation-delay: 0.72s;
}

.related-card:nth-child(3),
.related-grid li:nth-child(3) a {
  animation-delay: 0.74s;
}

.related-card:hover,
.related-grid li a:hover {
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 199, 0, 0.14);
  transform: translateY(-4px);
}

/* Blog hero */
.blog-hero__content {
  opacity: 0;
  animation: slideUp 0.6s ease-out forwards;
}

.section-badge {
  animation: fadeUpStatic 0.5s ease both;
}

.section-title {
  animation: fadeUpStatic 0.5s ease 0.1s both;
}

.section-description {
  animation: fadeUpStatic 0.5s ease 0.2s both;
}

.article-meta {
  animation: fadeUpStatic 0.5s ease-out 0.3s both;
}

/* Toque premium en títulos internos */
.blog-post-article h2::before,
.article-content h2::before {
  animation: glowPulse 3s ease-in-out infinite;
} 
