:root {
  --brand-700: #172e6a;
  --brand-500: var(--color-primary-dark);
  --brand-50: var(--color-neutral-indigo-50);
  --accent-500: var(--color-amber);
  --ok-500: var(--color-success);
  --ok-600: #16a34a;
  --text-900: var(--color-text);
  --text-700: var(--color-neutral-700);
  --text-600: #4b5563;
  --bg: var(--color-white);
  --bg-alt: var(--color-neutral-50);
  --bg-brand: #172e6a;
  --radius: 14px;
  --shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body.body {
  margin: 0;
  color: var(--text-900);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
}
img {
  max-width: 100%;      
  height: auto;
  image-rendering: -webkit-optimize-contrast;
}
.hidden {
  display: none !important;
}
.muted {
  color: #d1d5db;
}
.w-full {
  width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.sm-only {
  display: none;
}
.md-only {
  display: flex;
}
.sm-hide {
  display: inline;
}
@media (max-width: 767px) {
  .sm-only {
    display: block;
  }
  .md-only {
    display: none;
  }
  .sm-hide {
    display: none;
  }
}
.h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin: 0 0 0.8rem;
}
.h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 0.8rem;
}
.h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.2rem 0 0.5rem;
  margin-bottom: 2rem;
}
.h4 {
    color: #ffc107de;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.lead {
  font-size: 1.125rem;
  color: var(--color-border);
  opacity: 0.95;
  max-width: 40rem;
  margin-bottom: 1.75rem;
}
.container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 0.5rem;
}
@media (min-width: 640px) {
  .container {
    padding-inline: 0.75rem;
  }
}
@media (min-width: 1024px) {
  .container {
    padding-inline: 1rem;
  }
}
.section {
  padding: 4rem 0;
}
.section--alt {
  background: var(--bg-alt);
}
.section--brand {
  background: linear-gradient(
    135deg,
    var(--hero-start) 0%,
    var(--hero-end) 100%,
    var(--brand-500) 100%
  );
}
.text-on-hero {
  color: var(--color-white);
}
.section__header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section__subtitle {
  font-size: 1.125rem;
  color: var(--text-600);
  max-width: 48rem;
  margin: 0 auto;
}

/* NAV */
.nav {
  background: var(--color-white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.nav.fixed {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 20;
}
.nav__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav__logo {
  height: 60px;
  width: auto;
}
.nav__title {
  font-weight: 800;
  color: var(--brand-500);
}
.nav__menu {
  align-items: center;
  gap: 1rem;
}
.nav__link {
  color: var(--color-neutral-700);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.nav__link--active,
.nav__link:hover {
  color: var(--brand-500);
  background: var(--brand-50);
}
.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--color-neutral-700);
  transition: transform 0.2s;
}
.nav__toggle:hover {
  transform: translateY(-1px);
}
.nav__mobile {
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
}
.nav__mobile-link {
  display: block;
  padding: 0.75rem;
  border-radius: 8px;
  margin: 0.35rem 0.5rem;
  color: var(--color-neutral-700);
  transition: background 0.15s;
}
.nav__mobile-link:hover {
  background: var(--color-neutral-100);
}

/* HERO */
.hero {
  padding-top: 7rem;
}
.hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
  }
}
.hero__col {
  margin-bottom: 0;
}
.hero__image {
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.35s, box-shadow 0.35s, filter 0.35s;
}
.hero__image:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.14), 0 10px 18px rgba(0, 0, 0, 0.08);
  filter: saturate(1.02);
}

/* BUTTONS */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s,
    border-color 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.btn--sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
}
.btn--lg {
  padding: 0.9rem 1.25rem;
  font-size: 1.05rem;
}
.btn--primary {
  background: var(--brand-500);
  color: var(--color-white);
}
.btn--primary:hover {
  background: var(--brand-700);
  transform: translateY(-1px);
}
.btn--light {
  background: var(--color-white);
  color: var(--brand-500);
}
.btn--light:hover {
  background: var(--color-neutral-25);
  transform: translateY(-1px);
}
.btn--outline-light {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}
.btn--outline-light:hover {
  background: var(--color-white);
  color: var(--brand-700);
}
.btn--whatsapp {
  background: var(--ok-500);
  color: var(--color-white);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.22);
}
.btn--whatsapp:hover {
  background: var(--ok-600);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(34, 197, 94, 0.3);
}
.btn .icon {
  margin-right: 0.5rem;
}

