@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --azul:       #2E7DB1;
  --azul-claro: #4E97C6;
  --azul-osc:   #225F87;
  --vino:       #8E1F3F;
  --vino-claro: #B23456;
  --vino-osc:   #6E1530;
  --sol:        #E0A53A;
  --sol-claro:  #EFC777;
  --tinta:      #1A2230;
  --piedra:     #5C6573;
  --humo:       #98A0AD;
  --niebla:     #F2F5FA;
  --arena:      #F6F1E7;
  --linea:      #E2E7EF;
  --blanco:     #FFFFFF;
  --r-s: 8px; --r-m: 14px; --r-l: 22px; --r-pill: 999px;
  --sh-card: 0 1px 2px rgba(26,34,48,.06), 0 8px 24px rgba(26,34,48,.08);
  --sh-soft: 0 2px 10px rgba(26,34,48,.07);
  --f-archivo: 'Archivo', system-ui, sans-serif;
  --f-source:  'Source Sans 3', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--f-source); background: var(--niebla); color: var(--tinta); min-height: 100vh; line-height: 1.55; }

/* ── HEADER ── */
.site-header {
  background: var(--blanco);
  border-bottom: 1px solid var(--linea);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--sh-soft);
}
.header-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.logo-row { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-row img { height: 40px; width: auto; }
.logo-words { line-height: .9; font-family: var(--f-archivo); font-weight: 800; letter-spacing: -.01em; }
.logo-words .w1 { font-size: 13px; color: var(--vino); }
.logo-words .w2 { font-size: 13px; color: var(--azul); }
.site-nav { display: flex; gap: 2px; align-items: center; }
.site-nav a {
  font-family: var(--f-source); font-size: 14px; font-weight: 600;
  color: var(--piedra); text-decoration: none;
  padding: 7px 13px; border-radius: var(--r-s); transition: all .15s;
}
.site-nav a:hover { color: var(--tinta); background: var(--niebla); }
.site-nav a.active { color: var(--azul); }
.btn-admin {
  background: var(--tinta) !important; color: var(--blanco) !important;
  border-radius: var(--r-s) !important; font-weight: 700 !important;
}
.btn-admin:hover { background: var(--azul-osc) !important; }

/* ── FLAG BAR ── */
.flag-bar { display: flex; height: 7px; width: 100%; }
.flag-bar .f1 { flex:1; background: var(--azul); }
.flag-bar .f2 { flex:1; background: var(--sol); }
.flag-bar .f3 { flex:1; background: var(--vino); }
.flag-bar.pill { border-radius: var(--r-pill); overflow: hidden; }
.flag-bar.sm { height: 5px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-source); font-weight: 700; font-size: 15px;
  padding: 13px 20px; border-radius: 11px; border: none;
  cursor: pointer; text-decoration: none; transition: all .15s; line-height: 1;
}
.btn-primary   { background: var(--azul);  color: #fff; }
.btn-primary:hover  { background: var(--azul-osc); }
.btn-wine      { background: var(--vino);  color: #fff; }
.btn-wine:hover     { background: var(--vino-osc); }
.btn-outline   { background: transparent; border: 1.5px solid var(--linea); color: var(--tinta); }
.btn-outline:hover  { border-color: var(--azul); color: var(--azul); background: rgba(46,125,177,.05); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; border-radius: var(--r-s); }
.btn-wa  { background: #1FA855; color: #fff; }
.btn-wa:hover  { background: #178a45; }
.btn-full { width: 100%; }

/* ── RUBRO CHIPS ── */
.rubro-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: var(--r-pill);
  font-family: var(--f-source); font-weight: 700; font-size: 13.5px;
  line-height: 1;
}
.rubro-chip .chip-icon { width: 17px; height: 17px; display: block; flex-shrink: 0; }
.rubro-chip.azul { background: rgba(46,125,177,.10); color: var(--azul); }
.rubro-chip.vino { background: rgba(142,31,63,.10);  color: var(--vino); }

/* ── JOB CARD ── */
.job-card {
  background: var(--blanco); border: 1px solid var(--linea);
  border-radius: var(--r-l); box-shadow: var(--sh-card);
  overflow: hidden; display: block; text-decoration: none; color: inherit;
  transition: box-shadow .2s, transform .15s;
}
.job-card:hover { box-shadow: 0 4px 32px rgba(26,34,48,.13); transform: translateY(-2px); }
.job-card-top-bar { height: 5px; background: var(--azul); }
.job-card-body { padding: 20px 22px 22px; }
.job-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.badge-destacado {
  background: var(--sol); color: #553a06;
  font-family: var(--f-archivo); font-weight: 800; font-size: 11px;
  padding: 4px 10px; border-radius: var(--r-pill); letter-spacing: .04em;
  white-space: nowrap; flex-shrink: 0;
}
.badge-nuevo {
  background: rgba(46,125,177,.12); color: var(--azul);
  font-family: var(--f-archivo); font-weight: 800; font-size: 11px;
  padding: 4px 10px; border-radius: var(--r-pill); letter-spacing: .04em;
  white-space: nowrap; flex-shrink: 0;
}
.job-title {
  font-family: var(--f-archivo); font-weight: 800; font-size: 22px;
  line-height: 1.05; letter-spacing: -.01em; color: var(--tinta);
  margin-bottom: 4px;
}
.job-empresa { font-size: 15px; font-weight: 600; color: var(--piedra); margin-bottom: 14px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--piedra); margin-bottom: 14px; }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-meta .salario { font-family: var(--f-archivo); font-weight: 800; color: var(--vino); font-size: 16px; }
.job-desc { font-size: 14px; color: var(--piedra); line-height: 1.55; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Reveal contact */
.contact-reveal-btn {
  width: 100%; border: none; cursor: pointer; background: var(--azul); color: #fff;
  font-family: var(--f-source); font-weight: 700; font-size: 15px;
  padding: 13px 16px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .15s;
}
.contact-reveal-btn:hover { background: var(--azul-osc); }
.contact-block { border: 1px solid var(--linea); border-radius: var(--r-m); overflow: hidden; margin-top: 0; }
.contact-block-head {
  background: var(--niebla); padding: 10px 16px;
  font-family: var(--f-archivo); font-size: 11px; font-weight: 700;
  color: var(--azul); letter-spacing: .06em; text-transform: uppercase;
}
.contact-block-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.contact-link {
  display: flex; align-items: center; gap: 11px;
  font-size: 15px; font-weight: 600; color: var(--tinta);
  text-decoration: none; border-radius: var(--r-s); padding: 4px 0;
  transition: color .15s;
}
.contact-link:hover { color: var(--azul); }
.contact-link svg { color: var(--azul); flex-shrink: 0; }
.contact-block-foot {
  background: var(--niebla); padding: 9px 16px;
  font-size: 11.5px; color: var(--humo); line-height: 1.4;
}
/* animate reveal */
.contact-anim { animation: revealIn .18s ease; }
@keyframes revealIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--tinta); font-family: var(--f-archivo); letter-spacing: .02em; }
.form-input, .form-select, .form-textarea {
  width: 100%; border: 1.5px solid var(--linea); border-radius: var(--r-s);
  padding: 11px 14px; font-size: 15px; font-family: var(--f-source);
  color: var(--tinta); background: var(--blanco); outline: none; transition: border-color .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(46,125,177,.1); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--humo); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  padding: 14px 20px; border-radius: var(--r-m); font-size: 14px; font-weight: 600;
  color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transform: translateY(80px); opacity: 0; transition: all .3s;
  font-family: var(--f-source);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #1a5c38; }
.toast.error   { background: var(--vino); }

/* ── SECTION UTILS ── */
.section-eyebrow { font-family: var(--f-archivo); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--azul); margin-bottom: 8px; }
.section-title { font-family: var(--f-archivo); font-weight: 800; font-size: clamp(24px,4vw,34px); letter-spacing: -.02em; color: var(--tinta); line-height: 1.05; margin-bottom: 6px; }
.section-sub { font-size: 16px; color: var(--piedra); margin-bottom: 32px; }
.section-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── CARDS GRID ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 64px 24px; color: var(--piedra); }
.empty-state .es-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state h3 { font-family: var(--f-archivo); font-size: 18px; font-weight: 800; margin-bottom: 6px; color: var(--tinta); }

