/* ==========================================================================
   Pro Futuro - Cooperativa Integral de Ahorro y Credito, R.L.
   Estilos de la portada. Los colores institucionales entran desde la base
   de datos (site_settings) y se inyectan como variables en el layout.
   ========================================================================== */

:root {
  --navy: #0e2c52;
  --green: #1f7a3d;

  --ink: #1c2b3a;
  --ink-soft: #4a5a6a;
  --muted: #7a8a99;
  --muted-strong: #67788a;
  --line: #eef1f4;

  --bg-soft: #f6f9f7;
  --bg-tint: #eef4ee;
  --bg-tint-alt: #eaf1ea;

  --footer-bg: #0a1e39;
  --footer-text: #c3d2e0;
  --footer-muted: #8ba0b8;
  --footer-dim: #7f92a8;

  --topbar-text: #dfe8f2;
  --whatsapp: #25d366;

  /* Los fondos (barra azul, pie, franjas de color) van de borde a borde de la
     pantalla; el contenido se centra en una columna de este ancho. --gutter
     resuelve las dos cosas de una vez: separacion minima en pantallas chicas,
     y el sobrante repartido a los lados en monitores grandes. */
  --content-max: 1440px;
  --pad-x: 40px;
  --gutter: max(var(--pad-x), (100% - var(--content-max)) / 2);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Poppins', var(--font-body);
}

/* --------------------------------------------------------------- Base --- */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  margin: 0;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color .15s ease;
}

a:hover { color: var(--green); }

img { max-width: 100%; display: block; }

.pf-shell {
  width: 100%;
  overflow-x: hidden;
  background: #fff;
}

/* Titulo de seccion con la barrita verde debajo. */
.pf-section-title {
  font-size: 24px;
  color: var(--navy);
  text-align: center;
}

.pf-section-title--lg { font-size: 28px; }

.pf-rule {
  width: 60px;
  height: 3px;
  background: var(--green);
  margin: 14px auto 44px;
  border: 0;
}

/* Marcador de imagen: se ve como un bloque discreto con su etiqueta hasta
   que se suba la foto real. */
.pf-imgslot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(
    45deg, #eef2f6, #eef2f6 10px, #e6ebf1 10px, #e6ebf1 20px
  );
  color: #8fa0b3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  padding: 8px;
  overflow: hidden;
}

.pf-imgslot img { width: 100%; height: 100%; object-fit: cover; }
.pf-imgslot--rounded { border-radius: var(--radius-md); }

/* ------------------------------------------------------------- Topbar --- */

.pf-topbar {
  background: var(--navy);
  color: var(--topbar-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px var(--gutter);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-topbar a { color: inherit; }
.pf-topbar a:hover { color: #fff; }

.pf-topbar__info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.pf-topbar__social {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pf-social-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  transition: background .15s ease;
}

.pf-social-dot:hover { background: rgba(255, 255, 255, .3); color: #fff; }

/* ------------------------------------------------------------- Header --- */

.pf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  position: relative;
  z-index: 5;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
}

.pf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pf-brand__mark { width: 50px; height: 50px; flex-shrink: 0; }

.pf-brand__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  color: var(--navy);
  line-height: 1;
  white-space: nowrap;
}

.pf-brand__sub {
  font-size: 8.5px;
  letter-spacing: .3px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

.pf-brand__slogan {
  font-size: 9px;
  color: var(--muted);
  font-style: italic;
  white-space: nowrap;
}

.pf-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  font-size: 12px;
  color: #33465c;
  flex-wrap: wrap;
  flex: 1 1 320px;
  justify-content: center;
  min-width: 0;
}

.pf-nav a {
  color: inherit;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.pf-nav a:hover { color: var(--green); }

.pf-nav a.is-active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* Boton hamburguesa: solo aparece en pantallas chicas. */
.pf-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 18px;
  padding: 6px 12px;
  cursor: pointer;
}

/* -------------------------------------------------------------- Botones - */

.pf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
  padding: 14px 26px;
  font-size: 14px;
  transition: filter .15s ease, transform .15s ease;
}

.pf-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }

.pf-btn--navy { background: var(--navy); color: #fff; }
.pf-btn--navy:hover { color: #fff; }

.pf-btn--green { background: var(--green); color: #fff; }
.pf-btn--green:hover { color: #fff; }

.pf-btn--sm {
  padding: 11px 16px;
  font-size: 12px;
  gap: 6px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------- Hero --- */

.pf-hero {
  position: relative;
  padding: 56px var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: linear-gradient(180deg, #fff 0%, #f5f8f6 100%);
}

.pf-hero__title {
  font-size: clamp(28px, 3.2vw, 44px);
  color: var(--navy);
  line-height: 1.15;
}

.pf-hero__title span { color: var(--green); }

.pf-hero__text {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 20px 0 28px;
  line-height: 1.6;
}

.pf-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pf-hero__media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(20, 50, 80, .18);
}

.pf-hero__media .pf-imgslot { width: 100%; height: 380px; }

/* -------------------------------------------------------------- Stats --- */

/* La tarjeta monta sobre la seccion siguiente, por eso el margen negativo. */
.pf-stats {
  margin: 0 var(--gutter) -46px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(20, 40, 70, .1);
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 30px 20px;
}

.pf-stat {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  padding: 0 12px;
}

.pf-stat:last-child { border-right: 0; }

.pf-stat__icon { font-size: 26px; color: var(--green); }

.pf-stat__value {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
}

.pf-stat__label {
  font-size: 12px;
  color: var(--muted-strong);
  line-height: 1.3;
}

/* ----------------------------------------------------------- Servicios --- */

.pf-services {
  /* El padding de arriba deja aire para la tarjeta de cifras superpuesta. */
  padding: 100px var(--gutter) 60px;
  text-align: center;
}

.pf-services__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.pf-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 16px;
  box-shadow: 0 4px 16px rgba(20, 40, 70, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}

.pf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(20, 40, 70, .12);
}

.pf-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--green);
  margin: 0 auto 14px;
}

.pf-card__title {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 8px;
}

.pf-card__text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ------------------------------------------------------------- Razones --- */

.pf-reasons {
  padding: 60px var(--gutter);
  background: var(--bg-soft);
  text-align: center;
}

.pf-reasons__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: left;
}

.pf-reason {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pf-reason__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-tint-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--green);
}

.pf-reason__title {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 6px;
}

.pf-reason__text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------- Pasos --- */

.pf-steps {
  padding: 70px var(--gutter);
  text-align: center;
}

.pf-steps .pf-rule { margin-bottom: 50px; }

.pf-steps__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}

.pf-step {
  position: relative;
  padding: 0 16px;
}

/* Flecha de continuidad entre pasos. */
.pf-step:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  top: 10px;
  right: -10px;
  font-size: 20px;
  color: #c8d3de;
  line-height: 1;
}

.pf-step__number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 16px;
}

.pf-step__icon {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--navy);
}

.pf-step__title {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 6px;
}

.pf-step__text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ------------------------------------------------------------ Noticias --- */

.pf-news {
  padding: 60px var(--gutter) 80px;
  background: var(--bg-soft);
  text-align: center;
}

.pf-news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

.pf-news-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(20, 40, 70, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.pf-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(20, 40, 70, .12);
}

.pf-news-card .pf-imgslot { width: 100%; height: 170px; }

.pf-news-card__body { padding: 18px 20px; }

.pf-news-card__date {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 8px;
}

