:root {
  --bg-main: #fcfbfa;
  /* Light cream */
  --bg-surface: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --grid-color: rgba(78, 152, 168, 0.1);

  --brand-blue: #4e98a8;
  /* Main teal/blue */
  --brand-blue-lite: #eaf3f5;
  --brand-blue-dark: #3a7a88;

  --brand-yellow: #eeab2e;
  /* Mustard yellow */
  --brand-yellow-lite: #fdf5e6;
  --brand-yellow-dark: #cc9023;

  --brand-orange: #f59074;
  /* Peach/coral */
  --brand-orange-lite: #fef0ec;
  --brand-orange-dark: #d67a61;

  --text-main: #2d3748;
  --text-muted: #718096;

  --border: #e2e8f0;
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-pill: 100px;

  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.03);
  --shadow-3d: 0 6px 0 rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] {
  --bg-main: #0f172a;
  --bg-surface: #1e293b;
  --nav-bg: rgba(30, 41, 59, 0.9);
  --grid-color: rgba(56, 189, 248, 0.1);

  --brand-blue: #38bdf8;
  --brand-blue-lite: rgba(56, 189, 248, 0.15);
  --brand-blue-dark: #0284c7;

  --brand-yellow: #fcd34d;
  --brand-yellow-lite: rgba(252, 211, 77, 0.15);
  --brand-yellow-dark: #b45309;

  --brand-orange: #fb923c;
  --brand-orange-lite: rgba(251, 146, 60, 0.15);
  --brand-orange-dark: #c2410c;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --border: #334155;
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.3);
}

[data-theme='dim'] {
  --bg-main: #334155;
  --bg-surface: #475569;
  --nav-bg: rgba(51, 65, 85, 0.9);
  --grid-color: rgba(56, 189, 248, 0.1);

  --brand-blue: #38bdf8;
  --brand-blue-lite: rgba(56, 189, 248, 0.15);
  --brand-blue-dark: #0284c7;

  --brand-yellow: #fcd34d;
  --brand-yellow-lite: rgba(252, 211, 77, 0.15);
  --brand-yellow-dark: #b45309;

  --brand-orange: #fb923c;
  --brand-orange-lite: rgba(251, 146, 60, 0.15);
  --brand-orange-dark: #c2410c;

  --text-main: #f1f5f9;
  --text-muted: #cbd5e1;

  --border: #475569;
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--grid-color) 2px, transparent 2px);
  background-size: 30px 30px;
  z-index: -1;
  pointer-events: none;
}

/* NAVBAR PILL */
nav {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 14px 10px 24px;
  width: 100%;
  max-width: 800px;
  box-shadow: 0 10px 30px rgba(78, 152, 168, 0.08);
  /* slight teal glow */
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-icon {
  background: var(--bg-surface);
  border: 3px solid var(--brand-yellow);
  box-shadow: 0 0 0 3px var(--brand-blue);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-yellow);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-logo-title {
  font-weight: 900;
  color: var(--brand-blue-dark);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -0.5px;
}

.nav-logo-sub {
  font-weight: 800;
  color: var(--text-muted);
  font-size: 0.55rem;
  line-height: 1;
  margin-top: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 700;
  transition: color .2s;
}

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

.nav-cta {
  background: var(--brand-blue);
  color: white !important;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: .95rem;
  font-weight: 800 !important;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--brand-blue-dark);
  margin-bottom: 4px;
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--brand-blue-dark);
}

.cta-text-short {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* HERO */
#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 160px 5% 80px;
  text-align: center;
  position: relative;
}

.hero-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
}

.hero-emblem {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 6px solid var(--brand-yellow);
  box-shadow: 0 0 0 5px var(--brand-blue), 0 15px 35px rgba(78, 152, 168, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 900;
  color: var(--brand-yellow);
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}

.hero-logo-title {
  font-weight: 900;
  font-size: clamp(3rem, 6vw, 4.5rem);
  color: var(--brand-blue-dark);
  line-height: 0.95;
  text-align: center;
  letter-spacing: -2px;
  margin-bottom: 12px;
}

.hero-logo-sub {
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

h1 {
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 40rem);
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: -2px;
  text-align: center;
  max-width: 900px;
  margin-bottom: 1.5rem;
  color: var(--brand-blue);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.15rem;
  text-align: center;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  font-weight: 600;
  line-height: 1.6;
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.btn-primary {
  background: var(--brand-yellow);
  color: var(--bg-main);
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.05rem;
  box-shadow: 0 6px 0 var(--brand-yellow-dark);
  margin-bottom: 6px;
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: 0.5px;
}

.btn-primary:hover,
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--brand-yellow-dark);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--brand-blue);
  border: 2px solid var(--border);
  padding: 14px 34px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--border);
  margin-bottom: 6px;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-outline:hover,
