/*
Theme Name: WeHelp Child
Template: generatepress
Author: WeHelp
Description: Theme child de WeHelp — marketplace de canguros y language buddies. Construido a medida sobre GeneratePress + ACF + Amelia.
Version: 1.0.0
*/

:root {
  --wh-primary: oklch(0.62 0.19 30);
  --wh-primary-ink: oklch(0.99 0.01 30);
  --wh-secondary: oklch(0.88 0.13 85);
  --wh-secondary-ink: oklch(0.3 0.06 60);
  --wh-accent: oklch(0.42 0.09 200);
  --wh-accent-ink: oklch(0.99 0.01 195);
  --wh-accent-soft: oklch(0.93 0.045 195);
  --wh-warm-soft: oklch(0.93 0.05 40);
  --wh-gold-soft: oklch(0.94 0.06 85);
  --wh-bg: oklch(0.995 0.008 235);
  --wh-bg-soft: oklch(0.975 0.012 235);
  --wh-ink: oklch(0.26 0.045 285);
  --wh-ink-soft: oklch(0.46 0.04 285);
  --wh-ink-muted: oklch(0.55 0.03 285);
  --wh-line: oklch(0.9 0.02 85);
  --wh-navy: oklch(0.28 0.05 285);
  --wh-navy-card: oklch(0.33 0.05 285);
  --wh-star: oklch(0.78 0.14 75);
  --wh-radius-sm: 12px;
  --wh-radius-md: 20px;
  --wh-radius-lg: 28px;
  --wh-radius-xl: 44px;
  --wh-radius-pill: 99px;
  --wh-shadow-soft: 0 10px 22px -18px oklch(0.3 0.05 285 / 0.55);
  --wh-shadow-med: 0 20px 44px -30px oklch(0.3 0.05 285 / 0.6);
  --wh-shadow-high: 0 30px 60px -34px oklch(0.3 0.05 285 / 0.55);
  --wh-ease: cubic-bezier(.2,.8,.2,1);
  --wh-font-heading: 'Baloo 2', system-ui, sans-serif;
  --wh-font-body: 'Figtree', system-ui, sans-serif;
}

@keyframes whFloat { 0%,100% { transform:translate(0,0) scale(1); } 50% { transform:translate(18px,-22px) scale(1.06); } }
@keyframes whCloud { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-15px); } }
@keyframes whBob { 0%,100% { transform:translateY(0) rotate(-2deg); } 50% { transform:translateY(-11px) rotate(1.5deg); } }
@keyframes whBob2 { 0%,100% { transform:translateY(-6px) rotate(2deg); } 50% { transform:translateY(6px) rotate(-1deg); } }
@keyframes whPulse { 0% { transform:scale(1); opacity:0.55; } 70% { transform:scale(2.2); opacity:0; } 100% { transform:scale(2.2); opacity:0; } }
@keyframes whBlink { 0%,100% { opacity:1; } 50% { opacity:0.25; } }
@keyframes whDraw { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@keyframes whWiggle { 0%,100% { transform:rotate(-1.6deg); } 50% { transform:rotate(1.6deg); } }
@keyframes whMarquee { from { transform:translate3d(0,0,0); } to { transform:translate3d(-50%,0,0); } }
@keyframes whDrift { from { transform:translateX(-35%); } to { transform:translateX(135%); } }
@keyframes whSpin { from { transform:rotate(0deg);} to { transform:rotate(360deg);} }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--wh-bg);
  color: var(--wh-ink);
  font-family: var(--wh-font-body);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}
a { color: var(--wh-primary); text-decoration: none; transition: color .2s; }
a:hover { color: oklch(0.48 0.15 30); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 {
  font-family: var(--wh-font-heading);
  font-weight: 700;
  letter-spacing: -0.012em;
  margin: 0 0 .5em;
  color: var(--wh-ink);
}
.wh-container { max-width: 1320px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 56px); }
.wh-section { padding: clamp(30px, 4vw, 66px) 0; }

/* ---------- Header ---------- */
.wh-header { position: sticky; top: 0; z-index: 60; padding: 12px clamp(14px, 3vw, 44px); }
.wh-header-bar {
  display: flex; align-items: center; gap: clamp(6px, 1vw, 16px); flex-wrap: wrap;
  padding: 10px 10px 10px 16px;
  background: oklch(1 0 0 / 0.86); backdrop-filter: blur(16px);
  border: 1.5px solid var(--wh-line); border-radius: 26px;
  box-shadow: 0 14px 34px -26px oklch(0.3 0.05 285 / 0.5);
}
.wh-logo img { display: block; height: 42px; width: auto; transition: transform .35s var(--wh-ease); }
.wh-logo:hover img { transform: scale(1.06) rotate(-2deg); }
.wh-nav { display: flex; align-items: center; gap: 0; flex: 1 1 auto; font-size: 14px; font-weight: 600; white-space: nowrap; }
.wh-nav a { color: oklch(0.34 0.045 285); padding: 8px 10px; border-radius: var(--wh-radius-pill); transition: background .25s, color .25s; }
.wh-nav a:hover { background: oklch(0.93 0.035 85); color: oklch(0.2 0.04 285); }
.wh-header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: nowrap; white-space: nowrap; }

