/* 
   HolaPronto Design System 
   Based on Bootstrap 5.3 Overrides 
*/

:root {
  /* Brand Colors */
  --cl-primary: #0f62fe; /* High-trust Blue */
  --cl-primary-dark: #0043ce;
  --cl-primary-light: #e0eaff;
  --cl-secondary: #393939;
  --cl-success: #198754;
  --cl-warning: #ffc107;
  --cl-danger: #dc3545;

  /* Surfaces */
  --cl-bg-body: #f4f7fa;
  --cl-bg-surface: #ffffff;
  --cl-bg-surface-alt: #f8f9fa;
  
  /* Text */
  --cl-text-primary: #161616;
  --cl-text-secondary: #525252;
  --cl-text-tertiary: #8d8d8d;

  /* Spacing Rhythm */
  --cl-spacing-xs: 0.25rem;  /* 4px */
  --cl-spacing-sm: 0.5rem;   /* 8px */
  --cl-spacing-md: 1rem;     /* 16px */
  --cl-spacing-lg: 1.5rem;   /* 24px */
  --cl-spacing-xl: 2.5rem;   /* 40px */
  --cl-spacing-xxl: 4rem;    /* 64px */

  /* Radius & Shadows */
  --cl-radius-sm: 4px;
  --cl-radius-md: 8px;
  --cl-radius-lg: 12px;
  --cl-radius-pill: 50rem;
  
  --cl-shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --cl-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --cl-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --cl-shadow-floating: 0 12px 32px rgba(0,0,0,0.15);

  /* Font Stack */
  --cl-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global Reset & Typography */
body {
  background-color: var(--cl-bg-body);
  color: var(--cl-text-primary);
  font-family: var(--cl-font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* Spacer for the fixed-top navbar (and optional SEO governance bar) */
.hp-navbar-spacer {
  height: 70px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cl-text-primary);
}

a {
  text-decoration: none;
  color: var(--cl-primary);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--cl-primary-dark);
}

/* Utility Classes Overrides */
.text-primary { color: var(--cl-primary) !important; }
.bg-primary { background-color: var(--cl-primary) !important; }
.btn-primary {
  background-color: var(--cl-primary);
  border-color: var(--cl-primary);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--cl-radius-md);
  box-shadow: var(--cl-shadow-sm);
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background-color: var(--cl-primary-dark);
  border-color: var(--cl-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--cl-shadow-md);
}

.card {
  border: none;
  border-radius: var(--cl-radius-lg);
  box-shadow: var(--cl-shadow-sm);
  background-color: var(--cl-bg-surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hero Section */
.hero-section {
  padding: var(--cl-spacing-xl) 0;
  background: linear-gradient(to bottom, #fff, var(--cl-bg-body));
}

@media (min-width: 992px) {
  .hero-section {
    padding: var(--cl-spacing-xxl) 0;
  }
}

/* Trust Stack */
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--cl-text-secondary);
  font-size: 0.95rem;
}
.trust-badge i {
  color: var(--cl-success);
  font-size: 1.25rem;
}

/* Form Wizard */
.wizard-card {
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--cl-shadow-md);
}

.wizard-header {
  background-color: var(--cl-bg-surface);
  border-bottom: 1px solid #eee;
  padding: 1.5rem;
}

.wizard-progress {
  height: 4px;
  background-color: #eee;
  border-radius: var(--cl-radius-pill);
  margin-top: 1rem;
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  background-color: var(--cl-primary);
  transition: width 0.4s ease;
}

