/* =========================================
   Economía Conversada / Talking Economics
   Modern Design System
   ========================================= */

:root {
  --primary: #5B2A1C;
  --primary-rgb: 91, 42, 28;
  --secondary: #9D8F68;
  --secondary-rgb: 157, 143, 104;
  --tertiary: #D8D1BF;
  --tertiary-rgb: 216, 209, 191;
  --bg: #F8F4EE;
  --bg-rgb: 248, 244, 238;
  --white: #FFFFFF;
  --black: #1a1a1a;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(var(--primary-rgb), .08);
  --shadow-md: 0 4px 20px rgba(var(--primary-rgb), .1);
  --shadow-lg: 0 10px 40px rgba(var(--primary-rgb), .12);
  --shadow-xl: 0 20px 60px rgba(var(--primary-rgb), .15);
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
  --transition-slow: .6s cubic-bezier(.4, 0, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--secondary) var(--primary);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Typography ---- */
@font-face { font-family: 'Poppins'; src: url('../fonts/Poppins-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Liberation'; src: url('../fonts/LiberationSerif-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Liberation'; src: url('../fonts/LiberationSerif-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Liberation'; src: url('../fonts/LiberationSerif-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Liberation'; src: url('../fonts/LiberationSerif-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; font-display: swap; }

.font-serif { font-family: 'Liberation', Georgia, serif; }
.font-sans { font-family: 'Poppins', system-ui, sans-serif; }

h1, h2, h3, h4 { font-family: 'Liberation', Georgia, serif; line-height: 1.2; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition);
  background: transparent;
}

.header.scrolled {
  background: rgba(var(--primary-rgb), .97);
  padding: 12px 0;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,.15);
}

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

.logo {
  font-family: 'Liberation', Georgia, serif;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  font-size: 1.1rem;
  letter-spacing: .02em;
  line-height: 1.15;
}

.logo span { display: block; }

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

.nav-desktop a {
  color: var(--white);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}

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

.nav-desktop a:hover::after { width: 100%; }

.nav-separator {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,.25);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  color: rgba(255,255,255,.6);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.lang-btn:hover, .lang-btn.active {
  color: var(--white);
  background: rgba(255,255,255,.12);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  color: var(--white);
  padding: 8px;
}

.nav-toggle svg { width: 28px; height: 28px; }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(var(--primary-rgb), .98);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transform: translateY(-100%);
  opacity: 0;
  transition: var(--transition-slow);
  pointer-events: none;
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav a {
  color: var(--white);
  font-family: 'Liberation', Georgia, serif;
  font-size: 1.8rem;
  letter-spacing: .04em;
}

.mobile-nav-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--white);
  padding: 8px;
}

.mobile-nav-close svg { width: 32px; height: 32px; }

.mobile-lang {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.mobile-lang a {
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  color: var(--secondary);
}

@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(var(--secondary-rgb), .15) 0%, transparent 70%),
              radial-gradient(ellipse at 70% 80%, rgba(var(--secondary-rgb), .1) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  padding: 0 24px;
  width: 100%;
}

.hero-text { color: var(--white); }

.hero-tag {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 24px;
  border: 1px solid rgba(var(--secondary-rgb), .4);
  padding: 6px 16px;
  border-radius: 100px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--white);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.75);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-height: 520px;
  width: auto;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,.4));
  transition: transform .8s cubic-bezier(.4, 0, .2, 1);
}

.hero-image:hover img {
  transform: scale(1.03) translateY(-8px);
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding: 120px 0 80px; }
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-image img { max-height: 360px; }
  .hero-image { order: -1; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: var(--radius);
  transition: var(--transition);
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
}
.btn-primary:hover {
  background: #b5a67a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 2px solid rgba(255,255,255,.3);
  color: var(--white);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,.08);
}

.btn-dark {
  background: var(--primary);
  color: var(--white);
}
.btn-dark:hover {
  background: #7a3d2a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-sm {
  padding: 10px 20px;
  font-size: .8rem;
}

