/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
  --bg-primary: #f2ede6;
  --bg-secondary: #e8e0d5;
  --navy: #1a2f6e;
  --navy-light: #2d4499;
  --accent: #2563eb;
  --text-dark: #0f1f3d;
  --text-mid: #4a5568;
  --text-soft: #8a96a8;
  --tags: #edf0f7;
  --card: #ffffff;

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(26, 47, 110, 0.08);
  --shadow-hover: 0 8px 40px rgba(26, 47, 110, 0.15);
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

/* ============================================
   TYPOGRAPHY HELPERS
   ============================================ */
.section-label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-mid);
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled {
  background: rgba(242, 237, 230, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(26, 47, 110, 0.08);
  padding: 0.875rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--navy);
}

.nav-cta {
  background: var(--navy) !important;
  color: #fff !important;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  transition: background var(--transition), transform var(--transition) !important;
}

.nav-cta:hover {
  background: var(--navy-light) !important;
  transform: translateY(-1px);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  transition: color var(--transition);
  line-height: 1;
}

.lang-btn.active {
  color: var(--navy);
  font-weight: 600;
}

.lang-btn:hover {
  color: var(--text-dark);
}

.lang-sep {
  color: var(--text-soft);
  font-size: 0.75rem;
  user-select: none;
  line-height: 1;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 0 5rem;
  background: linear-gradient(160deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(26, 47, 110, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-logo {
  height: 100px;
  width: auto;
  margin-bottom: 0.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--tags);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(26, 47, 110, 0.12);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.1;
  max-width: 720px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: var(--text-mid);
  max-width: 520px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.btn-primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 47, 110, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: rgba(26, 47, 110, 0.3);
}

.btn-outline:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 47, 110, 0.1);
}

.hero-scroll {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-soft), transparent);
}

/* ============================================
   QUE ES
   ============================================ */
.que-es {
  background: var(--bg-primary);
}

.que-es .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.que-es-text {}

.que-es-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.feature-card h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.6;
}

.feature-card.accent {
  background: var(--navy);
}

.feature-card.accent h3,
.feature-card.accent p {
  color: rgba(255,255,255,0.9);
}

/* ============================================
   QUE BUSCAMOS
   ============================================ */
.que-buscamos {
  background: var(--bg-secondary);
}

.que-buscamos .container {
  text-align: center;
}

.que-buscamos .section-subtitle {
  margin: 0 auto 3.5rem;
}

.buscamos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: left;
}

.buscamos-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.buscamos-icon {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.buscamos-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.buscamos-item p {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.65;
}

/* ============================================
   CASOS DE EXITO
   ============================================ */
.casos {
  background: var(--bg-primary);
}

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

.casos .section-subtitle {
  margin: 0 auto 3.5rem;
}

.casos-carousel {
  position: relative;
}

.casos-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
}

.casos-scroll::-webkit-scrollbar {
  height: 4px;
}

.casos-scroll::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 2px;
}

.casos-scroll::-webkit-scrollbar-thumb {
  background: var(--tags);
  border-radius: 2px;
}

.caso-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(26, 47, 110, 0.06);
  min-width: 200px;
  max-width: 220px;
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}

a.caso-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.caso-card--placeholder {
  cursor: default;
  opacity: 0.6;
}

.caso-photo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.caso-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.caso-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--text-soft);
}

.caso-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.caso-role {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-soft);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.caso-empresa {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0;
}

@media (max-width: 768px) {
  .casos-scroll {
    justify-content: flex-start;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .caso-card {
    min-width: calc(80vw - 2rem);
    max-width: calc(80vw - 2rem);
    scroll-snap-align: center;
  }
}

/* Flechas de navegación */
.casos-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-80%);
  background: var(--card);
  border: 1px solid rgba(26, 47, 110, 0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--navy);
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 2;
  transition: background var(--transition), box-shadow var(--transition);
}