.form-step {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Custom Input Styles */
.form-control, .form-select {
  padding: 0.75rem 1rem;
  border-radius: var(--cl-radius-md);
  border: 1px solid #dee2e6;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--cl-primary);
  box-shadow: 0 0 0 4px var(--cl-primary-light);
}

/* Segmented Control / Radio Tiles */
.btn-check:checked + .btn-outline-secondary {
  background-color: var(--cl-primary-light);
  color: var(--cl-primary-dark);
  border-color: var(--cl-primary);
  box-shadow: inset 0 0 0 1px var(--cl-primary);
}

.btn-outline-secondary {
  border: 1px solid #dee2e6;
  color: var(--cl-text-primary);
  background-color: #fff;
  padding: 1rem;
  border-radius: var(--cl-radius-md);
  transition: all 0.2s ease;
}
.btn-outline-secondary:hover {
  background-color: #f8f9fa;
  color: var(--cl-text-primary);
  border-color: #ccc;
}

/* Navbar */
.navbar {
  box-shadow: var(--cl-shadow-sm);
  padding: 0.75rem 0;
  background-color: rgba(255,255,255,0.98) !important;
  backdrop-filter: blur(8px);
}
.nav-link {
  font-weight: 500;
  color: var(--cl-text-secondary);
  padding: 0.5rem 1rem !important;
}
.nav-link:hover {
  color: var(--cl-primary);
}

/* Category Cards */
.category-card {
  height: 100%;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid transparent;
}
.category-card:hover {
  border-color: var(--cl-primary-light);
  transform: translateY(-4px);
  box-shadow: var(--cl-shadow-md);
}
.category-icon {
  width: 64px;
  height: 64px;
  background-color: var(--cl-primary-light);
  color: var(--cl-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
}

/* Mobile Sticky CTA */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: none; /* JS will toggle */
}
.mobile-sticky-cta.visible {
  transform: translateY(0);
}
@media (min-width: 992px) {
  .mobile-sticky-cta { display: none !important; }
}

/* Accordion */
.accordion-item {
  border: none;
  background: transparent;
  border-bottom: 1px solid #eee;
}
.accordion-button {
  background: transparent;
  box-shadow: none !important;
  padding: 1.25rem 0;
  font-weight: 600;
  color: var(--cl-text-primary);
}
.accordion-button:not(.collapsed) {
  color: var(--cl-primary);
  background: transparent;
}
.accordion-body {
  padding: 0 0 1.5rem 0;
  color: var(--cl-text-secondary);
}

/* ============================
   Home (TaskRabbit-inspired)
   ============================ */

.home-hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--cl-bg-body) 100%);
  overflow: hidden;
}

.home-hero-bg {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 520px;
  background:
    radial-gradient(closest-side, rgba(15, 98, 254, 0.12), transparent 70%) 15% 35% / 520px 520px no-repeat,
    radial-gradient(closest-side, rgba(25, 135, 84, 0.10), transparent 70%) 85% 10% / 560px 560px no-repeat,
    radial-gradient(closest-side, rgba(255, 193, 7, 0.08), transparent 70%) 85% 75% / 520px 520px no-repeat;
  pointer-events: none;
  filter: blur(0px);
}

.home-title {
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.home-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.home-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--cl-text-secondary);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
}

.home-search-wrap {
  max-width: 860px;
}

.home-search-input {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 0.9rem;
}

.home-search-input .form-control {
  border: none;
  box-shadow: none !important;
  padding: 0.85rem 0.25rem;
}

.home-search-input .form-control:focus {
  outline: none;
}

.home-search-input:focus-within {
  border-color: rgba(15, 98, 254, 0.45);
  box-shadow: 0 0 0 4px var(--cl-primary-light);
}

.home-search-input .btn {
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
}

.home-suggest {
  position: relative;
  max-width: 860px;
  margin: 0.6rem auto 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  overflow: hidden;
  display: none;
  text-align: left;
}

.home-suggest.open {
  display: block;
}

.home-suggest-item {
  width: 100%;
  display: block;
  text-align: left;
  padding: 0.9rem 1rem;
  border: none;
  background: transparent;
}

.home-suggest-item:hover,
.home-suggest-item.active {
  background: rgba(15, 98, 254, 0.06);
}

.home-suggest-name {
  font-weight: 700;
  color: var(--cl-text-primary);
  line-height: 1.25;
}

.home-suggest-sub {
  font-size: 0.9rem;
  color: var(--cl-text-secondary);
  margin-top: 0.15rem;
}

.home-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.75);
  color: var(--cl-text-primary);
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.home-cat-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 98, 254, 0.25);
  background: rgba(255,255,255,0.95);
}

.home-cat-chip i {
  color: var(--cl-primary);
}

.home-cat-chip-more i {
  color: var(--cl-text-secondary);
}

.home-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.65);
  color: var(--cl-text-secondary);
  font-weight: 600;
}

.home-pill:hover {
  background: rgba(255,255,255,0.95);
  color: var(--cl-text-primary);
}

