/* ABOGADO EN LINEA COLOMBIA - RESPONSIVE */

:root {
  --primary: #1e3a5f;
  --primary-light: #2d5a8f;
  --accent: #d4af37;
  --accent-hover: #b8941f;
  --secondary: #e74c3c;
  --secondary-hover: #c0392b;
  --bg-main: #f8f9fa;
  --bg-white: #ffffff;
  --bg-light: #f1f3f5;
  --text-dark: #2c3e50;
  --text-medium: #5a6c7d;
  --text-light: #95a5a6;
  --border: #dee2e6;
  --border-light: #e9ecef;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-main);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
}

.logo, .logo-link {
  display: flex;
  align-items: center;
  z-index: 1001;
  text-decoration: none;
}

.logo-img {
  height: 35px;
  width: auto;
  transition: transform 0.3s;
}

@media (min-width: 769px) { .logo-img { height: 42px; } }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 769px) { .menu-toggle { display: none !important; } }

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-link:hover { color: var(--accent); }

.nav-primary {
  background: var(--secondary);
  color: white !important;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
}

.nav-primary:hover {
  background: var(--secondary-hover);
  transform: translateY(-2px);
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  z-index: 998;
  pointer-events: none;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.25rem;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
    overflow-y: auto;
  }
  .nav.active { right: 0; }
  .nav-link {
    width: 100%;
    padding: 0.875rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-light);
  }
  .nav-primary {
    width: 100%;
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
  }
}

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,%3Csvg width="60" height="60" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="30" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/%3E%3C/svg%3E');
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .hero-content { padding: 3.5rem 1.5rem 2.5rem; gap: 2rem; }
}

.hero-text { color: white; }

.hero-text h1 {
  color: white;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-text p {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: rgba(255,255,255,0.95);
  line-height: 1.7;
  max-width: 600px;
}

.hero-small .hero-content { padding: 2rem 1.5rem 1.5rem; }

/* FIX: este era el bloque “huérfano” que rompía todo el CSS */
.search-box{
  background: var(--bg-white);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow-xl);
  transition: all 0.4s;
}

@media (min-width: 768px) {
  .search-box {
    padding: 1.75rem;
    border-radius: 18px;
  }
  .search-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  }
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .search-row { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .search-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1rem;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

/* FIX: no anidado SCSS, CSS puro */
.field-button{ width: 100%; }
.field-button button{ width: 100%; }

.field label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field input,
.field select,
.field textarea {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s;
  background: var(--bg-light);
  width: 100%;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.btn-primary,
button[type="submit"] {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-md);
  width: 100%;
  font-family: inherit;
}

.btn-primary:hover,
button[type="submit"]:hover {
  background: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.how-it-works,
.featured,
.trust,
.results { padding: 2.5rem 0; }

@media (min-width: 768px) {
  .how-it-works,
  .featured,
  .trust,
  .results { padding: 3.5rem 0; }
}

.how-it-works { background: var(--bg-white); }

.how-it-works h2,
.featured h2,
.trust h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  background: var(--bg-white);
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.step:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.step:hover::before { transform: translateX(0); }

.step h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.step p {
  color: var(--text-medium);
  font-size: 0.95rem;
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--bg-white);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-light);
  position: relative;
  transition: all 0.4s;
  cursor: pointer;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  opacity: 0;
  transition: opacity 0.4s;

  /* FIX: evita que el overlay capture clics */
  pointer-events: none;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.card:hover::before { opacity: 0.05; }

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
  z-index: 1;
}

.card h3 {
  font-size: 1.375rem;
  margin-bottom: 0.625rem;
  color: var(--primary);
  position: relative;
}

.card-meta {
  color: var(--text-medium);
  font-size: 0.875rem;
  margin: 0.375rem 0;
  display: flex;
  align-items: center;
}

.card-meta:last-child {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
}

.card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: #ddd;
}

.trust {
  background: var(--bg-light);
  border-top: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
}

.trust-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.trust h2 { margin-bottom: 1rem; }

.trust p {
  color: var(--text-medium);
  font-size: 1.05rem;
  line-height: 1.8;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.btn-secondary {
  margin-top: 0.875rem;
  border-radius: 50px;
  border: none;
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 10;
  font-weight: 600;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-white);
  margin-top: auto;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer a {
  color: var(--text-medium);
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover { color: var(--accent); }

.form-card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 1.5rem;
  border: 2px solid var(--border-light);
  max-width: 640px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .form-card { padding: 2rem; }
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.alert {
  border-radius: 12px;
  padding: 0.875rem 1.125rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.alert-success {
  background: #d3f9d8;
  border: 1px solid #8fd19e;
  color: #265d35;
}

.alert-error {
  background: #ffe3e3;
  border: 1px solid #ff8787;
  color: #7b1f1f;
}

.alert-error ul { padding-left: 1.25rem; }

.messages-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.checkbox-item {
  font-size: 0.9rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   HERO SLIDER - FINAL (PRODUCCIÓN)
   ========================================= */

.hero.hero-slider{
  position: relative;
  overflow: hidden;
}

.hero.hero-slider .hero-slider-bg{
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero.hero-slider .hero-slide{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  will-change: opacity;
}

.hero.hero-slider .hero-slide.active{ opacity: 1; }

.hero.hero-slider .hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.78;
  transition: background 700ms ease-in-out, opacity 700ms ease-in-out;
}

.hero.hero-slider .hero-overlay::after{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    80% 70% at 50% 35%,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.35) 70%,
    rgba(0,0,0,0.55) 100%
  );
  opacity: 0.85;
}

.hero.hero-slider .hero-overlay.filter-1{
  background: linear-gradient(120deg,
    rgba(18, 91, 165, 0.85) 0%,
    rgba(10, 55, 105, 0.55) 55%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

.hero.hero-slider .hero-overlay.filter-2{
  background: linear-gradient(120deg,
    rgba(10, 160, 150, 0.82) 0%,
    rgba(15, 120, 175, 0.45) 55%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

.hero.hero-slider .hero-overlay.filter-3{
  background: linear-gradient(120deg,
    rgba(180, 60, 150, 0.82) 0%,
    rgba(230, 90, 120, 0.45) 55%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

.hero.hero-slider .hero-content{
  position: relative;
  z-index: 3;
}

.hero.hero-slider .hero-text h1{
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}

.hero.hero-slider .hero-text p{
  max-width: 620px;
}

/* =========================================
   FORM HERO - Layout 3 campos + botón ancho
   ========================================= */

/* Mobile: todo en columna */
.search-box .search-row {
  grid-template-columns: 1fr;
}

/* Desktop/tablet */
@media (min-width: 768px) {
  .search-box .search-row:not(.search-row-submit) {
    grid-template-columns: repeat(3, 1fr);
  }

  .search-box .search-row.search-row-submit {
    grid-template-columns: 1fr;
    margin-top: 0.25rem;
  }

  .search-box .search-row.search-row-submit .field-button button {
    width: 100%;
  }
}
