/* ============================================================
   PerfilesGlobal — Design System & Main Styles
   Tipografía: Barlow Condensed (display) + DM Sans (cuerpo)
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── CSS Custom Properties ───────────────────────────────── */
:root {
  --color-primary:       #E2010D;
  --color-primary-dark:  #C30A0D;
  --color-primary-light: #ffeaea;
  --color-text:          #3D3D3D;
  --color-text-muted:    #5D5C5D;
  --color-text-light:    #8A8A8A;
  --color-bg:            #FFFFFF;
  --color-bg-alt:        #F2F2F2;
  --color-border:        #E4E4E4;
  --color-border-dark:   #CACACA;

  --font-display: 'Barlow Condensed', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --sidebar-width: 240px;
  --header-height: 60px;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  --shadow-card:   0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover:  0 6px 20px rgba(0,0,0,0.12);
  --shadow-modal:  0 20px 60px rgba(0,0,0,0.16);

  --transition:    all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.14s ease;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--color-text); max-width: 65ch; }
.text-muted { color: var(--color-text-muted); }
.text-light  { color: var(--color-text-light); }

/* ── Layout: Sidebar + Content ───────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-bg);
  border-right: 3px solid var(--color-primary);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar-logo img {
  width: 160px;
  height: auto;
}

.sidebar-logo .tagline {
  font-size: 0.68rem;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 6px;
  font-family: var(--font-body);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.sidebar-nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  padding: 12px 20px 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
  margin-left: -3px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-left-color: var(--color-primary);
}

.sidebar-nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-nav a:hover svg,
.sidebar-nav a.active svg {
  opacity: 1;
}

/* Sidebar CTA — Contáctanos */
.sidebar-cta {
  margin: 12px 12px 4px;
  padding: 10px 14px !important;
  border-radius: var(--radius-md) !important;
  border-left: none !important;
  margin-left: 0 !important;
  background: var(--color-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
  justify-content: center;
  gap: 8px;
}

.sidebar-cta:hover,
.sidebar-cta.active {
  background: var(--color-primary-dark) !important;
  color: #fff !important;
  border-left-color: transparent !important;
}

.sidebar-cta svg { opacity: 1 !important; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  font-size: 0.78rem;
  color: var(--color-text-light);
}

/* Main content area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Page header */
.page-header {
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: background 140ms ease-out, color 140ms ease-out;
}

.breadcrumb a:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.breadcrumb-sep {
  color: var(--color-border-dark);
  font-size: 0.72rem;
  opacity: 0.55;
  user-select: none;
  padding: 0 2px;
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 600;
  padding: 3px 8px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

/* Search bar in header */
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Header público: sin SVG dentro del wrap, no necesita padding-left extra */
.header-search .search-input-wrap input {
  padding: 7px 12px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 140ms ease-out, color 140ms ease-out;
}

.search-icon-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* SVG icono dentro del wrap (usado en admin, solo hijo directo) */
.search-input-wrap > svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
  pointer-events: none;
  flex-shrink: 0;
}

/* El SVG dentro del botón de búsqueda no debe heredar el posicionamiento absoluto */
.search-icon-btn svg {
  position: static;
  transform: none;
  width: 15px;
  height: 15px;
  color: inherit;
}

.search-input-wrap input {
  padding: 7px 12px 7px 34px;  /* espacio para el icono absoluto */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  background: var(--color-bg-alt);
  color: var(--color-text);
  width: 240px;
  transition: var(--transition);
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-bg);
  box-shadow: 0 0 0 3px rgba(226,1,13,0.1);
  width: 280px;
}

/* Page body */
.page-body {
  flex: 1;
  padding: 32px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  color: var(--color-text);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  background: var(--color-bg);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background: var(--color-bg-alt);
  background-image: radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 16px;
}

.hero-title em {
  font-style: normal;
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 42ch;
  margin-bottom: 32px;
  line-height: 1.65;
}

.hero-search {
  display: flex;
  gap: 0;
  max-width: 480px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.hero-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 4px 20px rgba(226,1,13,0.12);
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-size: 0.95rem;
  color: var(--color-text);
  background: transparent;
}