/* CARDS */
.cards {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  background: var(--color-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.22s, box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.card__icon {
  color: var(--brand-500);
  margin-bottom: 0.75rem;
}
.icon-xl {
  width: 40px;
  height: 40px;
}

/* ABOUT */
.about {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .about {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.media-img {
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.35s, box-shadow 0.35s, filter 0.35s;
}
.media-img:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.14), 0 10px 18px rgba(0, 0, 0, 0.08);
  filter: saturate(1.02);
}

.checks {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-700);
}
.checks i {
  color: var(--brand-500);
}
.card--plain {
  background: var(--color-white);
}
.testimonial {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  object-fit: cover;
}
.tag {
  color: var(--brand-500);
  font-size: 0.95rem;
}

/* CONTACT GRID */
.contact {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .contact {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.contact__list {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}
/* CONTRASTE: texto e iconos del bloque izquierdo */
.contact__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}
.contact__item i,
.contact__item svg {
  color: var(--text-600);
}

.contact__form .form {
  display: grid;
  gap: 1rem;
}
.form__group {
  display: grid;
  gap: 0.4rem;
}
.label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-strong);
}

.input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: box-shadow 0.15s, border-color 0.15s, background 0.15s,
    color 0.15s;
}
.input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.35);
}
.input--dark {
  background: rgba(30, 58, 138, 0.65);
  border-color: rgba(30, 58, 138, 0.3);
  color: var(--color-white);
}
.input--dark::placeholder {
  color: #c7d2fe;
}

.alert {
  font-size: 0.9rem;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  background: var(--brand-50);
  color: var(--brand-700);
  transition: opacity 0.2s, transform 0.2s;
}

/* FOOTER (legacy) */
.footer {
  background: rgba(222, 203, 173, 0.6);
  color: var(--color-white);
  padding: 3rem 0;
}
.footer__grid {
  display: grid;
  gap: 3.5rem;
}
@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 0.8fr 1fr 1fr 1fr;
    gap: 4rem;
  }
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer__logo {
  height: 32px;
  width: auto;
}
.footer__title {
  font-weight: 800;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.link {
  position: relative;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.link:hover {
  color: var(--color-white);
}
.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-white);
  transition: width 0.2s;
}
.link:hover::after {
  width: 100%;
}
.inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.icon-sm {
  width: 16px;
  height: 16px;
}
.social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.social__link {
  display: inline-flex;
  padding: 0.4rem;
  border-radius: 10px;
  color: var(--color-neutral-300);
  transition: background 0.15s, color 0.15s;
}
.social__link:hover {
  background: var(--color-neutral-800);
  color: var(--color-white);
}
.footer__copy {
  border-top: 1px solid var(--color-neutral-800);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  color: var(--color-neutral-400);
}

/* WHATSAPP FAB */
.whatsapp-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ok-500);
  color: var(--color-white);
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
  transition: transform 180ms, box-shadow 180ms, background-color 0.15s;
  animation: wh-pulse 2.2s ease-in-out infinite;
}
.whatsapp-fab:hover {
  background: var(--ok-600);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16), 0 6px 10px rgba(0, 0, 0, 0.1);
}
@keyframes wh-pulse {
  0%,
  100% {
    transform: translateZ(0) scale(1);
  }
  50% {
    transform: translateZ(0) scale(1.04);
  }
}

#preloader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  display: grid;
  place-items: center;
  z-index: 9999;
  transition: opacity 0.25s, visibility 0.25s;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}
