:root {
  --bg: #081120;
  --bg-soft: #0f1b31;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: #ffffff;
  --text: #e9eef8;
  --text-dark: #152033;
  --muted: #b7c2d8;
  --line: rgba(255, 255, 255, 0.12);
  --primary: #3ea1ff;
  --primary-dark: #1f7dd5;
  --accent: #7be0b3;
  --shadow: 0 20px 45px rgba(4, 12, 24, 0.35);
  --radius: 24px;
  --container: 1180px;
  --body-gradient: radial-gradient(circle at top left, rgba(62, 161, 255, 0.20), transparent 26%), radial-gradient(circle at top right, rgba(123, 224, 179, 0.12), transparent 20%), linear-gradient(180deg, #07101d 0%, #0a1527 100%);
  --header-bg: rgba(6, 13, 24, 0.72);
  --card-bg: rgba(255, 255, 255, 0.05);
  --section-alt-bg: rgba(255, 255, 255, 0.03);
  --input-bg: rgba(255, 255, 255, 0.04);
  --badge-bg: rgba(255,255,255,0.08);
  --icon-bg: rgba(62, 161, 255, 0.14);
  --summary-bg: rgba(255,255,255,0.04);
  --code-bg: rgba(255,255,255,0.08);
  --nav-mobile-bg: rgba(6, 13, 24, 0.96);
  --sending-overlay: rgba(3, 10, 22, 0.72);
  --sending-dialog-bg: linear-gradient(160deg, rgba(12, 24, 44, 0.96) 0%, rgba(8, 18, 34, 0.96) 100%);
  --sending-dialog-border: rgba(123, 162, 214, 0.28);
  --sending-dialog-text: #f5f8ff;
  --sending-dialog-muted: #c2d0ea;
  --sending-envelope-base-top: #f8fbff;
  --sending-envelope-base-bottom: #d7e4f7;
  --sending-envelope-fold: #c5d7f2;
  --sending-envelope-flap-top: #ffffff;
  --sending-envelope-flap-bottom: #bdd3ef;
  --sending-envelope-paper-top: #ffffff;
  --sending-envelope-paper-bottom: #eef5ff;
  --sending-envelope-line: rgba(52, 95, 156, 0.32);
  --sending-spinner-track: rgba(182, 210, 247, 0.24);
  --sending-spinner-inner: rgba(182, 210, 247, 0.34);
  --sending-spinner-accent: #71b6ff;
  --sending-spinner-glow: rgba(82, 155, 235, 0.32);
}

html[data-theme='light'] {
  --bg: #f3f7fc;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #152033;
  --text-dark: #152033;
  --muted: #5d6b82;
  --line: rgba(21, 32, 51, 0.12);
  --primary: #2f7fd1;
  --primary-dark: #1f68b2;
  --accent: #169f6d;
  --shadow: 0 20px 45px rgba(27, 51, 86, 0.12);
  --body-gradient: radial-gradient(circle at top left, rgba(62, 161, 255, 0.18), transparent 26%), radial-gradient(circle at top right, rgba(22, 159, 109, 0.10), transparent 20%), linear-gradient(180deg, #f5f9ff 0%, #eaf1fb 100%);
  --header-bg: rgba(255, 255, 255, 0.8);
  --card-bg: rgba(255, 255, 255, 0.78);
  --section-alt-bg: rgba(255, 255, 255, 0.42);
  --input-bg: rgba(255, 255, 255, 0.95);
  --badge-bg: rgba(21, 32, 51, 0.06);
  --icon-bg: rgba(47, 127, 209, 0.12);
  --summary-bg: rgba(255,255,255,0.8);
  --code-bg: rgba(21, 32, 51, 0.08);
  --nav-mobile-bg: rgba(255, 255, 255, 0.98);
  --sending-overlay: rgba(18, 30, 49, 0.38);
  --sending-dialog-bg: linear-gradient(160deg, #ffffff 0%, #f5f8ff 100%);
  --sending-dialog-border: rgba(23, 46, 84, 0.15);
  --sending-dialog-text: #1b2a42;
  --sending-dialog-muted: #4e617c;
  --sending-envelope-base-top: #ffffff;
  --sending-envelope-base-bottom: #e2ebf8;
  --sending-envelope-fold: #cdddf4;
  --sending-envelope-flap-top: #f8fbff;
  --sending-envelope-flap-bottom: #bfd2ed;
  --sending-envelope-paper-top: #ffffff;
  --sending-envelope-paper-bottom: #f0f5fd;
  --sending-envelope-line: rgba(40, 84, 149, 0.24);
  --sending-spinner-track: rgba(27, 69, 128, 0.2);
  --sending-spinner-inner: rgba(27, 69, 128, 0.22);
  --sending-spinner-accent: #2f7fd1;
  --sending-spinner-glow: rgba(47, 127, 209, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  background: var(--body-gradient);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.logo strong,
.logo small { display: block; }
.logo small { color: var(--muted); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav a:not(.btn) {
  position: relative;
  padding-bottom: 0.35rem;
  color: var(--muted);
  font-weight: 500;
  transition: color .24s ease;
}

.site-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .24s ease, opacity .24s ease;
  opacity: 0.9;
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn):focus-visible {
  color: var(--surface-strong);
}

.site-nav a:not(.btn):hover::after,
.site-nav a:not(.btn):focus-visible::after {
  transform: scaleX(1);
}

.site-nav a:not(.btn):focus-visible {
  outline: none;
}

html[data-theme='light'] .site-nav a:not(.btn):hover {
  color: var(--text-dark);
}

html[data-theme='light'] .site-nav a:not(.btn):focus-visible {
  color: var(--text-dark);
}

html[data-theme='light'] .site-nav a:not(.btn)::after {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.65rem 0.8rem;
}

.hero {
  padding: 6rem 0 4rem;
}

.hero-full-bg {
  position: relative;
  isolation: isolate;
  padding: 2rem 0 5.2rem;
  background:
    linear-gradient(115deg, rgba(4, 10, 20, 0.78) 0%, rgba(7, 16, 29, 0.62) 46%, rgba(10, 20, 38, 0.7) 100%),
    url('../images/proyecto-6.jpg') center / cover no-repeat;
}

.hero-full-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 18% 24%, rgba(62, 161, 255, 0.24), transparent 43%);
}

.hero-focus {
  width: min(100%, 760px);
  padding: 2rem 2rem 2.1rem;
  background: rgba(7, 15, 28, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
}

.hero-badges {
  margin-bottom: 0.8rem;
}

.hero-grid,
.split-grid,
.contact-grid,
.footer-grid {
  display: grid;
  gap: 2rem;
}

.hero-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}

.hero h1,
.section h2,
.contact-result h1 {
  margin: 0;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(1.95rem, 4vw, 3.8rem);
  max-width: 18ch;
}

.hero-text {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 1.25rem 0 2rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(123, 224, 179, 0.12);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.35rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface-strong);
}

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--surface-strong);
}

