/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== Base ===== */
body {
  font-family: 'Open Sans', sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* Aplica justificación a todos los párrafos */
p {
  text-align: justify;
}
/* Justificar solo los párrafos de Misión y Visión */
.nosotros .mv-content p {
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 1em;
}
.card .info {
  padding: 1rem;
  text-align: center; /* centra todo el contenido dentro de la tarjeta */
}

.card h3 {
  margin: .5rem 0;
  color: #16509d;
  text-align: center; /* asegura que los nombres estén centrados */
}

.card p {
  color: #666;
  font-size: .9rem;
  text-align: center; /* centra la descripción */
}

.card .linkedin {
  display: inline-block;
  margin: .5rem auto 0; /* centra el botón */
  padding: .5rem 1rem;
  background: #16509d;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: .3s;
  text-align: center;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
}

/* ===== Header ===== */
.sticky-header {
  background: #fff;
  padding: .5rem 0;
  position: sticky;
  top: 0;
  z-index: 2500;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 90px;
}

/* ===== Nav Links ===== */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  transition: opacity .3s ease, transform .3s ease;
  position: relative;
  z-index: 3000;
}

.nav-links a {
  color: #16509d;
  text-decoration: none;
  transition: .3s;
}

.nav-links a:hover {
  color: #0d2f5b;
}

/* ===== Hamburger ===== */
.hamburger {
  display: none;
  flex-direction: column;
  width: 30px;
  cursor: pointer;
}

.hamburger span {
  height: 4px;
  background: #16509d;
  border-radius: 2px;
  transition: .3s;
  margin-bottom: 6px;
}

.hamburger span:last-child {
  margin-bottom: 0;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== Overlay ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease;
  z-index: 900;
  pointer-events: none;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: #426DA9;
  color: #fff;
  animation: fadeIn 1.5s ease-in-out;
}

.hero-img {
  margin: 0 auto 1.5rem;
  border-radius: 8px;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

.btn {
  display: inline-block;
  background: #fff;
  color: #16509d;
  padding: .8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: .3s;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}

/* ===== Secciones ===== */
section {
  padding: 3rem 1rem;
  scroll-margin-top: 120px;
}

.section-img {
  margin: 0 auto 1.5rem;
  border-radius: 8px;
}

.nosotros,
.servicios,
.contacto,
.equipo {
  max-width: 1100px;
  margin: auto;
}

.nosotros h2,
.servicios h2,
.contacto h2,
.equipo h2 {
  font-size: 2rem;
  color: #16509d;
  margin-bottom: 1rem;
  text-align: center;
}

.nosotros p,
.servicios p,
.contacto p,
.equipo p {
  margin-bottom: 1.5rem;
  color: #444;
  text-align: center;
}

/* ===== Misión y Visión ===== */
.nosotros {
  background: #f5f5f5;
  border-top: 1px solid rgba(22,80,157,.08);
  border-bottom: 1px solid rgba(22,80,157,.08);
}

.nosotros .section-img {
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.mv-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: .75rem;
  align-items: start;
  background: #fff;
  border: 1px solid rgba(22,80,157,.12);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.mv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  border-color: rgba(22,80,157,.25);
}

.mv-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(66,109,169,.12);
  border: 1px solid rgba(66,109,169,.25);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: #16509d;
}

.mv-card:hover .mv-icon {
  background: rgba(22,80,157,.15);
  color: #0d2f5b;
}

.mv-content h3 {
  font-family: 'Montserrat', sans-serif;
  color: #16509d;
  font-size: 1.05rem;
  margin-bottom: .35rem;
}

.mv-content p {
  color: #444;
  line-height: 1.55;
  margin: 0;
}

/* ===== Listas ===== */
.nosotros ul,
.servicios ul {
  list-style: none;
  margin-top: 1rem;
}

.nosotros li,
.servicios li {
  margin-bottom: .5rem;
}

/* ===== Equipo ===== */
.equipo {
  background: #f5f5f5;
}

.equipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
  transition: .3s;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0,0,0,.2);
}

.card .info {
  padding: 1rem;
}

.card h3 {
  margin: .5rem 0;
  color: #16509d;
}

.card p {
  color: #666;
  font-size: .9rem;
}

.card .linkedin {
  display: inline-block;
  margin-top: .5rem;
  padding: .5rem 1rem;
  background: #16509d;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: .3s;
}

.card .linkedin:hover {
  background: #0d2f5b;
}

/* ===== Opiniones ===== */
.opiniones {
  background: #fff;
  padding: 3rem 1rem;
}

.opiniones h2 {
  text-align: center;
  font-size: 2rem;
  color: #16509d;
  margin-bottom: 2rem;
}

.opiniones-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.op-card {
  background: #f8f9fc;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  transition: .3s;
}

.op-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0,0,0,.15);
}

.op-text {
  font-style: italic;
  color: #444;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.op-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.op-author img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
}

.op-author h4 {
  margin: 0;
  color: #16509d;
}

