/* ===================================== */
/* FUENTE Y CONFIGURACIÓN BASE           */
/* ===================================== */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

/* ===================================== */
/* BARRA SUPERIOR NEGRA (TOPBAR)         */
/* ===================================== */
.topbar {
  background-color: #000;
  color: #fff;
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1050;
  transition: top 0.3s ease;
}
.topbar-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.topbar-right a {
  color: #fff;
  margin-left: 18px;
  text-decoration: none;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.topbar-right a:hover {
  color: #255e9c;
}
@media (max-width: 768px) {
  .topbar { display: none; }
  .topbar-container {
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
  }
}

/* ===================================== */
/* ENCABEZADO (HEADER)                   */
/* ===================================== */
.header {
  background-color: transparent;
  padding: 1rem 2rem;
  position: fixed;
  top: 2.2rem; /* espacio para topbar */
  width: 100%;
  box-shadow: none;
  z-index: 1000;
  transition: all 0.3s ease;
}
.container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* Logos */
.logo-img { height: 60px; display: none; }
.logo-white { display: block; }
.header.scrolled .logo-white { display: none; }
.header.scrolled .logo-blue  { display: block; }
/* Menú */
.nav-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.nav-list a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-list a:hover { color: #e3f2fd; }
/* Botón hamburguesa */
.hamburger {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
}
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav {
    display: none;
    width: 100%;
  }
  .nav.active { display: block; }
  .nav-list {
    flex-direction: column;
    padding-top: 1rem;
  }
  .nav-list a {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0;
  }
  .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .logo-img { height: 50px; }
}

/* ===================================== */
/* HEADER AL HACER SCROLL                */
/* ===================================== */
.header.scrolled {
  top: 0;
  background-color: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}
.header.scrolled .nav-list a { color: #000; }
.header.scrolled .nav-list a:hover { color: #255e9c; }

/* ===================================== */
/* HERO PRINCIPAL                        */
/* ===================================== */
.hero {
  background-image: url('../assets/img/hero.jpg');
  background-size: cover;
  background-position: center;
  height: 100vh;
  position: relative;
}
.hero-overlay {
  background-color: rgba(0,0,0,0.3);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}
.hero-content {
  text-align: center;
  color: #fff;
  max-width: 800px;
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  text-decoration: none;
  font-weight: 600;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}
.btn-primary {
  background-color: #255e9c;
  color: #fff;
}
.btn-primary:hover {
  background-color: #1a4171;
}
.btn-secondary {
  background-color: #fff;
  color: #255e9c;
  border: 2px solid #255e9c;
}
.btn-secondary:hover {
  background-color: #e3f2fd;
}

/* ===================================== */
/* ANIMACIONES DE ENTRADA CON SCROLL     */
/* ===================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================== */
/* SOBRE NOSOTROS (HUBSPOT STYLE)        */
/* ===================================== */
.sobre-nosotros {
  background-color: #fff;
  padding: 1.2rem 1rem;
}
.sobre-nosotros h2 {
  text-align: center;
  color: #255e9c;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}
.sobre-nosotros-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
}
.sobre-nosotros .texto {
  flex: 1 1 500px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}
.sobre-nosotros .imagen {
  flex: 1 1 400px;
  text-align: center;
}
.sobre-nosotros .imagen img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
}
@media (max-width: 768px) {
  .sobre-nosotros-flex {
    flex-direction: column;
    text-align: center;
  }
  .sobre-nosotros .texto {
    font-size: 1rem;
  }
}

/* ===================================== */
/* SECCIÓN SERVICIOS (CUADRÍCULA 3×2)    */
/* ===================================== */
.servicios {
  padding: 1.2rem 1rem;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.servicios h2 {
  text-align: center;
  color: #255e9c;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.servicios .container {
  width: 100%;
  max-width: 1200px;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
}
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  justify-content: center;
  width: 100%;
}
.servicio {
  background-color: #f9f9f9;
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}
.servicio:hover {
  transform: translateY(-5px);
}
.servicio img {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}
.servicio h3 {
  margin-bottom: 0.5rem;
  color: #255e9c;
}
.servicio p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}

/* ===================================== */
/* NAV BAR ESTILOS ACTUALIZADOS Y CENTRADO */
/* ===================================== */
.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin: 0 auto;
  padding: 0;
  font-size: 0.9rem;
}
.nav-list a {
  position: relative;
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  padding: 5px;
  transition: color 0.3s ease;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background-color: #255e9c;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.header.scrolled .nav-list a {
  color: #000;
}
.header.scrolled .nav-list a:hover::after {
  background-color: #255e9c;
}

/* ===================================== */
/* BOTÓN WHATSAPP EMERGENTE              */
/* ===================================== */
.whatsapp-fixed {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 2000;
  background-color: #25D366;
  color: white;
  padding: 0.7rem;
  border-radius: 50%;
  font-size: 1.6rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* === Estructura de header en tres columnas === */
.header .container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
}

/* Centrado del menú */
.header-center {
  display: flex;
  justify-content: center;
}
.header-center .nav-list {
  justify-content: center;
}

/* Botón de WhatsApp al lado derecho */
.whatsapp-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  font-size: 1.5rem;
  margin-left: auto;
  position: relative;
}
.whatsapp-button span {
  position: absolute;
  top: 100%;
  font-size: 0.7rem;
  width: 120px;
  color: #255e9c;
  background: transparent;
  text-align: center;
  margin-top: 0.4rem;
}

/* ===================================== */
/* BOTÓN WHATSAPP + LEYENDA EN HEADER    */
/* ===================================== */
.whatsapp-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.whatsapp-menu-icon:hover {
  transform: scale(1.1);
}
.whatsapp-label {
  font-size: 0.75rem;
  font-weight: bold;
  color: #255e9c;
  line-height: 1.1;
  text-align: left;
}

/* ===================================== */
/* TEXTO WHATSAPP EN BLANCO AL INICIO   */
/* ===================================== */
.header:not(.scrolled) .whatsapp-label {
  color: white !important;
}

/* ===================================== */
/* BLOQUES CORREGIDOS WHATSAPP ICONO Y TEXTO */
/* ===================================== */
.whatsapp-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #25D366;
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  text-decoration: none;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
  animation: pulse 1.5s infinite;
}
.whatsapp-menu-icon:hover {
  transform: scale(1.1);
}
.whatsapp-label {
  font-size: 0.75rem;
  font-weight: bold;
  line-height: 1.1;
  text-align: left;
  text-decoration: none;
  color: #255e9c;
}
.whatsapp-label:hover {
  text-decoration: none;
}

/* Animación */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}