#preloader .loader {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(30, 58, 138, 0.15);
  border-top-color: var(--brand-500);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Service cards en index ===== */
.service-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  background: var(--bg);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}
.service-card--media {
  padding: 0;
}
.service-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  object-fit: cover;
  background: var(--color-neutral-100);
}
.service-card__body {
  padding: 1.25rem 1.25rem 1.5rem;
}
.service-card__icon {
  color: var(--accent);
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.service-card__title {
  margin: 0.25rem 0 0.5rem;
  color: var(--text-strong);
  font-weight: 800;
  font-size: 1.35rem;
}
.service-card__text {
  color: var(--text);
  margin: 0;
}
:root/* removed dark rule */

/* Variante robusta con media y padding controlado */
.service-card--with-media {
  padding: 0;
  overflow: hidden;
}
.service-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-neutral-100);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.service-card__media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-card__content {
  padding: 1.25rem 1.25rem 1.5rem;
}
.service-card--with-media:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* ===== Surfaces y tonos de apoyo ===== */
:root {
  --surface: color-mix(in oklab, var(--bg) 92%, black 8%);
  --surface-2: color-mix(in oklab, var(--bg) 88%, black 12%);
  --ring: color-mix(in oklab, var(--primary) 35%, transparent);
}
:root/* removed dark rule */

/* ========== CONTACTO ========== */
.section--contact {
  background: linear-gradient(
      180deg,
      color-mix(in oklab, var(--hero-start) 18%, transparent) 0%,
      color-mix(in oklab, var(--hero-end) 18%, transparent) 100%
    ),
    var(--surface);
  padding: 3rem 0;
}
.contact-card {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  padding: 1.25rem;
}
:root/* removed dark rule */

/* CONTRASTE del texto informativo y enlaces */
.section--contact .contact__info p {
  color: var(--text);
}
.section--contact .contact__info p a {
  color: var(--color-indigo);
  font-weight: 600;
  text-decoration: underline;
}

/* Inputs y textarea con borde visible */
.section--contact input[type="text"],
.section--contact input[type="email"],
.section--contact input[type="tel"],
.section--contact textarea,
.section--contact select {
  width: 100%;
  background: var(--color-white);
  color: var(--text);
  border: 2px solid color-mix(in oklab, var(--border) 85%, transparent);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
:root/* removed dark rule */
.section--contact .input::placeholder,
.section--contact textarea::placeholder {
  color: color-mix(in oklab, var(--text) 55%, transparent);
}
:root/* removed dark rule */
.section--contact input:hover,
.section--contact textarea:hover,
.section--contact select:hover {
  border-color: color-mix(in oklab, var(--border) 65%, var(--primary) 10%);
}
.section--contact input:focus,
.section--contact textarea:focus,
.section--contact select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

/* Botones dentro de contacto (unificados) */
.section--contact .btn,
.section--contact button[type="submit"] {
  background: var(--primary);
  color: #111827;
  border: 1px solid var(--primary-dark);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
.section--contact .btn:hover,
.section--contact button[type="submit"]:hover {
  background: var(--primary-dark);
  color: #fff;
}
.section--contact .btn--whatsapp {
  background: #22c55e;
  border-color: #16a34a;
  color: #0b0f19;
}
.section--contact .btn--whatsapp:hover {
  background: #16a34a;
  color: #fff;
}

/* ========== FOOTER (nuevo estilo cohesivo) ========== */
.site-footer {
  background: rgba(222, 203, 173, 0.6);
  color: color-mix(in oklab, var(--text) 92%, #fff);
  padding: 3rem 0 2.25rem;
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.site-footer h4,
.site-footer h5 {
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}
.site-footer a {
  color: color-mix(in oklab, var(--text) 90%, #fff);
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.site-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary);
}
.site-footer .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid color-mix(in oklab, var(--border) 65%, transparent);
  margin-right: 0.5rem;
}
.site-footer .social a:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}
.section--contact + .site-footer {
  margin-top: 0;
}

html { color-scheme: light !important; }
