:root {
  --cfr-blue: #001f3f;
  --cfr-accent: #0047ab;
  --text-dark: #0f172a;
  --text-slate: #475569;
  --border: #e2e8f0;
  --bg-light: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
}
body {
  background: #ffffff;
  color: var(--text-slate);
  scroll-behavior: smooth;
  overflow-x: hidden;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  width: 100%;
}

/* --- NAVIGATION --- */
/* NAVIGATION REESTRUCTURADO Y ARMONIZADO */
nav {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0; /* más compacto */
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
}
.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-menu {
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav-link {
  position: relative;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.2em 0.5em 0.2em 0.5em;
  border-radius: 3px;
  transition:
    color 0.22s,
    background 0.22s;
  background: none;
  display: inline-block;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cfr-blue), var(--cfr-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover,
.nav-link:focus {
  color: var(--cfr-accent);
  background: var(--bg-light);
}
.nav-link:hover::after,
.nav-link:focus::after {
  transform: scaleX(1);
}
/* Dropdown Soluciones */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-dark);
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.2em 0.5em 0.2em 0.5em;
  border-radius: 3px;
  cursor: pointer;
  transition:
    color 0.22s,
    background 0.22s;
  outline: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.dropdown-toggle::after {
  content: "\25BC";
  font-size: 0.7em;
  margin-left: 0.3em;
  transition: transform 0.2s;
}
.dropdown.open .dropdown-toggle::after {
  transform: rotate(180deg);
}
.dropdown-toggle:hover,
.dropdown-toggle:focus {
  color: var(--cfr-accent);
  background: var(--bg-light);
}
.dropdown-content {
  display: none;
  position: absolute;
  left: auto;
  right: 0;
  top: 150%;
  min-width: 180px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  z-index: 1001;
  opacity: 0;
  transform: translateX(20px) scale(0.98);
  transition:
    opacity 0.22s,
    transform 0.22s;
}
.dropdown.open .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.dropdown-content a {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 1rem;
  border-radius: 2px;
  transition:
    background 0.18s,
    color 0.18s;
}
.dropdown-content a:hover {
  background: var(--bg-light);
  color: var(--cfr-accent);
}
.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--cfr-blue);
  letter-spacing: -1px;
}
/* --- HERO: MAXIMIZADO PARA CUALQUIER PANTALLA --- */
.hero {
  min-height: 100vh; /* Ocupa el 100% del alto visual */
  display: flex;
  align-items: center;
  padding: 100px 0;
  position: relative;
  overflow: hidden;

  /* Configuración de Imagen de Fondo */
  background-image: url("/img/world.jpg");
  background-repeat: no-repeat;
  background-position: center; /* Centra la imagen para que no se corte mal */
  background-size: cover; /* Obliga a la imagen a cubrir TODO el espacio sin deformarse */
  background-attachment: scroll; /* Cambiar a 'fixed' si quieres un efecto parallax suave */
}

/* Capa de contraste (Overlay) para asegurar legibilidad del texto */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Graduación blanca sutil para que el diseño siga viéndose limpio y premium */
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.4) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 1;
}
/* Aseguramos que el contenido esté por encima del overlay */
.hero .container {
  position: relative;
  z-index: 2;
}
.hero span {
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--cfr-accent);
  font-weight: 700;
  font-size: 0.8rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem); /* Tamaño fluido según resolución */
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -4px;
  line-height: 0.9;
  margin: 20px 0 40px;
  position: relative;
  z-index: 2;
}
.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.6;
  max-width: 750px;
  color: var(--text-slate);
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
}

.btn {
  padding: 18px 35px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s;
  cursor: pointer;
  display: inline-block;
  font-size: 1rem;
}
.btn-primary {
  background: var(--cfr-blue);
  color: white;
  padding: 20px 40px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  transition: 0.3s;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--cfr-accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 31, 63, 0.15);
}
.btn-secondary {
  background: transparent;
  color: var(--cfr-blue);
  border: 2px solid var(--cfr-blue);
}
/* --- SECCIONES RESTANTES --- */
.section-padding {
  padding: 120px 0;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 60px;
}
.service-card {
  border: 1px solid var(--border);
  padding: 50px;
  border-radius: 4px;
  transition: 0.4s;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.service-card:hover {
  border-color: var(--cfr-accent);
  background: #fff;
  transform: translateY(-10px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.05);
}
.service-card h3 {
  color: var(--text-dark);
  margin-bottom: 20px;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.crm-full {
  background: var(--cfr-blue);
  color: white;
  padding: 140px 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.crm-layout {
  display: flex;
  align-items: center;
  gap: 100px;
}
.crm-text {
  flex: 1.2;
}
.crm-text h2 {
  font-size: 3.5rem;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 30px;
}
.crm-text p {
  font-size: 1.2rem;
  opacity: 0.8;
  margin-bottom: 40px;
  line-height: 1.8;
}
.crm-visual {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  padding: 60px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.crm-feature {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  font-size: 1.1rem;
}
.crm-feature span {
  color: var(--cfr-accent);
  font-weight: 900;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 80px;
}
.method-item {
  border-top: 2px solid var(--cfr-blue);
  padding-top: 25px;
}
.method-item h4 {
  color: var(--text-dark);
  margin-bottom: 10px;
}

.cta-final {
  padding: 150px 0;
  text-align: center;
  background: var(--bg-light);
  border-top: 1px solid var(--border);
}
.cta-final h2 {
  font-size: 3.5rem;
  color: var(--text-dark);
  letter-spacing: -3px;
  margin-bottom: 30px;
}

footer {
  background: #fff;
  padding: 100px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-dark);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 80px;
}
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cfr-accent);
  margin-bottom: 25px;
  font-weight: 700;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 15px;
}
.footer-col ul li a {
  text-decoration: none;
  color: var(--text-slate);
  font-size: 0.95rem;
  transition: 0.3s;
}
.footer-col ul li a:hover {
  color: var(--cfr-blue);
  padding-left: 5px;
}
.footer-address {
  font-size: 0.95rem;
  color: var(--text-slate);
  line-height: 1.8;
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-slate);
  opacity: 0.8;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3,
  .crm-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .hero {
    background-position: center bottom;
    background-size: 50vh;
  }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .method-grid {
    grid-template-columns: 1fr;
  }
}