.btn-outline:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--border);
  border-color: var(--brand-blue-lite);
}


/* THEME TOGGLE */
.theme-toggle {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-main);
  margin-right: 4px;
  box-shadow: 0 4px 0 var(--border);
}

.theme-toggle:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--border);
}

/* SCROLLING TAGS */
.scrolling-tags {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  margin-top: 80px;
  padding: 24px 0;
  border-top: 2px dashed var(--border);
  border-bottom: 2px dashed var(--border);
  width: 100%;
  background: var(--bg-surface);
}

.scrolling-track {
  display: flex;
  animation: scroll-left 40s linear infinite;
  gap: 4rem;
  padding-right: 4rem;
}

.tag-item {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-blue);
  letter-spacing: -0.5px;
}

@keyframes scroll-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* SECTIONS */
section {
  padding: 100px 5%;
  margin: 0 auto;
  max-width: 1200px;
  position: relative;
  z-index: 1;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--bg-main);
  background: var(--brand-orange);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 0 var(--brand-orange-dark);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: 1.2rem;
  color: var(--text-main);
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.section-sub {
  color: var(--text-muted);
  margin: 0 auto 4rem;
  font-size: 1.15rem;
  max-width: 600px;
  font-weight: 600;
}

/* CARDS GRID (Servicios) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-soft);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}

.card:hover {
  border-color: var(--brand-blue-lite);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(78, 152, 168, 0.15);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: var(--brand-yellow-lite);
  border-radius: 20px;
  color: var(--brand-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--brand-blue);
  letter-spacing: -0.5px;
}

.card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 600;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}

.stag {
  font-size: .8rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: none;
  color: var(--brand-blue);
  background: var(--brand-blue-lite);
}

/* LIST SECTION (Proceso) */
.list-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.list-item {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius-md);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s;
}

.list-item:hover {
  transform: translateX(8px);
  border-color: var(--brand-blue-lite);
}

.list-number {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--brand-yellow);
  color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 0 var(--brand-yellow-dark);
}

.list-content h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.list-content p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 600;
}

/* STATS (Nosotros) */
#nosotros {
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: center;
}

.stat-box {
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s;
}

.stat-box:hover {
  transform: translateY(-5px);
  border-color: var(--brand-orange-lite);
}

.stat-num {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--brand-orange);
  margin-bottom: 0.25rem;
  letter-spacing: -2px;
  line-height: 1;
}

.stat-label {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* CONTACT FORM */
#contacto {
  text-align: center;
}

.contact-container {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 2px solid var(--brand-blue-lite);
  border-radius: var(--radius-md);
  padding: 3.5rem 3rem;
  box-shadow: 0 20px 50px rgba(78, 152, 168, 0.1);
}

.contact-input {
  width: 100%;
  background: var(--bg-main);
  border: 2px solid var(--border);
  padding: 18px 24px;
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-family: inherit;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: all .2s;
}

.contact-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px var(--brand-blue-lite);
}

.contact-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.contact-btn {
  width: 100%;
  background: var(--brand-orange);
  color: var(--bg-main);
  padding: 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  margin-bottom: 4px;
  box-shadow: 0 6px 0 var(--brand-orange-dark);
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: 0.5px;
}

.contact-btn:hover,
.contact-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--brand-orange-dark);
}

/* FOOTER */
footer {
  border-top: 2px solid var(--border);
  padding: 60px 5% 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  background: var(--bg-surface);
  position: relative;
  z-index: 10;
  font-family: 'Nunito', sans-serif;
}

footer p {
  color: var(--text-muted);
  font-weight: 700;
  font-size: .95rem;
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 700;
  transition: color .2s;
}

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

