/*
Theme Name: Equacom News (React Replica)
Theme URI: https://equacom.news/
Author: Equacom Digital
Author URI: https://equacom.digital/
Description: Tema de WordPress que replica la apariencia actual de Equacom News hecha en React. Incluye estilos via Tailwind CDN y variables CSS para mantener el diseño.
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: equacom-news
Tags: news, magazine, responsive, tailwind
*/

/* Variables y utilidades mínimas (portadas desde src/index.css) */
:root {
  --background: 0 0% 100%;
  --foreground: 220 13% 13%;
  --card: 0 0% 100%;
  --card-foreground: 220 13% 13%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 13% 13%;
  --primary: 340 82% 52%;
  --primary-foreground: 0 0% 100%;
  --primary-hover: 340 82% 45%;
  --secondary: 186 100% 69%;
  --secondary-foreground: 220 13% 13%;
  --muted: 210 40% 96%;
  --muted-foreground: 220 9% 46%;
  --accent: 186 100% 69%;
  --accent-foreground: 220 13% 13%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 340 82% 52%;
  --radius: 0.5rem;
  --news-pink: 340 82% 52%;
  --news-cyan: 186 100% 69%;
  --news-gray: 220 13% 96%;
  --news-text: 220 13% 13%;
  --gradient-primary: linear-gradient(135deg, hsl(340 82% 52%), hsl(340 82% 62%));
  --gradient-accent: linear-gradient(135deg, hsl(186 100% 69%), hsl(186 100% 79%));
  --gradient-hero: linear-gradient(to right, hsl(340 82% 52% / 0.95), hsl(186 100% 69% / 0.95));
  --shadow-news: 0 4px 20px hsl(340 82% 52% / 0.15);
  --shadow-card: 0 2px 8px hsl(220 13% 13% / 0.08);
  --shadow-hover: 0 8px 30px hsl(340 82% 52% / 0.2);
}

.dark {
  --background: 220 13% 9%;
  --foreground: 0 0% 98%;
  --card: 220 13% 11%;
  --card-foreground: 0 0% 98%;
  --popover: 220 13% 11%;
  --popover-foreground: 0 0% 98%;
  --primary: 340 82% 58%;
  --primary-foreground: 0 0% 100%;
  --primary-hover: 340 82% 52%;
  --secondary: 186 100% 75%;
  --secondary-foreground: 220 13% 9%;
  --muted: 220 13% 15%;
  --muted-foreground: 220 9% 65%;
  --accent: 186 100% 75%;
  --accent-foreground: 220 13% 9%;
  --destructive: 0 63% 40%;
  --destructive-foreground: 0 0% 100%;
  --border: 220 13% 20%;
  --input: 220 13% 20%;
  --ring: 340 82% 58%;
  --news-pink: 340 82% 58%;
  --news-cyan: 186 100% 75%;
  --news-gray: 220 13% 15%;
  --news-text: 0 0% 98%;
  --gradient-primary: linear-gradient(135deg, hsl(340 82% 58%), hsl(340 82% 68%));
  --gradient-accent: linear-gradient(135deg, hsl(186 100% 75%), hsl(186 100% 85%));
  --gradient-hero: linear-gradient(to right, hsl(340 82% 58% / 0.9), hsl(186 100% 75% / 0.9));
  --shadow-news: 0 4px 20px hsl(340 82% 58% / 0.25);
  --shadow-card: 0 2px 8px hsl(0 0% 0% / 0.3);
  --shadow-hover: 0 8px 30px hsl(340 82% 58% / 0.3);
}

html { scroll-behavior: smooth; }
body { 
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif; 
  background-color: hsl(var(--background)); 
  color: hsl(var(--foreground));
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background-image: url('screenshot.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
}

.text-gradient { 
  -webkit-background-clip: text !important; 
  background-clip: text !important; 
  -webkit-text-fill-color: transparent !important;
  background-image: var(--gradient-primary) !important; 
  font-weight: 700;
}

.bg-gradient-primary { background-image: var(--gradient-primary); }

/* Animaciones mejoradas */
@keyframes fade-in { 
  from { opacity: 0; transform: translateY(20px); } 
  to { opacity: 1; transform: translateY(0); } 
}

@keyframes slide-up { 
  from { opacity: 0; transform: translateY(40px); } 
  to { opacity: 1; transform: translateY(0); } 
}

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

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

@keyframes scale-in { 
  from { opacity: 0; transform: scale(0.9); } 
  to { opacity: 1; transform: scale(1); } 
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px hsla(var(--primary), 0.3); }
  50% { box-shadow: 0 0 40px hsla(var(--primary), 0.6); }
}

/* Clases de animación */
.animate-fade-in { animation: fade-in 0.8s ease-out; }
.animate-slide-up { animation: slide-up 0.8s ease-out; }
.animate-slide-in-left { animation: slide-in-left 0.6s ease-out; }
.animate-slide-in-right { animation: slide-in-right 0.6s ease-out; }
.animate-scale-in { animation: scale-in 0.5s ease-out; }

/* Efectos hover mejorados */
.hover-lift { 
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
  cursor: pointer;
}
.hover-lift:hover { 
  transform: translateY(-8px) scale(1.02); 
  box-shadow: var(--shadow-hover); 
}

/* Efectos para tarjetas de noticias */
.news-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, hsla(var(--primary), 0.05), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.news-card:hover::before {
  opacity: 1;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.news-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Story link con underline animado */
.story-link {
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}

.story-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: hsl(var(--primary));
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Botones con efectos */
button, .button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover, .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsla(var(--primary), 0.3);
}

button:active, .button:active {
  transform: translateY(0);
}

/* Skeleton loading */
@keyframes skeleton-loading {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--muted-foreground) / 0.1) 50%, hsl(var(--muted)) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

/* Widgets de publicidad */
.widget-ad {
  overflow: hidden;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.widget-ad:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.vertical-ad {
  min-height: 600px;
  max-width: 300px;
  margin: 0 auto;
}

.horizontal-ad {
  min-height: 90px;
  max-width: 728px;
  margin: 0 auto;
}

.widget-ad img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.widget-ad:hover img {
  transform: scale(1.05);
}

/* Rotating images for cards and galleries */
.rotating-set { position: relative; }
.rotating-set .rotating-image { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.rotating-set .rotating-image.active { opacity: 1; }

/* Dark mode logo treatment */
.dark .custom-logo, .dark .site-logo img { filter: brightness(0) invert(1); }

/* Breaking News Scroll Animation */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.breaking-news-scroll {
  animation: scroll 30s linear infinite;
}

.breaking-news-scroll:hover {
  animation-play-state: paused;
}

/* Enhanced news card styling - Ecomatin style */
.news-card {
  background: hsl(var(--card));
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid hsl(var(--border));
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px hsl(var(--primary) / 0.2);
  border-color: hsl(var(--primary));
}

.news-card .category-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.news-card:hover .category-badge {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  transform: scale(1.05);
}

/* Grid layout improvements */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Smooth transitions for all interactive elements */
a, button, .hover-lift, .story-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced gradient effects */
.bg-gradient-accent {
  background-image: var(--gradient-accent);
}

/* Better spacing and typography */
.text-gradient-accent {
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-image: var(--gradient-accent) !important;
  font-weight: 700;
}
