/* =============================================
   VARIABLES GLOBALES
   ============================================= */
:root {
  --color-primario: #073673;          /* Azul profundo principal */
  --color-secundario: #14548C;        /* Azul medio para detalles */
  --color-acento: #A61731;            /* Rojo acento para contrastes */
  --color-acento-claro: #D90416;      /* Rojo más vibrante para botones/hover */
  --color-fondo: #f8fafc;             /* Fondo gris-azulado muy claro */
  --color-texto-principal: #1b263b;   /* Azul-gris muy oscuro para textos principales */
  --color-texto-secundario: #52759c;  /* Gris-azulado para textos secundarios */
  --color-fondo-topbar: #e9eef4;      /* Gris-azulado pálido para la barra superior */
  --color-boton: var(--color-acento-claro);
  --color-boton-hover: var(--color-acento);
  --color-whatsapp: #25d366;
}

/* =============================================
   RESET Y BASE GENERAL
   ============================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Open Sans', Arial, sans-serif;
  background: var(--color-fondo);
  color: var(--color-texto-principal);
  line-height: 1.6;
}

.container {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 2em;
}

/* =============================================
   TOPBAR
   ============================================= */
#topbar {
  background-color: var(--color-fondo-topbar);
  font-size: 0.9rem;
  padding: 8px 0;
}
#topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-left, .topbar-right {
  color: var(--color-texto-secundario);
}
.topbar-right a {
  color: var(--color-primario);
  font-weight: 700;
  margin-left: 12px;
  text-decoration: none;
}
.topbar-right a:hover { text-decoration: underline; }

/* =============================================
   HEADER Y NAVEGACIÓN
   ============================================= */
#header { padding: 1em 0; border-bottom: 1px solid #ddd; }
#header .container { display: flex; justify-content: space-between; align-items: center; }
#logo img { height: 120px; width: auto; }

#nav ul {
  list-style: none;
  display: flex;
  gap: 0.3em;
  align-items: center;
}
#nav ul li a {
  text-decoration: none;
  color: var(--color-texto-principal);
  font-weight: 600;
  padding: 0.3em 0.7em;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}
#nav ul li a:hover, #nav ul li a.active {
  background-color: var(--color-primario);
  color: #fff;
}

/* =============================================
   BANNER PRINCIPAL
   ============================================= */
#banner {
  background: url('../images/banner-home.jpg') no-repeat center center/cover;
  min-height: 400px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#banner .container,
.banner-content {
  width: 100%;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  text-align: center;
  gap: 1em;
}
.banner-content h1,
.banner-content p {
  color: white;
}

.banner-text-box {
  background: linear-gradient(135deg, rgba(7, 54, 115, 0.75), rgba(20, 84, 140, 0.65));
  padding: 2em 3em;
  border-radius: 16px;
  max-width: 90%;
  margin: 0 auto;
  backdrop-filter: blur(2px);
}

.banner-btn {
  background-color: var(--color-boton);
  color: white;
  padding: 0.8em 1.5em;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s;
  font-size: 1.1em;
  margin-right: 1em;
}
.banner-btn.secondary { background-color: var(--color-secundario); margin-right: 0; }
.banner-btn:hover { opacity: 0.9; }
.banner-desc {
  font-weight: bold;
  text-shadow: 2px 2px 8px #000;
  color: white;
}

/* =============================================
   SECCIONES GENERALES
   ============================================= */
