/* =============================================
   VARIABLES GLOBALES
   ============================================= */
:root {
  --color-primario: #072621;          /* Verde oscuro principal */
  --color-secundario: #29733C;        /* Verde medio */
  --color-acento: #428C37;            /* Verde claro */
  --color-acento-claro: #58A633;      /* Verde más vibrante para botones/hover */
  --color-fondo: #F2F2F0;             /* Gris muy claro */
  --color-texto-principal: #072621;   /* Verde oscuro para textos principales */
  --color-texto-secundario: #29733C;  /* Verde medio para textos secundarios */
  --color-fondo-topbar: #d8e6d8;      /* Verde 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 #c0d6c0; }
#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: #FFFFFF;
}

/* =============================================
   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: #FFFFFF;
  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: #FFFFFF;
}

.banner-text-box {
  background: linear-gradient(135deg, rgba(7, 38, 33, 0.80), rgba(41, 115, 60, 0.70));
  padding: 2em 3em;
  border-radius: 16px;
  max-width: 90%;
  margin: 0 auto;
  backdrop-filter: blur(2px);
}

.banner-btn {
  background-color: var(--color-boton);
  color: #FFFFFF;
  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 rgba(0,0,0,0.6);
  color: #FFFFFF;
}

/* =============================================
   SECCIONES GENERALES
   ============================================= */
.section {
  padding: 3em 0;
  background: #F2F2F0;
}
.section:nth-child(even) { background: #FFFFFF; }
.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; }

/* =============================================
   NUESTRA PROMESA - CON IMAGEN DE FONDO
   ============================================= */
.section-conocenos {
  background: var(--color-primario);
  background-image: url('../images/promesa-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #FFFFFF;
  padding: 5em 0;
  text-align: center;
  position: relative;
}

.section-conocenos::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 38, 33, 0.75);
  z-index: 0;
}

.section-conocenos h2,
.section-conocenos p {
  position: relative;
  z-index: 1;
}

.section-conocenos h2 {
  color: #FFFFFF;
  font-size: 2.5em;
  letter-spacing: 0.03em;
  font-weight: bold;
  margin-bottom: 0.7em;
}

.section-conocenos p {
  color: #d4e8d4;
  font-size: 1.25em;
  line-height: 1.7;
  max-width: 850px;
  margin: 0.7em auto;
}

/* =============================================
   CONTACTO CON IMAGEN DE FONDO
   ============================================= */
.section-contacto {
  background: var(--color-secundario);
  background-image: url('../images/contacto-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 3em 0;
  position: relative;
}

.section-contacto::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 38, 33, 0.30);
  z-index: 0;
}

.section-contacto .container {
  position: relative;
  z-index: 1;
}

.section-contacto h2 {
  color: #FFFFFF;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.section-contacto .contact-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-contacto .contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(7, 38, 33, 0.15);
}

.section-contacto .contact-card h3 {
  color: var(--color-primario);
}

.section-contacto .contact-card a {
  color: var(--color-primario);
}

.section-contacto .contact-card a:hover {
  color: var(--color-acento-claro);
}

/* =============================================
   SERVICIOS (GRID GENERAL)
   ============================================= */
.services-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  width: 100%;
}
.service-item {
  min-width: 0;
  background: #FFFFFF;
  padding: 1.5em;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(7, 38, 33, 0.08);
  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(7, 38, 33, 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(7, 38, 33, 0.10);
}
.contenedor-blanco { background: #FFFFFF; }
.contenedor-gris-claro { background: #f0f5ef; }
.contenedor-gris-medio { background: #e6ede5; }
.contenedor-azul-claro { background: #d8e6d8; }

.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: #FFFFFF;
  padding: 1.5em;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(7, 38, 33, 0.05);
  transition: all 0.3s ease;
  text-align: center;
}
.card-servicio:hover {
  box-shadow: 0 5px 20px rgba(7, 38, 33, 0.10);
  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(7, 38, 33, 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(7, 38, 33, 0.20);
}

.texto-destacado { background: linear-gradient(135deg, var(--color-primario), var(--color-secundario)); }
.texto-destacado-fianzas { background: linear-gradient(135deg, var(--color-secundario), var(--color-acento)); }
.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: #FFFFFF;
  text-align: center;
  padding: 4em 0;
}
.cta-section h2 { color: #FFFFFF; font-size: 2.5em; margin-bottom: 0.5em; }
.cta-section p { color: #b8d9b8; font-size: 1.25em; margin-bottom: 2em; }
.cta-btn {
  display: inline-block;
  padding: 0.9em 2em;
  border-radius: 8px;
  background: var(--color-acento);
  color: #FFFFFF;
  font-size: 1.15em;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}
.cta-btn:hover { background: var(--color-acento-claro); }

/* =============================================
   CONTACTO INFO (estilo base)
   ============================================= */
.contact-info {
  display: flex;
  gap: 2em;
  justify-content: center;
  margin-bottom: 2em;
  flex-wrap: wrap;
}
.contact-card {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(7, 38, 33, 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: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(7, 38, 33, 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('../images/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 CON IMAGEN DE FONDO
   ============================================= */
footer#footer {
  background-color: var(--color-primario);
  background-image: url('../images/footer-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 2.5em 0 1.8em 0;
  text-align: center;
  color: #FFFFFF;
  font-size: 1.06em;
  position: relative;
}

footer#footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 38, 33, 0.80);
  z-index: 0;
}

footer#footer .container {
  position: relative;
  z-index: 1;
}

footer#footer p {
  margin-bottom: 0.5em;
  color: #d4e8d4;
}

footer#footer a {
  color: #58A633;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s ease;
}

footer#footer a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* =============================================
   CONÓCENOS SECCIÓN
   ============================================= */
.conocenos-section { background: #FFFFFF; }
.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(7, 38, 33, 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(7, 38, 33, 0.10);
  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: #FFFFFF;
    flex-direction: column;
    width: 180px;
    box-shadow: 0 6px 18px rgba(7, 38, 33, 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; }
  .section-conocenos {
    background-attachment: scroll;
  }
}

@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;
  }
  .section-conocenos {
    padding: 3.5em 0;
  }
  .section-conocenos h2 {
    font-size: 2rem;
  }
  .section-conocenos p {
    font-size: 1.1rem;
  }
  .contact-info {
    flex-direction: column;
    align-items: center;
  }
  .contact-card {
    width: 100%;
    max-width: 400px;
  }
}

@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;
  }
  .section-conocenos {
    padding: 2.5em 0;
  }
  .section-conocenos h2 {
    font-size: 1.6rem;
  }
  .section-conocenos p {
    font-size: 1rem;
    padding: 0 1em;
  }
}

@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;
  }
}
