/* ===================================
   REVOLUCIÓN MARRÓN - MAIN STYLES
   Think Tank en Arquitectura Productiva
   Versión 2.0 - Contraste Mejorado
   =================================== */

/* === IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* === CSS VARIABLES === */
:root {
  /* Colores principales - Paleta tierra */
  --soil-dark: #3d2817;
  --soil: #6B4423;
  --soil-light: #8B5E34;
  --clay: #C97B3C;
  --accent: #E8B849;
  --sand: #F5EFE8;
  --sand-light: #FDFBF7;
  --white: #FFFFFF;
  
  /* Colores de acento */
  --accent-green: #6B8E23;
  --accent-blue: #2C5F7C;
  
  /* Colores de texto */
  --text-primary: #2d201c;
  --text-light: #555555;
  --text-muted: #999999;
  
  /* Sombras mejoradas */
  --shadow-sm: 0 2px 12px rgba(61, 40, 23, 0.1);
  --shadow-md: 0 8px 24px rgba(61, 40, 23, 0.15);
  --shadow-lg: 0 16px 48px rgba(61, 40, 23, 0.25);
  --shadow-xl: 0 24px 64px rgba(61, 40, 23, 0.3);
  
  /* Tipografía */
  --font-serif: 'Crimson Pro', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* === RESET BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--soil-dark);
}

h1 {
  font-size: clamp(36px, 5vw, 56px);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
}

h3 {
  font-size: clamp(22px, 3vw, 28px);
}

p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 1rem;
}

a {
  color: var(--soil);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--clay);
}

/* === HEADER === */
header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(107, 68, 35, 0.1);
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: block;
  line-height: 0;
}

.logo img {
  height: 45px;
  width: auto;
  display: block;
  transition: transform var(--transition-normal);
}

.logo a:hover img {
  transform: scale(1.03);
}

nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 0;
  position: relative;
  text-decoration: none;
  transition: color var(--transition-fast);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--soil);
  transition: width var(--transition-normal);
}

nav a:hover {
  color: var(--soil);
}

nav a:hover::after {
  width: 100%;
}

/* === FOOTER === */
footer {
  background: var(--soil-dark);
  color: white;
  text-align: center;
  padding: 60px 40px;
  margin-top: 80px;
}

footer p {
  color: rgba(255, 255, 255, 0.9);
  margin: 8px 0;
  font-size: 15px;
}