.section {
  padding: 3em 0;
  background: #f9f9f9;
}
.section:nth-child(even) { background: #fff; }
.section h2 { text-align: center; font-size: 2rem; margin-bottom: 0.8em; }
.section p {
  max-width: 800px;
  margin: 0 auto 1.8em auto;
  color: var(--color-texto-secundario);
  font-size: 1.1rem;
  line-height: 1.5;
}
.section h2, .section p { text-align: center !important; }

.section-conocenos {
  background: var(--color-primario);
  color: #fff;
  padding: 4em 0;
  text-align: center;
}
.section-conocenos h2 {
  color: #ffffff;
  font-size: 2.5em;
  letter-spacing: 0.03em;
  font-weight: bold;
  margin-bottom: 0.7em;
}
.section-conocenos p {
  color: #dbe6fa;
  font-size: 1.25em;
  line-height: 1.7;
  max-width: 850px;
  margin: 0.7em auto;
}

.section-contacto {
  background: #e0e5ed;
}

/* =============================================
   SERVICIOS (GRID GENERAL)
   ============================================= */
.services-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  width: 100%;
}
.service-item {
  min-width: 0;
  background: white;
  padding: 1.5em;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  text-align: center;
  transition: box-shadow .2s;
}
.service-item h3 { margin-top: 1.5em; color: var(--color-primario); }
.service-item p { font-size: 1rem; color: var(--color-texto-secundario); }
.service-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.14); }

/* =============================================
   ICONOS PNG BENEFICIOS
   ============================================= */