.btn-block { width: 100%; }

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-stats strong {
  display: block;
  font-size: 1.5rem;
  color: var(--text);
}

.hero-stats span,
.section-heading p,
.feature-list span,
.project-card p,
.service-card p,
.contact-info span,
.site-footer p,
.contact-section p,
.result-card p {
  color: var(--muted);
}

.contact-info a,
.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.32);
  text-underline-offset: 3px;
}

.contact-info a:hover,
.site-footer a:hover {
  text-decoration-color: currentColor;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card,
.contact-form,
.highlight-card,
.result-card {
  padding: 2rem;
}

.hero-side {
  display: grid;
  gap: 1.25rem;
  align-self: start;
}

.hero-brand-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
}

.hero-brand-logo {
  width: clamp(150px, 20vw, 220px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  overflow: hidden;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.18));
}

.hero-brand-panel h3 {
  margin: 0 0 0.45rem;
}

.hero-brand-panel p {
  margin: 0;
  color: var(--muted);
}

.badge-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.badge,
.project-tag {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--text);
  font-size: 0.85rem;
}

.check-list,
.error-list {
  padding-left: 1.1rem;
}

.card-callout {
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--section-alt-bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-section {
  padding-top: 2rem;
  padding-bottom: 1.1rem;
}

#servicios.section {
  padding-top: 1.1rem;
}

.section-heading {
  margin-bottom: 2rem;
  max-width: 720px;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.8rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
}

.geo-service-card {
  padding: 1.4rem;
  margin-bottom: 1.5rem;
}

.geo-service-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.geo-service-card p {
  margin-top: 0;
}

.geo-list {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.geo-list li + li {
  margin-top: 0.4rem;
}

.service-card,
.project-card {
  padding: 1.5rem;
}

.icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--icon-bg);
  margin-bottom: 1rem;
}