footer a {
  color: white;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

footer a:hover {
  opacity: 0.8;
  color: var(--accent);
}

/* === BUTTONS === */
button, .button {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--soil) 0%, var(--soil-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: inline-block;
}

button:hover, .button:hover {
  background: linear-gradient(135deg, var(--soil-dark) 0%, #2d1f14 100%);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

/* Botón secundario con acento verde */
button.secondary, .button.secondary {
  background: linear-gradient(135deg, var(--accent-green) 0%, #5a7a1e 100%);
}

button.secondary:hover, .button.secondary:hover {
  background: linear-gradient(135deg, #5a7a1e 0%, #4a6518 100%);
}

/* === CARDS === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin: 40px 0;
}

.card {
  background: white;
  border: 1px solid rgba(107, 68, 35, 0.08);
  border-radius: 16px;
  padding: 32px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--clay) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--clay);
}

.card h3 {
  color: var(--soil);
  margin-bottom: 16px;
  font-size: 22px;
}

.card p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
  flex-grow: 1;
}

/* === HIGHLIGHT BOXES === */
.highlight-box {
  background: linear-gradient(135deg, #ffffff 0%, var(--sand-light) 100%);
  border-left: 6px solid var(--clay);
  padding: 28px 32px;
  border-radius: 12px;
  margin: 24px 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.highlight-box::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(232, 184, 73, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.highlight-box h3 {
  color: var(--soil-dark);
  margin-bottom: 12px;
  font-size: 20px;
  position: relative;
  z-index: 1;
}

.highlight-box p, .highlight-box ul {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.highlight-box ul {
  padding-left: 20px;
}

.highlight-box ul li {
  margin-bottom: 8px;
}

/* === WARNING BOX === */
.warning-box {
  background: linear-gradient(135deg, #FFF9E6 0%, #FFFBF0 100%);
  border-left: 6px solid #E8B849;
  padding: 24px 28px;
  border-radius: 12px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.warning-box p {
  color: #666;
  margin: 0;
}

/* === SUCCESS BOX === */
.success-box {
  background: linear-gradient(135deg, #F0F9F4 0%, #F8FCF9 100%);
  border-left: 6px solid var(--accent-green);
  padding: 24px 28px;
  border-radius: 12px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.success-box p {
  color: #666;
  margin: 0;
}

/* === STATS GRID === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.stat-item {
  background: linear-gradient(135deg, white 0%, var(--sand-light) 100%);
  border: 2px solid var(--sand);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(232, 184, 73, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.stat-item:hover::before {
  opacity: 1;
}

.stat-item:hover {
  border-color: var(--accent-green);
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  color: var(--soil);
  margin-bottom: 8px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.stat-number.positive {
  color: var(--accent-green);
}

.stat-number.negative {
  color: var(--clay);
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* === TABLES === */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 24px 0;
}

thead {
  background: linear-gradient(135deg, var(--soil) 0%, var(--soil-dark) 100%);
  color: white;
}

thead th {
  padding: 18px 20px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody tr {
  border-bottom: 1px solid var(--sand);
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--sand-light);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody td {
  padding: 16px 20px;
  font-size: 15px;
  color: var(--text-light);
}

tbody td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* === BLOCKQUOTES === */
blockquote {
  position: relative;
  padding: 32px 32px 32px 70px;
  margin: 32px 0;
  background: linear-gradient(135deg, var(--sand-light) 0%, white 100%);
  border-left: 6px solid var(--accent-green);
  border-radius: 12px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-primary);
  font-style: italic;
  box-shadow: var(--shadow-md);
}

blockquote::before {
  content: '"';
  position: absolute;
  left: 24px;
  top: 24px;
  font-size: 64px;
  color: var(--accent-green);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

blockquote p {
  margin: 0;
  color: var(--text-primary);
}

blockquote cite {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

/* === GRADIENTES DE SECCIÓN === */
.section-gradient {
  background: linear-gradient(135deg, var(--sand-light) 0%, white 50%, var(--sand-light) 100%);
}

.section-dark {
  background: linear-gradient(135deg, var(--soil-dark) 0%, var(--soil) 100%);
  color: white;
}

.section-accent {
  background: linear-gradient(135deg, var(--accent-green) 0%, #5a7a1e 100%);
  color: white;
}

/* === BORDES DECORATIVOS === */
.border-top-accent {
  border-top: 4px solid;
  border-image: linear-gradient(90deg, var(--clay) 0%, var(--accent) 50%, var(--clay) 100%) 1;
}

.border-left-accent {
  border-left: 4px solid;
  border-image: linear-gradient(180deg, var(--clay) 0%, var(--accent) 50%, var(--clay) 100%) 1;
}

/* === EFECTOS DE HOVER MEJORADOS === */
.hover-lift {
  transition: all var(--transition-normal);
}

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

/* === BADGES DE CATEGORÍA === */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.arquitectura {
  background: linear-gradient(135deg, var(--soil) 0%, var(--soil-dark) 100%);
  color: white;
}

.badge.papers {
  background: linear-gradient(135deg, var(--accent-green) 0%, #5a7a1e 100%);
  color: white;
}

.badge.casos {
  background: linear-gradient(135deg, var(--clay) 0%, var(--accent) 100%);
  color: white;
}

.badge.economia {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #234a60 100%);
  color: white;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  header {
    padding: 14px 24px;
    flex-wrap: wrap;
  }
  
  .logo img {
    height: 36px !important;
  }
  
  nav {
    width: 100%;
    margin-top: 16px;
    gap: 20px;
    justify-content: center;
  }
  
  nav a {
    font-size: 14px;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  h1 {
    font-size: 36px;
  }
  
  h2 {
    font-size: 28px;
  }
  
  blockquote {
    padding-left: 50px;
    font-size: 16px;
  }
  
  blockquote::before {
    font-size: 48px;
    left: 16px;
  }
  
  table {
    font-size: 14px;
  }
  
  thead th, tbody td {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 12px 20px;
  }
  
  .logo img {
    height: 32px !important;
  }
  
  nav {
    gap: 16px;
    margin-top: 12px;
  }
  
  nav a {
    font-size: 13px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 40px;
  }
  
  button, .button {
    width: 100%;
    padding: 12px 24px;
  }
  
  .card {
    padding: 24px;
  }
  
  footer {
    padding: 40px 20px;
  }
  
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* === UTILITY CLASSES === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

/* === HERO SECTION === */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  section[style*="background-attachment: fixed"] {
    background-attachment: scroll !important;
    padding: 100px 24px 80px !important;
  }
}

@media (max-width: 480px) {
  section[style*="background-attachment: fixed"] {
    padding: 80px 20px 60px !important;
  }
}

/* === PRINT STYLES === */
@media print {
  header, footer, nav {
    display: none;
  }
  
  body {
    color: black;
    background: white;
  }
  
  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