/* ---- Section Titles ---- */
.section-label {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: rgba(var(--primary-rgb), .7);
  max-width: 600px;
  line-height: 1.8;
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ---- Intro ---- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.intro-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.intro-text p {
  font-size: .95rem;
  color: rgba(var(--primary-rgb), .8);
  margin-bottom: 16px;
}

.intro-text p:last-child { margin-bottom: 0; }

.intro-text em {
  font-family: 'Liberation', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  color: var(--primary);
}

@media (max-width: 768px) {
  .intro-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---- Buy Section ---- */
.buy-section {
  background: var(--primary);
  color: var(--white);
  text-align: center;
}

.buy-section .section-title { color: var(--white); }
.buy-section .section-label { color: var(--secondary); }

.buy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.buy-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: var(--transition);
}

.buy-card:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

.buy-card-label {
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
}

.buy-card-title {
  font-family: 'Liberation', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.buy-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.buy-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  font-size: .85rem;
  transition: var(--transition);
  color: rgba(255,255,255,.85);
}

.buy-link:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

.buy-link svg {
  width: 16px;
  height: 16px;
  opacity: .5;
}

.buy-series {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.buy-series-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .buy-grid { grid-template-columns: 1fr; }
}

/* ---- Chatbot Banner ---- */
.chatbot-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, #b5a67a 100%);
  padding: 48px 0;
  text-align: center;
}

.chatbot-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.chatbot-text {
  font-family: 'Liberation', Georgia, serif;
  font-size: 1.3rem;
  color: var(--white);
}

.chatbot-btn {
  background: var(--white);
  color: var(--primary);
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chatbot-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.chatbot-btn svg { width: 20px; height: 20px; }

/* ---- Author ---- */
.author-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: center;
}

.author-image {
  width: 320px;
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.author-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-family: 'Liberation', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.author-social {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.author-social a {
  color: var(--secondary);
  transition: var(--transition);
}

.author-social a:hover { color: var(--primary); }

.author-social svg { width: 22px; height: 22px; }

.author-bio p {
  font-size: .95rem;
  color: rgba(var(--primary-rgb), .8);
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .author-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 32px; }
  .author-image { width: 240px; height: 320px; }
  .author-social { justify-content: center; }
}

/* ---- Volumes ---- */
.volume-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  margin-bottom: 32px;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.volume-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  z-index: 10;
}

.volume-cover {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
}

.volume-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.volume-card:hover .volume-cover img {
  transform: scale(1.05);
}

.volume-number {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
}

.volume-title {
  font-family: 'Liberation', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.volume-sub {
  font-size: 1rem;
  color: var(--secondary);
  margin-bottom: 16px;
}

.volume-desc {
  font-size: .9rem;
  color: rgba(var(--primary-rgb), .75);
  margin-bottom: 24px;
  line-height: 1.8;
}

/* Audio player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.audio-label {
  font-size: .75rem;
  font-style: italic;
  color: rgba(var(--primary-rgb), .6);
  white-space: nowrap;
}

.audio-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.audio-play:hover { background: #7a3d2a; }
.audio-play svg { width: 14px; height: 14px; }
.audio-play .icon-pause { display: none; }
.audio-play.playing .icon-play { display: none; }
.audio-play.playing .icon-pause { display: block; }

.audio-seekbar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--tertiary);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.audio-seekbar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.audio-seekbar::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.volume-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
  overflow: hidden;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  font-size: .85rem;
  color: var(--primary);
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: var(--bg);
}

.dropdown-divider {
  height: 1px;
  background: var(--tertiary);
  margin: 0;
}

@media (max-width: 768px) {
  .volume-card {
    grid-template-columns: 1fr;
    padding: 24px;
    text-align: center;
  }
  .volume-cover { max-width: 280px; margin: 0 auto; }
  .volume-actions { justify-content: center; }
  .audio-player { flex-wrap: wrap; }
  .audio-label { width: 100%; }
}

/* ---- Testimonials ---- */
.testimonials {
  background: var(--tertiary);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.testimonial-quote {
  font-family: 'Liberation', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 20px;
  position: relative;
  padding-left: 24px;
  border-left: 3px solid var(--secondary);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 700;
  font-size: .9rem;
}

.testimonial-role {
  font-size: .75rem;
  color: rgba(var(--primary-rgb), .6);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo {
  font-family: 'Liberation', Georgia, serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.4rem;
  line-height: 1.15;
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.footer-social svg { width: 18px; height: 18px; }

.footer-heading {
  font-family: 'Liberation', Georgia, serif;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 20px;
  color: var(--secondary);
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 12px; }

.footer-links a {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a {
  color: var(--secondary);
}

.footer-bottom a:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ---- Animations (scroll reveal) ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ---- Utilities ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
