/* ============================================================
   TechCare Pro — Design System & Styles
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --clr-bg: #0a0a0f;
  --clr-bg-alt: #111118;
  --clr-surface: rgba(255, 255, 255, 0.04);
  --clr-surface-hover: rgba(255, 255, 255, 0.07);
  --clr-border: rgba(255, 255, 255, 0.08);
  --clr-border-hover: rgba(255, 255, 255, 0.15);
  --clr-text: #e4e4e7;
  --clr-text-muted: #71717a;
  --clr-text-dim: #52525b;
  --clr-white: #fafafa;

  /* Accent palette — vivid violet to indigo */
  --clr-primary: #8b5cf6;
  --clr-primary-light: #a78bfa;
  --clr-primary-dark: #6d28d9;
  --clr-primary-glow: rgba(139, 92, 246, 0.25);

  /* Semantic */
  --clr-success: #22c55e;
  --clr-warning: #f59e0b;
  --clr-danger: #ef4444;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
  --shadow-glow: 0 0 40px var(--clr-primary-glow);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
  --duration-slow: 0.5s;

  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

body {
  font-family: var(--font-family);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ---------- Static Background Decoration ---------- */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 50% at 85% 10%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 45% 45% at 10% 80%, rgba(139, 92, 246, 0.10), transparent),
    radial-gradient(ellipse 35% 35% at 50% 50%, rgba(167, 139, 250, 0.06), transparent);
}

/* ---------- Layout ---------- */
.section__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- HEADER ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--duration-normal) var(--ease-out);
}

.header.scrolled {
  background: rgba(10, 10, 15, 0.92);
}

.header__container {
  width: 100%;
  padding: 0 var(--space-xl) 0 var(--space-lg);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
 
}

.header__logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--clr-white);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header__logo-text .accent {
  color: #00e5ff;
  -webkit-text-fill-color: #00e5ff;
}

.header__logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #0a0a0f;
  background: #00e5ff;
  border-radius: 4px;
  line-height: 1.3;
}

.header__nav {
  display: flex;
  gap: var(--space-xl);
}

.header__nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-primary);
  border-radius: 1px;
  transition: width var(--duration-normal) var(--ease-out);
}

.header__nav-link:hover {
  color: var(--clr-white);
}

.header__nav-link:hover::after {
  width: 100%;
}

/* Hamburger */
.header__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.header__menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: var(--duration-normal) var(--ease-out);
}

.header__menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.header__menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99;
  display: none;
  flex-direction: column;
  padding: var(--space-lg);
  gap: var(--space-sm);
  border-bottom: 1px solid var(--clr-border);
}

.mobile-nav.open {
  display: flex;
  animation: slideDown 0.3s var(--ease-out);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-nav__link {
  padding: var(--space-md);
  font-size: 1rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  border-radius: var(--radius-sm);
  transition: var(--duration-fast) var(--ease-out);
}

.mobile-nav__link:hover {
  background: var(--clr-surface);
  color: var(--clr-white);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px var(--space-lg) var(--space-4xl);
  overflow: hidden;
  background:
    url('img/hero-bg.jpg') center / cover no-repeat;
}

/* Dark overlay + subtle color accents on top of the image */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 22%, rgba(99, 102, 241, 0.22), transparent 42%),
    radial-gradient(circle at 85% 8%, rgba(236, 72, 153, 0.12), transparent 40%),
    radial-gradient(circle at 55% 100%, rgba(139, 92, 246, 0.18), transparent 55%),
    linear-gradient(to bottom, rgba(10, 10, 15, 0.72), rgba(10, 10, 15, 0.85) 60%, rgba(10, 10, 15, 0.95));
}

.hero__content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--clr-primary-light);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-success);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--clr-white);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.hero__title-shine {
  display: inline-block;
  background: linear-gradient(90deg, #e230cb 0%, #00e5ff 25%, #ffffff 50%, #10b981 75%, #e230cb 100%);
  background-size: 250% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroShine 5s linear infinite;
}

@keyframes heroShine {
  0%   { background-position: 0% center; }
  100% { background-position: -250% center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title-shine {
    animation: none;
    background-position: 0% center;
  }
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  max-width: 540px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
  animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
  animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
}

.hero__highlight {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(139,92,246,.08));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  text-align: left;
  animation: fadeInUp 0.6s var(--ease-out) 0.4s both;
}

.hero__highlight-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  color: #fff;
  box-shadow: 0 0 20px rgba(139, 92, 246, .45);
}

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