.split-grid {
  grid-template-columns: 1fr 0.95fr;
  align-items: center;
}

.feature-list {
  display: grid;
  gap: 1.2rem;
}

.feature-list > div,
.feature-item {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.feature-list > div:hover,
.feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 161, 255, 0.42);
  background: rgba(62, 161, 255, 0.08);
  box-shadow: 0 12px 26px rgba(6, 17, 34, 0.28);
}

.feature-list > div:hover span,
.feature-item:hover span {
  color: var(--text);
}

html[data-theme='light'] .feature-list > div,
html[data-theme='light'] .feature-item {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(21, 32, 51, 0.12);
}

html[data-theme='light'] .feature-list > div:hover,
html[data-theme='light'] .feature-item:hover {
  border-color: rgba(47, 127, 209, 0.36);
  background: rgba(47, 127, 209, 0.1);
  box-shadow: 0 14px 24px rgba(21, 49, 88, 0.14);
}

.trust-card,
.geo-service-card,
.service-card,
.service-type-card,
.mv-item {
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease, background .24s ease;
}

.trust-card:hover,
.geo-service-card:hover,
.service-card:hover,
.service-type-card:hover,
.mv-item:hover,
.trust-card:focus-within,
.geo-service-card:focus-within,
.service-card:focus-within,
.service-type-card:focus-within,
.mv-item:focus-within {
  transform: translateY(-3px);
  border-color: rgba(62, 161, 255, 0.42);
  background: linear-gradient(180deg, rgba(62, 161, 255, 0.12) 0%, rgba(123, 224, 179, 0.06) 100%);
  box-shadow: 0 16px 30px rgba(6, 17, 34, 0.3);
}

.service-card .icon {
  transition: transform .24s ease, background .24s ease;
}

.service-card:hover .icon,
.service-card:focus-within .icon {
  transform: scale(1.06);
  background: rgba(62, 161, 255, 0.24);
}

.trust-card:hover p,
.geo-service-card:hover p,
.geo-service-card:hover .geo-list,
.service-card:hover p,
.service-type-card:hover .service-tech-list,
.mv-item:hover span,
.trust-card:focus-within p,
.geo-service-card:focus-within p,
.geo-service-card:focus-within .geo-list,
.service-card:focus-within p,
.service-type-card:focus-within .service-tech-list,
.mv-item:focus-within span {
  color: var(--text);
}

html[data-theme='light'] .trust-card:hover,
html[data-theme='light'] .geo-service-card:hover,
html[data-theme='light'] .service-card:hover,
html[data-theme='light'] .service-type-card:hover,
html[data-theme='light'] .mv-item:hover,
html[data-theme='light'] .trust-card:focus-within,
html[data-theme='light'] .geo-service-card:focus-within,
html[data-theme='light'] .service-card:focus-within,
html[data-theme='light'] .service-type-card:focus-within,
html[data-theme='light'] .mv-item:focus-within {
  border-color: rgba(47, 127, 209, 0.36);
  background: linear-gradient(180deg, rgba(47, 127, 209, 0.12) 0%, rgba(22, 159, 109, 0.06) 100%);
  box-shadow: 0 14px 24px rgba(21, 49, 88, 0.14);
}

html[data-theme='light'] .service-card:hover .icon,
html[data-theme='light'] .service-card:focus-within .icon {
  background: rgba(47, 127, 209, 0.2);
}

.mission-vision-grid {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.mv-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.mv-item strong {
  display: block;
  margin-bottom: 0.35rem;
}

.mv-item span {
  color: var(--muted);
}

.project-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-tech-heading {
  margin-top: 2.2rem;
}

.cards-grid.service-type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-type-card {
  padding: 1.4rem;
}

.service-type-card h3 {
  margin-top: 0;
}

.service-tech-list {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.service-tech-list li + li {
  margin-top: 0.45rem;
}

.trust-card,
.testimonial-card {
  padding: 1.4rem;
}

.trust-card h3,
.testimonial-card h3 {
  margin-top: 0;
}

.project-points {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.project-points li + li {
  margin-top: 0.55rem;
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.cards-grid.testimonial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.testimonial-card p {
  margin-top: 0;
}

.testimonial-meta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.25rem;
}

.testimonial-meta strong {
  color: var(--text);
}

.testimonial-meta span {
  color: var(--muted);
  font-size: 0.94rem;
}

.contact-grid {
  grid-template-columns: 1fr 0.95fr;
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.contact-form .label-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
}

.required-mark {
  color: #ff5b6e;
  font-weight: 800;
}

.contact-form .consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
  font-weight: 500;
  font-size: 0.94rem;
}

.contact-form .consent-row input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  margin: 0.2rem 0 0;
  accent-color: var(--primary);
}

.contact-form .consent-row .consent-text {
  line-height: 1.4;
}

.contact-form input:not([type='checkbox']),
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--input-bg);
  color: var(--surface-strong);
  font: inherit;
}

