@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap');

/* =========================================================
   RESET BASE
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  background: black;
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
}

a {
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   HERO / BACKGROUND WRAPPER
   ========================================================= */
.background {
  position: relative;
  padding: 20px 5%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  z-index: 0;
}

.bg-foto-derecha {
  position: absolute;
  right: 5%;
  top: 10%;
  height: 80%;
  width: 40%;
  object-fit: contain;
  z-index: 1;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 40vh;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.5rem);
  line-height: 1.15;
}

/* =========================================================
   HEADER + NAV (desktop default)
   ========================================================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 50px;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 1000;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 10vh;
  min-height: 46px;
  max-height: 90px;
  width: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.08);
}

nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 12px;
  margin-right: 12px;
  font-size: clamp(1rem, 0.85rem + 0.4vw, 1.15rem);
  white-space: nowrap;
}

nav > a:hover,
.nav-dropdown-row a:hover {
  opacity: 0.75;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-row {
  display: flex;
  align-items: center;
}

.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 1rem;
}

.dropdown-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 0;
}

.dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border-radius: 10px;
  padding: 0.5rem 0;
  min-width: 170px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1001;
  pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s;
  margin: 0;
}

.dropdown-menu a:hover {
  background: #222;
}

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 1002;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================================================
   FOOTER (shared on every page)
   ========================================================= */
.footer {
  background: #fff;
}

.footer-titulo {
  padding: 4rem 6% 3rem;
}

.footer-titulo h2 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.8rem, 1.1rem + 4.5vw, 5rem);
  font-weight: 800;
  line-height: 1.15;
}

.ft-violeta {
  color: #27124D;
}

.ft-verde {
  color: #2dbf9b;
}

.footer-inferior {
  background: #27124D;
  padding: 3rem 6%;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem 4rem;
  color: #fff;
}

.footer-col {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.footer-logo-hr {
  font-family: Georgia, serif;
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
}

.footer-logo-evolution {
  width: 18vh;
  min-width: 110px;
  max-width: 160px;
  height: auto;
}

.footer-logo-evolution p {
  font-size: 0.7rem;
  color: #CD6829;
  font-style: normal;
  letter-spacing: 0.05em;
  margin-top: -0.2rem;
}

.footer-col h4 {
  color: #CD6829;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.footer-col a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.9;
  transition: opacity 0.2s;
  word-break: break-word;
}

.footer-col a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-col p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* =========================================================
   QUÉ HACEMOS (compartido: inicio + servicios)
   ========================================================= */
.que-hacemos {
  padding: 4rem 6%;
  background: #fff;
}

.qh-header {
  margin-bottom: 2.5rem;
}

.qh-linea {
  width: 60px;
  height: 5px;
  background: #2dbf9b;
  margin-bottom: 0.75rem;
}

.que-hacemos h2 {
  font-size: clamp(1.8rem, 1.3rem + 2vw, 3.2rem);
  font-weight: 700;
  color: #27124D;
}

.qh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.qh-card h3 {
  font-family: Georgia, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #27124D;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.qh-card p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 1.5rem;
}

.btn-ver {
  display: inline-block;
  background: #2dbf9b;
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 25px;
  text-decoration: none;
  font-size: 1.05rem;
  transition: background 0.2s, transform 0.2s;
}

.btn-ver:hover {
  background: #22a082;
  transform: translateY(-1px);
}

/* =========================================================
   EVO FRASE (compartido: inicio + evolution + servicios)
   ========================================================= */
.evo-frase {
  background: #13AB91;
  padding: 3rem 6%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.evo-frase h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.2rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.35;
}

.evo-frase h2 strong {
  font-weight: 700;
}

.evo-frase p {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  color: #fff;
  line-height: 1.7;
}

.evo-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  background: #213F9A;
  color: #fff;
  text-decoration: none;
  padding: 1.1rem 1.6rem;
  border-radius: 50px;
  font-size: clamp(1rem, 0.85rem + 0.6vw, 1.25rem);
  font-weight: 700;
  transition: opacity 0.2s, transform 0.2s;
  align-self: flex-start;
}

.evo-cta:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* =========================================================
   LISTA SERVICIOS (compartido: estrategia + retribucion + evolution)
   ========================================================= */
.lista-servicios {
  background: #fff;
  padding: 2rem 4%;
  width: 100%;
}

.lista-servicios ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.lista-servicios ul li {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.6rem 0;
  border-bottom: 1.5px solid #27124D;
  width: 100%;
}

.lista-servicios ul li:first-child {
  border-top: 1.5px solid #27124D;
}

.lista-servicios ul li::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  background: #2dbf9b;
  margin-top: 0.5rem;
}

.lista-servicios ul li p {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  color: #1a1a2e;
  line-height: 1.6;
}

.lista-servicios ul li p strong {
  color: #27124D;
}

/* =========================================================
   CARRUSEL DE CLIENTES (compartido: inicio + clientes)
   ========================================================= */
.clientes {
  background: #fff;
  padding: 4rem 6%;
  color: #27124D;
}