.hero__highlight-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--clr-white);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

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

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.78rem 1.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-sm), 0 0 20px var(--clr-primary-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}

.btn--outline:hover {
  background: var(--clr-surface);
  border-color: var(--clr-border-hover);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--clr-text-muted);
  border: 1px solid transparent;
}

.btn--ghost:hover {
  color: var(--clr-text);
  background: var(--clr-surface);
}

.btn--ghost:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

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

.btn--submit {
  min-width: 200px;
  justify-content: center;
}

/* ---------- SECTION HEADER ---------- */
.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-primary-light);
  background: rgba(139, 92, 246, 0.1);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: var(--space-md);
}

.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--clr-white);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.section__desc {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- SERVICES ---------- */
/* ---------- SERVICES SECTION & CARDS (UPDATED) ---------- */
.services {
  position: relative;
  z-index: 1;
  padding: var(--space-4xl) 0;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 0; /* Cambiado a 0 para permitir imagen de borde a borde */
  display: flex;
  flex-direction: column;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-color, var(--clr-primary)), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  z-index: 3; /* Asegura que la línea brillante quede sobre la imagen */
}

.service-card:hover {
  background: var(--clr-surface-hover);
  border-color: var(--clr-primary-light);
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-lg), 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.3);
  z-index: 10;
}

.service-card:hover::before {
  opacity: 1;
}

/* Contenedor de Imagen Uniforme */
.service-card__img-container {
  width: 100%;
  height: 180px; /* Altura perfecta e idéntica para todas las tarjetas */
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--clr-border);
}

.service-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Centra y recorta la imagen sin deformarla */
  transition: transform 0.5s var(--ease-out);
}

.service-card:hover .service-card__img {
  transform: scale(1.05); /* Efecto de zoom profesional al pasar el mouse */
}

/* Contenido de la Tarjeta */
.service-card__content {
  padding: var(--space-lg); /* Padding balanceado para los textos */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(139, 92, 246, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  color: var(--card-color, var(--clr-primary));
  transition: transform var(--duration-normal) var(--ease-bounce);
}

.service-card:hover .service-card__icon {
  transform: scale(1.1) translateY(-2px);
}

.service-card__icon svg {
  width: 20px;
  height: 20px;
}

.service-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.service-card__desc {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

/* ---------- REQUEST / FORM SECTION ---------- */
.request {
  position: relative;
  z-index: 1;
  padding: var(--space-4xl) 0;
}

.request__layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* -- Sidebar Info -- */
.request__info {
  position: sticky;
  top: 100px;
}

.request__info .section__tag {
  margin-bottom: var(--space-md);
}

.request__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--clr-white);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.request__title .accent {
  color: #00e5ff;
}

.request__desc {
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
}

.request__contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.request__contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.request__contact-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: var(--radius-md);
  color: #00e5ff;
}

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

.request__contact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-text-dim);
  margin-bottom: 2px;
}

.request__contact-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-white);
}

/* -- Form Wrapper -- */
.form-wrapper {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-primary);
}

/* ----- Stepper ----- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-2xl);
  padding: 0 var(--space-md);
}

.stepper__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.stepper__circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px solid var(--clr-border);
  background: var(--clr-bg-alt);
  color: var(--clr-text-dim);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
}

.stepper__check {
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: 0;
  transform: scale(0);
  transition: all var(--duration-normal) var(--ease-bounce);
}

.stepper__step.active .stepper__circle {
  border-color: var(--clr-primary);
  background: rgba(139, 92, 246, 0.15);
  color: var(--clr-primary-light);
  box-shadow: 0 0 20px var(--clr-primary-glow);
}

.stepper__step.completed .stepper__circle {
  border-color: var(--clr-success);
  background: rgba(34, 197, 94, 0.15);
  color: var(--clr-success);
}

.stepper__step.completed .stepper__circle span {
  opacity: 0;
  transform: scale(0);
}

.stepper__step.completed .stepper__check {
  opacity: 1;
  transform: scale(1);
  color: var(--clr-success);
}

.stepper__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-text-dim);
  transition: color var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.stepper__step.active .stepper__label {
  color: var(--clr-primary-light);
}

.stepper__step.completed .stepper__label {
  color: var(--clr-success);
}

.stepper__line {
  flex: 1;
  height: 2px;
  background: var(--clr-border);
  margin: 0 var(--space-sm);
  margin-bottom: 28px;
  border-radius: 1px;
  overflow: hidden;
  min-width: 40px;
}

.stepper__line-fill {
  height: 100%;
  width: 0;
  background: var(--clr-success);
  border-radius: 1px;
  transition: width var(--duration-slow) var(--ease-out);
}

/* ----- Form Steps ----- */
.form__step {
  display: none;
  animation: stepFadeIn 0.4s var(--ease-out);
}

