/* =============================================================
   JURÍDICO VIRTUAL — INTEGRACIÓN FINAL DE IMÁGENES Y RESPONSIVO
   Mantiene la identidad visual V5 y conecta los recursos reales.
   ============================================================= */

/* Identidad SVG oficial */
.logo {
  min-width: 216px;
  gap: 12px;
}
.logo img {
  position: relative;
  z-index: 2;
  width: 40px !important;
  height: 58px !important;
  object-fit: contain;
  opacity: 1 !important;
}
.logo::before { display: none !important; }
.logo::after {
  content: 'JURÍDICO VIRTUAL' !important;
  position: static !important;
  transform: none !important;
  color: var(--azul-dark);
  font-size: .79rem;
  font-weight: 800;
  letter-spacing: .085em;
}

.footer-brand img {
  width: 44px !important;
  height: 68px !important;
  margin-bottom: 18px;
  opacity: 1 !important;
  filter: none !important;
}
.footer-brand::before { display: none !important; }
.footer-brand::after {
  content: 'JURÍDICO VIRTUAL' !important;
  left: 58px !important;
  top: 23px !important;
  color: #fff;
}

/* Hero de inicio con fotografía real */
.hero-bg {
  display: block !important;
  background-image: url('../img/fotosjv/fondo-inicio-despacho-juridico.png') !important;
  background-position: center !important;
  background-size: cover !important;
  opacity: .075 !important;
  filter: saturate(.7) !important;
}
.hero-img-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  background: #dce7eb;
}
.hero-img-wrap::before,
.hero-img-wrap::after { display: none !important; }
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: saturate(.78) contrast(1.03);
  transition: transform .8s cubic-bezier(.2,.75,.25,1), filter .8s ease;
}
.hero-img-frame:hover .hero-photo {
  transform: scale(1.035);
  filter: saturate(.9) contrast(1.05);
}
.hero-photo-label {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  background: rgba(7,31,46,.88);
  color: white;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  backdrop-filter: blur(10px);
}
.hero-photo-label img {
  width: 23px;
  height: 34px;
  filter: invert(1);
}

/* Logotipos de clientes */
.cliente-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4px 10px;
  background: #fff !important;
  border-color: rgba(255,255,255,.32) !important;
}
.cliente-logo img {
  width: 94%;
  height: 60px;
  object-fit: contain;
  filter: none;
  transform: scale(1.08);
  transition: transform .35s ease, filter .35s ease;
}
.cliente-logo:hover img { transform: scale(1.14); }

/* Refuerzo para archivos cuadrados que incluyen margen dentro de la imagen */
.cliente-logo img[src*="viajes-yce"],
.cliente-logo img[src*="vicejsa"],
.cliente-logo img[src*="universidad-londres"] {
  transform: scale(1.18);
}
.cliente-logo:hover img[src*="viajes-yce"],
.cliente-logo:hover img[src*="vicejsa"],
.cliente-logo:hover img[src*="universidad-londres"] {
  transform: scale(1.23);
}

/* Imágenes de noticias */
.news-card-img { position: relative; }
.news-image {
  width: 100%;
  height: 100%;
  min-height: 205px;
  object-fit: cover;
  object-position: center;
  transition: transform .65s ease, filter .65s ease;
}
.news-card:hover .news-image {
  transform: scale(1.035);
  filter: saturate(1.05);
}

/* Franja de Facebook: texto visible sobre la superficie clara */
.news-fb-cta,
.news-fb-cta p,
.news-fb-cta p strong {
  color: #102c3d !important;
}
.news-fb-cta p strong { font-weight: 800; }
.news-fb-cta .btn-sm {
  border-color: #c7dcf7 !important;
  background: #edf5ff !important;
  color: #0d62ce !important;
}
.news-fb-cta .btn-sm:hover {
  border-color: #1877f2 !important;
  background: #1877f2 !important;
  color: #fff !important;
}

/* Fotografías institucionales */
.about-photo-composition {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: #dce7eb;
}
.about-photo-composition::before,
.about-photo-composition::after { display: none !important; }
.about-main-photo {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  filter: saturate(.82) contrast(1.03);
}
.about-inset-photo {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 42%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 5px solid #fff;
  border-radius: 14px;
  box-shadow: 0 14px 35px rgba(7,31,46,.18);
}

.office-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 28px;
}
.office-card { overflow: hidden; }
.office-photo {
  width: calc(100% + 56px);
  height: 220px;
  margin: -28px -28px 26px;
  object-fit: cover;
}

