/* ==========================================================================
   Fonelsa - estilos propios sobre Helix Ultimate
   Reemplaza el diseño de Anacron (Gantry 5). Paleta tomada del sitio en producción:
   teal #015a7e · azul #0071b8 / #26589c / #325793 · verde #87b718 / #a3bd31 · naranja #f3a300 / #f4af01→#f29b00
   ========================================================================== */
:root {
  --fnl-teal: #015a7e;
  --fnl-azul: #0071b8;
  --fnl-azul-card: #26589c;
  --fnl-azul-pie: #325793;
  --fnl-verde: #87b718;
  --fnl-verde-titulo: #a3bd31;
  --fnl-naranja: #f3a300;
  --fnl-gris: #f5f6f8;
}

/* ---- Barra superior --------------------------------------------------- */
#sp-top-bar { background: var(--fnl-teal); color: #fff; padding: 0; }
#sp-top-bar #sp-top1 { flex: 0 0 100%; max-width: 100%; }
#sp-top-bar #sp-top2 { display: none; }
#sp-top-bar .sp-column { padding: 0; }
.fnl-topinfo { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 30px; list-style: none; margin: 0; padding: 7px 0; font-size: 13px; line-height: 1.5; color: #fff; }
.fnl-topinfo li { margin: 0; padding: 0; }
.fnl-topinfo li:last-child { max-width: 370px; text-align: center; }
.fnl-topinfo i { margin-right: 4px; }
#sp-top-bar a { color: #fff; }

/* ---- Cabecera --------------------------------------------------------- */
#sp-header { background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); height: auto; min-height: 100px; }
#sp-header .container-inner > .row { min-height: 100px; }
#sp-logo .sp-column { display: flex; align-items: center; gap: 26px; }
#sp-logo .sp-column > * { margin: 0; }
#sp-logo .logo, #sp-logo .logo a { display: flex; align-items: center; }
#sp-logo .sp-module { margin: 0; }
/* botón "¡Asóciate Ya!" (módulo de SP Page Builder en la posición logo) */
#sp-logo .sp-module a, #sp-logo .sppb-btn { background: var(--fnl-verde) !important; color: #fff !important; border-radius: 3px; font-weight: 700; padding: 11px 36px; font-size: 15px; font-style: italic; white-space: nowrap; border: 0; box-shadow: none; }
#sp-logo .sp-module .sppb-section, #sp-logo .sp-module .sppb-row-container, #sp-logo .sp-module .sppb-addon-wrapper { padding: 0 !important; margin: 0 !important; }

/* ---- Menú principal --------------------------------------------------- */
@media (min-width: 992px) { .sp-megamenu-parent { display: flex !important; flex-direction: row; align-items: stretch; margin: 0; } }
.sp-megamenu-parent > li { position: relative; display: flex; align-items: center; }
.sp-megamenu-parent > li > a, .sp-megamenu-parent > li > span, .sp-megamenu-parent > li > .sp-menu-separator { text-transform: uppercase; font-weight: 700; font-size: 16px; letter-spacing: 0; color: var(--fnl-teal); padding: 0 16px; line-height: 100px; border-bottom: 3px solid transparent; }
.sp-megamenu-parent > li + li::before { content: "•"; color: var(--fnl-naranja); font-size: 13px; position: absolute; left: -3px; top: 50%; transform: translateY(-50%); }
.sp-megamenu-parent > li:hover > a, .sp-megamenu-parent > li.active > a { color: var(--fnl-naranja); }
.sp-megamenu-parent > li.active > a { border-bottom-color: var(--fnl-teal); }
.sp-megamenu-parent .sp-dropdown .sp-dropdown-inner { border-top: 3px solid var(--fnl-teal); }
.sp-megamenu-parent .sp-dropdown li.sp-menu-item > a { text-transform: none; font-weight: 500; }

/* ---- Secciones -------------------------------------------------------- */
.fnl-showcase, .fnl-showcase .sp-module, .fnl-showcase .container { margin: 0; padding: 0; }
/* como en producción, la cabecera se superpone a la parte alta del slider */
@media (min-width: 992px) {
  #sp-header:not(.header-sticky) { position: relative; z-index: 20; }
  #sp-header.header-sticky { z-index: 20; }
  .fnl-showcase { margin-top: -90px; position: relative; z-index: 1; }
}
.fnl-showcase .container-inner { padding: 0; }

/* Tarjetas de accesos principales sobre degradado naranja */
.fnl-tarjetas { position: relative; background: linear-gradient(to top right, #f29b00 0%, #f4af01 55%, #f9d500 100%); padding: 10px 0 24px; }
.fnl-tarjetas::after { content: ""; position: absolute; left: calc(50% - 14px); bottom: -14px; border: 14px solid transparent; border-top-color: #f29b00; border-bottom: 0; }
.fnl-tarjetas .sp-module { margin: 0; }

/* Momentos Fonelsa */
.fnl-momentos { padding: 56px 0 40px; background: #fff; }
.fnl-momentos h1 { color: var(--fnl-verde-titulo); font-weight: 400; font-size: 64px; line-height: 1.05; margin: 0 0 6px; }
.fnl-momentos h1 img { display: block; max-width: 330px; height: auto; margin-top: 6px; }
.fnl-momentos h3 { color: var(--fnl-teal); font-family: Lato, Arial, sans-serif; font-weight: 400; font-size: 18px; line-height: 1.45; margin: 14px 0 22px; }
.fnl-momentos .sp-module { margin: 0; }
.fnl-momentos img[src*="celular-n"] { display: none; }
@media (max-width: 767.98px) {
  .fnl-momentos { padding: 36px 0 24px; text-align: center; }
  .fnl-momentos h1 { font-size: 46px; }
  .fnl-momentos h1 img { margin: 6px auto 0; }
  .fnl-momentos img[src*="celular-n"] { display: inline-block; max-width: 100%; height: auto; }
}
.ButtonColor { display: inline-block; background: var(--fnl-azul); color: #fff !important; text-transform: uppercase; font-weight: 700; font-size: 14px; letter-spacing: 2px; padding: 15px 28px; border-radius: 2px; text-decoration: none; transition: background .2s; }
.ButtonColor:hover { background: var(--fnl-teal); }

/* Redes sociales */
.fnl-redes { background: var(--fnl-gris); border-top: 1px solid #e3e6ea; }
.fnl-redes .sp-module { margin: 0; }

/* Indicadores económicos */
.fnl-indicadores { background: #e6e6e6; }
.fnl-indicadores .sp-module { margin: 0; }
.fnl-indicadores iframe { display: block; width: 100%; height: 40px; border: 0; background: transparent; }

/* Páginas armadas solo con módulos (antes vistas "custom" de Gantry): sin cuerpo vacío */
.view-featured #sp-main-body, #sp-main-body:has(.blog-featured:empty) { display: none; }
.fnl-whatsapp, .fnl-whatsapp .container, .fnl-whatsapp .container-inner, .fnl-whatsapp .sp-module, .fnl-whatsapp .sppb-section { padding: 0 !important; margin: 0 !important; min-height: 0 !important; }

/* Contenido de páginas internas */
.fnl-main { padding-top: 30px; padding-bottom: 30px; }
.fnl-main:empty, .fnl-main #sp-component:empty { padding: 0; }
.fnl-volver .sp-module { margin: 0; }

/* ---- Pie -------------------------------------------------------------- */
#sp-footer { background: var(--fnl-azul-pie); color: #fff; padding: 0; }
#sp-footer .container-inner > .row { align-items: center; min-height: 66px; text-align: center; }
#sp-footer .sp-module, #sp-footer p { margin: 0; font-size: 13px; color: #fff; }
#sp-footer a { color: #fff; }
#sp-footer a:hover { color: var(--fnl-naranja); }
#sp-footer .vigilado { text-transform: uppercase; font-size: 11px; border-bottom: 1px solid #fff; padding-bottom: 1px; }
#sp-footer .super img { height: 20px; width: auto; vertical-align: middle; }
#sp-copyright { background: #22252d; color: #fff; padding: 12px 0; font-size: 12px; }
#sp-copyright .sp-module { margin: 0; }
@media (max-width: 767.98px) {
  #sp-footer .container-inner > .row > div { margin: 6px 0; }
}

/* ==========================================================================
   Ancho de contenido y páginas internas
   ========================================================================== */
@media (min-width: 1200px) { .container { max-width: 1140px; } }
#sp-main-body.fnl-main { padding: 0; background: #fff; }
.article-ratings-social-share { display: none; }
.fnl-expandedtop { padding: 32px 0; }
.fnl-expandedbottom { background: var(--fnl-gris); padding: 40px 0 44px; border-top: 1px solid #e3e6ea; }
.fnl-expandedbottom .sp-module, .fnl-expandedtop .sp-module { margin: 0; }

/* ---- Botón flotante PSE --------------------------------------------------- */
.fnl-pse { position: fixed; right: 0; top: 190px; z-index: 900; display: block; line-height: 0; }
.fnl-pse img { width: 150px; height: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
@media (max-width: 991.98px) { .fnl-pse { top: auto; bottom: 90px; } .fnl-pse img { width: 120px; } }

/* ---- Barra inferior: aviso + "Subir" -------------------------------------- */
.fnl-aviso { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.fnl-subir { color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.fnl-subir:hover { color: var(--fnl-naranja); }

/* ==========================================================================
   Reemplazos de RokSprocket (módulos HTML)
   ========================================================================== */
/* Pestañas */
.fnl-tabs__nav { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--fnl-naranja); }
.fnl-tabs__nav li { margin: 0; }
.fnl-tabs__nav button { border: 0; background: #e9eaec; color: var(--fnl-azul); font-family: Roboto, Arial, sans-serif; font-weight: 700; font-size: 20px; padding: 10px 22px; cursor: pointer; border-top: 3px solid transparent; transition: background .15s; }
.fnl-tabs__nav button:hover { background: #dfe3e8; }
.fnl-tabs__nav button.active { background: linear-gradient(135deg, #0f9ac6, #87b718); color: #fff; border-top-color: #87b718; }
.fnl-tabs__pane { display: none; padding: 18px 0 0; }
.fnl-tabs__pane.active { display: block; }
.fnl-tabs__pane p { font-size: 1.4rem; color: #3c3b3b; line-height: 1.3; text-align: justify; }
@media (max-width: 767.98px) { .fnl-tabs__nav button { font-size: 16px; padding: 9px 14px; } .fnl-tabs__pane p { font-size: 1.1rem !important; } }

/* Acordeón (Conoce tu empresa) */
.fnl-acordeon { display: grid; gap: 10px; }
.fnl-acordeon details { background: #fff; border: 1px solid #e3e6ea; border-radius: 3px; }
.fnl-acordeon summary { display: flex; align-items: center; gap: 16px; padding: 10px 16px; cursor: pointer; list-style: none; color: var(--fnl-teal); font-weight: 700; font-size: 18px; }
.fnl-acordeon summary::-webkit-details-marker { display: none; }
.fnl-acordeon summary::after { content: "+"; margin-left: auto; font-size: 26px; color: var(--fnl-naranja); }
.fnl-acordeon details[open] summary::after { content: "–"; }
.fnl-acordeon summary img { width: 84px; height: 56px; object-fit: cover; border-radius: 2px; }
.fnl-acordeon__txt { padding: 6px 18px 16px; }

/* Tiras de imágenes (sorteo) */
.fnl-strips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fnl-strips img { width: 100%; height: auto; display: block; }
@media (max-width: 767.98px) { .fnl-strips { grid-template-columns: 1fr; } }

/* Los módulos de filas a ancho completo guardan el ancho de contenido */
.fnl-expandedtop .sp-module, .fnl-expandedbottom .sp-module, .fnl-utility .sp-module { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 15px; padding-right: 15px; }

/* Acordeón: filas grises como en el sitio original, sin miniaturas */
.fnl-acordeon { gap: 6px; }
.fnl-acordeon details { background: #fff; border: 1px solid #dcdcdc; border-radius: 0; }
.fnl-acordeon summary { background: linear-gradient(#fafafa, #e6e6e6); color: #555; font-weight: 400; font-size: 18px; padding: 8px 14px; }
.fnl-acordeon summary::after { content: "+"; width: 22px; height: 22px; line-height: 20px; text-align: center; border: 1px solid #b8b8b8; border-radius: 50%; font-size: 18px; color: #888; }
.fnl-acordeon details[open] summary::after { content: "–"; }
.fnl-acordeon__txt img { max-width: 100%; height: auto; }

/* Compatibilidad con clases de Bootstrap 3 que usan artículos y módulos antiguos del sitio */
@media (max-width: 767.98px) { .hidden-phone { display: none !important; } }
@media (min-width: 768px) { .visible-phone { display: none !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .hidden-tablet { display: none !important; } }
@media (max-width: 767.98px), (min-width: 992px) { .visible-tablet { display: none !important; } }
@media (min-width: 992px) { .hidden-desktop { display: none !important; } }
@media (max-width: 991.98px) { .visible-desktop { display: none !important; } }

/* ==========================================================================
   Tablas de contenido: mismo aspecto que tenían con Gantry/Anacron
   (valores medidos en https://www.fonelsa.com: encabezados de 4 colores, cuerpo gris, texto teal en negrita y centrado)
   ========================================================================== */
#sp-component table.table, .sppb-addon-content table.table, .sppb-addon-text-block table.table {
  --bs-table-bg: transparent; --bs-table-accent-bg: transparent; --bs-table-hover-bg: transparent;
  width: 100% !important; height: auto !important; max-width: 100%;
  border: 1px solid #ddd; border-radius: 4px; border-collapse: separate; border-spacing: 0; margin-bottom: 20px; color: #005a7f;
}
.table.table-bordered > :not(caption) > * > * { box-shadow: none; border-width: 0; }
.table.table-bordered td, .table.table-bordered th { padding: 8px; text-align: center; vertical-align: top; font-weight: 700; color: #005a7f; background-color: #d8d5d5; border: 1px solid #fff; }
.table.table-bordered td p, .table.table-bordered th p { margin: 0; }
.table.table-bordered tbody tr:first-child td:first-child { background-color: #dedede; }
.table.table-bordered thead td, .table.table-bordered thead th { padding: 10px; color: #f0f8ff; border: 0; border-left: 1px solid #fff; }
.table.table-bordered thead td:nth-child(4n+1), .table.table-bordered thead th:nth-child(4n+1) { background-color: #037ec4; }
.table.table-bordered thead td:nth-child(4n+2), .table.table-bordered thead th:nth-child(4n+2) { background-color: #f4b202; }
.table.table-bordered thead td:nth-child(4n+3), .table.table-bordered thead th:nth-child(4n+3) { background-color: #6ba922; }
.table.table-bordered thead td:nth-child(4n+4), .table.table-bordered thead th:nth-child(4n+4) { background-color: #015a7e; }
.table.table-hover tbody tr:hover td { background-color: #cdcaca; }
@media (max-width: 767.98px) { .table.table-bordered td, .table.table-bordered th { padding: 6px 4px; font-size: 14px; } }

/* Imágenes de artículos migrados a SP Page Builder: la sombra suave que traían inline (clase del addon Imagen) */
.fnl-img-sombra img { box-shadow: 0 0 25px rgba(0, 0, 0, 0.3); max-width: 100%; height: auto; }

/* ==========================================================================
   Texto de contenido (artículos y páginas de SP Page Builder): valores medidos en producción (Anacron preset 8)
   texto Lato 16/26 en gris #6e6e6e · títulos Roboto en teal #01597f · celdas de tabla centradas en teal · botón .readon
   ========================================================================== */
.sppb-addon-text-block, .article-details .article-full-image ~ *, .article-details [itemprop="articleBody"] { font-family: Lato, Arial, sans-serif; font-size: 16px; line-height: 26px; color: #6e6e6e; }
.sppb-addon-text-block h1, .sppb-addon-text-block h2, .sppb-addon-text-block h3, .sppb-addon-text-block h4, .sppb-addon-text-block h5,
[itemprop="articleBody"] h1, [itemprop="articleBody"] h2, [itemprop="articleBody"] h3, [itemprop="articleBody"] h4, [itemprop="articleBody"] h5 { font-family: Roboto, Arial, sans-serif; font-weight: 400; color: #01597f; line-height: 1.3; }
.sppb-addon-text-block h3, [itemprop="articleBody"] h3 { font-size: 1.3rem; }
.sppb-addon-text-block p { margin: 0 0 12px; }
.sppb-addon-text-block img, .sppb-addon-raw-html img { max-width: 100%; height: auto; }
.sppb-addon-text-block table:not(.table) td, .sppb-addon-raw-html table:not(.table) td { text-align: center; vertical-align: middle; color: #005a7f; background: #fff; }
.readon { display: inline-block; background: #005b7e; color: #fff !important; padding: 12px 20px; font-size: 14px; line-height: 1.3; text-transform: uppercase; border-radius: 3px; text-decoration: none; }
.readon::after { content: " +"; }
.readon:hover { background: #0071b8; }

/* Contenido migrado desde artículos: imágenes en línea (como en Gantry), tablas de maquetación a todo el ancho, títulos con tamaño de producción */
.sppb-addon-text-block img, .sppb-addon-raw-html img { display: inline-block; vertical-align: middle; }
.sppb-addon-text-block table:not(.table), .sppb-addon-raw-html table:not(.table) { width: 100%; margin-bottom: 14px; }

.sppb-addon-text-block h3 { font-size: 1.3rem !important; color: #01597f !important; } .sppb-addon-text-block h4 { font-size: 1.15rem !important; color: #01597f !important; }

/* Móvil: la barra de indicadores económicos necesita más alto para no cortar el texto, y los elementos flotantes no tapan el contenido */
@media (max-width: 575.98px) {
  .fnl-indicadores iframe { height: 96px; }
  .fnl-pse img { width: 100px; }
}

/* ==========================================================================
   Móvil y tablet (≤ 991.98px): cabecera en una sola fila, textos y pestañas a su tamaño, pie centrado
   ========================================================================== */
@media (max-width: 991.98px) {
  #sp-header { min-height: 72px; }
  #sp-header .container-inner > .row { flex-wrap: nowrap; min-height: 72px; }
  #sp-logo { flex: 0 1 auto; min-width: 0; }
  #sp-logo .sp-column { gap: 10px; }
  #sp-logo .logo img, #sp-logo img { height: 38px; width: auto; max-width: none; }
  #sp-logo .sp-module a, #sp-logo .sppb-btn { padding: 8px 14px !important; font-size: 13px !important; }
  #sp-menu { flex: 0 0 auto; margin-left: auto; }
}
@media (max-width: 767.98px) {
  .fnl-topinfo { font-size: 12px; gap: 2px 14px; padding: 6px 8px; }
  .sppb-nav-custom a { font-size: 15px !important; padding: 6px 12px !important; }
  .sppb-nav-custom { gap: 3px; }
  .sppb-tab-pane .sppb-addon-text-block, .sppb-tab-pane .sppb-addon-text-block p, .sppb-tab-pane .sppb-addon-text-block li { font-size: 16px !important; line-height: 24px !important; }
  #sp-footer .sp-module-content, #sp-footer .sp-module { text-align: center; }
  #sp-footer .super img { margin: 0 auto; }
}
@media (max-width: 767.98px) { .sppb-addon-text-block, .sppb-addon-raw-html > .sppb-addon-content > div { padding-left: 15px; padding-right: 15px; } .sppb-tab-pane .sppb-addon-text-block { padding-left: 0; padding-right: 0; } }

/* ==========================================================================
   Artículos: contenido centrado (título, imágenes, tablas, iframes) como en el sitio original
   Título de producción: Roboto 1.6rem, peso 900, cursiva, teal #015a7e, centrado.
   ========================================================================== */
.article-details { padding-bottom: 30px; }
.article-details .article-header { text-align: center; margin: 44px 0 26px; }
.article-details .article-header h1 { font-family: Roboto, Arial, sans-serif; font-size: 1.6rem; font-weight: 900; font-style: italic; color: #015a7e; line-height: 1.6; margin: 0; }
.article-details [itemprop="articleBody"] { max-width: 1140px; margin: 0 auto; }
.article-details [itemprop="articleBody"] img { max-width: 100%; height: auto; }
.article-details [itemprop="articleBody"] p > img:only-child, .article-details [itemprop="articleBody"] > img { display: block; margin-left: auto; margin-right: auto; }
.article-details [itemprop="articleBody"] table { margin-left: auto; margin-right: auto; }
.article-details [itemprop="articleBody"] iframe, .article-details [itemprop="articleBody"] video { display: block; margin: 0 auto; max-width: 100%; }
.article-details [itemprop="articleBody"] .container { max-width: 100%; padding: 0; }
@media (max-width: 767.98px) { .article-details .article-header { margin: 28px 0 18px; } .article-details .article-header h1 { font-size: 1.35rem; } }

/* ==========================================================================
   Galerías: cuadrícula responsive (js/custom.js la arma sola) + visor ampliado
   Sin JavaScript, el contenido antiguo (photostack) también se ve como cuadrícula.
   ========================================================================== */
.fnl-grid, .photostack > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 20px 0 30px; }
.fnl-grid__item, .photostack figure { display: block; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: #eef1f4; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: zoom-in; position: relative; }
.fnl-grid__item img, .photostack figure img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.fnl-grid__item:hover img, .fnl-grid__item:focus-visible img, .photostack figure:hover img { transform: scale(1.07); }
.fnl-grid__item:focus-visible { outline: 3px solid #f3a300; outline-offset: 2px; }
.photostack { position: static !important; width: auto !important; height: auto !important; background: none !important; }
@media (max-width: 575.98px) { .fnl-grid, .photostack > div { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

.fnl-lb { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .9); }
.fnl-lb[hidden] { display: none; }
body.fnl-lb-open { overflow: hidden; }
.fnl-lb__fig { margin: 0; max-width: 92vw; max-height: 92vh; text-align: center; }
.fnl-lb__img { display: block; max-width: 92vw; max-height: 84vh; width: auto; height: auto; margin: 0 auto; opacity: 0; transition: opacity .25s; box-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
.fnl-lb__img.is-ready { opacity: 1; }
.fnl-lb__cap { color: #fff; font-size: 14px; margin-top: 10px; min-height: 20px; }
.fnl-lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; line-height: 1; border-radius: 50%; width: 46px; height: 46px; font-size: 32px; transition: background .2s; }
.fnl-lb button:hover, .fnl-lb button:focus-visible { background: rgba(243, 163, 0, .9); outline: 0; }
.fnl-lb__close { top: 16px; right: 16px; font-size: 34px !important; }
.fnl-lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.fnl-lb__next { right: 16px; top: 50%; transform: translateY(-50%); }
.fnl-lb--single .fnl-lb__prev, .fnl-lb--single .fnl-lb__next { display: none; }
@media (max-width: 575.98px) { .fnl-lb__prev, .fnl-lb__next { width: 38px; height: 38px; font-size: 26px; } .fnl-lb__prev { left: 6px; } .fnl-lb__next { right: 6px; } }

/* Bloques de solo imágenes dentro de artículos (los marca js/custom.js): siempre centrados, aunque el artículo traiga text-align o <br> */
.fnl-centrar { text-align: center !important; }
.fnl-centrar img { display: inline-block !important; float: none !important; margin-left: auto; margin-right: auto; max-width: 100%; height: auto; }
