/* public/css/styles.css */
/* CSS global de Mora Spa: variables, reset, tipografía, utilidades. */

/* === FUENTES === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');
/* === FUENTES LOCALES === */
@font-face {
  font-family: 'Aileron';
  src: url('/fonts/Aileron-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('/fonts/Aileron-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('/fonts/Aileron-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('/fonts/Aileron-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === VARIABLES === */
:root {
  /* ---- 3 COLORES BASE ---- */
  --color-primary: #8C9E7B;        /* Verde Oliva */
  --color-accent: #C1A8A9;         /* Marrón Rosado */
  --color-bg-alt: #EBE0E3;         /* Rosa Muy Pálido */

  /* ---- DERIVADOS (variaciones de los 3 base) ---- */
  --color-primary-light: #A5B596;  /* Verde Oliva + claro (hover) */
  --color-accent-dark: #A88D8E;    /* Marrón Rosado + oscuro (hover) */
  --color-bg: #FCFAFB;             /* Blanco cálido (mezcla del pálido) */
  --color-text: #3A4333;           /* Verde muy oscuro (derivado del primario) */
  --color-text-muted: #7A8274;     /* Verde grisáceo suave */
  --color-border: #E0CDD0;         /* Rosa pálido más claro (mezcla del acento) */

  /* Estados (se mantienen) */
  --color-success: #4caf50;
  --color-error: #c44536;
  --color-warning: #e0a800;

    /* Fuentes */
  --font-display: 'Aileron', 'Helvetica Neue', sans-serif; /* Para Títulos */
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif; /* Para el Cuerpo */

  /* Bordes y sombras */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 8px rgba(140, 158, 123, 0.08);
  --shadow-md: 0 6px 20px rgba(140, 158, 123, 0.12);
  --shadow-lg: 0 16px 40px rgba(140, 158, 123, 0.15);

  --transition: all 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-accent);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

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

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p {
  margin-bottom: 0.8rem;
}

/* === UTILIDADES === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hidden { display: none !important; }
.muted { color: var(--color-text-muted); }
.text-center { text-align: center; }

/* === BOTONES === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn--primary:hover {
  background: var(--color-primary-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--accent {
  background: var(--color-accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--ghost:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--color-accent-dark);
  border-color: var(--color-accent);
}

.btn--outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn--block { width: 100%; }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn--lg { padding: 1rem 2.2rem; font-size: 1.05rem; }

/* === FORMULARIOS === */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.form-input,
.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: var(--transition);
}

.form-input:focus,
.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 168, 124, 0.15);
}

.form-input::placeholder {
  color: #aaa;
}

.form-error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

/* === ALERTAS === */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert--error {
  background: #fdecea;
  color: var(--color-error);
  border-left: 4px solid var(--color-error);
}

.alert--success {
  background: #edf7ed;
  color: #2e7d32;
  border-left: 4px solid var(--color-success);
}

.alert--warning {
  background: #fff8e1;
  color: #8a6d00;
  border-left: 4px solid var(--color-warning);
}

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge--success { background: #e6f4e6; color: #2e7d32; }
.badge--pending { background: #fff4d6; color: #8a6d00; }
.badge--error   { background: #fdecea; color: var(--color-error); }
.badge--info    { background: #e3f2fd; color: #1565c0; }

/* === SPINNER === */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === SCROLLBAR (Chrome) === */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-dark); }

/* ══════════════════════════════════════════════════
   BOTÓN CON ICONO DE WHATSAPP
   Agrega el SVG del logo de WhatsApp al inicio
   de cualquier .btn que tenga la clase .btn--wa
   ══════════════════════════════════════════════════ */
.btn--wa {
  position: relative;
  padding-left: 3rem !important;
}

.btn--wa::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M20.5 3.5A11.9 11.9 0 0 0 12 0C5.4 0 0 5.4 0 12c0 2.1.5 4.1 1.6 6L0 24l6.2-1.6c1.8 1 3.8 1.6 5.8 1.6 6.6 0 12-5.4 12-12 0-3.2-1.3-6.3-3.5-8.5zM12 21.8c-1.8 0-3.6-.5-5.2-1.4l-.4-.2-3.7 1 1-3.6-.3-.4A9.8 9.8 0 1 1 21.8 12c0 5.4-4.4 9.8-9.8 9.8zm5.4-7.4c-.3-.2-1.8-.9-2-1-.3-.1-.5-.2-.7.1s-.8 1-1 1.2c-.2.2-.4.2-.7.1-.3-.2-1.3-.5-2.4-1.5-.9-.8-1.5-1.8-1.7-2.1-.2-.3 0-.5.1-.6.1-.1.3-.4.5-.6.2-.2.2-.3.3-.5.1-.2 0-.4 0-.6 0-.2-.7-1.7-1-2.3-.3-.6-.5-.5-.7-.5h-.6c-.2 0-.6.1-.9.4-.3.3-1.2 1.1-1.2 2.7 0 1.6 1.2 3.2 1.4 3.4.2.2 2.3 3.5 5.6 4.9 3.3 1.4 3.3.9 3.9.9.6-.1 1.8-.7 2.1-1.5.3-.8.3-1.4.2-1.5-.1-.2-.3-.2-.6-.4z'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Variante para botones ghost (fondo claro) */
.btn--wa.btn--ghost::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f2b2b'><path d='M20.5 3.5A11.9 11.9 0 0 0 12 0C5.4 0 0 5.4 0 12c0 2.1.5 4.1 1.6 6L0 24l6.2-1.6c1.8 1 3.8 1.6 5.8 1.6 6.6 0 12-5.4 12-12 0-3.2-1.3-6.3-3.5-8.5zM12 21.8c-1.8 0-3.6-.5-5.2-1.4l-.4-.2-3.7 1 1-3.6-.3-.4A9.8 9.8 0 1 1 21.8 12c0 5.4-4.4 9.8-9.8 9.8zm5.4-7.4c-.3-.2-1.8-.9-2-1-.3-.1-.5-.2-.7.1s-.8 1-1 1.2c-.2.2-.4.2-.7.1-.3-.2-1.3-.5-2.4-1.5-.9-.8-1.5-1.8-1.7-2.1-.2-.3 0-.5.1-.6.1-.1.3-.4.5-.6.2-.2.2-.3.3-.5.1-.2 0-.4 0-.6 0-.2-.7-1.7-1-2.3-.3-.6-.5-.5-.7-.5h-.6c-.2 0-.6.1-.9.4-.3.3-1.2 1.1-1.2 2.7 0 1.6 1.2 3.2 1.4 3.4.2.2 2.3 3.5 5.6 4.9 3.3 1.4 3.3.9 3.9.9.6-.1 1.8-.7 2.1-1.5.3-.8.3-1.4.2-1.5-.1-.2-.3-.2-.6-.4z'/></svg>");
}