/* ═══════════════════════════════════════════════════════════
   comun.css — jesyrodriguezc.com
   Estructura común de la home, la landing USA y las landings de servicio:
   reset, tipografía, utilidades, botones, barra superior, menú global
   (con desplegable de Servicios y hamburguesa) y footer global.
   Requiere base.css antes. Tras cualquier cambio: subir ?v=N.
═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   VARIABLES Y RESET
═══════════════════════════════════════════════ */

/* Ancho máximo del contenedor principal (home, USA, landings).
   Contenido útil = 1320 − 2×24 px de margen = 1272 px. */
:root { --max: 1320px; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--fuente-cuerpo);
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.contenedor {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════════
   TIPOGRAFÍA BASE
═══════════════════════════════════════════════ */
h1, h2, h3, h4 {
  font-family: var(--fuente-display);
  line-height: 1.15;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
p  { font-size: 1.0625rem; color: var(--texto-suave); line-height: 1.75; }

/* ═══════════════════════════════════════════════
   UTILIDADES
═══════════════════════════════════════════════ */
.etiqueta {
  display: inline-block;
  background: var(--lima);
  color: #1a2a6c;
  font-family: var(--fuente-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fuente-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radio);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primario {
  background: var(--azul);
  color: var(--blanco);
  box-shadow: var(--sombra);
}
.btn-primario:hover { background: var(--azul-oscuro); box-shadow: var(--sombra-lg); }
.btn-secundario {
  background: var(--blanco);
  color: var(--azul);
  border: 2px solid var(--azul);
}
.btn-secundario:hover { background: var(--azul-suave); }
.btn-lima {
  background: var(--lima);
  color: var(--texto);
}
.btn-lima:hover { background: #dde96a; box-shadow: 0 4px 20px rgba(237,246,125,.5); }

.seccion { padding: 96px 0; }
.seccion-gris { background: var(--gris-claro); }
.seccion-azul { background: var(--azul); color: var(--blanco); }
.seccion-azul p { color: #ffffff; }   /* AA: 4,58:1 sobre #4968f5 */
.seccion-azul h2 { color: var(--blanco); }

.centrado { text-align: center; }
.centrado p { max-width: 640px; margin: 0 auto; }

.texto-azul { color: var(--azul); }
.texto-lima  { color: var(--lima); }

/* ═══════════════════════════════════════════════
   BARRA DE ANUNCIO
═══════════════════════════════════════════════ */
.barra-aviso {
  background: var(--azul-oscuro);
  color: #ffffff;
  text-align: center;
  padding: 10px 24px;
  font-size: .875rem;
  font-family: var(--fuente-display);
  font-weight: 600;
  letter-spacing: .02em;
}
.barra-aviso a {
  color: var(--lima);
  margin-left: 8px;
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════
   NAVEGACIÓN
═══════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borde);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav__logo img { height: 40px; width: auto; }
.nav__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__menu a:not(.btn) {
  font-family: var(--fuente-display);
  font-size: .9rem;
  font-weight: 600;
  color: var(--texto-suave);
  transition: color .2s;
}
.nav__menu a:not(.btn):hover { color: var(--azul); }
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--texto);
  border-radius: 2px;
  transition: all .3s;
}


/* ═══════════════════════════════════════════════
   MENÚ — desplegable de Servicios
═══════════════════════════════════════════════ */
.nav__item--sub { position: relative; }
.nav__item--sub > a::after { content: ' ▾'; font-size: .75em; }
.nav__submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 250px;
  padding: 8px;
  margin-top: 0;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  z-index: 101;
}
.nav__item--sub:hover .nav__submenu,
.nav__item--sub:focus-within .nav__submenu { display: block; }
.nav__submenu a { display: block; padding: 10px 14px; border-radius: 10px; white-space: nowrap; }
.nav__submenu a:hover { background: var(--gris-claro); }

/* Barra superior */
.barra-aviso a { white-space: nowrap; }


/* Menú móvil abierto (lo activa main.js) */
.nav__menu.nav__menu--abierto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--blanco);
  padding: 16px 24px;
  border-bottom: 1px solid var(--borde);
  z-index: 99;
}
.nav__menu a[aria-current="page"] { color: var(--azul); }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.footer {
  background: #0f172a;
  color: rgba(255,255,255,.7);
  padding: 56px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer__logo { margin-bottom: 16px; }
.footer__logo img { height: 36px; filter: brightness(0) invert(1); }
.footer__desc { font-size: .9rem; line-height: 1.7; color: rgba(255,255,255,.75); }   /* AA (antes heredaba #4b5563: 2,36) */
.footer h4 {
  font-family: var(--fuente-display);
  font-size: .9rem;
  color: var(--blanco);
  margin-bottom: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__nav a {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  transition: color .2s;
}
.footer__nav a:hover { color: var(--blanco); }
.footer__legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__legal p { font-size: .82rem; color: rgba(255,255,255,.6); margin: 0; }   /* AA (antes .4: 3,8) */
.footer__legal-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__legal-links a {
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  transition: color .2s;
}
.footer__legal-links a:hover { color: var(--blanco); }

/* Footer: "Configurar cookies" con aspecto de enlace */
.footer__nav button.footer__cookies {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  transition: color .2s;
  cursor: pointer;
  text-align: left;
}
.footer__nav button.footer__cookies:hover { color: var(--blanco); }

/* ═══════════════════════════════════════════════
   TARJETAS DE SERVICIOS (home, USA y landings)
═══════════════════════════════════════════════ */
.servicios__intro {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}
.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.servicio-card {
  background: var(--blanco);
  border: 1.5px solid var(--borde);
  border-radius: var(--radio-lg);
  padding: 28px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.servicio-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--lima);
  transform: scaleX(0);
  transition: transform .3s;
}
.servicio-card:hover {
  transform: translateY(-6px);
  border-color: var(--lima);
  box-shadow: var(--sombra-lg);
}
.servicio-card:hover::before { transform: scaleX(1); }
.servicio-icono {
  width: 48px; height: 48px;
  background: var(--azul-suave);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.servicio-card h3 { margin-bottom: 8px; }
.servicio-card .subtitulo-servicio {
  font-size: .82rem;
  font-weight: 600;
  color: var(--azul);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.servicio-card p { font-size: .92rem; margin-bottom: 16px; }
.servicio-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.servicio-lista li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .88rem;
  color: var(--texto-suave);
}
.servicio-lista li::before {
  content: '→';
  color: var(--azul);
  font-weight: 700;
  flex-shrink: 0;
}
.servicio-icono { color: var(--azul); font-size: 0; }
.servicio-icono svg { display: block; }
/* Servicios: enlace a landing (visible desde la Fase 3) */
.servicio-link {
  display: inline-flex;
  margin-top: 20px;
  font-family: var(--fuente-display);
  font-weight: 700;
  color: var(--azul);
}
.servicio-link:hover { text-decoration: underline; }
.servicio-link[hidden] { display: none; }
@media (max-width: 1024px) {
  .servicios__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .servicios__grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .seccion { padding: 48px 0; }
  .contenedor { padding: 0 16px; width: 100%; box-sizing: border-box; }
  .nav__menu { display: none; }
  .nav__hamburger { display: flex; }
  .nav__logo img { height: 32px; width: auto; }
  .nav__submenu {
    display: block;
    position: static;
    min-width: 0;
    padding: 4px 0 0 12px;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .nav__item--sub > a::after { content: ''; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer { padding: 40px 0 24px; }
}
@media (max-width: 420px) {
  .footer__grid { grid-template-columns: 1fr; }
}
