/* ==========================================================================
   MatchAbogados — hoja de estilos
   Paleta: azul jurídico + dorado. Diseño moderno tipo marketplace.
   ========================================================================== */

:root {
  --navy: #12395c;
  --navy-dark: #0d2a45;
  --navy-light: #1d4e7a;
  --gold: #d7a94b;
  --gold-dark: #bd9236;
  --ink: #1c2733;
  --muted: #5c6b7a;
  --line: #e3e8ee;
  --bg: #f6f8fb;
  --white: #ffffff;
  --green: #1f9d63;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(16, 42, 67, 0.08);
  --shadow-lg: 0 16px 48px rgba(16, 42, 67, 0.14);
  --maxw: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -.5px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--navy-light); text-decoration: none; }
a:hover { color: var(--gold-dark); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .98rem; cursor: pointer;
  padding: 12px 22px; border-radius: 40px; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: #3a2c05; }
.btn--gold:hover { background: var(--gold-dark); color: #3a2c05; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-dark); color: #fff; }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { background: #fff; border-color: var(--line); color: var(--navy); }
.btn--outline:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn--block { width: 100%; justify-content: center; }
.btn--sm { padding: 9px 16px; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand .logo { width: 34px; height: 34px; }
.brand b { color: var(--gold-dark); }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink); font-weight: 600; font-size: .96rem; }
.nav a:hover { color: var(--gold-dark); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  color: #fff; position: relative; overflow: hidden;
  padding: 72px 0 84px;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(215,169,75,.28), transparent 65%);
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero p { color: #d7e2ee; font-size: 1.18rem; max-width: 52ch; }
.hero .eyebrow { color: var(--gold); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-size: .82rem; margin-bottom: 14px; }

/* ---------- Buscador ---------- */
.searchbar {
  margin-top: 30px; background: #fff; border-radius: var(--radius);
  padding: 14px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px;
  box-shadow: var(--shadow-lg); max-width: 780px;
}
.searchbar .field { display: flex; flex-direction: column; text-align: left; }
.searchbar label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 0 6px; }
.searchbar select, .searchbar input {
  border: 0; padding: 8px 6px; font-size: 1rem; color: var(--ink);
  background: transparent; outline: none; font-family: inherit;
}
.hero-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .num { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.hero-stats .lbl { color: #c3d3e2; font-size: .9rem; }

/* ---------- Especialidades ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.spec-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.spec-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.spec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.spec-card .ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: #eef3f8; color: var(--navy); }
.spec-card h3 { font-size: 1.05rem; margin: 0; }
.spec-card .count { font-size: .85rem; color: var(--muted); }

/* ---------- Cards de abogados ---------- */
.lawyer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.lawyer-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .2s;
}
.lawyer-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.lawyer-card__top { position: relative; padding: 22px 22px 0; display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; color: #fff;
  border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.12);
}
.lawyer-card__name { font-size: 1.12rem; font-weight: 700; color: var(--navy); margin: 0; }
.lawyer-card__firm { font-size: .86rem; color: var(--muted); }
.badge-pro {
  position: absolute; top: 16px; right: 16px; background: var(--gold);
  color: #3a2c05; font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
}
.lawyer-card__body { padding: 14px 22px 0; flex: 1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { background: #eef3f8; color: var(--navy); font-size: .76rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.stars { color: var(--gold); font-size: .95rem; letter-spacing: 1px; }
.rating-row { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.meta-row { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.lawyer-card__foot { padding: 16px 22px 22px; display: flex; gap: 10px; }
.lawyer-card__foot .btn { flex: 1; }

/* ---------- Directorio (layout con filtros) ---------- */
.dir-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: start; }
.filters {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: sticky; top: 88px;
}
.filters h3 { font-size: 1rem; margin-bottom: 14px; }
.filter-group { border-top: 1px solid var(--line); padding: 16px 0; }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group > label { display: block; font-weight: 700; font-size: .82rem; color: var(--navy); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .92rem; cursor: pointer; color: var(--ink); }
.check input { accent-color: var(--navy); width: 16px; height: 16px; }
.field-full { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit; color: var(--ink); background: #fff; }
.dir-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.dir-count { font-weight: 600; color: var(--muted); }
.no-results { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px; text-align: center; color: var(--muted); }

/* ---------- Perfil de abogado ---------- */
.profile-hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #fff; padding: 48px 0; }
.profile-top { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.profile-top .avatar { width: 108px; height: 108px; font-size: 2.3rem; }
.profile-top h1 { color: #fff; margin: 0 0 6px; }
.profile-top .firm { color: #cfdcea; font-size: 1.05rem; }
.profile-grid { display: grid; grid-template-columns: 1fr 340px; gap: 30px; margin-top: -40px; align-items: start; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.card h2 { font-size: 1.35rem; }
.contact-card { position: sticky; top: 88px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list .k { color: var(--muted); min-width: 96px; font-weight: 600; }
.svc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.svc-list li { display: flex; gap: 10px; align-items: flex-start; }
.svc-list li::before { content: "✓"; color: var(--green); font-weight: 800; }

/* ---------- Formularios ---------- */
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 600; font-size: .9rem; color: var(--navy); }
.form-field input, .form-field select, .form-field textarea {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit; color: var(--ink); background: #fff; width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,169,75,.18);
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .82rem; color: var(--muted); }
.form-success { background: #e7f6ee; border: 1px solid #b7e3ca; color: #14663f; padding: 14px 18px; border-radius: var(--radius-sm); display: none; }
.form-success.show { display: block; }

/* ---------- Pasos / Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px; }
.step { text-align: center; }
.step .n { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #3a2c05; border-radius: var(--radius); padding: 44px; text-align: center; }
.cta-band h2 { color: #3a2c05; }
.cta-band .btn--navy { margin-top: 8px; }

/* ---------- Testimonios ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.quote p { font-style: italic; color: var(--ink); }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.quote .who .avatar { width: 42px; height: 42px; font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #b9c9d8; padding: 54px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.site-footer a { color: #b9c9d8; display: block; padding: 4px 0; font-size: .92rem; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 20px; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Utilidades ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.pill-legal { display: inline-flex; align-items: center; gap: 6px; background: #eef3f8; color: var(--navy); font-weight: 600; font-size: .85rem; padding: 6px 14px; border-radius: 30px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .dir-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .profile-grid { grid-template-columns: 1fr; margin-top: 20px; }
  .contact-card { position: static; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav, .nav-cta { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-header.open .nav {
    display: flex; position: absolute; top: 68px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 16px 20px; gap: 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-header.open .nav-cta { display: flex; position: absolute; top: 100%; }
}
@media (max-width: 620px) {
  .searchbar { grid-template-columns: 1fr; }
  .form-grid.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}