.hero-search button {
  padding: 12px 20px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-search button:hover { background: var(--color-primary-dark); }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 28px;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── Hero floating cards ────────────────────────────────────── */
.hero-cards {
  position: relative;
  width: 340px;
  height: 360px;  /* fila 1 + fila 2 */
}

.hero-card-pos {
  position: absolute;
}

/* Fila 1: derecha / izquierda */
.hero-card-pos-1 { top: 0px;    right: -200px;    transform: rotate(2.5deg);  }
.hero-card-pos-2 { top: 100px; left: 50px;     transform: rotate(-2deg);   }

/* Fila 2: derecha / izquierda */
.hero-card-pos-3 { top: 220px; right: -220px;   transform: rotate(-1deg);   }
.hero-card-pos-4 { top: 262px; left: 70px; transform: rotate(1.5deg);  }

/* Fila 3: izquierda / derecha — visibles en ≥1100px */
.hero-card-pos-5 { top: 440px; left: 5px;  transform: rotate(-1.5deg); }
.hero-card-pos-6 { top: 462px; right: -70px; transform: rotate(1deg);    }

.hero-card-lg { display: none; }

@media (min-width: 1100px) {
  .hero-card-lg { display: block; }
  .hero-cards   { height: 565px; }
}

@keyframes heroCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

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

.hero-card {
  background:    var(--color-bg);
  border:        1px solid var(--color-border);
  border-radius: 16px;
  padding:       16px 20px;
  box-shadow:    var(--shadow-card);

  animation-name:            heroCardIn,                       heroFloat;
  animation-duration:        480ms,                            5s;
  animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1),  ease-in-out;
  animation-delay:           var(--card-delay, 0ms),           calc(var(--card-delay, 0ms) + 500ms + var(--float-offset, 0ms));
  animation-fill-mode:       both,                             none;
  animation-iteration-count: 1,                                infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-card { animation: none; opacity: 1; }
}

/* ── Section Styles ───────────────────────────────────────── */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-header {
  margin-bottom: 40px;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.15;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  max-width: 52ch;
}

/* ── Categories Grid ──────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.category-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.category-icon svg { width: 24px; height: 24px; }

.category-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

/* ── Professional Cards ───────────────────────────────────── */
.professionals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pro-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.pro-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--color-border-dark);
}

.pro-card-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pro-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-bg-alt);
}

.pro-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
}

.pro-avatar-placeholder svg { width: 28px; height: 28px; }

.pro-info { flex: 1; min-width: 0; }

.pro-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pro-specialty {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pro-location {
  font-size: 0.78rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.pro-location svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.badge-certified svg { width: 11px; height: 11px; }

.badge-category {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.pro-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Stars */
.stars {
  display: flex;
  align-items: center;
  gap: 1px;
}

.stars svg {
  width: 14px;
  height: 14px;
}

.star-filled { color: var(--color-primary); }
.star-empty  { color: var(--color-border-dark); }

.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.rating-num {
  font-weight: 600;
  color: var(--color-text);
}

.rating-count {
  color: var(--color-text-light);
}

/* Pro card footer */
.pro-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.btn-ver-perfil {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

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

.btn-ver-perfil svg { width: 14px; height: 14px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px) scale(0.99); }

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

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-dark);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.btn-danger {
  background: #fef2f2;
  color: var(--color-primary);
  border: 1.5px solid #fecaca;
}
.btn-danger:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-sm svg { width: 14px; height: 14px; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="password"],
select,
textarea {
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(226,1,13,0.1);
}

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

textarea { resize: vertical; min-height: 100px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235D5C5D' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.field-error {
  font-size: 0.78rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Flash Messages ───────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  box-shadow: var(--shadow-modal);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.flash-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.flash-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.flash-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  padding: 0;
}

.flash-close:hover { opacity: 1; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-fast);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
}

.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination .active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Profile Page ────────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.profile-header {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.profile-photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-bg-alt);
}

.profile-photo-placeholder {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 3px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
}

.profile-photo-placeholder svg { width: 44px; height: 44px; }

.profile-meta { flex: 1; }

.profile-name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 4px;
}

.profile-specialty {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.profile-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-location-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.profile-location-row svg { width: 14px; height: 14px; color: var(--color-text-light); }

/* Profile sidebar card */
.profile-sidebar-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.profile-sidebar-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.contact-row:last-child { border-bottom: none; }

.contact-row svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-row a {
  color: var(--color-text-muted);
  word-break: break-all;
}

.contact-row a:hover { color: var(--color-primary); }

/* Profile content sections */
.profile-section {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.profile-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

/* Company review badge */
.company-review-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary-light);
  border: 1px solid rgba(226,1,13,0.2);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 12px;
}

.company-review-badge svg { width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0; }

.company-review-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* Ghost client result */
.ghost-result {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.88rem;
}

.ghost-score {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text);
}

/* Review card */
.review-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.review-card:last-child { border-bottom: none; }

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.review-alias {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
}

.review-date {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.review-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: none;
}

/* Review form */
.review-form {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
}

.review-form h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.star-rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.star-rating-input input[type="radio"] { display: none; }

.star-rating-input label {
  cursor: pointer;
  color: var(--color-border-dark);
  transition: color 0.12s ease;
  font-size: 1.6rem;
  line-height: 1;
}