.contact-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.65rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23dbe8ff' d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1.05rem;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.contact-form select::-ms-expand {
  display: none;
}

.contact-form select option {
  background: #0d192d;
  color: #e9eef8;
}

.contact-form textarea {
  resize: none;
}

.contact-form input:not([type='checkbox']):focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(62, 161, 255, 0.35);
  border-color: rgba(62, 161, 255, 0.55);
}

.contact-form select:focus,
.contact-form select:active {
  background-color: var(--input-bg);
}

.contact-note {
  margin: -0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.required-note {
  margin: -0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.required-note .required-mark {
  margin-right: 0.2rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 4rem;
}

.footer-grid {
  grid-template-columns: repeat(3, 1fr);
}

.floating-actions {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.back-to-top {
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.whatsapp-float {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: transparent;
  color: #ffffff;
  padding: 0;
  border-radius: 999px;
  line-height: 0;
}

.wa__btn_popup_icon {
  width: 56px;
  height: 56px;
  position: relative;
  display: block;
  border-radius: 999px;
  background: linear-gradient(0deg, rgba(86, 166, 30, 1) 0%, rgba(105, 202, 59, 1) 100%);
  box-shadow: 0 10px 16px -8px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: transform .24s ease, box-shadow .24s ease;
}

.wa__btn_popup_icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent url('https://cdn-icons-png.flaticon.com/128/1384/1384095.png') center center no-repeat;
  background-size: 30px auto;
  filter: invert(1) grayscale(100%) brightness(2);
}

.whatsapp-float:hover .wa__btn_popup_icon {
  transform: translateY(-2px);
  box-shadow: 0 14px 20px -10px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.whatsapp-float:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

html[data-theme='light'] .back-to-top {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-dark);
  border-color: rgba(21, 32, 51, 0.16);
}

.back-to-top {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--surface-strong);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, border-color .25s ease, background .25s ease;
}

.back-to-top:hover {
  transform: translateY(0);
  border-color: rgba(62, 161, 255, 0.45);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme='light'] .back-to-top {
  color: var(--text-dark);
}

html[data-theme='light'] .back-to-top svg {
  stroke: var(--text-dark);
}

.contact-result {
  min-height: calc(100vh - 220px);
  display: grid;
  align-items: center;
}

.narrow {
  width: min(calc(100% - 2rem), 760px);
}

.summary-box {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: var(--summary-bg);
  border: 1px solid var(--line);
}

@media (max-width: 960px) {
  .hero-grid,
  .split-grid,
  .contact-grid,
  .cards-grid,
  .project-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid,
  .split-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid.service-type-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: var(--nav-mobile-bg);
    border: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .nav-cta { width: 100%; }
}

@media (max-width: 640px) {
  .hero { padding-top: 4rem; }
  .hero-focus { padding: 1.4rem 1.2rem 1.5rem; }
  .hero-brand-panel { grid-template-columns: 1fr; text-align: center; }
  .cards-grid,
  .project-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .cards-grid.service-type-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1rem; }
  .hero-card,
  .contact-form,
  .highlight-card,
  .result-card { padding: 1.4rem; }
}

.cards-grid,
.gallery-grid {
  display: grid;
  gap: 1.5rem;
}

.cards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-card {
  overflow: hidden;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.gallery-card-body {
  padding: 1.25rem;
}

.gallery-card-body h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.gallery-card-body p,
.gallery-card-body small {
  color: var(--muted);
}

.gallery-card-body code {
  color: var(--text-dark);
  background: var(--badge-bg);
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
}

@media (max-width: 1080px) {
  .hero-grid,
  .split-grid,
  .contact-grid,
  .cards-grid,
  .project-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid,
  .split-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid.testimonial-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cards-grid.service-type-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 81px;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--nav-mobile-bg);
    border: 1px solid var(--line);
    border-radius: 20px;
  }

  .site-nav.open { display: flex; }
  .menu-toggle { display: inline-flex; }

  .cards-grid,
  .project-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid.testimonial-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid.service-type-grid {
    grid-template-columns: 1fr;
  }

  .hero { padding-top: 4.5rem; }
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(62, 161, 255, 0.45);
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

html[data-theme='light'] .eyebrow {
  background: rgba(22, 159, 109, 0.12);
}

html[data-theme='light'] .hero-full-bg {
  background:
    linear-gradient(110deg, rgba(12, 32, 58, 0.7) 0%, rgba(14, 38, 69, 0.5) 52%, rgba(14, 35, 66, 0.58) 100%),
    url('../images/proyecto-6.jpg') center / cover no-repeat;
}

html[data-theme='light'] .btn-secondary,
html[data-theme='light'] .menu-toggle {
  color: var(--text);
}

html[data-theme='light'] .contact-form input:not([type='checkbox']),
html[data-theme='light'] .contact-form select,
html[data-theme='light'] .contact-form textarea {
  color: var(--text-dark);
}

html[data-theme='light'] .contact-form select {
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231b2a42' d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
}

html[data-theme='light'] .contact-form select option {
  background: #ffffff;
  color: #1b2a42;
}

html[data-theme='light'] .contact-form select:focus,
html[data-theme='light'] .contact-form select:active {
  background-color: #ffffff;
}

html[data-theme='light'] .contact-form input:not([type='checkbox'])::placeholder,
html[data-theme='light'] .contact-form textarea::placeholder {
  color: #7a8798;
}

@media (max-width: 960px) {
  .theme-toggle-text {
    display: none;
  }
}

@media (max-width: 720px) {
  .header-actions {
    margin-left: auto;
  }

  .theme-toggle {
    padding: 0.7rem 0.8rem;
  }
}



.gallery-carousel {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 4.5rem 1.5rem;
}

.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.55s ease;
  will-change: transform;
}

