/*
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: 217 33% 17%;
  --card: 0 0% 100%;
  --card-foreground: 217 33% 17%;
  --popover: 0 0% 100%;
  --popover-foreground: 217 33% 17%;
  --primary: 211 100% 45%;
  --primary-foreground: 0 0% 100%;
  --primary-hover: 211 100% 38%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 217 33% 17%;
  --muted: 210 40% 96%;
  --muted-foreground: 217 20% 51%;
  --accent: 211 100% 45%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 211 100% 45%;
  --radius: 0.5rem;
  --news-blue: 211 100% 45%;
  --news-blue-dark: 211 100% 35%;
  --news-gray: 220 13% 96%;
  --news-text: 217 33% 17%;
  --gradient-primary: linear-gradient(135deg, hsl(211 100% 45%), hsl(211 100% 55%));
  --gradient-hero: linear-gradient(to right, hsl(211 100% 45% / 0.95), hsl(211 100% 35% / 0.95));
  --shadow-news: 0 4px 20px hsl(211 100% 45% / 0.1);
  --shadow-card: 0 2px 8px hsl(217 33% 17% / 0.08);
  --shadow-hover: 0 8px 30px hsl(211 100% 45% / 0.15);
}

.dark {
  --background: 217 33% 10%;
  --foreground: 0 0% 98%;
  --card: 217 33% 12%;
  --card-foreground: 0 0% 98%;
  --popover: 217 33% 12%;
  --popover-foreground: 0 0% 98%;
  --primary: 211 100% 50%;
  --primary-foreground: 0 0% 100%;
  --primary-hover: 211 100% 45%;
  --secondary: 217 33% 15%;
  --secondary-foreground: 0 0% 98%;
  --muted: 217 33% 15%;
  --muted-foreground: 217 20% 65%;
  --accent: 211 100% 50%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 63% 40%;
  --destructive-foreground: 0 0% 100%;
  --border: 217 33% 20%;
  --input: 217 33% 20%;
  --ring: 211 100% 50%;
  --news-blue: 211 100% 50%;
  --news-blue-dark: 211 100% 40%;
  --news-gray: 217 33% 15%;
  --news-text: 0 0% 98%;
  --gradient-primary: linear-gradient(135deg, hsl(211 100% 50%), hsl(211 100% 60%));
  --gradient-hero: linear-gradient(to right, hsl(211 100% 50% / 0.9), hsl(211 100% 40% / 0.9));
  --shadow-news: 0 4px 20px hsl(211 100% 50% / 0.2);
  --shadow-card: 0 2px 8px hsl(0 0% 0% / 0.3);
  --shadow-hover: 0 8px 30px hsl(211 100% 50% / 0.25);
}

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);
}
