/* Base styles */
:root {
  /* Color palette */
  --color-primary: #5a9090;
  --color-accent: #f05338;
  --color-accent-light: #ff8e7d;
  --color-text: #2d2d2d;
  --color-text-light: #5b6d6d;
  --color-background: #ffffff;
  --color-border: #d9d9d9;
  --color-light-gray: #f1f1f1;
  --color-charts-bg: #fafafa;

  /* Chart category colors - DOCUMENTED */
  --color-economy: #19807e;
  --color-immigration: #f05338;
  --color-social-security: #124675;
  --color-health: #ff00bb;
  --color-education: #720d00;
  --color-foreign: #8b5cf6;

  /* Blog specific colors - UPDATED */
  --color-blog-category: #f05338;
  --color-blog-title: #19807e; /* Updated color */
  --color-blog-author: #939393; /* Updated color */
  --color-blog-text: #2d2d2d; /* Updated color */

  /* Typography */
  --font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Fluid spacing - Simplified */
  --space-xs: clamp(0.5rem, 2vw, 0.75rem);
  --space-sm: clamp(0.75rem, 3vw, 1rem);
  --space-md: clamp(1rem, 4vw, 1.5rem);
  --space-lg: clamp(1.5rem, 5vw, 2.5rem);
  --space-xl: clamp(2rem, 6vw, 4rem);

  /* Fluid typography - Simplified */
  --text-sm: clamp(0.875rem, 2vw, 1rem);
  --text-md: clamp(1rem, 2.5vw, 1.25rem);
  --text-lg: clamp(1.25rem, 3vw, 1.75rem);
  --text-xl: clamp(1.5rem, 4vw, 2.25rem);
  --text-2xl: clamp(1.75rem, 5vw, 3rem);

  /* Border radius */
  --radius-md: 8px;
  --radius-sm: 7px;
  --radius-blog: 5px;

  /* Transitions */
  --transition-normal: 0.3s ease;

  /* Shadows */
  --shadow-sm: 1px 2px 2px 0px rgba(0, 0, 0, 0.3);
  --shadow-sm-active: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
  --shadow-blog-card: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Header font override - maintain system font */
.header,
.header *,
.logo,
.logo *,
.nav-link,
.menu-toggle,
.menu-close,
.mobile-menu,
.mobile-menu * {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif !important;
}

/* Footer font override - maintain system font */
.footer,
.footer *,
.footer-nav-item,
.footer-social,
.footer-copyright,
.footer-copyright-desktop {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif !important;
}

/* Blog section - ensure Helvetica Neue */
.blog,
.blog *,
.blog-card,
.blog-card *,
.blog-category,
.blog-author,
.blog-author-name,
.blog-author-date,
.blog-card-title,
.blog-card-text {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

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

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

body {
  font-family: var(--font-family);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul,
ol {
  list-style: none;
}

/* Container - Modified to be wider in the hero section */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
  box-sizing: border-box;
}

/* Specific container for the hero - wider */
.hero .container {
  max-width: 1400px; /* Increased to prevent the title from splitting into two lines */
}

/* Main content */
main {
  flex: 1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
  text-align: center;
}

/* H2 Title Style - Reusable class for consistent title styling */
.h2-for-titles-style {
  color: #115151;
  font-weight: 500; /* medium weight */
  font-size: var(--text-xl);
  margin-bottom: 2em; /* Fixed spacing of 2em */
  text-align: center;
  margin-top: 0;
}

/* Section Title Styling - Future use, recyclable for other section titles */
.section-title,
.charts-section h2,
.blog h2,
.content h2 {
  color: #115151;
  font-weight: 500; /* medium weight */
  font-size: var(--text-xl);
  margin-bottom: 2em; /* Fixed spacing of 2em */
  text-align: center;
}

/* Override default h2 styling for sections that use the new title style */
.charts-section h2 {
  color: #115151;
  font-weight: 500;
  margin-top: 0; /* Removed margin-top since we now use padding in the section */
  margin-bottom: 2em; /* Fixed spacing of 2em */
}

/* Blog section title styling - matches charts section */
.blog h2 {
  color: #115151;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 2em; /* Fixed spacing of 2em */
}

h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: var(--text-md);
  margin-bottom: var(--space-sm);
}

h5 {
  font-size: var(--text-sm);
  margin-bottom: var(--space-xs);
}

/* Chart Card Title Styling - Future use, recyclable for chart titles */
.chart-card h4,
.chart-main-card h4 {
  color: #4d4f4f;
  font-weight: 500; /* medium weight */
  font-size: var(--text-md);
  margin-bottom: 0.5rem; /* Reduced margin */
  margin-top: 0;
}

/* Chart Title Styling - Specific for chart titles */
.grid-sixty-thirty-left h5,
.chart-title-main {
  color: #19807e !important;
  font-weight: 500;
  font-size: var(--text-sm);
  margin-bottom: 1rem !important;
  margin-top: 0;
  padding: 0;
}

/* NEW: Chart Section H4 Styling - Specific for chart section titles */
.grid-sixty-thirty-column h4,
.chart-section-title {
  /* Remove these styles as we're now using h5 */
}

/* Chart column title hover effect (only for the first column) */
/*.grid-sixty-thirty-column:first-child h5:hover {
  color: #115151 !important;
}*/

p {
  margin-bottom: var(--space-md);
}

/* Geometric Background */
.geometric-bg {
  background: url("https://galaxina.mx/politicker/test-img/testing-banner-1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  color: var(--color-background);
}

/* ===== REUSABLE BASIC BUTTONS ===== */
/* basic-button-1: Main button with colored background and elevation effect */
/* used in homepage buttons */
.basic-button-1 {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-size: var(--text-sm);
  background-color: var(--color-accent);
  color: var(--color-background);
  box-shadow: var(--shadow-sm);
}

.basic-button-1:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-2px);
}

