/**
 * Design System - Hablemos Bien
 * Extraído de index.html para uso compartido en toda la aplicación
 */

/* Importar fuentes */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&display=swap');

/* Variables CSS */
:root {
  --color-cream: #FDF8F3;
  --color-warm-white: #FFFCF9;
  --color-sage: #7A9E7E;
  --color-sage-light: #A8C5AB;
  --color-sage-dark: #5B7A5E;
  --color-terracotta: #C4785E;
  --color-terracotta-light: #E8A088;
  --color-navy: #2C3E50;
  --color-navy-light: #34495E;
  --color-text: #3D3D3D;
  --color-text-light: #6B6B6B;
  --color-border: #E8E2DB;
  
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-medium: 0 8px 40px rgba(0,0,0,0.08);
  --shadow-large: 0 20px 60px rgba(0,0,0,0.1);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-navy);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
}

p {
  color: var(--color-text-light);
  line-height: 1.7;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(122, 158, 126, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(122, 158, 126, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--color-navy);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-sage);
  background: var(--color-warm-white);
}

.btn-danger {
  background: var(--color-terracotta);
  color: white;
  box-shadow: 0 4px 16px rgba(196, 120, 94, 0.35);
}

.btn-danger:hover {
  background: var(--color-terracotta-light);
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

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

.card-compact {
  padding: 24px;
  border-radius: var(--radius-md);
}

.card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 8px;
}

/* Formularios */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: white;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(122, 158, 126, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-light);
  opacity: 0.6;
}

label {
  display: block;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* Alertas */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-error {
  background: #FEE2E2;
  border: 2px solid #FCA5A5;
  color: #991B1B;
}

.alert-success {
  background: #D1FAE5;
  border: 2px solid #86EFAC;
  color: #065F46;
}

.alert-info {
  background: #DBEAFE;
  border: 2px solid #93C5FD;
  color: #1E40AF;
}

.alert-warning {
  background: #FEF3C7;
  border: 2px solid #FCD34D;
  color: #92400E;
}

/* Badges y Tags */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-primary {
  background: var(--color-sage-light);
  color: var(--color-sage-dark);
}

.badge-secondary {
  background: var(--color-border);
  color: var(--color-text);
}

/* Navegación */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(253, 248, 243, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
  padding: 12px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-navy);
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(122, 158, 126, 0.3);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-large);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-navy);
}

/* Grids */
.grid {
  display: grid;
  gap: 24px;
}

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

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

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Utilidades */
.text-center {
  text-align: center;
}

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

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

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

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

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.w-full {
  width: 100%;
}

.hidden {
  display: none;
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-bubble.sent {
  background: var(--color-sage-dark);
  color: white !important;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.chat-bubble.sent * {
  color: white !important;
}

.chat-bubble.sent p {
  color: white !important;
}

.chat-bubble.received {
  background: white;
  color: var(--color-text);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-soft);
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .modal {
    padding: 24px;
  }
  
  .card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  
  .btn-large {
    padding: 14px 28px;
    font-size: 1rem;
  }
}
