/* ----------------------------------------------------
   diegojurado.com - Design System & Modern Styles
   Identidad: Cubo Rubik + Ecosistema Cohesivo (Datos & Cuboademia)
   ---------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colores Oficiales Inspirados en el Cubo Rubik */
  --rubik-blue: #2563EB;
  --rubik-blue-hover: #1D4ED8;
  --rubik-red: #EF4444;
  --rubik-yellow: #F59E0B;
  --rubik-green: #10B981;
  --rubik-orange: #F97316;
  --rubik-white: #F8FAFC;

  /* AsignaciÃ³n de Sistema de Marca */
  --primary-indigo: var(--rubik-blue);
  --primary-indigo-hover: var(--rubik-blue-hover);
  --primary-indigo-glow: rgba(37, 99, 235, 0.25);
  
  --accent-amber: var(--rubik-yellow);
  --accent-orange: var(--rubik-orange);
  --accent-emerald: var(--rubik-green);

  /* Theme Defaults (Light Mode) */
  --bg-main: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-glass: rgba(255, 255, 255, 0.88);

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;

  --border-subtle: rgba(148, 163, 184, 0.25);
  --border-highlight: rgba(37, 99, 235, 0.4);

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-main: #0B0F19;
  --bg-surface: #131C2E;
  --bg-surface-elevated: #1E293B;
  --bg-glass: rgba(19, 28, 46, 0.88);

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-inverse: #0F172A;

  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-highlight: rgba(59, 130, 246, 0.4);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-indigo);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform var(--transition-fast);
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
  border-color: var(--primary-indigo);
}

.btn-cta-brand {
  background: linear-gradient(135deg, var(--rubik-blue), #1D4ED8);
  color: white;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px var(--primary-indigo-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-cta-brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Hero Section */
.hero-section {
  padding: 5rem 0 3.5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(245, 158, 11, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--rubik-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--rubik-blue), var(--rubik-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
}

.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.hero-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
}

.mini-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.badge-chip {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

/* Category Filter Tabs & Section Header Layout */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 3.2rem; /* Espaciado amplio y elegante entre botones y artÃ­culos */
}

.filter-tabs {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.tab-btn {
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.tab-btn i {
  font-size: 0.95rem;
}

.tab-btn:hover {
  color: var(--text-main);
  border-color: var(--rubik-blue);
  transform: translateY(-2px);
}

.tab-btn.active {
  background-color: var(--rubik-blue);
  color: white;
  border-color: var(--rubik-blue);
  box-shadow: 0 4px 14px var(--primary-indigo-glow);
}

/* Articles Grid */
.articles-section {
  padding: 5rem 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.2rem; /* Espaciado adecuado entre las tarjetas de artÃ­culos */
}

.article-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--rubik-blue);
  box-shadow: var(--shadow-md);
}

.article-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-category {
  color: var(--rubik-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-read-more {
  color: var(--rubik-blue);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Strategic CTA Banner */
.cta-banner-section {
  padding: 4rem 0;
}

.cta-card {
  background: linear-gradient(135deg, #0B0F19 0%, #1E293B 50%, #0F172A 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.cta-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 2;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--rubik-yellow);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
}

.cta-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 650px;
}

.cta-btn-action {
  background: linear-gradient(135deg, var(--rubik-blue), #1D4ED8);
  color: white;
  padding: 1rem 2.2rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px var(--primary-indigo-glow);
  transition: transform var(--transition-fast);
  white-space: nowrap;
  z-index: 2;
}

.cta-btn-action:hover {
  transform: translateY(-3px);
}

/* Modal de Lectura Enriquecido */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-surface);
  width: 90%;
  max-width: 820px;
  max-height: 88vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Selector Interactivo de 5 Estrellas (IluminaciÃ³n Visual) */
.stars-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.stars-row .star {
  font-size: 1.4rem;
  color: var(--border-subtle);
  transition: color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
  padding: 2px;
}

/* Estrellas Seleccionadas / Iluminadas en Amarillo Dorado */
.stars-row .star.star-filled,
.stars-row .star.star-hovered {
  color: #F59E0B !important;
  transform: scale(1.22);
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.5));
}

/* Social Share Bar */
.share-buttons-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.share-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform var(--transition-fast);
}

.share-btn:hover {
  transform: translateY(-2px);
}

.share-btn.facebook { background-color: #1877F2; }
.share-btn.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.share-btn.linkedin { background-color: #0A66C2; }
.share-btn.twitter { background-color: #000000; }

/* Comentarios Widget */
.comments-section-widget {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--border-subtle);
}

.comments-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.comment-input, .comment-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.comment-textarea {
  resize: vertical;
  min-height: 90px;
}

.comment-submit-btn {
  background: var(--rubik-blue);
  color: white;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  width: fit-content;
  align-self: flex-end;
  box-shadow: 0 4px 12px var(--primary-indigo-glow);
  transition: transform var(--transition-fast);
}

.comment-submit-btn:hover {
  transform: translateY(-2px);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-author-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.comment-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  text-align: center;
}

/* Responsive Queries */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .about-card { grid-template-columns: 1fr; text-align: center; }
  .about-card img { margin: 0 auto; }
  .cta-card { grid-template-columns: 1fr; padding: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .hero-title { font-size: 2.4rem; }
}

/* ----------------------------------------------------
   RESPONSIVE MEDIA QUERIES (M¨®viles & Tablets)
   ---------------------------------------------------- */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; padding: 2.5rem; }
}

@media (max-width: 768px) {
  .container {
    width: 94%;
    padding: 0 0.5rem;
  }

  .nav-wrapper {
    height: 64px;
  }

  .brand-logo span {
    font-size: 1.1rem;
  }

  .nav-menu {
    display: flex;
    gap: 0.8rem;
    font-size: 0.82rem;
  }

  .btn-cta-brand span {
    display: none;
  }

  .btn-cta-brand {
    padding: 0.55rem 0.9rem;
  }

  .hero-section {
    padding: 2.2rem 0 1.8rem 0;
  }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.2;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .about-card {
    grid-template-columns: 1fr !important;
    text-align: center;
    padding: 1.8rem 1.2rem !important;
  }

  .about-card img {
    margin: 0 auto;
    width: 140px !important;
    height: 140px !important;
  }

  .mini-badge-row {
    justify-content: center;
  }

  .articles-section {
    padding: 2.5rem 0;
  }

  .articles-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .filter-tabs {
    gap: 0.5rem;
  }

  .tab-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
  }

  .modal-container {
    width: 95%;
    max-height: 92vh;
    padding: 1.5rem 1.2rem;
    border-radius: var(--radius-md);
  }

  .modal-close-btn {
    top: 0.8rem;
    right: 0.8rem;
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .tab-btn {
    width: 100%;
    justify-content: center;
  }
}