.basic-button-1:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm-active);
}

/* ===== BASIC TITLE STYLES ===== */
/* basic-h2-style: Left-aligned h2 title */
.basic-h2-style {
  color: #115151;
  font-weight: 500;
  font-size: var(--text-xl);
  margin-bottom: 2em;
  text-align: left;
}

/* basic-button-2: Secondary button with border and color change on hover */
.basic-button-2 {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 400;
  font-size: 0.65em;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 0.8px solid #9e534a;
  background-color: #ffffff;
  color: #9e534a;
  box-shadow: var(--shadow-sm);
  outline: none;
}

.basic-button-2:hover {
  background-color: #9e534a;
  color: #ffffff;
  cursor: pointer;
}

.basic-button-2:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm-active);
}

/* Hero Section */
.hero {
  padding: var(--space-xl) 0;
  position: relative;
  z-index: 1;
}

/* Hero Title Styling - Updated for h2 with organic background */
.hero-title {
  font-size: var(--text-xl); /* Reduced size for h2 */
  font-weight: 500; /* Medium weight */
  background-color: rgba(45, 45, 45, 0.8);
  padding: 0.2rem 0.4rem; /* Further reduced padding */
  border-radius: 2px;
  display: inline; /* Inline for organic background */
  line-height: 1.3; /* Tighter line-height */
  margin-bottom: 0; /* Completely removed */
  margin-top: 0;
  text-align: left;
  color: var(--color-background);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow: 0.2rem 0 0 rgba(45, 45, 45, 0.8), -0.2rem 0 0 rgba(45, 45, 45, 0.8);
}

/* Hero Description Styling - Adjusted for organic background and less space */
.hero-description {
  font-size: calc(var(--text-md) - 1pt); /* Reduced size */
  margin-bottom: var(--space-lg);
  margin-top: 0.1rem; /* Minimal space */
  background-color: rgba(45, 45, 45, 0.8);
  padding: 0.2rem 0.4rem; /* Further reduced padding */
  border-radius: 2px;
  display: inline; /* Inline for organic background */
  line-height: 1.5; /* Adjusted line-height */
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: var(--color-background);
  box-shadow: 0.2rem 0 0 rgba(45, 45, 45, 0.8), -0.2rem 0 0 rgba(45, 45, 45, 0.8);
}