.home-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cl-primary-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cl-primary);
  flex-shrink: 0;
}

/* Small hover helper used in breadcrumbs */
.hover-primary:hover {
  color: var(--cl-primary) !important;
}

/* ============================
   Thank You (Ranking List)
   ============================ */
.ty-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--cl-bg-body) 100%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ty-dot { opacity: 0.55; }

.ty-check {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(25, 135, 84, 0.12);
  color: var(--cl-success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ty-check i { font-size: 1.45rem; }

.ty-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 0.35rem;
  box-shadow: var(--cl-shadow-sm);
}
.ty-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--cl-text-secondary);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.ty-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--cl-primary-light);
}
.ty-tab.is-active {
  color: var(--cl-primary-dark);
  background: rgba(15, 98, 254, 0.10);
  border-color: rgba(15, 98, 254, 0.18);
}
.ty-tab[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.ty-provider {
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--cl-shadow-sm);
}
.ty-provider:hover {
  transform: translateY(-2px);
  box-shadow: var(--cl-shadow-md);
}
.ty-provider-selected {
  border-color: rgba(25, 135, 84, 0.35);
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.08), var(--cl-shadow-md);
}

.ty-provider-wide .card-body {
  border-radius: var(--cl-radius-lg);
}

.ty-left {
  min-width: 170px;
}
@media (min-width: 992px) {
  .ty-left { min-width: 200px; }
}

.ty-rank {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(15, 98, 254, 0.10);
  color: var(--cl-primary-dark);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ty-logo {
  width: 96px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
  color: var(--cl-text-primary);
  font-weight: 900;
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
}
.ty-logo-initial {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.ty-logo-sub {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(0,0,0,0.42);
}

.ty-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  background: rgba(15, 98, 254, 0.08);
  border: 1px solid rgba(15, 98, 254, 0.15);
  color: var(--cl-primary-dark);
}

.ty-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  background: rgba(255, 193, 7, 0.16);
  border: 1px solid rgba(255, 193, 7, 0.25);
  color: #8a6a00;
}

.ty-verified {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  background: rgba(25, 135, 84, 0.12);
  border: 1px solid rgba(25, 135, 84, 0.22);
  color: #146c43;
}

.ty-hl {
  display: grid;
  gap: 0.5rem;
  color: var(--cl-text-secondary);
  font-weight: 500;
}

.ty-deal {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--cl-text-primary);
  font-weight: 700;
}

.ty-secondary-link {
  color: var(--cl-primary);
  font-weight: 700;
  text-decoration: none;
}
.ty-secondary-link[aria-disabled="true"] {
  opacity: 0.65;
  pointer-events: none;
}

.ty-meta {
  color: var(--cl-text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}

.ty-meta-sub {
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.9;
}

.ty-availability {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--cl-text-secondary);
}

.ty-side {
  width: 100%;
}
@media (min-width: 768px) {
  .ty-side {
    width: 220px;
    flex-shrink: 0;
  }
}

.ty-score {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  background: rgba(255,255,255,0.7);
}
.ty-score-num {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cl-text-primary);
}
.ty-score-label {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--cl-text-secondary);
  font-weight: 600;
}

.ty-cta-btn {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.ty-visit-link {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.ty-lead-details summary {
  cursor: pointer;
  list-style: none;
}
.ty-lead-details summary::-webkit-details-marker { display: none; }
.ty-lead-details[open] .ty-details-icon i { transform: rotate(180deg); }
.ty-details-icon i {
  transition: transform 0.18s ease;
  display: inline-block;
}

/* ============================
   Admin
   ============================ */
.admin-kpi .card-body {
  border-radius: var(--cl-radius-lg);
}
.admin-table th, .admin-table td {
  padding: 0.85rem 1rem;
}
.admin-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid rgba(0,0,0,0.08);
}
.admin-pill-good {
  background: rgba(25, 135, 84, 0.10);
  color: #146c43;
  border-color: rgba(25, 135, 84, 0.22);
}
.admin-pill-mid {
  background: rgba(255, 193, 7, 0.18);
  color: #8a6a00;
  border-color: rgba(255, 193, 7, 0.30);
}
.admin-pill-low {
  background: rgba(220, 53, 69, 0.10);
  color: #b02a37;
  border-color: rgba(220, 53, 69, 0.22);
}
