:root {
  /* Paleta alineada al logo clásico */
  --blue: #0655d3;
  --blue-2: #299ed7;
  --gray-900: #222322;
  --gray-600: #919ca1;
  --gray-050: #f5f7fa;
  --bevel: #cfdadf;
  --red: #9b4d4d;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(6, 85, 211, 0.12);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--gray-900);
  background: var(--gray-050);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
}
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.86)
  );
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #e6e8ec;
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand__title {
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.3px;
}

/* ------ NAV + SUBMENU ------ */
.nav__links {
  display: flex;
  gap: 20px;
  align-items: center;
  position: relative;
  text-align: left;
}
.nav__links a,
.nav__links button.nav__parent {
  color: var(--gray-900);
  text-decoration: none;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}
.nav__links a:hover,
.nav__links button.nav__parent:hover {
  color: var(--blue);
}

.menu-item {
  position: relative;
}
.nav__parent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav__parent .caret {
  font-size: 0.9em;
  opacity: 0.8;
}

/* Submenu panel */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 360px;
  background: var(--white);
  border: 1px solid var(--gray-600);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  display: none; /* hidden by default */
  padding: 5px;
}
.submenu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #0b3d63;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(#fff, #fff);
  border: 1px solid transparent;
}
.submenu a:hover {
  background: #e9edf1;
  border-color: #cfd6dc;
}
/* open state */
.menu-item[data-open="true"] .submenu {
  display: block;
}

.nav__toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: 0.2s;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover {
  filter: brightness(0.95);
}
.btn--ghost {
  border-color: var(--blue);
  color: var(--blue);
  background: transparent;
}
.btn--ghost:hover {
  background: rgba(6, 85, 211, 0.06);
}
.btn--inverse {
  background: var(--white);
  color: var(--blue);
  border-color: transparent;
}
.btn--inverse:hover {
  filter: brightness(0.95);
}

/* Hero */
.hero {
  background: radial-gradient(
      900px 360px at 12% 12%,
      rgba(41, 158, 215, 0.3),
      transparent
    ),
    linear-gradient(120deg, var(--blue) 0%, #0d58c6 55%, var(--blue-2) 100%);
  color: #fff;
  padding: 64px 0;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
}
.hero__company {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  margin: 0 0 10px;
  color: #eaf3ff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 14px rgba(41, 158, 215, 0.55);
  letter-spacing: 0.3px;
}
.hero h1 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.15;
  margin: 0 0 12px;
}
.hero p {
  opacity: 0.95;
  margin: 0 0 18px;
}
.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--bevel);
  padding: 22px;
  color: var(--gray-900);
}
.kpi__chart {
  height: 140px;
  border-radius: 10px;
  background: linear-gradient(180deg, #eaf5ff, #ffffff);
  position: relative;
  overflow: hidden;
}
.kpi__chart::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--blue-2), var(--blue));
  clip-path: polygon(
    0 70%,
    20% 60%,
    40% 80%,
    60% 45%,
    80% 65%,
    100% 35%,
    100% 100%,
    0 100%
  );
  opacity: 0.9;
}
.kpi__rows {
  height: 12px;
  margin-top: 12px;
  background: #eff3f7;
  border-radius: 6px;
}

/* Sections */
.section {
  padding: 64px 0;
}
.section--alt {
  background: var(--white);
}
.section--highlight {
  background: linear-gradient(90deg, var(--blue), #0d58c6);
  color: #fff;
}
.section__title {
  font-size: clamp(22px, 2.4vw, 32px);
  margin: 0 0 18px;
  color: var(--blue);
}
.section--highlight .section__title,
.section--highlight .section__subtitle {
  color: #fff;
}
.lead {
  font-size: 1.1rem;
  max-width: 68ch;
}

/* Grids */
.grid {
  display: grid;
  gap: 20px;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: justify;
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.thumb {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ddd;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reasons {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.logos .logo {
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-weight: 800;
  color: #9aa7b2;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.full {
  grid-column: 1 / -1;
}
.form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d8dde5;
  border-radius: 12px;
  font: inherit;
}
.form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}
.form input[type="file"] {
  padding: 9.5px 14px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 12px 15px;
  text-align: left;
  border: 1px solid var(--bevel);
}
td:last-child {
  text-align: right;
}
th {
  background-color: var(--gray-050);
  font-weight: 800;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
tbody tr:hover {
  background-color: rgba(6, 85, 211, 0.04);
}

/* Footer */
.site-footer {
  background: #0f1b2a;
  color: #c8d1da;
  padding: 24px 0;
}
.footer__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.backtotop {
  color: #c8d1da;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive */
@media (max-width: 960px) {
  .hero__grid,
  .contact {
    grid-template-columns: 1fr;
  }
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--4 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 720px) {
  .nav__toggle {
    display: block;
  }
  .nav__links {
    display: none;
    position: absolute;
    right: 20px;
    top: 68px;
    background: var(--white);
    padding: 14px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex-direction: column;
    min-width: 260px;
  }
  .nav__links[data-open="true"] {
    display: flex;
  }
  .menu-item {
    width: 100%;
  }
  .submenu {
    position: static;
    display: none;
    margin-top: 8px;
    border-radius: 10px;
  }
  .menu-item[data-open="true"] .submenu {
    display: block;
  }
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .grid--3 {
    grid-template-columns: 1fr;
  }
  .grid--4 {
    grid-template-columns: 2, 1fr;
  }
}

/* Helpers / CMS Content */
.ql-align-justify {
  text-align: justify;
}
.ql-align-justify ul,
.ql-align-justify ol {
  text-align: left;
}