/* Hero content container - adjusted for better spacing */
.hero-content {
  text-align: left;
  position: relative;
  z-index: 2;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ===== REUSABLE TWO-COLUMN GRID SYSTEM ===== */
/* Future use - Recyclable for any two-column layout across pages */

.grid-two-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2em;
  margin-bottom: 2em;
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* Two-column layout from 1000px to avoid compression */
@media (min-width: 1000px) {
  .grid-two-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 2em;
    max-width: 1200px;
  }
}

/* Maintain single column until 999px to avoid compression */
@media (max-width: 999px) {
  .grid-two-columns {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}

/* Two-column grid items - base styling for cards/items within the grid */
.grid-two-columns-item {
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 0.9rem; /* Cambiado de var(--space-md) a 0.9rem */
  border: 1px solid var(--color-border);
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 300px;
  box-sizing: border-box;
}

/* Responsive adjustments for two-column grid items */
@media (min-width: 1000px) {
  .grid-two-columns-item {
    min-width: 400px;
  }
}

@media (max-width: 999px) {
  .grid-two-columns-item {
    min-width: 300px;
    max-width: 100%;
  }
}

/* ===== REUSABLE 60%-30% GRID SYSTEM ===== */
/* Future use - Recyclable for 60%-30% layout across pages */

.grid-sixty-thirty {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2em;
  margin-bottom: 2em;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* 60%-30% layout from 728px */
@media (min-width: 728px) {
  .grid-sixty-thirty {
    grid-template-columns: 60% 30%;
    gap: 2em;
    align-items: stretch;
  }
}

/* Maintain single column until 727px */
@media (max-width: 727px) {
  .grid-sixty-thirty {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}

/* 60%-30% grid items - base styling for cards/items within the grid */
.grid-sixty-thirty-item {
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 0.9rem; /* Cambiado de var(--space-md) a 0.9rem */
  border: 1px solid var(--color-border);
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Left column (60%) specific styling */
.grid-sixty-thirty-left {
  /* Inherits from grid-sixty-thirty-item */
}

/* Right column (30%) specific styling */
.grid-sixty-thirty-right {
  /* Inherits from grid-sixty-thirty-item */
}

/* New column wrapper for titles outside containers */
.grid-sixty-thirty-column {
  display: flex;
  flex-direction: column;
}

/* Chart hover effects - RESTORED AND CORRECTED */
.grid-sixty-thirty-left {
  cursor: pointer;
  transition: all 0.3s ease;
}

.grid-sixty-thirty-left:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.grid-sixty-thirty-left:active {
  transform: scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.1s ease;
}

.grid-sixty-thirty-left h5:hover {
  color: #115151 !important;
}

/* Right column (30%) hover effects - NEW */
.grid-sixty-thirty-right {
  cursor: pointer;
  transition: all 0.3s ease;
}

.grid-sixty-thirty-right:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.grid-sixty-thirty-right:active {
  transform: scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.1s ease;
}

.grid-sixty-thirty-right h5:hover {
  color: #115151 !important;
}

/* Remove the previous styles that disabled interactivity */
/* .grid-sixty-thirty-right {
  cursor: default;
}

.grid-sixty-thirty-right h5 {
  cursor: default;
} */

/* ===== HOMEPAGE CATEGORIES STYLING (MOVED FROM homepage-categories-panel) ===== */
.grid-sixty-thirty-right {
  background-color: #ffffff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Categories Panel Title - Match chart title */
.categories-panel-title {
  color: #19807e !important;
  font-weight: 500;
  font-size: var(--text-sm) !important;
  margin-bottom: 1rem !important;
  margin-top: 0;
  text-align: center; /* Changed from left to center */
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.grid-sixty-thirty-right .categories-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-md);
  padding: 0; /* Remove any padding */
  align-items: center; /* Center the list items */
  width: 100%; /* Ensure full width */
}

.grid-sixty-thirty-right .explore-more-btn {
  background-color: var(--color-accent);
  color: var(--color-background);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
}

.grid-sixty-thirty-right .explore-more-btn:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-2px);
}

.grid-sixty-thirty-right .explore-more-btn:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm-active);
}