.beneficio-icono {
  width: 64px;
  height: 64px;
  margin-bottom: 0.8rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   PÁGINA SERVICIOS - CABECERA
   ============================================= */
.contenido-servicios { max-width: 100%; margin: 0 auto; }

.servicios-header {
  display: flex;
  align-items: center;
  gap: 2em;
  margin-bottom: 2em;
}
.servicios-header img {
  width: 40%;
  max-width: 400px;
  border-radius: 16px;
  object-fit: cover;
}
.servicios-header .servicios-texto { flex: 1; }

.servicio-categoria {
  margin-top: 3em;
  margin-bottom: 1.5em;
  text-align: center;
}
.servicio-categoria h2 {
  color: var(--color-primario);
  font-size: 2rem;
  border-bottom: 3px solid var(--color-acento-claro);
  display: inline-block;
  padding-bottom: 0.3em;
}

/* =============================================
   CONTENEDORES CON FONDOS ALTERNADOS
   ============================================= */
.contenedor-servicios {
  border-radius: 20px;
  padding: 2em 1.5em;
  margin-bottom: 2em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contenedor-servicios:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.contenedor-blanco { background: #ffffff; }
.contenedor-gris-claro { background: #f5f7fa; }
.contenedor-gris-medio { background: #eef2f7; }
.contenedor-azul-claro { background: #e8f0fe; }

.contenedor-titulo {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--color-primario);
  text-align: center;
  margin-bottom: 1.5em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--color-acento-claro);
  display: inline-block;
}
.contenedor-titulo-wrapper {
  text-align: center;
  margin-bottom: 1.5em;
}

/* =============================================
   GRIDS Y TARJETAS DE SERVICIO
   ============================================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5em;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5em;
}

.card-servicio {
  background: white;
  padding: 1.5em;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-align: center;
}
.card-servicio:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}
.card-servicio h3 {
  color: var(--color-primario);
  margin-bottom: 0.8em;
  font-size: 1.2rem;
}
.card-servicio p {
  color: var(--color-texto-secundario);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.servicio-icono {
  width: 48px;
  height: 48px;
  margin-bottom: 0.8rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   TEXTOS DESTACADOS (CON PROTAGONISMO)
   ============================================= */
.texto-destacado,
.texto-destacado-fianzas,
.texto-destacado-pensiones {
  border-radius: 20px;
  padding: 2.5em 2em;
  margin: 2.5em 0;
  text-align: center !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.texto-destacado:hover,
.texto-destacado-fianzas:hover,
.texto-destacado-pensiones:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.texto-destacado { background: linear-gradient(135deg, var(--color-primario), var(--color-secundario)); }
.texto-destacado-fianzas { background: linear-gradient(135deg, var(--color-secundario), #1a6ba8); }
.texto-destacado-pensiones { background: linear-gradient(135deg, var(--color-acento), var(--color-acento-claro)); }

.texto-destacado p,
.texto-destacado-fianzas p,
.texto-destacado-pensiones p {
  color: #ffffff !important;
  font-size: 1.35rem !important;
  font-weight: bold !important;
  line-height: 1.6 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  text-align: center !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25) !important;
  letter-spacing: 0.3px !important;
  max-width: 100% !important;
  display: block !important;
  width: 100% !important;
}

.texto-destacado *,
.texto-destacado-fianzas *,
.texto-destacado-pensiones * {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* =============================================
   CTA SECCIÓN
   ============================================= */
.cta-section {
  background: var(--color-primario);
  color: white;
  text-align: center;
  padding: 4em 0;
}
.cta-section h2 { color: white; font-size: 2.5em; margin-bottom: 0.5em; }
.cta-section p { color: #f5f5f5; font-size: 1.25em; margin-bottom: 2em; }
.cta-btn {
  display: inline-block;
  padding: 0.9em 2em;
  border-radius: 8px;
  background: var(--color-acento);
  color: white;
  font-size: 1.15em;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}
.cta-btn:hover { background: var(--color-acento-claro); }

/* =============================================
   CONTACTO INFO
   ============================================= */
.contact-info {
  display: flex;
  gap: 2em;
  justify-content: center;
  margin-bottom: 2em;
  flex-wrap: wrap;
}
.contact-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 2em 1.5em;
  min-width: 220px;
  text-align: center;
  flex: 1 1 220px;
}
.contact-card h3 { color: var(--color-primario); margin-bottom: 0.7em; }
.contact-card a {
  color: var(--color-primario);
  text-decoration: none;
  font-weight: 700;
}
.contact-card a:hover { text-decoration: underline; }

/* =============================================
   TESTIMONIOS
   ============================================= */
.testimonios-list {
  display: flex;
  justify-content: center;
  gap: 2em;
  flex-wrap: wrap;
  margin-top: 2em;
}
.testimonio-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-align: center;
  padding: 2em 2.5em;
  max-width: 400px;
  min-width: 270px;
  margin-bottom: 2em;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.testimonio-foto {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1em;
}
.testimonio-nombre {
  color: var(--color-primario);
  font-size: 1.25em;
  font-weight: bold;
  margin-bottom: 0.2em;
}
.testimonio-cargo {
  color: var(--color-texto-secundario);
  font-size: 1em;
  margin-bottom: 1em;
}
.testimonio-texto {
  color: var(--color-texto-principal);
  font-size: 1.05em;
  font-style: italic;
}

/* =============================================
   BOTÓN COTIZACIÓN
   ============================================= */
.boton-cotizacion {
  display: inline-block;
  padding: 15px 30px;
  background-color: var(--color-acento-claro) !important;
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 8px;
  font-family: sans-serif;
  font-weight: bold;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.boton-cotizacion:hover {
  background-color: var(--color-acento) !important;
  cursor: pointer;
  color: #ffffff !important;
}

/* =============================================
   WHATSAPP BURBUJA
   ============================================= */
.whatsapp-bubble {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: var(--color-whatsapp);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  z-index: 999;
  background-image: url('../assets/WhatsApp.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 35px 35px;
  transition: transform 0.3s;
}
.whatsapp-bubble:hover {
  transform: scale(1.1);
  cursor: pointer;
}

/* =============================================
   FOOTER
   ============================================= */
footer#footer {
  background-color: #e9eef4;
  padding: 1.6em 0 1em 0;
  text-align: center;
  color: var(--color-texto-secundario);
  font-size: 1.06em;
}
#footer p { margin-bottom: 0.5em; }
#footer a {
  color: var(--color-primario);
  text-decoration: none;
  font-weight: 700;
}
#footer a:hover { text-decoration: underline; }

/* =============================================
   CONÓCENOS SECCIÓN
   ============================================= */
.conocenos-section { background: #fff; }
.conocenos-flex {
  display: flex;
  gap: 2.5em;
  align-items: center;
  justify-content: center;
}
.conocenos-img {
  flex: 0 0 340px;
  max-width: 340px;
}
.conocenos-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
}
.conocenos-info { flex: 1 1 0px; padding: 0; }
.conocenos-titulo {
  color: var(--color-acento);
  font-weight: bold;
  font-size: 1.15em;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 16px;
}
.conocenos-info h2 {
  font-size: 2.3em;
  margin-bottom: 18px;
  font-weight: bold;
}
.conocenos-info p {
  font-size: 1.1em;
  color: var(--color-texto-secundario);
  margin-bottom: 18px;
  line-height: 1.7;
}

/* =============================================
   GALERÍA
   ============================================= */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.gallery img {
  width: 260px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.gallery img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

/* =============================================
   BURGER MENÚ
   ============================================= */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  height: 40px;
  width: 48px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  margin-left: 12px;
}
.burger-menu span {
  display: block;
  height: 5px;
  width: 32px;
  background: var(--color-primario);
  border-radius: 3px;
  margin: 5px 0;
  transition: all 0.3s;
}

/* =============================================
   RESPONSIVE QUERIES
   ============================================= */
@media (max-width: 1024px) {
  #banner { min-height: 300px; }
  #banner .container { max-width: 95vw; padding-bottom: 40px; }
  .services-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  #header .container { position: relative; }
  .burger-menu { display: flex; }
  #nav ul {
    display: none !important;
    position: absolute;
    top: 70px;
    right: 14px;
    background: #fff;
    flex-direction: column;
    width: 180px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.09);
    border-radius: 8px;
    padding: 18px 0;
    gap: 0.5em;
    z-index: 1010;
  }
  #nav ul.active { display: flex !important; }
  #logo img { height: 80px; }
  .conocenos-flex { flex-direction: column; gap: 0.5em; text-align: center; }
  .conocenos-img, .conocenos-info { max-width: 95vw; padding: 0; }
  .conocenos-info h2 { font-size: 1.4em; }
  .servicios-header { flex-direction: column; text-align: center; }
  .servicios-header img { width: 100%; max-width: 340px; margin-bottom: 1em; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 1em; }
  .contenedor-servicios { padding: 1.5em 1em; }
}

@media (max-width: 768px) {
  .banner-text-box {
    padding: 1.2em 1.5em;
    border-radius: 12px;
    width: 95%;
  }
  .beneficio-icono {
    width: 48px;
    height: 48px;
  }
  .texto-destacado,
  .texto-destacado-fianzas,
  .texto-destacado-pensiones {
    padding: 1.5em 1.2em;
    margin: 1.5em 0;
  }
  .texto-destacado p,
  .texto-destacado-fianzas p,
  .texto-destacado-pensiones p {
    font-size: 1.1rem !important;
  }
}

@media (max-width: 700px) {
  .services-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  #logo img { height: 50px; }
  #nav ul { top: 60px; right: 8px; width: 150px; }
  .burger-menu { height: 36px; width: 38px; }
  .banner-btn { margin-bottom: 0.8em; display: inline-block; }
  #banner .container { padding-bottom: 20px; }
  .conocenos-img { max-width: 100vw; margin: 0 auto; }
  .conocenos-info h2 { font-size: 1.1em; }
  #topbar .container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
  }
  .topbar-left, .topbar-right {
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
  }
  .topbar-right a {
    margin-left: 12px;
    margin-right: 0;
  }
}

@media (min-width: 901px) {
  #nav ul {
    display: flex !important;
    position: static;
    flex-direction: row;
    gap: 0.5em;
    box-shadow: none;
    width: auto;
    background: none;
    padding: 0;
  }
  .burger-menu { display: none !important; }
}

@media (min-width: 1400px) {
  .texto-destacado p,
  .texto-destacado-fianzas p,
  .texto-destacado-pensiones p {
    font-size: 1.5rem !important;
  }
}

@media (min-width: 1920px) {
  .beneficio-icono {
    width: 80px;
    height: 80px;
  }
}