.op-author span {
  font-size: .85rem;
  color: #777;
}

/* ===== Formulario ===== */
form input,
form textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: .8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: .3s;
  background: #fff;
}

::placeholder {
  color: #999;       /* gris claro */
  font-style: italic; /* opcional */
}

#formMsg {
  margin-top: 10px;
  font-size: 0.95rem;
  display: none; /* oculto por defecto */
}

#formMsg.show {
  display: block; /* se muestra cuando JS le pone la clase show */
}

button:disabled {
  background-color: #ccc;   /* gris */
  color: #666;              /* texto más apagado */
  cursor: not-allowed;      /* cursor bloqueado */
  opacity: 0.8;             /* un poco más tenue */
}

button {
  transition: background-color 0.3s ease, color 0.3s ease;
}


form textarea {
  min-height: 120px;
}

form input:focus,
form textarea:focus {
  border-color: #16509d;
  box-shadow: 0 0 0 2px rgba(22,80,157,.1);
  outline: none;
}

form button {
  background: #16509d;
  color: #fff;
  border: none;
  padding: 1rem;
  width: 100%;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: .3s;
}

form button:hover {
  background: #0d2f5b;
}

.msg {
  margin-top: 1rem;
  font-weight: bold;
  color: #16509d;
  opacity: 0;
  transform: translateY(-5px);
  transition: .3s;
  text-align: center;
}

.msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Footer ===== */
footer {
  background: #426DA9;
  color: #fff;
  padding: 2rem 1rem 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-content div {
  margin-bottom: 20px;
}

.footer-menu ul {
  list-style: none;
}

.footer-menu a {
  color: #fff;
  text-decoration: none;
  transition: .3s;
}

.footer-menu a:hover {
  color: #d0e4ff;
}

/* Redes sociales */
.footer-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.footer-icons img {
  max-width: 60px;
  max-height: 40px;
  object-fit: contain;
}

.footer-bottom {
  text-align: center;
  margin-top: 1rem;
  font-size: .9rem;
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: .75rem;
}

/* ===== Botones flotantes ===== */
.btn-top {
  position: fixed;
  right: 20px;
  bottom: 100px;
  background: #16509d;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
  transition: .3s;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

.btn-top.show {
  opacity: 1;
  pointer-events: auto;
}

.btn-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
  transition: .3s;
  z-index: 9999;
}

.btn-whatsapp img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.btn-whatsapp:hover,
.btn-top:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,.3);
}

/* ===== Animación ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 1rem 0;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }

  .nav-links.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .hamburger {
    display: flex;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-social {
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .btn-top { bottom: 80px; right: 15px; }
  .btn-whatsapp { bottom: 15px; right: 15px; }
}

/* ===== Servicios ===== */
/* ===== Servicios: layout columnas ===== */
.servicios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

/* Carrusel de páginas */
.servicios-carousel { position: relative; }
.carousel-page { display: none; }
.carousel-page.active { display: block; }

/* Grid de bloques (80x80) */
.grid-bloques {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 80px);
  gap: 1rem;
}

.bloque {
  background: #fff;
  border: 1px solid rgba(22,80,157,.15);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  text-align: center;
  color: #16509d;
  transition: .3s;
  cursor: pointer;
}
.bloque i {
  font-size: 1.4rem;
  margin-bottom: .25rem;
  color: #426DA9;
}
.bloque:hover,
.bloque.active {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  border-color: rgba(22,80,157,.25);
}

/* Indicadores */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}
.carousel-indicators .dot {
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: .3s;
}
.carousel-indicators .dot.active { background: #16509d; }
.carousel-indicators .dot:hover { background: #0d2f5b; }

/* Columna derecha */
.servicios-detalle img {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  margin-bottom: 1rem;
}
.servicios-detalle p {
  color: #444;
  line-height: 1.6;
  text-align: justify;
}

/* Responsive */
@media (max-width: 768px) {
  .servicios-grid { grid-template-columns: 1fr; }
  .grid-bloques {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 80px);
  }
  .servicios-detalle p { text-align: center; }
}

/* Sección Valores */
.valores {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

.valores h2 {
  font-size: 2.2rem;
  color: #16509d;
  margin-bottom: 10px;
}

.valores h2 span {
  color: #333;
}

.valores .intro {
  max-width: 700px;
  margin: 0 auto 40px;
  font-size: 1rem;
  color: #555;
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.valor {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 25px;
  border-radius: 8px;
  transition: transform .3s ease, box-shadow .3s ease;
}

.valor:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.valor .icono {
  font-size: 2rem;
  color: #16509d;
  margin-bottom: 15px;
}

.valor h3 {
  font-size: 1.2rem;
  color: #222;
  margin-bottom: 10px;
}

.valor p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
}



/* ===== Contador de Visitas ===== */
.contador-visitas {
  text-align: center;
  margin-top: 1rem;
  font-size: .9rem;
  color: #fff;
  opacity: .85;
  font-weight: 600;
}