/* Fix uneven margins in categories list */
.category-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #d9d9d9;
  margin: 0; /* Remove any margin */
  width: 90%; /* Set width to less than 100% to create centered appearance */
  max-width: 300px; /* Limit maximum width */
}

.category-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  padding-right: 1rem; /* Add consistent right padding */
  min-width: 0; /* Allow text to shrink */
}

.category-name {
  font-size: 0.875rem;
  color: var(--color-text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  flex: 1;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.category-value {
  font-size: 0.875rem;
  color: var(--color-text-light);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  flex-shrink: 0; /* Prevent shrinking */
  text-align: right;
  min-width: 50px; /* Ensure minimum space for values */
}

/* Ensure consistent padding in categories list container */
.categories-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-md);
  padding: 0; /* Remove any padding */
}

/* Placeholder styling for right column content */
.grid-sixty-thirty-placeholder {
  background-color: #d3d3d3;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  color: #666;
  font-size: var(--text-sm);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive adjustments for 60%-30% grid items - UPDATED HEIGHTS */
/* Single column breakpoints: 320px, 390px, 430px, 500px, 620px */
@media (max-width: 727px) {
  .grid-sixty-thirty-item {
    min-height: auto; /* Altura automática en una columna */
    max-width: 100%;
  }

  .grid-sixty-thirty-left .chart-container {
    height: 280px !important; /* Reducido de 300px a 280px */
    min-height: 280px !important;
    max-height: 280px !important;
  }

  .grid-sixty-thirty-right .homepage-categories-panel {
    min-height: auto; /* Altura automática en una columna */
  }
}

/* Two column breakpoints: 728px, 1024px, 1100px, 1440px */
@media (min-width: 728px) {
  .grid-sixty-thirty-item {
    min-height: 320px; /* Reducido de 400px a 320px */
    align-items: flex-start;
  }

  .grid-sixty-thirty-left .chart-container {
    height: 280px !important; /* Reducido de 300px a 280px */
    min-height: 280px !important;
    max-height: 280px !important;
    flex: none;
  }

  .grid-sixty-thirty-right .homepage-categories-panel {
    height: 350px; /* Altura fija específica */
    min-height: 350px;
    max-height: 350px; /* Prevenir estiramiento */
  }
}

/* Charts Section */
.charts-section {
  padding: 2em 0 2em 0; /* Adjusted: added top padding of 2em */
  background-color: #ffffff; /* Cambiado de var(--color-charts-bg) a #ffffff */
  position: relative; /* Added for shadow positioning */
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.05); /* Subtle shadow - increased by 1px */
  z-index: 1; /* Ensure shadow appears above next section */
}

/* Modify the existing style for the charts section */
.charts-section h2 {
  color: #115151;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 2em;
  text-align: left; /* Changed from center to left */
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2em; /* Fixed spacing of 2em between charts */
  margin-bottom: 2em; /* Fixed spacing of 2em between grid and button */
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.chart-card {
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 300px; /* Add minimum width */
}

/* Base Chart Container Styles - Enhanced overflow prevention */
.chart-container {
  position: relative;
  width: 100%;
  min-height: 250px;
  height: 300px;
  margin-bottom: 1rem;
  background-color: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden; /* Prevent overflow */
  box-sizing: border-box;
}

/* Chart Canvas Element - Enhanced responsive constraints */
.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border-radius: var(--radius-md);
  box-sizing: border-box;
}

/* Chart Actions Container - Future use, recyclable for chart button layouts */
.chart-actions {
  display: flex;
  justify-content: flex-end; /* Align to right */
  margin-top: auto; /* Push to bottom of card */
  padding-top: 0.5rem;
}

.charts-action {
  text-align: center;
  margin-top: 0; /* Reset margin-top since charts-grid has margin-bottom */
  margin-bottom: calc(2em + 2%); /* Increased by 2% from original 2em */
}