.wh-btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--wh-font-heading); font-weight: 700; border: 0; border-radius: var(--wh-radius-pill); cursor: pointer; transition: transform .3s var(--wh-ease), box-shadow .3s, background .25s; text-align: center; }
.wh-btn:hover { transform: translateY(-3px) scale(1.02); }
.wh-btn-lg { font-size: 18px; padding: 13px 24px; }
.wh-btn-md { font-size: 14px; padding: 9px 14px; }
.wh-btn-primary { background: var(--wh-primary); color: var(--wh-primary-ink); box-shadow: 0 12px 26px -14px oklch(0.62 0.19 30 / 0.6); }
.wh-btn-primary:hover { color: var(--wh-primary-ink); box-shadow: 0 16px 30px -14px oklch(0.62 0.19 30 / 0.75); }
.wh-btn-secondary { background: var(--wh-secondary); color: var(--wh-secondary-ink); }
.wh-btn-secondary:hover { color: var(--wh-secondary-ink); box-shadow: 0 12px 26px -14px oklch(0.75 0.14 70 / 0.9); }
.wh-btn-accent { background: var(--wh-accent); color: var(--wh-accent-ink); }
.wh-btn-accent:hover { color: var(--wh-accent-ink); box-shadow: 0 12px 26px -14px oklch(0.42 0.09 200 / 0.8); }
.wh-btn-ghost { background: none; color: var(--wh-ink); border: 1.5px solid var(--wh-line); }
.wh-btn-ghost:hover { color: var(--wh-ink); border-color: var(--wh-primary); }

.wh-mobile-header { display: none; }
.wh-burger { display: flex; flex-direction: column; justify-content: center; gap: 4.5px; width: 44px; height: 44px; padding: 0 11px; border: 0; border-radius: 16px; background: var(--wh-accent); cursor: pointer; }
.wh-burger span { display: block; height: 2.5px; border-radius: 9px; background: var(--wh-accent-ink); }

.wh-mobile-panel { position: fixed; top: 0; right: 0; height: 100vh; z-index: 90; width: min(86%, 330px); display: flex; flex-direction: column; gap: 18px; padding: 18px 20px 26px; background: var(--wh-bg); box-shadow: -24px 0 60px -30px oklch(0.26 0.045 285 / 0.6); transform: translateX(106%); transition: transform .42s var(--wh-ease); overflow-y: auto; }
.wh-mobile-panel.is-open { transform: translateX(0); }
.wh-mobile-overlay { position: fixed; inset: 0; z-index: 88; background: oklch(0.26 0.045 285 / 0.5); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .38s, visibility .38s; }
.wh-mobile-overlay.is-open { opacity: 1; visibility: visible; }

@media (max-width: 900px) {
  .wh-nav, .wh-header-actions { display: none; }
  .wh-mobile-header { display: block; }
  .wh-header { display: none; }
}
@media (min-width: 901px) {
  .wh-mobile-header { display: none; }
}

/* ---------- Buttons chips ---------- */
.wh-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; padding: 7px 14px; border-radius: var(--wh-radius-pill); }
.wh-chip-warm { color: oklch(0.42 0.13 30); background: var(--wh-warm-soft); }
.wh-chip-accent { color: oklch(0.36 0.07 210); background: var(--wh-accent-soft); }
.wh-dot { position: relative; display: flex; }
.wh-dot span:first-child { width: 8px; height: 8px; border-radius: 99px; background: var(--wh-primary); }
.wh-dot span:last-child { position: absolute; inset: 0; border-radius: 99px; background: var(--wh-primary); animation: whPulse 2.4s ease-out infinite; }