.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-blue-lite);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all .2s;
}

.social-btn:hover {
  background: var(--brand-blue);
  transform: translateY(-4px);
}

.social-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--brand-blue);
  transition: fill .2s;
}

.social-btn:hover svg {
  fill: white;
}

/* CHATBOT PLAYFUL THEME */
.chat-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--brand-orange);
  border: 4px solid var(--bg-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(245, 144, 116, 0.4);
  z-index: 200;
  transition: transform .2s, box-shadow .2s;
  font-size: 1.8rem;
}

.chat-toggle:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 15px 35px rgba(245, 144, 116, 0.5);
}

.chat-toggle .chat-ping {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 16px;
  height: 16px;
  background: var(--brand-yellow);
  border-radius: 50%;
  border: 3px solid var(--bg-main);
  animation: ping 2s ease-in-out infinite;
}

@keyframes ping {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: .6;
  }
}

.chat-window {
  position: fixed;
  bottom: 110px;
  right: 28px;
  width: 394px;
  height: 520px;
  max-height: calc(100vh - 130px);
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.8) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .3s;
}

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

.chat-header {
  padding: 12px 18px;
  background: var(--brand-blue);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.chat-info h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bg-main);
  margin-bottom: 2px;
}

.chat-status {
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand-blue-lite);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--brand-yellow);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--bg-main);
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform .2s;
}

.chat-close:hover {
  transform: scale(1.2);
  color: var(--brand-yellow);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-main);
  scrollbar-width: thin;
  font-family: 'Nunito', sans-serif;
}

.msg {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 20px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.5;
  animation: msgPop .2s ease;
}

@keyframes msgPop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg.bot {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-bottom-left-radius: 6px;
  align-self: flex-start;
  color: var(--text-main);
  white-space: pre-line;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.msg.user {
  background: var(--brand-blue);
  color: var(--bg-main);
  border-bottom-right-radius: 6px;
  align-self: flex-end;
  box-shadow: 0 4px 10px rgba(78, 152, 168, 0.2);
}

.msg.error {
  background: #ffe4e6;
  border: 2px solid #fda4af;
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  color: #e11d48;
}

.typing-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: 20px;
  border-bottom-left-radius: 6px;
  align-self: flex-start;
  width: fit-content;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--brand-blue);
  border-radius: 50%;
  animation: typing 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: .2s;
}

.typing-dot:nth-child(3) {
  animation-delay: .4s;
}

@keyframes typing {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .4;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0 24px 16px;
  flex-shrink: 0;
  background: var(--bg-main);
}

.qr-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

.qr-btn:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  background: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.chat-input-area {
  padding: 16px 24px;
  border-top: 2px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  background: var(--bg-surface);
}

.chat-input {
  flex: 1;
  background: var(--bg-main);
  border: 2px solid var(--border);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-size: .95rem;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  outline: none;
  transition: all .2s;
}

.chat-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-lite);
}

.chat-input::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

.chat-input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.chat-send {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--brand-orange);
  color: var(--bg-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: none;
  box-shadow: 0 4px 0 var(--brand-orange-dark);
  margin-bottom: 4px;
  transition: transform .1s, box-shadow .1s;
}

.chat-send:active {
  transform: translateY(4px);
  box-shadow: 0 0px 0 var(--brand-orange-dark);
}

.chat-send:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* SCROLL TO TOP BTN */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--border);
  color: var(--brand-blue);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  z-index: 150;
  transition: all .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.scroll-top-btn:hover {
  border-color: var(--brand-blue-lite);
  color: var(--bg-main);
  background: var(--brand-blue);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(78, 152, 168, 0.2);
}

/* ══════════════════════════════════════
   HAMBURGER MENU
══════════════════════════════════════ */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-main);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  transition: opacity .3s;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
}

.mobile-menu a {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  transition: color .2s;
}

.mobile-menu a:hover {
  color: var(--brand-blue);
}

.mobile-menu .nav-cta {
  background: var(--brand-blue);
  color: var(--bg-main) !important;
  padding: 14px 36px;
  border-radius: var(--radius-pill);
  font-size: 1.1rem;
  box-shadow: 0 4px 0 var(--brand-blue-dark);
}