.contact-photo {
  overflow: hidden;
  margin: 28px 0 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #dce7eb;
}
.contact-photo img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

/* Recursos jurídicos con logotipo real */
.sitio-img-icon {
  height: 112px;
  min-height: 112px;
  padding: 10px 16px;
  background: #f4f7f8 !important;
}
.sitio-img-icon::before,
.sitio-img-icon::after { display: none !important; }
.sitio-img-icon img {
  display: block !important;
  width: 92%;
  max-width: 92%;
  height: 88px;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .35s cubic-bezier(.2,.75,.25,1);
}
.sitio-card:hover .sitio-img-icon img { transform: scale(1.06); }
.sitio-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.sitio-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.sitio-body p { margin-bottom: 18px; }
.sitio-link-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: auto !important;
  height: auto !important;
  min-height: 38px;
  margin-top: auto;
  padding: 8px 12px;
  gap: 7px;
  border-radius: 10px;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.sitio-link-badge i {
  display: inline-block !important;
  font-size: .7rem;
}

/* Iconografía más visible */
.servicio-icon {
  width: 64px !important;
  height: 64px !important;
  flex: 0 0 64px;
  font-size: 1.4rem !important;
}
.contact-detail-icon,
.grupo-icon {
  width: 60px !important;
  height: 60px !important;
  flex: 0 0 60px;
  font-size: 1.25rem !important;
}
.pillar > i,
.login-feature > i {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px;
  font-size: 1.12rem !important;
}

/* Encabezados internos con fotografía y contraste */
.page-hero {
  min-height: 330px;
  padding: 142px 0 62px !important;
  background-image:
    linear-gradient(105deg,rgba(5,25,39,.92),rgba(14,60,82,.7)),
    var(--page-hero-image) !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
.page-hero::before { display: none !important; }
.page-hero h1 {
  position: relative;
  z-index: 2;
  color: #fff !important;
  text-shadow: 0 2px 18px rgba(0,0,0,.28);
}
.page-hero p {
  position: relative;
  z-index: 2;
  color: rgba(255,255,255,.9) !important;
  text-shadow: 0 1px 10px rgba(0,0,0,.2);
}

/* Cuadrículas inline heredadas: comportamiento adaptable */
@media (max-width: 820px) {
  .section .container > div[style*="grid-template-columns:1fr 1fr"],
  .section .container > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .section [style*="order:2"],
  .section [style*="order:1"] { order: initial !important; }
  .office-grid { grid-template-columns: 1fr; }
}

/* Tableta y móvil: contenido primero, fotografía compacta después */
@media (max-width: 920px) {
  .hero {
    min-height: auto !important;
    padding: 112px 0 52px !important;
  }
  .hero-bg { opacity: .045 !important; }
  .hero-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }
  .hero-content {
    order: 1 !important;
    max-width: 720px !important;
    text-align: left !important;
  }
  .hero-img-col {
    display: block !important;
    order: 2 !important;
    width: min(100%,560px) !important;
    max-width: 560px !important;
    margin: 0 auto !important;
  }
  .hero-img-wrap {
    height: 300px;
    aspect-ratio: auto !important;
  }
  .hero-photo { object-position: center 42%; }
  .hero-eyebrow,
  .hero-divider,
  .hero-actions { justify-content: flex-start !important; }
  .hero-stats { justify-content: flex-start !important; }
  .about-photo-composition,
  .about-main-photo { min-height: 400px; }
}

