/*
Theme Name: Sergio Ávila Premium
Theme URI: https://sergioavilabolsa.com/
Author: Sergio Ávila
Author URI: https://sergioavilabolsa.com/
Description: Tema premium a medida para analista financiero, con un diseño Dark Mode enfocado en autoridad, conversión y alta legibilidad para artículos automatizados.
Version: 1.0.0
Text Domain: sergiopremium
*/

:root {
  /* Colors */
  --bg-dark: #0a0f16;
  --bg-card: #131c26;
  --bg-card-hover: #1c2733;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-gold: #fbbf24;
  --accent-gold-hover: #f59e0b;
  --accent-blue: #3b82f6;
  
  /* Layout */
  --container-width: 1200px;
  --border-radius: 12px;
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-gold-hover);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 600;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: var(--accent-gold);
  color: #000;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-gold-hover);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-gold);
}

/* Header */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  background-color: rgba(10, 15, 22, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.site-logo span {
  color: var(--accent-gold);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: #fff;
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

/* Subte gradient background */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(10, 15, 22, 0) 70%);
  z-index: -1;
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 4rem;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 90%;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-image-wrapper {
  position: relative;
}

.hero-image {
  border-radius: var(--border-radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section Title */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.section-title span {
  color: var(--accent-gold);
}

/* Cards / Latest Articles */
.latest-analysis {
  padding: 6rem 0;
  background-color: #0c121b;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(251, 191, 36, 0.2);
}

.article-thumb {
  height: 200px;
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-thumb img {
  transform: scale(1.05);
}

.article-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.article-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.article-title a {
  color: #fff;
}

.article-title a:hover {
  color: var(--accent-gold);
}

.article-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* About Section */
.about-section {
  padding: 6rem 0;
  position: relative;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  flex: 1;
}

.stat-num {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  color: var(--accent-gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Newsletter CTA */
.newsletter-cta {
  padding: 5rem 0;
  background: linear-gradient(180deg, #0c121b 0%, var(--bg-dark) 100%);
}

.cta-box {
  background: linear-gradient(135deg, rgba(19, 28, 38, 0.8) 0%, rgba(10, 15, 22, 0.9) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  padding: 4rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
}

.cta-box h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.site-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background-color: #05080c;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-about p {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-widget h4 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-widget ul {
  list-style: none;
}

.footer-widget li {
  margin-bottom: 0.8rem;
}

.footer-widget a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-widget a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* SINGLE POST STYLES (Optimized for Automated Articles) */
.single-header {
  padding: 4rem 0 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.single-category {
  color: var(--accent-gold);
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  display: block;
}

.single-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.single-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.single-thumb {
  max-width: 1000px;
  margin: 0 auto 3rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.single-content {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.single-content p {
  margin-bottom: 1.8rem;
  color: #cbd5e1;
}

.single-content h2 {
  font-size: 2rem;
  margin: 3rem 0 1.5rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.single-content h3 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--accent-gold);
}

.single-content ul {
  margin-bottom: 2rem;
  padding-left: 0;
  list-style: none;
}

.single-content li {
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 3px solid var(--accent-blue);
  color: #e2e8f0;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-inner, .about-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .hero-content p {
    margin: 0 auto 2.5rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-about p {
    margin: 1rem auto;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .single-title {
    font-size: 2rem;
  }
}
