/* CAEDE - Sistema de Diseño Institucional */

:root {
  /* Paleta Principal */
  --negro-caede: #1A1A1A;
  --amarillo-caede: #FFB800;
  --blanco: #FFFFFF;
  --gris-claro: #F5F5F5;
  --gris-medio: #E5E5E5;
  --gris-oscuro: #737373;
  --verde-verificado: #10B981;
  --rojo-alerta: #EF4444;

  /* Tipografía */
  --font-principal: 'Inter', -apple-system, system-ui, sans-serif;
  --font-titulos: 'Merriweather', Georgia, serif;

  /* Espaciado */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Layout */
  --container-max: 1200px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

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

body {
  font-family: var(--font-principal);
  font-size: 16px;
  line-height: 1.6;
  color: var(--negro-caede);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titulos);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(28px, 4vw, 36px); }
h3 { font-size: clamp(20px, 3vw, 24px); }
h4 { font-size: 18px; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Header */
.header {
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-medio);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

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

.header-logo {
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo-symbol {
  background: var(--negro-caede);
  color: var(--amarillo-caede);
  font-weight: 700;
  font-size: 20px;
  padding: 8px 16px;
  border-radius: var(--radius);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logo-subtitle {
  font-size: 12px;
  color: var(--gris-oscuro);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--negro-caede);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--amarillo-caede);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--blanco);
  box-shadow: -4px 0 12px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 200;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--gris-medio);
}

.mobile-nav-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
}

.mobile-nav-links a {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--gris-claro);
  font-weight: 500;
  transition: background 0.2s ease;
}

.mobile-nav-links a:hover {
  background: var(--gris-claro);
}

.mobile-portal-btn {
  background: var(--amarillo-caede);
  color: var(--negro-caede);
  margin: var(--space-md);
  padding: var(--space-md);
  text-align: center;
  border-radius: var(--radius);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  justify-content: center;
}

.btn-primary {
  background: var(--amarillo-caede);
  color: var(--negro-caede);
  border-color: var(--amarillo-caede);
}

.btn-primary:hover {
  background: #E5A600;
  border-color: #E5A600;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--negro-caede);
  border-color: var(--gris-medio);
}

.btn-outline:hover {
  background: var(--gris-claro);
  border-color: var(--negro-caede);
}

.btn-portal {
  background: var(--negro-caede);
  color: var(--blanco);
  padding: 10px 20px;
  font-size: 14px;
}

.btn-portal:hover {
  background: #000000;
  transform: translateY(-1px);
}

.btn-card {
  padding: 8px 16px;
  font-size: 14px;
  width: 100%;
  background: transparent;
  border: 1px solid var(--gris-medio);
}

.btn-card:hover {
  background: var(--amarillo-caede);
  border-color: var(--amarillo-caede);
  color: var(--negro-caede);
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: var(--space-4xl) 0;
  background: linear-gradient(135deg, var(--gris-claro) 0%, var(--blanco) 100%);
}

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

.hero-title {
  margin-bottom: var(--space-lg);
  color: var(--negro-caede);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--gris-oscuro);
  margin-bottom: var(--space-2xl);
  line-height: 1.8;
}

/* Search Box */
.hero-search {
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--blanco);
  border: 2px solid var(--gris-medio);
  border-radius: var(--radius);
  padding: var(--space-sm);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--amarillo-caede);
}

.search-box i {
  margin: 0 var(--space-md);
  color: var(--gris-oscuro);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  padding: var(--space-sm) 0;
}

.search-result {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--blanco);
  border-radius: var(--radius);
  display: none;
  text-align: left;
  box-shadow: var(--shadow);
}

.search-result.show {
  display: block;
}

.search-result.verified {
  border-left: 4px solid var(--verde-verificado);
}

.search-result.not-found {
  border-left: 4px solid var(--rojo-alerta);
}

/* Hero Actions */
.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

/* Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--amarillo-caede);
  line-height: 1;
  margin-bottom: var(--space-xs);
  font-family: var(--font-titulos);
}

.stat-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gris-oscuro);
}

.stat-divider {
  width: 1px;
  background: var(--gris-medio);
}

/* Section Styles */
.section-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--amarillo-caede);
  font-weight: 600;
  font-size: 15px;
  transition: gap 0.2s ease;
}

.section-link:hover {
  gap: var(--space-md);
}

/* Verificación Section */
.verificacion {
  padding: var(--space-4xl) 0;
  background: var(--blanco);
}

.verificacion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.verificacion-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--gris-claro);
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  background: var(--amarillo-caede);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon i {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.verificacion-card h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
  font-family: var(--font-principal);
}

.verificacion-card p {
  color: var(--gris-oscuro);
  line-height: 1.6;
}

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

/* Para Quién Section */
.para-quien {
  padding: var(--space-4xl) 0;
  background: var(--gris-claro);
}

.uso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.uso-card {
  background: var(--blanco);
  padding: var(--space-xl);
  border-radius: var(--radius);
  position: relative;
  box-shadow: var(--shadow);
}

.uso-number {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  background: var(--amarillo-caede);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.uso-card h3 {
  font-size: 18px;
  margin-bottom: var(--space-md);
  font-family: var(--font-principal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.uso-card p {
  color: var(--gris-oscuro);
  padding-right: var(--space-2xl);
}

/* Empresas Destacadas */
.empresas-destacadas {
  padding: var(--space-4xl) 0;
  background: var(--blanco);
}

.empresas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.empresa-card {
  background: var(--blanco);
  border: 1px solid var(--gris-medio);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.empresa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.empresa-logo {
  width: 48px;
  height: 48px;
  background: var(--negro-caede);
  color: var(--amarillo-caede);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.empresa-verified {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--verde-verificado);
  font-size: 14px;
  font-weight: 600;
}

.empresa-card h3 {
  font-size: 18px;
  margin-bottom: var(--space-sm);
  font-family: var(--font-principal);
}

.empresa-especialidad {
  color: var(--gris-oscuro);
  font-size: 14px;
  margin-bottom: var(--space-md);
}

.empresa-info {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 13px;
  color: var(--gris-oscuro);
}

.empresa-info span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.empresa-info i {
  width: 14px;
  height: 14px;
}

/* Solicitudes Recientes */
.solicitudes-recientes {
  padding: var(--space-4xl) 0;
  background: var(--gris-claro);
}

.solicitudes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.solicitud-item {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.solicitud-item:hover {
  transform: translateX(4px);
}

.solicitud-icon {
  width: 48px;
  height: 48px;
  background: var(--gris-claro);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.solicitud-content {
  flex: 1;
}

.solicitud-content h4 {
  font-size: 16px;
  margin-bottom: var(--space-sm);
  font-family: var(--font-principal);
}

.solicitud-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 14px;
  color: var(--gris-oscuro);
}

.solicitud-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.solicitud-meta i {
  width: 14px;
  height: 14px;
}

.solicitud-badge {
  background: var(--amarillo-caede);
  color: var(--negro-caede);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

/* CTA Final */
.cta-final {
  padding: var(--space-4xl) 0;
  background: var(--negro-caede);
  color: var(--blanco);
}

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

.cta-content h2 {
  color: var(--blanco);
  margin-bottom: var(--space-md);
}

.cta-content p {
  font-size: 18px;
  margin-bottom: var(--space-xl);
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn-primary {
  background: var(--amarillo-caede);
  color: var(--negro-caede);
}

.cta-buttons .btn-outline {
  color: var(--blanco);
  border-color: var(--blanco);
}

.cta-buttons .btn-outline:hover {
  background: var(--blanco);
  color: var(--negro-caede);
}

/* Footer */
.footer {
  background: var(--negro-caede);
  color: var(--blanco);
  padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand {
  margin-bottom: var(--space-xl);
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--amarillo-caede);
  margin-bottom: var(--space-md);
}

.footer-brand p {
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 14px;
  opacity: 0.8;
}

.footer-contact i {
  width: 16px;
  height: 16px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.footer-column h4 {
  color: var(--amarillo-caede);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
  font-family: var(--font-principal);
}

.footer-column a {
  display: block;
  padding: var(--space-xs) 0;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s ease, padding-left 0.2s ease;
}

.footer-column a:hover {
  opacity: 1;
  padding-left: var(--space-sm);
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  font-size: 14px;
  opacity: 0.6;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--amarillo-caede);
  border-color: var(--amarillo-caede);
  color: var(--negro-caede);
}

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

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: var(--blanco);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease;
  z-index: 90;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float i {
  width: 28px;
  height: 28px;
}

/* Chat Bot */
.chatbot-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--amarillo-caede);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
  z-index: 90;
  animation: chatbot-bounce 2s ease-in-out infinite;
}

.chatbot-button::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--amarillo-caede);
  opacity: 0.4;
  animation: chatbot-pulse 2s ease-in-out infinite;
}

.chatbot-button:hover {
  transform: scale(1.1);
  animation: none;
}

.chatbot-button:hover::before {
  animation: none;
}

.chatbot-button-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

@keyframes chatbot-pulse {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes chatbot-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 420px;
  background: var(--blanco);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  z-index: 91;
  max-height: 650px;
  height: 650px;
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  background: var(--negro-caede);
  color: var(--blanco);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

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

.chatbot-header button {
  background: none;
  border: none;
  color: var(--blanco);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-header button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-reset-btn:hover {
  color: var(--amarillo-caede);
}

.chatbot-header i {
  width: 20px;
  height: 20px;
}

.chatbot-messages {
  flex: 1;
  padding: var(--space-lg);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: #FAFAFA;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #D0D0D0;
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: #B0B0B0;
}

.chat-message {
  margin-bottom: var(--space-md);
}

.chat-message.bot p {
  background: var(--blanco);
  padding: var(--space-md);
  border-radius: 12px;
  margin-bottom: var(--space-sm);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid var(--gris-medio);
}

.chat-message.user {
  text-align: right;
}

.chat-message.user p {
  background: var(--amarillo-caede);
  display: inline-block;
  padding: var(--space-md);
  border-radius: 12px;
  color: var(--negro-caede);
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Bot Avatar Integration */
.bot-message-with-avatar {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.bot-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB800 0%, #FFA500 100%);
  padding: 0;
  border: 3px solid var(--blanco);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  object-fit: cover;
}

.bot-avatar.thinking {
  animation: pulse 1.5s ease-in-out infinite;
  border-color: var(--amarillo-caede);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.bot-message-content {
  flex: 1;
  min-width: 0;
}

.bot-message-content p {
  margin: 0;
}

/* AI & Cache Badges */
.ai-badge, .cache-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: var(--space-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ai-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--blanco);
}

.cache-badge {
  background: #10B981;
  color: var(--blanco);
}

/* Typing Indicator */
.typing-indicator {
  opacity: 0;
  animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.typing-dots {
  background: var(--blanco);
  padding: 12px 16px;
  border-radius: 12px;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid var(--gris-medio);
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--amarillo-caede);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.chatbot-options {
  padding: var(--space-md);
  border-top: 1px solid var(--gris-medio);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.chatbot-options button {
  background: var(--gris-claro);
  border: 1px solid var(--gris-medio);
  padding: var(--space-sm);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatbot-options button:hover {
  background: var(--amarillo-caede);
  border-color: var(--amarillo-caede);
}

/* Chat Bot Input */
.chatbot-input-container {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-top: 1px solid var(--gris-medio);
  background: var(--blanco);
}

.chatbot-input-container input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--gris-medio);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chatbot-input-container input:focus {
  border-color: var(--amarillo-caede);
}

.chat-send-btn {
  background: var(--amarillo-caede);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: #E5A600;
  transform: translateY(-1px);
}

.chat-send-btn i {
  width: 18px;
  height: 18px;
}

/* Chat Messages Enhanced */
.chat-message.bot p {
  white-space: pre-line;
  line-height: 1.6;
  font-size: 14px;
}

.chat-message.bot p strong {
  font-weight: 700;
  color: var(--negro-caede);
}

.chat-message.bot p em {
  font-style: italic;
  color: var(--gris-oscuro);
}

.chat-message.bot p code {
  background: #F0F0F0;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #D63384;
}

.chat-message.user p {
  font-size: 14px;
  line-height: 1.5;
}

.chat-message .bot-link {
  color: #0066CC;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(0, 102, 204, 0.3);
  text-underline-offset: 2px;
  display: inline;
  transition: all 0.2s ease;
  word-break: break-word;
  cursor: pointer;
}

.chat-message .bot-link:hover {
  color: #0052A3;
  text-decoration-color: rgba(0, 82, 163, 0.6);
  background: rgba(0, 102, 204, 0.05);
  border-radius: 2px;
}

.chat-message .bot-link:active {
  color: #003D7A;
}

/* Quick Reply Buttons */
.chat-quick-reply {
  margin-bottom: var(--space-md);
  text-align: center;
}

.quick-reply-btn {
  background: var(--blanco);
  border: 2px solid var(--amarillo-caede);
  color: var(--negro-caede);
  padding: var(--space-sm) var(--space-md);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-reply-btn:hover {
  background: var(--amarillo-caede);
  transform: translateY(-1px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--blanco);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--gris-medio);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 24px;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.modal-close i {
  width: 24px;
  height: 24px;
}

.modal-form {
  padding: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--gris-medio);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--amarillo-caede);
}

.form-group textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-note {
  text-align: center;
  color: var(--gris-oscuro);
  font-size: 14px;
  margin-top: var(--space-md);
}

/* Responsive */
@media (max-width: 1024px) {
  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .header-content {
    height: 64px;
  }

  .logo-text {
    display: none;
  }

  .hero {
    padding: var(--space-3xl) 0;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    gap: var(--space-xl);
  }

  .stat-number {
    font-size: 36px;
  }

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .chatbot-options {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Chat responsive - Full screen en mobile */
  .chatbot-window {
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    max-height: 100vh;
    max-height: 100dvh;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    border-radius: 0;
    margin: 0;
    z-index: 9999 !important;
  }

  .chatbot-header {
    border-radius: 0;
    padding: var(--space-md);
    position: relative;
    z-index: 10000;
  }

  .chatbot-header button {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }

  .chatbot-header i {
    width: 24px;
    height: 24px;
  }

  .chatbot-messages {
    padding: var(--space-md);
  }

  .chatbot-input-container {
    padding: var(--space-md);
  }

  .chatbot-input-container input {
    font-size: 16px; /* Previene zoom en iOS */
  }

  .chat-message.bot p {
    font-size: 15px;
    line-height: 1.5;
    padding: 12px;
  }

  .chat-message.user p {
    font-size: 15px;
    padding: 12px;
  }

  .bot-message-with-avatar {
    gap: 8px;
  }

  .bot-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .chatbot-button {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
  }

  .chatbot-button-avatar {
    width: 36px;
    height: 36px;
  }

  .whatsapp-float {
    bottom: 80px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
}

/* Directory Page Specific */
.filters-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.filters-sidebar {
  background: var(--gris-claro);
  padding: var(--space-lg);
  border-radius: var(--radius);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filter-group {
  margin-bottom: var(--space-xl);
}

.filter-group h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
  font-family: var(--font-principal);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.filter-option label {
  cursor: pointer;
  font-size: 14px;
}

.directory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.directory-search {
  flex: 1;
  max-width: 400px;
}

.directory-search input {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--gris-medio);
  border-radius: var(--radius);
  font-size: 15px;
}

.directory-count {
  font-weight: 600;
}

/* Portal Dashboard */
.portal-header {
  background: var(--negro-caede);
  color: var(--blanco);
  padding: var(--space-xl) 0;
  margin-bottom: var(--space-2xl);
}

.portal-company {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.company-info h1 {
  font-size: 28px;
  margin-bottom: var(--space-sm);
}

.company-meta {
  display: flex;
  gap: var(--space-lg);
  opacity: 0.9;
  font-size: 14px;
}

.tabs {
  display: flex;
  gap: var(--space-md);
  border-bottom: 2px solid var(--gris-medio);
  margin-bottom: var(--space-2xl);
}

.tab {
  padding: var(--space-md) var(--space-lg);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--gris-oscuro);
  transition: color 0.2s ease;
  position: relative;
}

.tab:hover {
  color: var(--negro-caede);
}

.tab.active {
  color: var(--amarillo-caede);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--amarillo-caede);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.documents-table {
  width: 100%;
  background: var(--blanco);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.documents-table thead {
  background: var(--gris-claro);
}

.documents-table th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.documents-table td {
  padding: var(--space-md);
  border-top: 1px solid var(--gris-medio);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge.active {
  background: #D1FAE5;
  color: var(--verde-verificado);
}

.status-badge.warning {
  background: #FEF3C7;
  color: #D97706;
}

.status-badge.expired {
  background: #FEE2E2;
  color: var(--rojo-alerta);
}

/* ========================================
   SPONSORS PAGE
   ======================================== */

.sponsor-category {
  margin-bottom: var(--space-3xl);
}

.sponsor-category .section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  color: var(--negro-caede);
  font-size: 28px;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.sponsor-card {
  background: var(--blanco);
  border: 2px solid var(--gris-medio);
  border-radius: var(--radius);
  padding: var(--space-xl);
  transition: all 0.3s ease;
}

.sponsor-card:hover {
  border-color: var(--amarillo-caede);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.sponsor-card.featured {
  border-color: var(--amarillo-caede);
  background: linear-gradient(to bottom, rgba(255,215,0,0.05), var(--blanco));
}

.sponsor-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.sponsor-logo-placeholder {
  width: 60px;
  height: 60px;
  background: var(--gris-claro);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.sponsor-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--negro-caede);
  margin: 0;
}

.sponsor-benefit {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: #FEF3C7;
  color: #92400E;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  font-weight: 600;
  font-size: 14px;
}

.sponsor-benefit i {
  width: 16px;
  height: 16px;
}

.sponsor-description {
  color: var(--gris-oscuro);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.sponsor-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sponsor-detail {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--gris-oscuro);
  font-size: 14px;
}

.sponsor-detail i {
  width: 16px;
  height: 16px;
  color: var(--amarillo-caede);
}

.sponsor-cta {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) 0;
}

.cta-box {
  background: linear-gradient(135deg, var(--amarillo-caede), #FDB813);
  color: var(--negro-caede);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta-box h3 {
  font-size: 28px;
  margin-bottom: var(--space-md);
  font-family: var(--font-display);
}

.cta-box p {
  font-size: 18px;
  margin-bottom: var(--space-xl);
  opacity: 0.9;
}

.cta-box .btn {
  background: var(--negro-caede);
  color: var(--blanco);
}

.cta-box .btn:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

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

  .sponsor-category .section-title {
    font-size: 22px;
  }

  .cta-box h3 {
    font-size: 22px;
  }

  .cta-box p {
    font-size: 16px;
  }
}


/* Sponsors Showcase on Home */
.sponsors-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

.sponsor-item {
  text-align: center;
  padding: var(--space-lg);
  background: var(--blanco);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  cursor: default;
}

.sponsor-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.sponsor-icon {
  font-size: 48px;
  margin-bottom: var(--space-sm);
}

.sponsor-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--negro-caede);
  margin-bottom: var(--space-xs);
}

.sponsor-benefit-tag {
  display: inline-block;
  background: #FEF3C7;
  color: #92400E;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .sponsors-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .sponsors-showcase {
    grid-template-columns: 1fr;
  }
}