@media (max-width: 640px) {
  .navbar { min-height: 76px; }
  .logo {
    min-width: 178px;
    height: 48px;
  }
  .logo img {
    width: 34px !important;
    height: 50px !important;
  }
  .logo::after {
    content: 'JURÍDICO VIRTUAL' !important;
    font-size: .7rem;
    letter-spacing: .065em;
  }

  .hero {
    padding: 98px 0 42px !important;
  }
  .hero-bg { display: none !important; }
  .hero-inner {
    width: min(100% - 28px,560px) !important;
    gap: 24px !important;
  }
  .hero-title {
    margin-bottom: 18px !important;
    font-size: clamp(2.65rem,13vw,3.6rem) !important;
    line-height: .98 !important;
  }
  .hero-eyebrow {
    margin-bottom: 17px !important;
    font-size: .56rem !important;
  }
  .hero-subtitle {
    margin-bottom: 24px !important;
    font-size: .94rem !important;
    line-height: 1.65 !important;
  }
  .hero-actions { gap: 10px !important; }
  .hero-actions .btn { min-height: 46px; }
  .hero-stats {
    margin-top: 28px !important;
    padding-top: 18px !important;
  }
  .hero-img-col { width: 100% !important; }
  .hero-img-wrap {
    height: 190px !important;
    border-radius: 18px !important;
  }
  .hero-photo { object-position: center 38%; }
  .hero-photo-label {
    left: 12px;
    right: 12px;
    bottom: 12px;
    min-height: 42px;
    padding: 7px 11px;
    font-size: .63rem;
  }
  .hero-photo-label img { width: 18px; height: 27px; }
  .hero-badge { display: none !important; }

  .page-hero {
    min-height: 235px !important;
    padding: 112px 0 40px !important;
    background-position: center !important;
  }
  .page-hero h1 {
    margin-bottom: 10px;
    font-size: clamp(2.1rem,11vw,3rem) !important;
  }
  .page-hero p {
    max-width: 34ch;
    margin: 0;
    font-size: .9rem;
    line-height: 1.55;
  }

  .about-photo-composition,
  .about-main-photo { min-height: 330px; }
  .about-inset-photo { width: 44%; right: 12px; bottom: 12px; border-width: 3px; }
  .office-photo { height: 180px; }
  .contact-photo img { height: 175px; }
  .news-image { min-height: 190px; }
  .cliente-logo img { height: 56px; }
  .sitio-img-icon {
    height: 104px;
    min-height: 104px;
    padding: 9px 14px;
  }
  .sitio-img-icon img {
    width: 94%;
    max-width: 94%;
    height: 80px;
  }
  .sitio-body { padding: 18px 17px 16px; }
  .sitio-link-badge {
    min-height: 40px;
    padding: 9px 13px;
  }
}

/* =============================================================
   AJUSTES FINALES — LANDING, MÉTRICAS Y NAVEGACIÓN MÓVIL
   ============================================================= */

/* Métricas de confianza más dinámicas, sin alterar sus datos */
.hero-stats {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px !important;
  margin-top: 4px;
  padding: 10px !important;
  border: 1px solid rgba(42,108,143,.18) !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg,rgba(255,255,255,.88),rgba(235,243,246,.72)) !important;
  box-shadow: 0 18px 45px rgba(8,38,55,.09);
  backdrop-filter: blur(12px);
}
.hero-stats .stat-divider { display: none !important; }
.hero-stats .stat {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  grid-template-rows: auto auto;
  align-items: center;
  min-width: 0;
  padding: 14px 12px;
  column-gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(42,108,143,.13);
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  text-align: left;
  transition: transform .32s cubic-bezier(.2,.75,.25,1), border-color .32s ease, box-shadow .32s ease;
}
.hero-stats .stat::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(46,119,157,.07);
  pointer-events: none;
}
.hero-stats .stat:hover {
  transform: translateY(-4px);
  border-color: rgba(42,108,143,.34);
  box-shadow: 0 12px 24px rgba(8,38,55,.10);
}
.stat-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg,#0b3048,#2f789c);
  color: #fff;
  font-size: .94rem;
  box-shadow: 0 8px 18px rgba(19,80,111,.18);
}
.stat-value {
  display: block;
  white-space: nowrap;
  line-height: 1;
}
.hero-stats .stat-number,
.hero-stats .stat-plus {
  color: #09283c !important;
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.045em;
}
.hero-stats .stat-plus { font-size: 1.25rem; }
.hero-stats .stat-label {
  max-width: none;
  margin-top: 4px;
  color: #526d7a !important;
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1.25;
}

/* Las noticias conservan altura equilibrada y la acción queda al final */
.noticias-section .news-card {
  display: flex;
  flex-direction: column;
}
.noticias-section .news-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.noticias-section .news-card-body .news-link {
  margin-top: auto !important;
  padding-top: 18px;
}