.casos-nav:hover {
  background: var(--tags);
  box-shadow: var(--shadow-hover);
}

.casos-nav--prev { left: -18px; }
.casos-nav--next { right: -18px; }

/* Dots indicadores */
.casos-dots {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.caso-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tags);
  transition: background var(--transition), transform var(--transition);
}

.caso-dot.active {
  background: var(--navy);
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .casos-nav { display: flex; align-items: center; justify-content: center; }
  .casos-dots { display: flex; }
}

/* ============================================
   CONTACTO
   ============================================ */
.contacto {
  background: var(--bg-secondary);
}

.contacto .container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: start;
}

.contacto-text {}

.contacto-text .section-subtitle {
  margin-bottom: 2rem;
}

.contacto-highlight {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.contacto-highlight p {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.7;
  font-style: italic;
}

.contacto-form {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(26, 47, 110, 0.15);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--bg-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  min-height: 130px;
}

.form-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-top: 0.5rem;
}

.form-submit:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 47, 110, 0.25);
}

/* Honeypot */
.form-honeypot {
  display: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--navy);
  padding: 3rem 0;
  color: rgba(255,255,255,0.7);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo img {
  height: 32px;
  width: auto;
  opacity: 0.9;
}

.footer-copy {
  font-size: 0.85rem;
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* ============================================
   CÓMO FUNCIONA
   ============================================ */
.como-funciona {
  background: var(--bg-secondary);
  padding: 6rem 0;
}

.como-funciona-header {
  text-align: center;
  margin-bottom: 3rem;
}

.como-funciona-header .section-subtitle {
  margin: 0 auto;
}

.como-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}

.como-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(26, 47, 110, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  background: transparent;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.como-step.active .step-circle {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.step-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color 0.4s ease;
}

.como-step.active .step-label {
  color: var(--navy);
  font-weight: 600;
}

.como-connector {
  width: 80px;
  height: 2px;
  background: rgba(26, 47, 110, 0.15);
  margin-bottom: 1.25rem;
}

.como-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 0 auto;
  min-height: 320px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.como-panel {
  display: none;
  animation: panelFadeIn 0.4s ease;
}

.como-panel.active {
  display: block;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.como-card-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.demo-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.demo-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 0.3rem;
}

.demo-input {
  background: var(--bg-primary);
  border: 1.5px solid rgba(26, 47, 110, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-dark);
  min-height: 36px;
  display: flex;
  align-items: center;
}

.demo-cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  animation: blink 0.8s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.demo-submit {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.55rem 1.25rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: default;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.15s ease, background 0.2s ease;
}

.demo-submit.visible  { opacity: 1; }
.demo-submit.clicking { transform: scale(0.96); background: var(--navy-light); }

.demo-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
}

.upload-file-icon {
  animation: floatUp 0.5s ease forwards;
}

@keyframes floatUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.upload-filename {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-dark);
  font-weight: 500;
}

.upload-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.05s linear;
}