.pf-news-card__title {
  font-weight: 700;
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.pf-news-card__text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.pf-news-card__more {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

/* --------------------------------------------------------------- CTA ---- */

.pf-cta {
  background: var(--navy);
  color: #fff;
  padding: 26px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.pf-cta__title { font-weight: 700; font-size: 16px; }
.pf-cta__sub { font-size: 13px; color: var(--footer-text); }

.pf-cta__channels {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

.pf-cta__channel { font-size: 13px; }
.pf-cta__channel a { color: #fff; }
.pf-cta__channel a:hover { color: #7fe3a0; }
.pf-cta__channel--wa span { color: #7fe3a0; }

/* -------------------------------------------------------------- Footer --- */

.pf-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 50px var(--gutter) 16px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}

.pf-footer a { color: var(--footer-text); }
.pf-footer a:hover { color: #fff; }

.pf-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pf-footer__brand .pf-imgslot { width: 44px; height: 44px; }

.pf-footer__name {
  font-family: var(--font-head);
  font-weight: 800;
  color: #fff;
  font-size: 16px;
}

.pf-footer__sub { font-size: 9px; color: #8fd6a5; }

.pf-footer__slogan {
  font-size: 12px;
  font-style: italic;
  color: var(--footer-muted);
}

.pf-footer__heading {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}

.pf-footer__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
}

.pf-footer__social {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.pf-footer__social .pf-social-dot {
  width: 26px;
  height: 26px;
  font-size: 12px;
  background: rgba(255, 255, 255, .1);
}

.pf-footer__note { font-size: 11px; color: var(--footer-muted); }

.pf-footer__bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: 20px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--footer-dim);
  flex-wrap: wrap;
  gap: 8px;
}

.pf-footer__bottom a { color: var(--footer-dim); }
.pf-footer__legal { display: flex; gap: 16px; }

/* ------------------------------------------------------------ WhatsApp --- */

.pf-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  z-index: 10;
}

.pf-whatsapp:hover { color: #fff; transform: scale(1.06); }

/* ---------------------------------------------------------- Responsive --- */

/* Las seis tarjetas de servicios son lo primero que se aprieta, por eso bajan
   de columnas antes que el resto. */
@media (max-width: 1320px) {
  .pf-services__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1120px) {
  .pf-services__grid { grid-template-columns: repeat(3, 1fr); }
  .pf-reasons__grid { grid-template-columns: repeat(2, 1fr); }
  /* De 4 a 2 directo: con 3 columnas el bloque de redes queda huerfano abajo. */
  .pf-footer { grid-template-columns: 1fr 1fr; }
}

/* Aqui el menu ya no cabe en una linea junto al logo y el boton. */
@media (max-width: 1040px) {
  :root { --pad-x: 24px; }

  .pf-header { flex-wrap: nowrap; }

  .pf-nav-toggle { display: block; order: 3; }

  .pf-nav {
    order: 4;
    flex: 1 0 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 14px;
    padding-top: 10px;
  }

  .pf-nav.is-open { display: flex; }

  .pf-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
  }

  .pf-nav a.is-active { border-bottom-color: var(--line); }

  .pf-header .pf-btn--sm { display: none; }

  .pf-hero { grid-template-columns: 1fr; padding-top: 40px; }
  .pf-hero__media { order: -1; }
  .pf-hero__media .pf-imgslot { height: 260px; }

  .pf-stats { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .pf-stat:nth-child(2n) { border-right: 0; }

  .pf-steps__grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .pf-step:nth-child(2n)::after { content: none; }

  .pf-news__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .pf-services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .pf-topbar { justify-content: center; text-align: center; }
  .pf-topbar__info { gap: 10px 18px; justify-content: center; font-size: 12px; }

  .pf-services { padding-top: 90px; }

  .pf-stats { grid-template-columns: 1fr; margin-bottom: -30px; }
  .pf-stat { border-right: 0; justify-content: flex-start; padding: 0 8px; }

  .pf-news__grid { grid-template-columns: 1fr; }

  /* A dos columnas el texto queda contra el icono; mejor una sola. */
  .pf-reasons__grid { grid-template-columns: 1fr; }

  .pf-steps__grid { grid-template-columns: 1fr; }
  .pf-step::after { content: none !important; }

  .pf-cta { flex-direction: column; align-items: flex-start; }
  .pf-cta__channels { gap: 18px; flex-direction: column; }

  .pf-footer { grid-template-columns: 1fr; }
  .pf-footer__bottom { flex-direction: column; }
}

@media (max-width: 540px) {
  :root { --pad-x: 18px; }

  .pf-services__grid { grid-template-columns: 1fr; }

  .pf-hero__actions .pf-btn { flex: 1 1 100%; justify-content: center; }

  .pf-brand__mark { width: 42px; height: 42px; }
  .pf-brand__name { font-size: 16px; }
  .pf-brand__sub { font-size: 7.5px; }

  .pf-whatsapp {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}
