/* ==========================================================
   MENDEZ GESTORÍA - styles.css (compartido por todas las páginas)
   ========================================================== */

/*------ VARIABLES Y BASE --------------*/
:root {
  --rojo: #971519;
  --granate: #9b211e;
  --rojo-oscuro: #6f0f12;
  --negro: #1a1a1a;
  --blanco: #ffffff;
  --gris: #f2f2f2;
  --fuente: 'Plus Jakarta Sans', Arial, sans-serif;
  --fuente-texto: 'Open Sans', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente);
  font-size: 13px;
  line-height: 1.6;
  color: var(--negro);
  background: var(--blanco);
}

img { max-width: 100%; height: auto; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.center { text-align: center; }

/*------ HEADER Y MENU --------------*/
.site-header {
  background-color: var(--blanco);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.logo img { height: 42px; display: block; }

.main-nav .nav-list { display: flex; list-style: none; gap: 32px; }

.nav-link {
  text-decoration: none;
  color: var(--negro);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 4px;
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: var(--rojo);
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active { color: var(--rojo); }

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

.menu-toggle .bar {
  width: 26px;
  height: 3px;
  background-color: var(--negro);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open .bar:nth-child(2) { opacity: 0; }
.menu-toggle.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .logo img { height: 22px; }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(75%, 300px);
    background-color: var(--blanco);
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    padding-top: 90px;
  }
  .main-nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-link {
    display: block;
    padding: 16px 28px;
    text-transform: none;
    font-size: 17px;
    border-left: 3px solid transparent;
  }
  .nav-link.active,
  .nav-link:hover {
    border-left: 3px solid var(--rojo);
    background-color: rgba(151, 21, 25, 0.05);
  }
  .nav-link::after { display: none; }
}

/*------ BOTONES (con flecha en hover) --------------*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fuente);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn::after {
  content: "→";
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-left: 0;
  transition: max-width 0.25s ease, opacity 0.25s ease, margin-left 0.25s ease;
}

.btn:hover::after,
.btn:focus-visible::after { max-width: 24px; opacity: 1; margin-left: 8px; }

.btn:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }

.btn-primary { background: var(--rojo); color: var(--blanco); border-color: var(--rojo); }
.btn-primary:hover { background: var(--rojo-oscuro); border-color: var(--rojo-oscuro); }

.btn-outline { background: transparent; color: var(--blanco); border-color: var(--blanco); }
.btn-outline:hover { background: rgba(0, 0, 0, 0.45); }

.btn-ghost { background: transparent; color: var(--granate); border-color: var(--granate); }
.btn-ghost:hover { background: var(--granate); color: var(--blanco); }

/*------ HERO --------------*/
.hero-section { padding: 24px 0 0; }

.hero {
  background: url("/images/mendez-gestoria-background.webp") center / cover no-repeat;
  border-radius: 10px;
  min-height: 380px;
  display: flex;
  align-items: center;
  margin-top: 40px;
  padding: 80px 45px;
}

.hero-content { max-width: 600px; }

.hero h1 {
  margin-bottom: 50px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blanco);
}

.hero h1 span { display: block; color: var(--rojo); }

.hero p { color: var(--blanco); font-size: 14px; margin-top: 16px; font-family: var(--fuente-texto); margin-bottom: 40px;}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.benefits {
  background: var(--gris);
  border-radius: 10px;
  margin-top: 50px;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.benefit { display: flex; align-items: center; gap: 12px; font-size: 13px; font-family: var(--fuente-texto); font-weight: 600;}
.benefit img { width: 40px; height: 40px; flex-shrink: 0; }

/*------ SECCIONES GENERALES --------------*/
.section { padding: 64px 0 0; text-align: center; }
.section-clients { padding-bottom: 64px; }

.eyebrow {
  font-family: var(--fuente-texto);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--granate);
}

.section h2 { font-size: 30px; font-weight: 600; margin: 30px 0 30px; line-height: 1.3; }
.lead { font-size: 14px; font-family: var(--fuente-texto); font-weight: 400;}

/*------ SERVICIOS --------------*/
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 55px 0;
  text-align: left;
}

.service-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border: 1px solid var(--granate);
  border-radius: 10px;
  padding: 10px;
}

.service-card img { width: 40px; height: 40px; flex-shrink: 0; }
.service-card h3 { font-size: 13px; font-family: var(--fuente-texto); font-weight: 700; margin-bottom: 10px; }
.service-card p { font-size: 13px; font-family: var(--fuente-texto); font-weight: 400; }

.why {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  margin-top: 56px;
  text-align: left;
}