/* ---------- Cards ---------- */
.wh-card {
  display: flex; flex-direction: column; color: inherit; background: oklch(1 0 0);
  border: 1.5px solid var(--wh-line); border-radius: 26px; overflow: hidden;
  box-shadow: var(--wh-shadow-soft); transition: transform .4s var(--wh-ease), box-shadow .4s;
}
.wh-card:hover { transform: translateY(-9px); box-shadow: 0 30px 50px -24px oklch(0.3 0.05 285 / 0.5); }
.wh-card-media { position: relative; flex: 0 0 auto; aspect-ratio: 1/1.02; overflow: hidden; background: var(--wh-warm-soft); display: flex; align-items: center; justify-content: center; }
.wh-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--wh-ease); }
.wh-card:hover .wh-card-media img { transform: scale(1.07); }
.wh-card-initials { font-family: var(--wh-font-heading); font-size: 38px; font-weight: 700; color: oklch(0.62 0.09 60); }
.wh-badge-verified { position: absolute; top: 8px; right: 8px; height: 27px; width: auto; filter: drop-shadow(0 3px 7px oklch(0.2 0 0 / .45)); }
.wh-badge-lang { position: absolute; left: 9px; top: 9px; display: flex; align-items: center; gap: 6px; background: oklch(1 0 0 / .94); padding: 4px 10px 4px 5px; border-radius: 99px; box-shadow: 0 4px 12px -6px oklch(0.2 0 0 / .4); font-size: 12px; font-weight: 800; }
.wh-badge-lang img { width: 20px; height: 14px; object-fit: cover; border-radius: 3px; }
.wh-card-body { flex: 1; display: flex; flex-direction: column; padding: 13px 14px 14px; }
.wh-card-name { font-family: var(--wh-font-heading); font-size: 17.5px; font-weight: 600; line-height: 1.2; }
.wh-card-city { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; color: var(--wh-ink-muted); }
.wh-card-city span { width: 5px; height: 5px; border-radius: 99px; background: var(--wh-secondary); }
.wh-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 11px; border-top: 1.5px dashed var(--wh-line); }
.wh-stars { font-size: 12.5px; letter-spacing: .5px; color: var(--wh-star); }
.wh-price-pill { font-family: var(--wh-font-heading); font-size: 15px; font-weight: 700; color: var(--wh-secondary-ink); background: var(--wh-secondary); padding: 3px 12px; border-radius: 99px; transition: transform .4s var(--wh-ease); }
.wh-card:hover .wh-price-pill { transform: scale(1.08) rotate(-3deg); }
.wh-price-pill.wh-price-accent { color: oklch(0.28 0.06 210); background: var(--wh-accent-soft); }

/* ---------- Marquee / rail ---------- */
.wh-rail { display: flex; gap: 16px; overflow-x: auto; padding: 6px clamp(18px,4vw,56px) 18px; scroll-snap-type: x proximity; }
.wh-rail .wh-card { flex: 0 0 clamp(180px, 18vw, 248px); scroll-snap-align: start; }
.wh-marquee-track { display: flex; width: max-content; }
.wh-marquee-anim { animation: whMarquee 62s linear infinite; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--wh-ease), transform .7s var(--wh-ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Clouds / blobs ---------- */
.wh-cloud { position: absolute; pointer-events: none; animation: whCloud 10s ease-in-out infinite; }
.wh-blob { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; animation: whFloat 18s ease-in-out infinite; }

/* ---------- Footer ---------- */
.wh-footer { position: relative; overflow: hidden; background: var(--wh-navy); color: oklch(0.93 0.02 85); border-radius: 44px 44px 0 0; padding: clamp(34px,4vw,60px) clamp(18px,4vw,56px) 26px; }
.wh-footer a { color: oklch(0.84 0.02 85); }
.wh-footer a:hover { color: var(--wh-accent); }
.wh-footer-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.wh-footer-logo { display: inline-block; background: #fff; padding: 10px 14px; border-radius: 20px; }
.wh-footer-logo img { height: 50px; }
.wh-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; font-size: 15px; font-weight: 500; }
.wh-social { display: flex; gap: 12px; }
.wh-social a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 99px; background: var(--wh-navy-card); color: oklch(0.93 0.02 85); transition: transform .3s var(--wh-ease), background .3s; }
.wh-social a:hover { transform: translateY(-3px); background: var(--wh-accent); }

/* ---------- WhatsApp float ---------- */
.wh-whatsapp-fab { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: flex; align-items: center; gap: 10px; font-family: var(--wh-font-heading); font-size: 17px; font-weight: 700; color: var(--wh-primary-ink); background: var(--wh-primary); padding: 13px 22px; border-radius: 99px; box-shadow: 0 18px 36px -16px oklch(0.62 0.19 30 / .75); transition: transform .3s var(--wh-ease); }
.wh-whatsapp-fab:hover { color: var(--wh-primary-ink); transform: translateY(-4px) scale(1.04); }