/* HOME INSIGHTS CTA BANNER SECTION - Vertical layout */
.home-insights-cta-banner {
  padding: var(--space-xl) 0;
  background-color: #19807e;
  color: #ffffff;
  text-align: center;
}

.home-insights-cta-banner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
}

.home-insights-cta-banner-icon {
  width: 48px;
  height: 48px;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.home-insights-cta-banner-icon svg {
  width: 100%;
  height: 100%;
}

.home-insights-cta-banner-title {
  font-size: var(--text-lg);
  font-weight: 500;
  color: #ffffff !important;
  margin: 0;
  text-align: center;
  margin-bottom: 0.5rem;
}

.home-insights-cta-banner-button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-size: var(--text-sm);
  background-color: var(--color-accent);
  color: var(--color-background);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.home-insights-cta-banner-button:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-2px);
}

.home-insights-cta-banner-button:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm-active);
}

/* Methodology Section - UPDATED COLORS */
.methodology {
  padding: var(--space-xl) 0;
  background-color: #dbdbdb; /* Changed from var(--color-primary) to #dbdbdb */
  color: #2d2d2d; /* Changed from var(--color-background) to #2d2d2d */
  text-align: center;
  position: relative;
  z-index: 0;
}

.methodology-icon {
  width: clamp(48px, 8vw, 120px);
  height: clamp(48px, 8vw, 120px);
  margin: 0 auto var(--space-md);
  color: #2d2d2d; /* Added color for the icon */
}

.methodology-title {
  margin-bottom: var(--space-sm);
  font-size: var(--text-lg);
  color: #2d2d2d; /* Changed from var(--color-background) to #2d2d2d */
}

.methodology-subtitle {
  margin-bottom: var(--space-md);
  font-size: var(--text-md);
  color: #2d2d2d; /* Changed color and removed opacity */
}

.methodology-text {
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  font-size: var(--text-sm);
  color: #2d2d2d; /* Changed color and removed opacity */
}

/* ===== BLOG SECTION - COMPLETELY REDESIGNED ===== */
.blog {
  padding: 2em 0 2em 0;
  background-color: var(--color-background);
}

.blog-title {
  margin-bottom: var(--space-lg);
}

/* Blog Grid - Base (Mobile First) */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem; /* Reduced gap for tighter spacing */
  margin-bottom: 2em;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Blog Card Base Styles */
.blog-card {
  width: 100%;
  background-color: var(--color-background);
  border-radius: var(--radius-blog);
  border: 1px solid var(--color-light-gray);
  box-shadow: var(--shadow-blog-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 0.75rem;
  min-height: 350px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Blog Image - Vertical Layout (Default) */
.blog-image {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: var(--radius-blog);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background-color: var(--color-light-gray);
  position: relative;
  flex-shrink: 0;
}

.blog-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-blog);
}

/* Blog Content */
.blog-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Blog Category */
.blog-category {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-blog-category);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Blog Author Section - Simplified horizontal layout */
.blog-author {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.6875rem;
  color: var(--color-blog-author); /* #939393 */
}

.blog-author svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.blog-author-name {
  margin-right: 0.5rem;
}

/* Remove these styles as they're no longer needed */
.blog-author-avatar,
.blog-author-info,
.blog-author-date svg {
  display: none;
}

/* Blog Card Title - Updated color */
.blog-card-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-blog-title); /* #19807E */
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

/* Blog Card Text - Updated color */
.blog-card-text {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-blog-text); /* #2d2d2d */
  line-height: 1.4;
  margin-bottom: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-action {
  text-align: center;
  margin-top: 0;
  margin-bottom: calc(2em + 2%);
}

.btn-other-entries {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-size: var(--text-sm);
  background-color: var(--color-accent);
  color: var(--color-background);
  box-shadow: var(--shadow-sm);
}

.btn-other-entries:hover {
  background-color: var(--color-accent-light);
  transform: translateY(-2px);
}

.btn-other-entries:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm-active);
}