/* ══════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px)
══════════════════════════════════════ */
@media (max-width: 1024px) {
  section {
    padding: 80px 6%;
  }

  #hero {
    padding: 140px 6% 60px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .hero-logo-title {
    font-size: 3rem;
  }

  h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }

  .hero-sub {
    font-size: 1rem;
  }
}

/* ══════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
══════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav */
  .nav-links {
    display: none !important;
  }

  .hamburger {
    display: flex;
  }

  .nav-pill {
    padding: 6px 12px;
  }

  .nav-logo {
    gap: 8px;
  }

  .nav-logo-title {
    font-size: 1.05rem;
  }

  .nav-logo-sub {
    display: none;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-pill .nav-cta {
    padding: 6px 14px;
    font-size: 0.85rem;
  }

  .nav-pill .cta-text-full {
    display: none;
  }

  .nav-pill .cta-text-short {
    display: inline;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: .95rem;
  }

  /* Hero */
  #hero {
    padding: 130px 5% 50px;
  }

  .hero-emblem {
    width: 64px;
    height: 64px;
    font-size: 32px;
    border-width: 4px;
    box-shadow: 0 0 0 4px var(--brand-blue), 0 10px 25px rgba(78, 152, 168, 0.15);
    margin-bottom: 20px;
  }

  .hero-logo-title {
    font-size: clamp(2rem, 8vw, 3rem);
    letter-spacing: -1px;
    margin-bottom: 8px;
  }

  .hero-logo-sub {
    font-size: 0.7rem;
    letter-spacing: 2px;
  }

  .hero-logo {
    margin-bottom: 2rem;
  }

  h1 {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
    letter-spacing: -1px;
  }

  .hero-sub {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  .btn-primary,
  .btn-outline {
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  /* Scrolling tags */
  .scrolling-tags {
    margin-top: 50px;
    padding: 16px 0;
  }

  .tag-item {
    font-size: 0.9rem;
  }

  /* Sections */
  section {
    padding: 60px 5%;
  }

  .section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .section-sub {
    font-size: 1rem;
    margin-bottom: 2.5rem;
  }

  .section-label {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  /* Cards */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .card {
    padding: 2rem 1.5rem;
  }

  .card-icon {
    width: 52px;
    height: 52px;
    font-size: 1.6rem;
  }

  .card h3 {
    font-size: 1.15rem;
  }

  /* List items */
  .list-item {
    padding: 1.5rem;
    gap: 1rem;
  }

  .list-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .list-content h4 {
    font-size: 1.1rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stat-box {
    padding: 2rem 1rem;
  }

  .stat-num {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  /* Contact */
  .contact-container {
    padding: 2.5rem 1.5rem;
  }

  .contact-input {
    padding: 14px 18px;
  }

  .contact-btn {
    padding: 14px;
    font-size: 1rem;
  }

  /* Footer */
  footer {
    flex-direction: column;
    text-align: center;
    padding: 40px 5% 30px;
    gap: 1.5rem;
  }

  .footer-links {
    justify-content: center;
    gap: 1rem;
  }

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

  /* Chat */
  .chat-window {
    width: calc(100vw - 32px);
    right: 16px;
    height: 480px;
    bottom: 100px;
  }

  .chat-toggle {
    width: 56px;
    height: 56px;
    bottom: 24px;
    right: 20px;
    font-size: 1.5rem;
  }

  .scroll-top-btn {
    width: 48px;
    height: 48px;
    bottom: 24px;
    left: 20px;
    font-size: 1rem;
  }
}

/* ══════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤ 480px)
══════════════════════════════════════ */
@media (max-width: 480px) {
  #hero {
    padding: 120px 4% 40px;
  }

  .hero-emblem {
    width: 56px;
    height: 56px;
    font-size: 28px;
    border-width: 4px;
    box-shadow: 0 0 0 3px var(--brand-blue), 0 8px 20px rgba(78, 152, 168, 0.12);
    margin-bottom: 16px;
  }

  .hero-logo-title {
    font-size: 2rem;
  }

  h1 {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
    letter-spacing: -0.5px;
  }

  .hero-sub {
    font-size: 0.9rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  section {
    padding: 50px 4%;
  }

  .section-title {
    font-size: clamp(1.4rem, 7vw, 1.8rem);
  }

  .section-sub {
    font-size: 0.9rem;
  }

  .list-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .list-number {
    margin-bottom: 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-box {
    padding: 1.5rem 0.75rem;
  }

  .stat-num {
    font-size: 2rem;
  }

  .contact-container {
    padding: 2rem 1.2rem;
    margin: 0 -2%;
    border-radius: 16px;
  }

  footer p {
    font-size: 0.8rem;
  }

  .footer-links {
    gap: 0.75rem;
  }

  .footer-links a {
    font-size: 0.8rem;
  }

  .chat-window {
    height: 420px;
    bottom: 90px;
    border-radius: 16px;
  }

  .chat-header {
    padding: 14px 16px;
  }

  .chat-input-area {
    padding: 12px 16px;
  }

  .quick-replies {
    padding: 0 16px 12px;
  }

  .qr-btn {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}

/* ══════════════════════════════════════
   UTILITY
══════════════════════════════════════ */
.text-center {
  text-align: center;
}

/* Sections where section-sub bottom margin is 3rem instead of default 4rem */
#nosotros .section-sub,
#contacto .section-sub,
#faq .section-sub {
  margin-bottom: 3rem;
}

/* CARD CTA LINKS */
.card-cta {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: .9rem;
  font-weight: 800;
  color: var(--brand-orange);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color .2s, transform .2s;
}
.card-cta:hover {
  color: var(--brand-orange-dark);
  transform: translateX(4px);
}

/* CONTACT FORM FIELDS */
.form-field {
  margin-bottom: 1.2rem;
}
.contact-select,
.contact-textarea {
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.contact-textarea {
  resize: vertical;
  min-height: 110px;
  border-radius: var(--radius-sm);
  cursor: text;
}
.contact-success {
  margin-top: 1.2rem;
  padding: 14px 20px;
  background: rgba(34, 197, 94, .12);
  border: 2px solid #22c55e;
  border-radius: var(--radius-sm);
  color: #15803d;
  font-weight: 800;
  font-size: 1rem;
}
.contact-error {
  margin-top: 1.2rem;
  padding: 14px 20px;
  background: rgba(239, 68, 68, .1);
  border: 2px solid #ef4444;
  border-radius: var(--radius-sm);
  color: #dc2626;
  font-weight: 700;
  font-size: .95rem;
}

/* FOUNDER / NOSOTROS CARD */
.founder-card {
  display: flex;
  gap: 3rem;
  align-items: center;
  margin-top: 4rem;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
}
.founder-img {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--brand-yellow);
  box-shadow: 0 0 0 4px var(--brand-blue);
}
.founder-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.founder-text {
  flex: 1;
}
.founder-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 600;
  margin-bottom: .9rem;
}
.founder-text p:last-of-type {
  margin-bottom: 0;
}
.value-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}
.value-chip {
  background: var(--brand-blue-lite);
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue-lite);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .3px;
}
[data-theme='dark'] .value-chip,
[data-theme='dim'] .value-chip {
  border-color: var(--brand-blue);
}

/* FAQ ACCORDION */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: border-color .2s;
}
.faq-item[open] {
  border-color: var(--brand-blue-lite);
}
.faq-question {
  list-style: none;
  padding: 1.5rem 2rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color .2s;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-blue);
  flex-shrink: 0;
  transition: transform .3s;
}
.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}
.faq-question:hover {
  color: var(--brand-blue);
}
.faq-answer {
  padding: 0 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
}

/* RESPONSIVE — FAQ + FOUNDER */
@media (max-width: 768px) {
  .founder-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }
  .founder-img {
    width: 140px;
    height: 140px;
  }
  .value-chips {
    justify-content: center;
  }
  .faq-question {
    padding: 1.2rem 1.5rem;
    font-size: .95rem;
  }
  .faq-answer {
    padding: 0 1.5rem 1.2rem;
  }
}
@media (max-width: 480px) {
  .founder-card {
    padding: 1.5rem 1rem;
  }
  .faq-question {
    padding: 1rem 1.2rem;
  }
  .faq-answer {
    padding: 0 1.2rem 1rem;
  }
}