/* ---------- Forms (registro / login / verificación) ---------- */
.wh-form-shell { max-width: 640px; margin: 0 auto; }
.wh-form-card { background: #fff; border: 1.5px solid var(--wh-line); border-radius: var(--wh-radius-lg); padding: clamp(24px,3vw,40px); box-shadow: var(--wh-shadow-med); }
.wh-field { margin-bottom: 18px; }
.wh-field label { display: block; font-size: 13px; font-weight: 700; color: var(--wh-ink); margin-bottom: 6px; }
.wh-field .wh-hint { font-size: 12.5px; color: var(--wh-ink-muted); margin-top: 4px; }
.wh-field input[type="text"], .wh-field input[type="email"], .wh-field input[type="password"], .wh-field input[type="number"], .wh-field input[type="tel"], .wh-field input[type="date"], .wh-field select, .wh-field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 16px; border: 1.5px solid var(--wh-line); border-radius: var(--wh-radius-sm); background: var(--wh-bg-soft); color: var(--wh-ink); transition: border-color .2s;
}
.wh-field input:focus, .wh-field select:focus, .wh-field textarea:focus { outline: none; border-color: var(--wh-accent); }
.wh-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; }
.wh-check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.wh-check-chip { position: relative; }
.wh-check-chip input { position: absolute; opacity: 0; }
.wh-check-chip label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--wh-line); background: var(--wh-bg-soft); cursor: pointer; transition: all .2s; }
.wh-check-chip input:checked + label { background: var(--wh-accent-soft); border-color: var(--wh-accent); color: oklch(0.28 0.06 210); }
.wh-form-error { background: oklch(0.95 0.05 30); color: oklch(0.42 0.13 30); border-radius: var(--wh-radius-sm); padding: 12px 16px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.wh-form-success { background: var(--wh-accent-soft); color: oklch(0.28 0.06 210); border-radius: var(--wh-radius-sm); padding: 12px 16px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.wh-file-drop { border: 1.5px dashed var(--wh-line); border-radius: var(--wh-radius-md); padding: 20px; text-align: center; background: var(--wh-bg-soft); }
.wh-file-drop.has-file { border-color: var(--wh-accent); background: var(--wh-accent-soft); }
.wh-verify-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 99px; }
.wh-verify-status.pending { color: oklch(0.42 0.13 30); background: var(--wh-warm-soft); }
.wh-verify-status.verified { color: var(--wh-accent); background: var(--wh-accent-soft); }
.wh-verify-status.rejected { color: oklch(0.5 0.17 30); background: oklch(0.95 0.05 30); }

/* ---------- Dashboard (panel canguro/buddy) ---------- */
.wh-dash { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.wh-dash-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1.5px solid var(--wh-line); border-radius: var(--wh-radius-lg); padding: 18px; box-shadow: var(--wh-shadow-soft); }
.wh-dash-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; font-weight: 700; font-size: 14.5px; color: var(--wh-ink); }
.wh-dash-nav a:hover, .wh-dash-nav a.is-active { background: var(--wh-accent-soft); color: oklch(0.28 0.06 210); }
.wh-dash-panel { background: #fff; border: 1.5px solid var(--wh-line); border-radius: var(--wh-radius-lg); padding: clamp(20px,3vw,32px); box-shadow: var(--wh-shadow-soft); }
@media (max-width: 860px) { .wh-dash { grid-template-columns: 1fr; } .wh-dash-nav { position: static; flex-direction: row; overflow-x: auto; } }

/* ---------- Listado de canguros (sidebar de filtros + grid) ---------- */
.wh-listing-layout { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
.wh-listing-layout > aside { position: sticky; top: 100px; }
.wh-listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 20px; }
@media (max-width: 860px) {
  .wh-listing-layout { grid-template-columns: 1fr; }
  .wh-listing-layout > aside { position: static; }
}

/* ---------- Perfil individual (foto + info, contenido + sidebar sticky) ---------- */
.wh-profile-media-grid { display: grid; grid-template-columns: minmax(240px,320px) 1fr; gap: clamp(24px,4vw,48px); align-items: start; }
@media (max-width: 680px) {
  .wh-profile-media-grid { grid-template-columns: 1fr; }
  .wh-profile-media-grid > div:first-child { max-width: 280px; margin: 0 auto; aspect-ratio: 3/3 !important; }
}

.wh-profile-content-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(240px,1fr); gap: clamp(24px,3vw,40px); align-items: start; }
.wh-profile-sidebar { position: sticky; top: 110px; }
@media (max-width: 900px) {
  .wh-profile-content-grid { grid-template-columns: 1fr; }
  .wh-profile-sidebar { position: static; }
}

/* ---------- Stat grid del perfil: nunca menos de 2 columnas en móvil ---------- */
.wh-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px,1fr)); gap: 1px; background: var(--wh-line); border: 1.5px solid var(--wh-line); border-radius: 20px; overflow: hidden; }
@media (max-width: 480px) { .wh-stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Salvaguardas generales de responsive ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
table { max-width: 100%; }
img, video { max-width: 100%; height: auto; }

@media (max-width: 480px) {
  h1 { font-size: clamp(26px, 8vw, 34px) !important; }
  .wh-container { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