/* ===== STATIC CATEGORY INDICATORS (HOMEPAGE ONLY) ===== */
.category-indicator-static {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0; /* Reducido de 0.5rem a 0.25rem */
  font-size: 0.75rem;
  color: var(--color-text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.category-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.category-label {
  font-weight: 400;
  line-height: 1.2;
}

/* Updated chart-categories - CENTERED WITH CONTAINER */
.chart-categories {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem; /* Minimal space from chart */
  margin-bottom: 0;
  padding: 0 clamp(1rem, 4vw, 3rem); /* Same padding as container */
  justify-content: center;
  order: 2;
  width: 100vw; /* Full viewport width */
  margin-left: calc(-1 * clamp(1rem, 4vw, 3rem)); /* Negative margin to break out of container */
  margin-right: calc(-1 * clamp(1rem, 4vw, 3rem)); /* Negative margin to break out of container */
  max-width: 1200px; /* Same max-width as container */
  position: relative;
  left: 50%;
  transform: translateX(-50%); /* Center the full-width element */
}

/* Responsive adjustments for static indicators */
@media (min-width: 540px) {
  .chart-categories {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
}

@media (max-width: 539px) {
  .chart-categories {
    flex-direction: column;
    align-items: center;
    gap: 0.15rem; /* Even tighter on mobile */
  }
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* 350px and below - Extra small mobile */
@media (max-width: 350px) {
  .blog-card {
    padding: 0.625rem;
    min-height: 320px;
  }

  .blog-author-avatar {
    width: 1.25rem;
    height: 1.25rem;
  }

  .blog-author-avatar svg {
    width: 10px;
    height: 10px;
  }
}

/* 390px - Standard mobile */
@media (min-width: 390px) and (max-width: 499px) {
  .blog-grid {
    gap: 1.25rem;
  }

  .blog-card {
    min-height: 360px;
  }
}

/* 390px - 419px: Vertical layout */
@media (min-width: 390px) and (max-width: 419px) {
  .blog-grid {
    gap: 1.25rem;
  }

  .blog-card {
    min-height: 360px;
    flex-direction: column; /* Ensure vertical layout */
  }

  .blog-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    margin-bottom: 0.75rem;
    margin-right: 0;
  }

  .blog-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

/* 420px - 949px: HORIZONTAL LAYOUT (1 column) */
@media (min-width: 420px) and (max-width: 949px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }

  .blog-card {
    flex-direction: row; /* Change to horizontal */
    align-items: stretch;
    min-height: 180px; /* Reduced height for horizontal layout */
    padding: 1rem;
    max-width: 100%;
  }

  .blog-image {
    width: 40%; /* Fixed width for image */
    height: 150px; /* Fixed height instead of auto */
    padding-bottom: 0; /* Remove aspect ratio padding */
    margin-bottom: 0;
    margin-right: 1rem; /* Add right margin */
    flex-shrink: 0;
    position: relative; /* Ensure position relative for absolute child */
  }

  .blog-image img {
    position: absolute; /* Keep position absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the area */
  }

  .blog-content {
    width: 60%; /* Remaining width for content */
    flex: 1;
  }
}

/* 950px+: 3 columns vertical */
@media (min-width: 950px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }

  .blog-card {
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    min-height: 400px;
    padding: 1rem;
  }

  .blog-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    margin-bottom: 0.75rem;
    margin-right: 0;
  }

  .blog-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .blog-content {
    width: 100%;
  }
}

/* 1440px+ - 3 columns vertical (MAINTAINED) */
@media (min-width: 1440px) {
  .blog-grid {
    gap: 1.5rem;
    max-width: 1200px;
  }

  .blog-card {
    min-height: 420px;
  }
}

/* Generic Content Section - Future use, recyclable for other content blocks */
@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }
}

/* Newsletter: horizontal layout from 768px */
@media (min-width: 768px) {
  .newsletter .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
  }

  .newsletter-image {
    margin: 0;
    flex: 1;
    max-width: 300px;
  }

  .newsletter-content {
    flex: 1;
    text-align: left;
  }

  .newsletter-form {
    margin: 0;
    flex-direction: row;
  }

  .newsletter-form input {
    flex: 1;
  }
}