.form__step.active {
  display: block;
}

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

.form__step-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--clr-border);
}

.form__step-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-md);
  color: var(--clr-primary-light);
  flex-shrink: 0;
}

.form__step-icon svg {
  width: 22px;
  height: 22px;
}

.form__step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: var(--space-xs);
}

.form__step-subtitle {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
}

/* ----- Form Grid ----- */
.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form__grid--single {
  grid-template-columns: 1fr;
}

/* ----- Form Group ----- */
.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

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

.required {
  color: var(--clr-primary-light);
}

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

.form__input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--clr-text-dim);
  pointer-events: none;
  transition: color var(--duration-fast) var(--ease-out);
  z-index: 1;
}

.form__input {
  width: 100%;
  padding: 0.8rem 0.8rem 0.8rem 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-white);
  font-size: 0.92rem;
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
}

.form__input::placeholder {
  color: var(--clr-text-dim);
}

.form__input:hover {
  border-color: var(--clr-border-hover);
  background: rgba(255, 255, 255, 0.06);
}

.form__input:focus {
  border-color: var(--clr-primary);
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 0 3px var(--clr-primary-glow);
}

.form__input:focus ~ .form__input-icon,
.form__input:focus + .form__input-icon,
.form__input-wrap:focus-within .form__input-icon {
  color: var(--clr-primary-light);
}

.form__input.invalid {
  border-color: var(--clr-danger);
  background: rgba(239, 68, 68, 0.05);
}

.form__input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Select */
.form__input-wrap--select {
  position: relative;
}

.form__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
}

.form__select option {
  background: var(--clr-bg-alt);
  color: var(--clr-text);
}

.form__select-arrow {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  color: var(--clr-text-dim);
  pointer-events: none;
}

/* Phone prefix */
.form__input-wrap--phone {
  position: relative;
  display: flex;
  align-items: center;
}

.form__phone-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  height: 100%;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--clr-border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  color: var(--clr-primary-light);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.form__input--phone {
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
  padding-left: 14px !important;
}

.form__input-wrap--phone:focus-within .form__phone-prefix {
  border-color: var(--clr-primary);
  background: rgba(99, 102, 241, 0.08);
}

/* Optional tag */
.form__optional-tag {
  color: var(--clr-text-dim);
  font-weight: 400;
  font-size: 0.8em;
  opacity: 0.7;
}

/* Textarea */
.form__input-wrap--textarea {
  display: block;
}

.form__textarea {
  padding: var(--space-md);
  padding-left: var(--space-md);
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
  line-height: 1.6;
}

.form__textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form__char-count {
  font-size: 0.78rem;
  color: var(--clr-text-dim);
}

/* Urgency radio group */
.form__urgency {
  display: flex;
  gap: var(--space-md);
}

.form__urgency-option {
  flex: 1;
  cursor: pointer;
}

.form__urgency-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form__urgency-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem var(--space-md);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: all var(--duration-fast) var(--ease-out);
}

.form__urgency-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.form__urgency-option:hover .form__urgency-card {
  background: var(--clr-surface-hover);
  border-color: var(--clr-border-hover);
}

.form__urgency-option input:checked + .form__urgency-card {
  border-color: var(--clr-primary);
  background: rgba(139, 92, 246, 0.08);
  color: var(--clr-white);
}