/* ── SPINNER ── */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER ── */
.site-footer { background: var(--tinta); color: rgba(255,255,255,.65); padding: 48px 24px 24px; margin-top: 64px; }
.footer-inner { max-width: 1160px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; margin-bottom: 36px; }
.footer-brand .logo-row .w1 { color: #fff; }
.footer-brand .logo-row .w2 { color: rgba(255,255,255,.7); }
.footer-brand p { font-size: 13px; margin-top: 12px; color: rgba(255,255,255,.5); max-width: 240px; line-height: 1.55; }
.footer-col h4 { font-family: var(--f-archivo); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.35); margin-bottom: 12px; }
.footer-col a { display: block; color: rgba(255,255,255,.6); text-decoration: none; font-size: 14px; margin-bottom: 8px; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-copy { font-size: 12px; opacity: .35; }

/* ── ADMIN ── */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--tinta); padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.admin-sidebar-head { padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 8px; }
.admin-sidebar-head .logo-words .w1 { color: #fff; font-size: 11px; }
.admin-sidebar-head .logo-words .w2 { color: rgba(255,255,255,.6); font-size: 11px; }
.admin-sidebar-head .sub { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 4px; font-family: var(--f-archivo); text-transform: uppercase; letter-spacing: .08em; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: rgba(255,255,255,.6); font-size: 14px; font-weight: 600; cursor: pointer; border: none; background: none; width: 100%; text-align: left; font-family: var(--f-source); transition: all .15s; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-content { background: var(--niebla); padding: 36px; }
.stat-card { background: var(--blanco); border-radius: var(--r-m); padding: 20px 24px; border-left: 4px solid var(--azul); box-shadow: var(--sh-soft); }
.stat-card.vino { border-color: var(--vino); }
.stat-card.sol { border-color: var(--sol); }
.stat-card .num { font-family: var(--f-archivo); font-size: 2.2rem; font-weight: 800; color: var(--tinta); }
.stat-card .lbl { font-size: 13px; color: var(--piedra); margin-top: 2px; }
.data-table { width: 100%; border-collapse: collapse; background: var(--blanco); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--sh-soft); }
.data-table th { background: var(--tinta); color: rgba(255,255,255,.6); font-family: var(--f-archivo); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; padding: 12px 16px; text-align: left; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--niebla); font-size: 14px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--niebla); }
.badge-status { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); font-family: var(--f-archivo); letter-spacing: .03em; }
.badge-activo { background: rgba(46,125,177,.12); color: var(--azul); }
.badge-inactivo { background: var(--niebla); color: var(--humo); }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(26,34,48,.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--blanco); border-radius: var(--r-l); max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 32px; position: relative; box-shadow: 0 24px 80px rgba(26,34,48,.25); }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--niebla); border: none; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; color: var(--piedra); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 24px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .site-nav a:not(.btn-admin) { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .hero-search-box { flex-direction: column; border-radius: var(--r-m); }
  .hero-search-box button { border-radius: 0 0 var(--r-m) var(--r-m) !important; }
}