.upload-status {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* Reveal animation */
.reveal-item {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Browser mockup */
.browser-mockup {
  position: relative;
  border: 1px solid rgba(26, 47, 110, 0.12);
  border-radius: 8px;
  font-size: 0.72rem;
  font-family: var(--font-sans);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ececec;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  border-radius: 7px 7px 0 0;
}

.browser-dots { display: flex; gap: 4px; }

.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.browser-url {
  flex: 1;
  background: white;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.63rem;
  color: #666;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-actions {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}

.browser-btn {
  background: white;
  border: 1px solid rgba(26,47,110,0.2);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.6rem;
  color: var(--navy);
  font-weight: 600;
}

.browser-lang {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-soft);
}

.browser-icon {
  font-size: 0.7rem;
  color: var(--text-soft);
}

.browser-content {
  background: var(--bg-primary);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-radius: 0 0 7px 7px;
}

.cv-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(26,47,110,0.08);
}

.cv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.cv-info { flex: 1; min-width: 0; }

.cv-name {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.8rem;
}

.cv-role {
  font-size: 0.63rem;
  color: var(--text-soft);
  margin-top: 1px;
}

.cv-badge {
  display: inline-block;
  background: rgba(37,99,235,0.1);
  color: var(--accent);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.58rem;
  font-weight: 600;
  margin-top: 3px;
}

.cv-header-tags {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.cv-tag {
  background: var(--tags);
  color: var(--navy);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.58rem;
  font-weight: 500;
  display: inline-block;
}

.cv-body {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(26,47,110,0.06);
}

.cv-section-title {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.cv-exp-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.18rem;
}

.cv-exp-role    { font-weight: 600; color: var(--text-dark); font-size: 0.65rem; }
.cv-exp-company { color: var(--accent); font-size: 0.63rem; }
.cv-exp-years   { margin-left: auto; color: var(--text-soft); font-size: 0.6rem; }

.cv-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 0.3rem;
}

/* Chat widget flotante */
.cv-chat-widget {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cv-chat-widget.visible {
  opacity: 1;
}

/* Chat panel */
.chat-panel {
  width: 260px;
  background: white;
  border-radius: 10px;
  border: 1px solid rgba(26, 47, 110, 0.1);
  box-shadow: 0 4px 20px rgba(26, 47, 110, 0.18);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  background: var(--navy);
}

.chat-panel-robot { font-size: 0.75rem; }

.chat-panel-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: white;
  flex: 1;
}

.chat-panel-online {
  background: #22c55e;
  color: white;
  border-radius: 8px;
  padding: 1px 5px;
  font-size: 0.56rem;
  font-weight: 700;
}

.chat-panel-body {
  max-height: 155px;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  scrollbar-width: none;
}

.chat-panel-body::-webkit-scrollbar { display: none; }

.chat-msg {
  font-size: 0.62rem;
  line-height: 1.45;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  max-width: 85%;
  transition: opacity 0.3s ease;
}

.chat-msg-ai {
  background: #f0f4ff;
  color: var(--text-dark);
  border-radius: 0 6px 6px 6px;
  align-self: flex-start;
}

.chat-msg-user {
  background: var(--navy);
  color: white;
  border-radius: 6px 0 6px 6px;
  align-self: flex-end;
  text-align: right;
}

.chat-typing-cursor {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
}

.chat-widget-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(26, 47, 110, 0.35);
  transition: transform 0.15s ease;
}

@keyframes chatPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.18); }
}

.chat-widget-btn.pulse {
  animation: chatPulse 0.55s ease 2;
}

.chat-widget-btn.clicking {
  transform: scale(0.82) !important;
  transition: transform 0.12s ease;
}

/* ============================================
   GRACIAS — Thank you page
   ============================================ */
.gracias-section {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.gracias-content {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.gracias-content h1 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.gracias-content p {
  font-size: 1.05rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ============================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================ */
@media (max-width: 900px) {
  .que-es .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .que-es-cards {
    grid-template-columns: 1fr 1fr;
  }

  .buscamos-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contacto .container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ============================================
   RESPONSIVE — MOBILE (≤ 640px)
   ============================================ */
@media (max-width: 640px) {
  section {
    padding: 4rem 0;
  }

  .container {
    padding: 0 1.25rem;
  }

  /* Navbar mobile */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.3rem;
  }

  .nav-hamburger {
    display: flex;
    z-index: 1001;
  }

  .navbar .container {
    gap: 0.75rem;
  }

  .lang-toggle {
    z-index: 1001;
  }

  /* Hero mobile */
  .hero-logo {
    height: 72px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 320px;
  }

  /* Cards mobile */
  .que-es-cards {
    grid-template-columns: 1fr;
  }

  .buscamos-grid {
    grid-template-columns: 1fr;
  }

  /* Footer mobile */
  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

#demo { display: none; }