.star-rating-input label::before { content: '★'; }

.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
  color: var(--color-primary);
}

/* ── Plans Page ───────────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.plan-card {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.plan-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.plan-card.popular {
  border-color: var(--color-primary);
  box-shadow: 0 4px 24px rgba(226,1,13,0.14);
}

.plan-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.plan-duration {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.plan-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 8px;
}

.plan-pricing {
  margin-bottom: 4px;
}

.plan-discount {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(226, 1, 13, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.plan-price-monthly {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text);
}

.plan-price-monthly span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.plan-price-total {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.plan-features {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 20px;
}

.plan-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.plan-feature svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ── About Page ───────────────────────────────────────────── */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-stat-item {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
}

.about-stat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mv-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  border-top: 3px solid var(--color-primary);
}

.mv-card-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: 14px;
}

.mv-card-icon svg { width: 20px; height: 20px; }

.mv-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.mv-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: none;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: 24px;
  justify-content: center;
}

.team-card {
  text-align: center;
}

.team-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 12px;
  object-fit: cover;
  border: 3px solid var(--color-border);
  background: var(--color-bg-alt);
}

.team-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.team-role {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Contact form */
.contact-form-wrap {
  max-width: 560px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ── Services Page ────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--color-border-dark);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.service-icon svg { width: 24px; height: 24px; }

.service-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: none;
}

/* Ghost client service highlight */
.ghost-service-highlight {
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.ghost-service-highlight p { color: rgba(255,255,255,0.8); max-width: none; }
.ghost-service-highlight h2 { color: #fff; }

.ghost-service-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: #fff;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand img { width: 130px; background: #fff; border-radius: 8px; padding: 6px 12px; margin-bottom: 16px; display: block; }

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  max-width: 28ch;
}

.footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.15s ease;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--color-primary);
  color: #fff;
}

.social-link svg { width: 16px; height: 16px; }

/* ── Directorio sidebar filters ──────────────────────────── */
.directorio-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.filter-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.filter-sidebar h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: block;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Directory results header ─────────────────────────────── */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-count {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.results-count strong {
  color: var(--color-text);
  font-weight: 600;
}

.sort-select {
  width: auto;
  padding: 7px 32px 7px 10px;
  font-size: 0.85rem;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-light);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--color-border-dark);
}

.empty-state-icon svg { width: 100%; height: 100%; }

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 36ch;
  margin: 0 auto;
}

/* ── Utility classes ─────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 24px 0;
}

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

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.w-full { width: 100%; }

.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }

/* ── Contact Page ─────────────────────────────────────────── */
.contact-hero {
  background: var(--color-bg);
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}

.contact-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 60% 50%, rgba(226,1,13,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.contact-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

.contact-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 800;
  line-height: 1.06;
  color: var(--color-text);
  margin: 16px 0 20px;
}

.contact-hero-title em {
  font-style: normal;
  color: var(--color-primary);
}

.contact-hero-sub {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 40ch;
  margin-bottom: 36px;
}

.contact-trust {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.contact-trust-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-form-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-hover);
}

.contact-form-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 24px;
}

.contact-form-header-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.contact-form-card .form-group {
  margin-bottom: 16px;
}

.contact-submit-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.contact-form-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 12px;
  text-align: center;
  justify-content: center;
  max-width: none;
}

@media (max-width: 860px) {
  .contact-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-hero-sub { max-width: none; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-intro { grid-template-columns: 1fr; gap: 32px; }
  .professionals-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    transform: translateX(-240px);
    width: 240px;
    box-shadow: var(--shadow-modal);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay.open { display: block; }

  .main-content { margin-left: 0; }

  .menu-toggle { display: flex; align-items: center; justify-content: center; }


  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 16px;
  }

  .hero::before { display: none; }

  .hero { padding: 48px 0 40px; }

  .hero-visual { display: none; }

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

  .professionals-grid { grid-template-columns: 1fr; }

  .directorio-layout { grid-template-columns: 1fr; }

  .filter-sidebar { position: static; }

  .profile-layout { grid-template-columns: 1fr; }

  .profile-header { flex-direction: column; align-items: center; text-align: center; }

  .plans-grid { grid-template-columns: 1fr 1fr; }

  .mv-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .ghost-service-highlight { grid-template-columns: 1fr; }

  .services-grid { grid-template-columns: 1fr; }

  .page-body { padding: 20px 16px; }

  .container { padding: 0 16px; }

  .form-grid { grid-template-columns: 1fr; }

  .hero-stats { gap: 20px; }

  .search-input-wrap input { width: 180px; }
  .search-input-wrap input:focus { width: 200px; }
}

@media (max-width: 480px) {
  .plans-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