/* Desktop - 1024px+ */
@media (min-width: 1024px) {
  .hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
  }

  .hero-content {
    text-align: left;
    max-width: 100%;
    padding: 0;
  }

  .methodology-content {
    max-width: 800px;
    margin: 0 auto;
  }
}

/* Animation classes */
@media (max-width: 727px) {
  .grid-sixty-thirty-right .categories-panel-title {
    text-align: center;
  }
}

@media (min-width: 728px) {
  .grid-sixty-thirty-right .homepage-categories-panel {
    height: 100%; /* Usar toda la altura del contenedor padre */
    min-height: 350px; /* Altura mínima consistente */
  }
}

/* ===== ENHANCED RESPONSIVE BREAKPOINTS FOR UNIFIED CHARTS ===== */

/* Mobile (320px - 539px) - Enhanced */
@media (max-width: 539px) {
  .chart-container,
  .grid-sixty-thirty-item .chart-container,
  .grid-two-columns-item .chart-container {
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .chart-container canvas {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Tablet (540px - 1023px) - Enhanced with specific 710px fix */
@media (min-width: 540px) and (max-width: 1023px) {
  .grid-sixty-thirty-item .chart-container {
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .grid-two-columns-item .chart-container {
    height: 260px !important;
    min-height: 260px !important;
    max-height: 260px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .chart-container canvas {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Specific fix for 710px breakpoint */
@media (min-width: 700px) and (max-width: 750px) {
  .chart-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
  }

  .chart-container canvas {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
  }

  .grid-sixty-thirty-item {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
    box-sizing: border-box;
  }

  .charts-container {
    overflow-x: hidden;
  }
}

/* Desktop (1024px+) - Enhanced */
@media (min-width: 1024px) {
  .grid-sixty-thirty-item .chart-container {
    height: 300px !important; /* Altura fija con !important */
    min-height: 300px !important;
    max-height: 300px !important; /* Prevenir estiramiento */
  }

  .grid-two-columns-item .chart-container {
    height: 280px !important; /* Altura fija con !important */
    min-height: 280px !important;
    max-height: 280px !important; /* Prevenir estiramiento */
  }
}

/* Large Desktop (1440px+) - Enhanced */
@media (min-width: 1440px) {
  .grid-sixty-thirty-item .chart-container {
    height: 350px !important; /* Altura fija con !important */
    min-height: 350px !important;
    max-height: 350px !important; /* Prevenir estiramiento */
  }

  .grid-two-columns-item .chart-container {
    height: 320px !important; /* Altura fija con !important */
    min-height: 320px !important;
    max-height: 320px !important; /* Prevenir estiramiento */
  }
}

/* Enhanced responsiveness for charts section */
@media (max-width: 727px) {
  .grid-sixty-thirty-item {
    padding: 0.75rem;
  }

  .category-list-item {
    padding: 0.5rem 0;
  }

  .category-info {
    padding-right: 0.5rem;
  }

  .category-name {
    font-size: 0.8rem;
  }

  .category-value {
    font-size: 0.8rem;
    min-width: 45px;
  }
}

@media (min-width: 728px) {
  .grid-sixty-thirty-item {
    padding: 1rem;
  }
}

/* Container overflow prevention */
.charts-container,
.container {
  overflow-x: hidden;
  box-sizing: border-box;
}

.grid-sixty-thirty-item,
.grid-two-columns-item {
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

/* Independent content placeholder styling */
.independent-content-placeholder {
  background-color: #f9f9f7;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: left;
  color: #666;
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.independent-content-placeholder p {
  margin: 0;
  line-height: 1.5;
}

/* Loading States for Fetch Components */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: #686868;
  font-size: 0.875rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #f9f9f9;
  border-radius: var(--radius-md);
}

/* Loading state for chart containers */
.chart-container .loading {
  min-height: 250px;
  border: 1px solid var(--color-border);
}

/* Loading state for categories */
.categories-list .loading {
  min-height: 100px;
  margin: 1rem 0;
}

/* reCAPTCHA badge positioning */
.grecaptcha-badge {
  z-index: 9999 !important;
  position: fixed !important;
}