.clientes-texto {
  font-size: clamp(1.2rem, 1rem + 1vw, 2rem);
  font-weight: 700;
  color: #27124D;
  max-width: 800px;
  line-height: 1.4;
  margin-bottom: 2.5rem;
}

.carrusel-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.carrusel-track-container {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.carrusel-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  transition: transform 0.4s ease;
  will-change: transform;
}

.carrusel-track img {
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.car-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
  padding: 0;
}

.car-btn:hover {
  border-color: #2dbf9b;
  color: #2dbf9b;
  transform: scale(1.05);
}

.clientes-botones {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cbtn {
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-size: 1.1rem;
  transition: opacity 0.2s, transform 0.2s;
}

.cbtn:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.cbtn-verde {
  background: #2dbf9b;
  color: #fff;
}

.cbtn-oscuro {
  background: #27124D;
  color: #fff;
}

.cbtn-outline {
  background: transparent;
  color: #27124D;
  border: 1.5px solid #27124D;
}

/* =========================================================
   TESTIMONIOS (compartido: inicio + clientes + equipo)
   ========================================================= */
.testimonios {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 6%;
  overflow: hidden;
}

.test-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/edificio.webp");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.test-card {
  position: relative;
  z-index: 1;
  background-image: url("../img/cartas.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 20px;
  padding: 3rem 3.5rem;
  max-width: 750px;
  width: 100%;
  color: white;
  overflow: hidden;
}

.test-q {
  font-size: 3.5rem;
  color: #2dbf9b;
  line-height: 0;
  display: block;
  font-family: Georgia, serif;
}

.test-q-open {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.test-q-close {
  font-size: 3.5rem;
  text-align: right;
  margin-top: 0.5rem;
}

.test-track-container {
  overflow: hidden;
}

.test-track {
  display: flex;
  transition: transform 0.5s ease;
}

.test-slide {
  min-width: 100%;
  padding: 0 0.5rem;
}

.test-slide p {
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.2rem);
  line-height: 1.7;
  text-align: center;
  margin-bottom: 1.5rem;
}

.test-autor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.test-autor strong {
  font-size: 1rem;
  color: white;
}

.test-autor span {
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

.test-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.test-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.test-btn:hover {
  border-color: #2dbf9b;
  color: #2dbf9b;
  transform: scale(1.05);
}

.test-dots {
  display: flex;
  gap: 0.5rem;
}

.test-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.3s;
}

.test-dot.active {
  background: #2dbf9b;
}

/* =========================================================
   RESPONSIVE — MOBILE NAV BREAKPOINT (≤ 900px)
   ========================================================= */
@media (max-width: 900px) {

  .background {
    padding: 16px 6%;
  }

  header {
    margin-bottom: 30px;
  }

  .logo-img {
    height: 52px;
  }

  /* Hamburger becomes visible */
  .nav-toggle {
    display: flex;
  }

  /* Nav collapses into an accordion panel below the header */
  nav {
    flex: 1 1 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
  }

  nav.nav-open {
    max-height: 70vh;
    opacity: 1;
    overflow-y: auto;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  nav a {
    margin: 0;
    width: 100%;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-row {
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-dropdown-row a {
    padding: 0.9rem 0;
    font-size: 1.05rem;
  }

  .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-dropdown.dropdown-open .dropdown-toggle svg {
    transform: rotate(180deg);
  }

  .dropdown-menu {
    position: static;
    transform: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    min-width: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-dropdown.dropdown-open .dropdown-menu {
    max-height: 260px;
    padding: 0.4rem 0;
    pointer-events: auto;
    margin-bottom: 0.4rem;
  }

  .dropdown-menu a {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  nav > a:not(.nav-dropdown-row a) {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero {
    min-height: 26vh;
    align-items: flex-start;
    padding-top: 1rem;
  }

  .bg-foto-derecha {
    opacity: 0.25;
    z-index: 0;
    width: 60%;
    right: -10%;
  }

  .footer-titulo {
    padding: 3rem 6% 2rem;
  }

  .footer-inferior {
    padding: 2.5rem 6%;
    gap: 2.5rem;
  }

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

  .test-card {
    padding: 2.2rem 1.6rem;
  }

  .test-q,
  .test-q-open,
  .test-q-close {
    font-size: 2.6rem;
  }
}

/* =========================================================
   RESPONSIVE — SMALL PHONES (≤ 480px)
   ========================================================= */
@media (max-width: 480px) {

  .background {
    padding: 14px 5.5%;
  }

  .logo-img {
    height: 44px;
  }

  .nav-toggle {
    width: 38px;
    height: 38px;
  }

  .footer-titulo h2 {
    line-height: 1.2;
  }

  .footer-col {
    flex: 1 1 100%;
  }

  .que-hacemos,
  .evo-frase,
  .clientes,
  .lista-servicios {
    padding-left: 5.5%;
    padding-right: 5.5%;
  }

  .clientes-texto {
    max-width: 100%;
  }

  .carrusel-track img {
    height: 32px;
  }

  .evo-cta {
    align-self: stretch;
  }

  .test-card {
    padding: 1.8rem 1.1rem;
    border-radius: 16px;
  }

  .lista-servicios ul li {
    gap: 0.8rem;
    padding: 1.3rem 0;
  }
}