.gallery-slide {
  flex: 0 0 calc((100% - 2rem) / 3);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card-bg);
}

.gallery-slide img {
  width: 100%;
  height: clamp(220px, 24vw, 320px);
  object-fit: cover;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .2s ease, opacity .2s ease, color .2s ease;
  opacity: 0.9;
}

.carousel-control:hover {
  transform: translateY(-50%) scale(1.08);
  opacity: 1;
}

.carousel-control:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 12px;
}

.carousel-control svg {
  width: 30px;
  height: 30px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.28));
}

html[data-theme='light'] .carousel-control {
  color: rgba(21, 32, 51, 0.82);
}

.carousel-control.prev { left: 0.6rem; }
.carousel-control.next { right: 0.6rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.2rem 0 0;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  cursor: pointer;
}

html[data-theme='light'] .carousel-dot {
  background: rgba(21, 32, 51, 0.22);
}

.carousel-dot.active {
  background: var(--primary);
}

@media (max-width: 960px) {
  .gallery-carousel {
    padding-inline: 1.25rem;
  }

  .gallery-slide {
    flex-basis: calc((100% - 1rem) / 2);
  }

  .carousel-control {
    display: none;
  }
}

@media (max-width: 768px) {
  .gallery-carousel {
    padding: 1rem 1rem 1.25rem;
  }

  .carousel-control.prev { left: 0.65rem; }
  .carousel-control.next { right: 0.65rem; }

  .gallery-slide {
    flex-basis: 100%;
  }

  .gallery-slide img {
    height: 280px;
  }
}



html[data-theme='light'] .hero-stats strong {
  color: var(--text-dark);
}

html[data-theme='light'] .contact-form {
  background: rgba(255, 255, 255, 0.96);
}

html[data-theme='light'] .contact-form label {
  color: var(--text-dark);
}