/* El archivo nombrado "edomex" contiene el logotipo oficial de la JLCA CDMX */
.sitio-img-icon img[src$="logo-junta-local-conciliacion-arbitraje-edomex.webp"] {
  transform: scale(1.34);
}
.sitio-card:hover .sitio-img-icon img[src$="logo-junta-local-conciliacion-arbitraje-edomex.webp"] {
  transform: scale(1.4);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-stats .stat-icon {
    animation: statIconFloat 4.8s ease-in-out infinite;
  }
  .hero-stats .stat:nth-child(3) .stat-icon { animation-delay: -1.6s; }
  .hero-stats .stat:nth-child(5) .stat-icon { animation-delay: -3.2s; }
}
@keyframes statIconFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Menú móvil legible, compacto y separado del contenido */
@media (max-width: 920px) {
  #main-header,
  #main-header.scrolled {
    background: rgba(249,251,252,.98) !important;
    border-bottom: 1px solid #d8e2e6;
    box-shadow: 0 8px 28px rgba(7,31,46,.07) !important;
    backdrop-filter: blur(14px);
  }
  .navbar {
    min-height: 76px;
    padding-block: 10px !important;
  }
  .logo,
  .nav-toggle {
    z-index: 1003;
  }
  .nav-toggle,
  .nav-toggle.open {
    border-color: #c9d8de !important;
    background: #f6fafb !important;
  }
  .nav-toggle span,
  .nav-toggle.open span {
    background: #123d55 !important;
  }
  .nav-links {
    display: none !important;
    position: fixed !important;
    inset: 76px 0 0 !important;
    width: 100% !important;
    height: calc(100dvh - 76px) !important;
    margin: 0 !important;
    padding: 22px 18px 112px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow-y: auto;
    background:
      radial-gradient(circle at 92% 7%,rgba(83,156,190,.18),transparent 24%),
      linear-gradient(155deg,#071f2e 0%,#0b3045 100%) !important;
    z-index: 1001;
  }
  .nav-links.open {
    display: flex !important;
    animation: mobileMenuIn .26s ease-out both;
  }
  .nav-links li {
    width: 100%;
    text-align: left !important;
  }
  .nav-links li a,
  .nav-links li a:hover,
  .nav-links li a.active {
    display: flex !important;
    align-items: center;
    min-height: 52px;
    padding: 13px 16px !important;
    border: 1px solid transparent !important;
    border-bottom-color: rgba(255,255,255,.11) !important;
    border-radius: 11px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(255,255,255,.88) !important;
    font-size: .95rem !important;
    font-weight: 700;
    text-align: left !important;
  }
  .nav-links li a:hover,
  .nav-links li a.active {
    border-color: rgba(142,199,222,.22) !important;
    background: rgba(255,255,255,.075) !important;
    color: #fff !important;
  }
  .nav-links li a:not(.nav-cta)::after { display: none !important; }
  .nav-links li a.nav-cta,
  .nav-links li a.nav-cta:hover {
    justify-content: center;
    margin-top: 8px !important;
    border: 1px solid #3d83a7 !important;
    background: #286b8d !important;
    color: #fff !important;
  }
  .nav-social { display: none !important; }
  .nav-social.open {
    position: fixed !important;
    left: 18px !important;
    right: 18px !important;
    bottom: 16px !important;
    z-index: 1002;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px !important;
    padding: 10px !important;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 16px;
    background: rgba(6,25,37,.94) !important;
    box-shadow: 0 16px 42px rgba(0,0,0,.28);
    backdrop-filter: blur(14px);
  }
  .nav-social.open > a:first-child {
    display: grid !important;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 12px;
    color: #fff !important;
  }
  .nav-social.open .nav-wa {
    justify-content: center;
    min-height: 48px;
    flex: 1;
    border-radius: 12px !important;
    background: #e8f7ee !important;
    color: #17633a !important;
  }

  /* Elimina el espacio vacío heredado dentro del hero */
  .hero {
    align-items: flex-start !important;
    padding: 100px 0 48px !important;
  }
  .hero-inner {
    min-height: 0 !important;
    padding: 0 !important;
  }
  .hero-actions { margin-bottom: 28px !important; }
}

@keyframes mobileMenuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .hero { padding: 92px 0 38px !important; }
  .hero-inner { gap: 22px !important; }
  .hero-actions { margin-bottom: 20px !important; }
  .hero-stats {
    gap: 7px !important;
    margin-top: 0 !important;
    padding: 7px !important;
    border-radius: 16px !important;
  }
  .hero-stats .stat {
    display: flex;
    min-height: 118px;
    padding: 11px 5px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    text-align: center;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    font-size: .76rem;
  }
  .hero-stats .stat-number { font-size: 1.7rem; }
  .hero-stats .stat-plus { font-size: 1.1rem; }
  .hero-stats .stat-label {
    min-height: 30px;
    margin-top: 0;
    font-size: .56rem;
    line-height: 1.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo,
  .cliente-logo img,
  .news-image,
  .sitio-img-icon img { transition: none !important; }
}