.why img { width: 100%; border-radius: 10px; display: block; }
.why h3 { font-size: 20px; font-family: var(--fuente-texto); font-weight: 600; margin-bottom: 10px; }
.why p { font-size: 13px; font-family: var(--fuente-texto); font-weight: 400; }

.check-list { list-style: none; margin-top: 16px; }
.check-list li { font-size: 13px; font-family: var(--fuente-texto); font-weight: 400; padding-left: 26px; position: relative; margin-bottom: 8px; }
.check-list li::before { content: "\2611"; position: absolute; left: 0; color: var(--granate); font-size: 16px; line-height: 1.3; }

/*------ CLIENTES / BANDA CTA --------------*/
.cta-band {
  background: var(--granate);
  border-radius: 15px;
  margin-top: 32px;
  padding: 26px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  text-align: left;
}

.cta-band img { width: 40px; height: 40px; }
.cta-band h3 { color: var(--blanco); font-family: var(--fuente-texto); font-size: 20px; font-weight: 600; }
.cta-band p { color: var(--blanco); font-family: var(--fuente-texto); font-size: 12px; font-weight: 400; }

/*------ FOOTER --------------*/
.site-footer { background: #000; color: var(--blanco); padding-top: 48px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 40px;
}

.footer-logo { width: 120px; display: block; margin-bottom: 14px; }
.footer-brand p { font-size: 12px; font-family: var(--fuente-texto); font-weight: 400; max-width: 300px; }

.social { display: flex; gap: 12px; margin-top: 16px; }
.social img { display: block; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; font-family: var(--fuente-texto);}
.footer-links a {
  color: var(--blanco);
  font-family: var(--fuente-texto);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer-links a:hover { color: var(--rojo); }

.footer-contact { list-style: none; }
.footer-contact li { display: flex; align-items: center; gap: 12px; font-family: var(--fuente-texto); font-size: 13px; font-weight: 400; margin-bottom: 12px; }
.footer-contact img { flex-shrink: 0; }
.footer-contact a { color: var(--blanco); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }

.footer-bottom {
  margin-top: 36px;
  padding: 18px 0;
  border-top: 1px solid var(--blanco);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--fuente-texto);
  font-size: 12px;
  font-weight: 400;
}

.credit { display: flex; align-items: center; gap: 8px; color: var(--blanco); text-decoration: none; }
.credit img { height: 18px; width: auto; }

/*------ RESPONSIVE --------------*/
@media (max-width: 900px) {
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero { padding: 36px 22px; min-height: 340px; }
  .hero h1 { font-size: 28px; }
  .benefits,
  .services-grid,
  .why,
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
/*-----CARRUSEL HOME CLIENTE-----------*/
.mg-ticker-wrapper {
  width: 100%;
  overflow: hidden;
  background: #fff;
  padding: 20px 0;
  margin: 60px 0;
}

.mg-ticker-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: mg-ticker-scroll 35s linear infinite;
}

.mg-ticker-wrapper:hover .mg-ticker-track {
  animation-play-state: paused;
}

.mg-ticker-item {
  flex-shrink: 0;
  width: 150px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mg-ticker-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0px;
 }

.mg-ticker-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes mg-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 480px) {
  .mg-ticker-item {
    width: calc(50vw - 30px);
    height: 70px;
  }
}

/*------ PÁGINA NOSOTROS (agregar al final de styles.css) --------------*/

/* Hero de páginas internas: la imagen ya trae su degradé, no se agrega otro */
.page-hero {
  background: url("images/mendez-gestoria-nosotros-fondo.webp") center / cover no-repeat;
  border-radius: 10px;
  min-height: 340px;
  display: flex;
  align-items: center;
  padding: 80px 45px;
  margin-top: 40px;
}

.page-hero-content { max-width: 490px; }

.eyebrow--left { text-align: left;}

.page-hero h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--negro);
  margin-top: 30px;
}

.page-hero h1 span { display: block; color: var(--rojo); }

.page-hero-text { font-family: var(--fuente-texto); font-size: 14px; color: var(--negro); margin-top: 16px; }

/* Valores: 4 columnas con íconos de 40px */
.values-grid { grid-template-columns: repeat(4, 1fr); }
.values-grid .service-card img { width: 40px; height: 40px; }

/* Nuestra historia: reutiliza .why (imagen + texto), sin margen superior */
.why--historia { margin-top: 0; }
.why--historia h2 { text-align: left; margin-top: 0; }
.why--historia p + p { font-family: var(--fuente-texto); margin-top: 12px; }

/* Banda CTA como cierre de página */
.cta-final .cta-band { margin-top: 0; }