html[data-theme='light'] .contact-form input:not([type='checkbox']),
html[data-theme='light'] .contact-form select,
html[data-theme='light'] .contact-form textarea {
  border-color: rgba(21, 32, 51, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.carousel-dot {
  transition: background .25s ease, transform .25s ease, opacity .25s ease;
}

html[data-theme='light'] .carousel-dot {
  background: rgba(21, 32, 51, 0.14);
}

html[data-theme='light'] .carousel-dot.active,
.carousel-dot.active {
  background: var(--primary);
  transform: scale(1.15);
}


@media (max-width: 960px) {
  .floating-actions {
    right: 0.85rem;
    bottom: 0.85rem;
    gap: 0.65rem;
  }

  .back-to-top {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .whatsapp-float {
    width: 52px;
    height: 52px;
  }

  .wa__btn_popup_icon {
    width: 52px;
    height: 52px;
  }

  .wa__btn_popup_icon::before {
    background-size: 28px auto;
  }
}

.sending-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.sending-modal.is-active {
  display: flex;
}

.sending-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--sending-overlay);
  backdrop-filter: blur(6px);
}

.sending-modal__dialog {
  position: relative;
  width: min(92vw, 440px);
  padding: 32px 28px;
  border-radius: 22px;
  background: var(--sending-dialog-bg);
  border: 1px solid var(--sending-dialog-border);
  color: var(--sending-dialog-text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.sending-modal__dialog h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: var(--sending-dialog-text);
}

.sending-modal__dialog p {
  margin: 0;
  line-height: 1.6;
  color: var(--sending-dialog-muted);
  opacity: 1;
}

.sending-animation {
  position: relative;
  width: 148px;
  height: 106px;
  margin: 0 auto 20px;
}

.sending-envelope {
  position: absolute;
  left: 50%;
  bottom: 13px;
  width: 92px;
  height: 60px;
  transform: translateX(-50%);
  z-index: 2;
  animation: envelopeFloat 1.8s ease-in-out infinite;
}

.sending-envelope__body {
  position: absolute;
  inset: 0;
  border: 1px solid var(--sending-envelope-line);
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 48%, var(--sending-envelope-fold) 49%, var(--sending-envelope-fold) 51%, transparent 52%) left center / 50% 100% no-repeat,
    linear-gradient(225deg, transparent 48%, var(--sending-envelope-fold) 49%, var(--sending-envelope-fold) 51%, transparent 52%) right center / 50% 100% no-repeat,
    linear-gradient(180deg, var(--sending-envelope-base-top) 0%, var(--sending-envelope-base-bottom) 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
}

.sending-envelope__body::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 52%;
  width: 2px;
  height: 40%;
  transform: translate(-50%, -50%);
  background: var(--sending-envelope-line);
  opacity: 0.45;
}

.sending-envelope__flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, var(--sending-envelope-flap-top) 0%, var(--sending-envelope-flap-bottom) 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  animation: flapMove 1.8s ease-in-out infinite;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-top: 1px solid var(--sending-envelope-line);
}

.sending-envelope__paper {
  position: absolute;
  left: 50%;
  top: -10px;
  width: 54px;
  height: 34px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--sending-envelope-paper-top) 0%, var(--sending-envelope-paper-bottom) 100%);
  border-radius: 8px;
  border: 1px solid var(--sending-envelope-line);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.10);
  animation: paperMove 1.8s ease-in-out infinite;
}

.sending-envelope__paper::after {
  content: '';
  position: absolute;
  inset: 8px 10px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(57, 91, 145, 0.22) 0 2px,
    transparent 2px 6px
  );
}

.sending-trail {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 88px;
  height: 88px;
  transform: translateX(-50%);
  z-index: 1;
  border: 3px solid var(--sending-spinner-track);
  border-top-color: var(--sending-spinner-accent);
  border-right-color: var(--sending-spinner-accent);
  border-radius: 999px;
  box-shadow: 0 0 18px var(--sending-spinner-glow);
  animation: trailSpin 1.1s linear infinite;
}

.sending-trail::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  border: 1.5px solid var(--sending-spinner-inner);
}

.contact-form button[disabled],
.contact-form .btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes envelopeFloat {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

@keyframes flapMove {
  0%, 100% {
    transform: rotateX(0deg);
  }
  50% {
    transform: rotateX(18deg);
  }
}

@keyframes paperMove {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@keyframes trailSpin {
  from {
    transform: translateX(-50%) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@media (max-width: 576px) {
  .sending-modal__dialog {
    padding: 28px 20px;
    border-radius: 18px;
  }

  .sending-animation {
    width: 132px;
    height: 92px;
  }

  .sending-envelope {
    width: 80px;
    height: 52px;
  }

  .sending-trail {
    width: 78px;
    height: 78px;
    top: 4px;
  }
}