/* Error & Hint */
.form__error {
  font-size: 0.78rem;
  color: var(--clr-danger);
  min-height: 1rem;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.form__hint {
  font-size: 0.78rem;
  color: var(--clr-text-dim);
  font-style: italic;
}

/* ----- Form Nav ----- */
.form__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--clr-border);
}

/* ----- Success State ----- */
.form__success {
  display: none;
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  animation: successPop 0.5s var(--ease-bounce);
}

.form__success.show {
  display: block;
}

@keyframes successPop {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.form__success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-xl);
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.12);
  border-radius: 50%;
  color: var(--clr-success);
  animation: checkBounce 0.6s var(--ease-bounce) 0.2s both;
}

@keyframes checkBounce {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.form__success-icon svg {
  width: 40px;
  height: 40px;
}

.form__success-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-white);
  margin-bottom: var(--space-md);
}

.form__success-text {
  font-size: 1rem;
  color: var(--clr-text-muted);
  max-width: 400px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.form__success-ref {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-xs);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.form__success-ref span {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
}

.form__success-ref strong {
  font-size: 1.2rem;
  color: var(--clr-primary-light);
  font-weight: 700;
  letter-spacing: 0.05em;
}



/* ---------- FOOTER ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--clr-border);
  padding: var(--space-2xl) 0;
}

.footer__container {
  width: 100%;
  padding: 0 var(--space-xl) 0 var(--space-lg);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  text-align: left;
  grid-column: 1;
}

.footer__desc {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  max-width: 400px;
  line-height: 1.6;
  text-align: left;
}

.footer__copy {
  font-size: 0.82rem;
  color: var(--clr-text-dim);
  white-space: nowrap;
  grid-column: 2;
  text-align: center;
  justify-self: center;
}

/* ============================================================
   BOTONES FLOTANTES (WhatsApp + Instagram)
   ============================================================ */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3), 0 12px 36px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
  z-index: 2;
}

.whatsapp-btn:hover {
  transform: scale(1.15) rotate(5deg);
  background-color: #20ba56;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5), 0 16px 40px rgba(0, 0, 0, 0.6);
}

.whatsapp-btn__ping {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.35);
  z-index: 1;
}

.instagram-btn {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(214, 36, 159, 0.35), 0 12px 36px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.instagram-btn svg {
  width: 28px;
  height: 28px;
  z-index: 2;
}

.instagram-btn:hover {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 8px 24px rgba(214, 36, 159, 0.5), 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* ---------- Footer ---------- */

@media (max-width: 640px) {
  .footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__brand {
    align-items: center;
    text-align: center;
  }

  .footer__desc {
    text-align: center;
    align-items: center;
  }

  .footer__copy {
    white-space: normal;
    text-align: center;
  }
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out),
    background-color var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .header__nav {
    display: none;
  }

  .header__menu-btn {
    display: flex;
  }

  .hero {
    padding: 100px var(--space-md) var(--space-3xl);
    min-height: auto;
  }

  .hero__title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .hero__highlight {
    padding: var(--space-sm) var(--space-md);
  }

  .hero__highlight-text {
    font-size: 0.85rem;
  }

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

  .form-wrapper {
    padding: var(--space-lg);
  }

  .stepper__label {
    font-size: 0.7rem;
  }

  .stepper__circle {
    width: 38px;
    height: 38px;
    font-size: 0.82rem;
  }

  .form__urgency {
    flex-direction: column;
  }

  .form__nav {
    gap: var(--space-md);
  }

  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.88rem;
  }

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

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

  .request__info {
    position: static;
    text-align: center;
  }

  .request__contact-list {
    align-items: center;
  }

  .whatsapp-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-btn svg {
    width: 28px;
    height: 28px;
  }

  .instagram-btn {
    bottom: 82px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .instagram-btn svg {
    width: 24px;
    height: 24px;
  }
}

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

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

  .request__info {
    position: static;
  }
}

@media (max-width: 480px) {
  .stepper {
    padding: 0;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .form__nav {
    flex-wrap: wrap;
  }
}

/* ---------- LOADING SPINNER (for submit button) ---------- */
.btn--loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn--loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--space-sm);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Estilos de .whatsapp-btn e .instagram-btn ahora viven ANTES de las
   media queries (sección "BOTONES FLOTANTES"), para que los ajustes
   de tamaño en mobile no queden pisados por estas reglas base. */