/* Responsive */
@media (max-width: 900px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .page-hero { padding: 36px 22px; min-height: 300px; }
  .page-hero h1 { font-size: 28px; }
  .values-grid { grid-template-columns: 1fr; }
}

/*------ PÁGINA SERVICIOS (agregar al final de styles.css) --------------*/

/* Hero: misma clase .page-hero, solo cambia la imagen (ya trae su degradé) */
.page-hero--servicios { background-image: url("/images/mendez-gestoria-servicios-fondo.webp"); }

/* Texto solo para lectores de pantalla y buscadores (H2 invisible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Lista de tarjetas: 3 + 3 + 2, la última fila queda centrada */
.servicios-lista {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.service-detail {
  flex: 0 1 330px;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--granate);
  border-radius: 15px;
  padding: 40px 40px 18px;
  background: var(--blanco);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.service-detail:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.service-detail img {
  display: block;
  width: 60px;
  max-width: 60px;
  height: 60px;
  margin: 0 auto 12px;
}

.service-detail h3 {
  font-family: var(--fuente-texto);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.service-detail p { font-family: var(--fuente-texto); text-align: center; }

.service-detail ul {
  list-style: none;
  text-align: left;
  margin: 14px 0 18px;
  font-family: var(--fuente-texto);
  font-size: 13px;
  font-weight: 400;
}

.service-detail li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
}

.service-detail li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--rojo);
  font-weight: 700;
}

/* Link "Solicitar Info" abajo a la derecha, con flecha en hover */
.service-link {
  margin-top: auto;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  font-family: var(--fuente-texto);
  font-size: 14px;
  font-weight: 700;
  color: var(--rojo);
  text-decoration: none;
}

.service-link::after {
  content: "→";
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-left: 0;
  transition: max-width 0.25s ease, opacity 0.25s ease, margin-left 0.25s ease;
}

.service-link:hover::after,
.service-link:focus-visible::after { max-width: 24px; opacity: 1; margin-left: 6px; }

.service-link:focus-visible { outline: 2px solid var(--naranja); outline-offset: 3px; }

/*------ PÁGINA CONTACTO (agregar al final de styles.css) --------------*/
/* Requiere la clase .sr-only que se agregó con la página Servicios */

/* Hero: misma clase .page-hero, solo cambia la imagen (ya trae su degradé) */
.page-hero--contacto { background-image: url("/images/mendez-gestoria-contacto.webp"); }

/* Dos columnas: formulario + datos de contacto */
.contacto-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
  text-align: left;
}

/* Formulario: fondo transparente y sin contorno */
.contact-form { background: transparent; border: 0; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field { display: block; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--gris);
  border: 1px solid transparent; /* reserva el espacio para que el borde de error no mueva nada */
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--fuente-texto);
  font-size: 14px;
  color: var(--negro);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form textarea { min-height: 140px; resize: vertical; display: block; }

.contact-form ::placeholder { color: #8a8a8a; opacity: 1; }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(241, 152, 0, 0.35);
}

/* Estado de error (lo activa el JS al enviar con campos vacíos) */
.field.has-error input,
.field.has-error textarea { border-color: #d32f2f; }

.field-msg {
  display: none;
  margin-top: 4px;
  font-family: var(--fuente-texto);
  font-size: 12px;
  color: #d32f2f;
}

.field.has-error .field-msg { display: block; }

/* El campo Mensaje queda separado del botón */
.form-actions { margin-top: 16px; text-align: right; }
.form-actions .btn { border: 0; }

/* Datos de contacto */
.contacto-datos { list-style: none; }

.contacto-datos li {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-family: var(--fuente-texto);
  font-size: 13px;
  color: var(--rojo);
}

.contacto-datos img { width: 24px; height: 24px; flex-shrink: 0; }
.contacto-datos a { color: inherit; text-decoration: none; }
.contacto-datos a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
  .contacto-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}
/*------ BOTÓN FLOTANTE DE WHATSAPP --------------*/
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (max-width: 768px) {
  .whatsapp-float { right: 16px; width: 52px; height: 52px; }
}
/*------ ENVÍO DEL FORMULARIO (agregar al final de styles.css) --------------*/

/* Campo trampa: fuera de pantalla, no usar display:none (algunos bots lo detectan) */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mensaje de resultado debajo del botón */
.form-status {
  display: none;
  margin-top: 14px;
  font-family: var(--fuente-texto);
  font-size: 14px;
  text-align: right;
}

.form-status.is-ok { display: block; color: #1b7f3b; }
.form-status.is-error { display: block; color: #d32f2f; }

/* Botón mientras se envía */
.form-actions .btn:disabled { opacity: 0.6; cursor: not-allowed; }