:root {
  --cib-ink: #10243e;
  --cib-ink-2: #193757;
  --cib-muted: #52657a;
  --cib-primary: #0f8379;
  --cib-primary-dark: #08675f;
  --cib-primary-soft: #eaf7f5;
  --cib-accent: #dca53b;
  --cib-accent-soft: #fff8e8;
  --cib-soft: #f5f8fa;
  --cib-white: #ffffff;
  --cib-border: #d8e3e8;
  --cib-radius-sm: 14px;
  --cib-radius: 22px;
  --cib-radius-lg: 32px;
  --cib-shadow-sm: 0 10px 28px rgba(16, 36, 62, .07);
  --cib-shadow: 0 24px 60px rgba(16, 36, 62, .12);
  --cib-max: 1160px;
}

/* Capa visual independiente del tema activo. */
html { scroll-behavior: smooth; }
body.cib-site-shell { margin: 0; color: var(--cib-ink); background: #fff; }
body.cib-site-shell .wp-site-blocks { padding-top: 0 !important; padding-bottom: 0 !important; }
body.cib-site-shell .wp-site-blocks > header.wp-block-template-part,
body.cib-site-shell .wp-site-blocks > footer.wp-block-template-part,
body.cib-site-shell header.wp-block-template-part,
body.cib-site-shell footer.wp-block-template-part,
body.cib-site-shell .site-header,
body.cib-site-shell .site-footer,
body.cib-site-shell #masthead,
body.cib-site-shell #colophon { display: none !important; }
body.cib-generated .wp-block-post-title,
body.cib-generated .entry-title,
body.cib-generated .page-title,
body.cib-generated .post-title,
body.cib-generated main > article > header,
body.cib-generated article > .entry-header { display: none !important; }
body.cib-generated .wp-site-blocks > main,
body.cib-generated main.wp-block-group,
body.cib-generated .wp-block-post-content,
body.cib-generated article,
body.cib-generated .entry-content { margin-top: 0 !important; padding-top: 0 !important; }
body.cib-generated main { max-width: none !important; }
body.cib-generated .wp-block-post-content > * { max-width: none; }
body.cib-generated .entry-content { margin: 0 !important; }
body.cib-generated .entry-content > p:empty { display: none; }
body.cib-generated .entry-content p,
body.cib-generated .entry-content li { line-height: 1.72; }
body.cib-generated .entry-content a { text-underline-offset: 3px; }

/* Evita columnas fantasma generadas por wpautop en cuadrículas. */
.cib-grid > p,
.cib-split > p { display: contents !important; margin: 0 !important; padding: 0 !important; }
.cib-grid > br,
.cib-split > br { display: none !important; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.cib-container { width: min(calc(100% - 44px), var(--cib-max)); margin-inline: auto; }

/* Cabecera */
.cib-site-header { position: sticky; top: 0; z-index: 9998; border-bottom: 1px solid rgba(16,36,62,.09); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); box-shadow: 0 8px 28px rgba(16,36,62,.045); transition: box-shadow .2s ease, background .2s ease; }
.cib-site-header.is-scrolled { background: rgba(255,255,255,.985); box-shadow: 0 12px 34px rgba(16,36,62,.09); }
body.admin-bar .cib-site-header { top: 32px; }
.cib-site-header__inner { min-height: 76px; display: flex; align-items: center; gap: 22px; }
.cib-brand { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 12px; color: var(--cib-ink) !important; text-decoration: none !important; }
.cib-brand__mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, var(--cib-primary), #11a093); color: #fff; font-size: .8rem; font-weight: 900; letter-spacing: .045em; box-shadow: 0 11px 24px rgba(15,131,121,.22); }
.cib-brand__logo { width: auto; max-width: 54px; height: 48px; object-fit: contain; }
.cib-brand__text { display: grid; line-height: 1.05; }
.cib-brand__text strong { font-size: 1.06rem; letter-spacing: -.01em; }
.cib-brand__text small { margin-top: 5px; color: var(--cib-muted); font-size: .72rem; }
.cib-primary-nav { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 3px; }
.cib-primary-nav a { position: relative; padding: 10px 9px; border-radius: 10px; color: #2b4058 !important; font-size: .88rem; font-weight: 760; line-height: 1.2; text-decoration: none !important; white-space: nowrap; }
.cib-primary-nav a:hover,
.cib-primary-nav a:focus-visible { background: var(--cib-primary-soft); color: var(--cib-primary-dark) !important; }
.cib-header-cta { flex: 0 0 auto; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 999px; background: var(--cib-primary); color: #fff !important; font-size: .88rem; font-weight: 850; text-decoration: none !important; box-shadow: 0 10px 24px rgba(15,131,121,.19); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.cib-header-cta:hover { background: var(--cib-primary-dark); transform: translateY(-1px); box-shadow: 0 13px 28px rgba(15,131,121,.24); }
.cib-menu-toggle { display: none; width: 44px; height: 44px; padding: 9px; border: 1px solid var(--cib-border); border-radius: 12px; background: #fff; cursor: pointer; }
.cib-menu-toggle span:not(.screen-reader-text) { display: block; width: 22px; height: 2px; margin: 4px auto; border-radius: 2px; background: var(--cib-ink); transition: transform .2s ease, opacity .2s ease; }

/* Tipografía y secciones */
.cib-section { padding: 66px 0; }
.cib-section--soft { background: linear-gradient(180deg, #f6f9fa 0%, #f1f6f7 100%); }
.cib-section--dark { position: relative; overflow: hidden; background: linear-gradient(135deg, #0d2139 0%, #123052 100%); color: var(--cib-white); }
.cib-section--dark::before { content: ""; position: absolute; width: 420px; height: 420px; right: -160px; top: -180px; border-radius: 50%; background: rgba(39,188,172,.08); }
.cib-section--accent { background: linear-gradient(135deg, #e9f8f6 0%, #fff9ec 100%); }
.cib-center { text-align: center; }
.cib-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--cib-primary-dark); font-size: .76rem; font-weight: 850; letter-spacing: .105em; text-transform: uppercase; }
.cib-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; opacity: .68; }
.cib-section--dark .cib-eyebrow { color: #8fe1d8; }
.cib-section h2,
.cib-page-hero h1,
.cib-hero h1 { color: inherit; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.cib-section h2 { max-width: 900px; margin: 0 0 18px; font-size: clamp(2rem, 3.7vw, 3.15rem); }
.cib-section h3 { margin: 0 0 12px; color: var(--cib-ink); font-size: clamp(1.08rem, 1.7vw, 1.28rem); line-height: 1.25; letter-spacing: -.012em; }
.cib-section.cib-container > p,
.cib-section.cib-container > ul,
.cib-section.cib-container > ol { max-width: 900px; }
.cib-lead { max-width: 720px; color: var(--cib-muted); font-size: clamp(1.04rem, 1.6vw, 1.2rem); line-height: 1.68; }
.cib-section--dark .cib-lead { color: #d8e4ef; }

/* Hero */
.cib-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr); gap: 58px; align-items: center; padding-top: 68px; padding-bottom: 60px; }
.cib-hero::before { content: ""; position: absolute; inset: 24px -24px 14px; z-index: -1; border-radius: 38px; background: radial-gradient(circle at 15% 15%, rgba(15,131,121,.08), transparent 37%), radial-gradient(circle at 90% 20%, rgba(220,165,59,.10), transparent 32%); }
.cib-hero h1 { max-width: 690px; margin: 0 0 20px; font-size: clamp(3rem, 5.3vw, 4.8rem); }
.cib-hero__content { min-width: 0; }
.cib-hero__visual { position: relative; }
.cib-hero__visual::before { content: "Metodología · Datos · Sustentación"; position: absolute; z-index: 2; left: -28px; bottom: 28px; max-width: 230px; padding: 14px 18px; border: 1px solid rgba(16,36,62,.09); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--cib-shadow-sm); color: var(--cib-ink); font-size: .8rem; font-weight: 800; line-height: 1.4; }
.cib-hero__visual img,
.cib-split img { display: block; width: 100%; height: auto; border-radius: 26px; box-shadow: var(--cib-shadow); }
.cib-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cib-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 23px; border: 1px solid transparent; border-radius: 999px; font-size: .98rem; font-weight: 850; text-decoration: none !important; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.cib-button:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(15,131,121,.18); }
.cib-button--primary { background: var(--cib-primary); color: var(--cib-white) !important; }
.cib-button--primary:hover { background: var(--cib-primary-dark); }
.cib-button--secondary { border-color: var(--cib-border); background: var(--cib-white); color: var(--cib-ink) !important; }
.cib-trust-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; padding: 0; margin: 26px 0 0; list-style: none; color: var(--cib-muted); font-size: .84rem; }
.cib-trust-list li { position: relative; padding: 11px 12px 11px 34px; border: 1px solid #e0e9ed; border-radius: 13px; background: rgba(255,255,255,.76); }
.cib-trust-list li::before { content: "✓"; position: absolute; left: 12px; top: 10px; color: var(--cib-primary); font-weight: 900; }

/* Introducción */
.cib-intro { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; padding-top: 22px; padding-bottom: 54px; }
.cib-intro > p { max-width: none !important; margin: 0; padding: 25px 28px; border: 1px solid var(--cib-border); border-radius: var(--cib-radius); background: #fff; box-shadow: var(--cib-shadow-sm); color: #304760; }
.cib-intro > p:first-child { border-top: 4px solid var(--cib-primary); }
.cib-intro > p:last-child { border-top: 4px solid var(--cib-accent); }

/* Páginas interiores */
.cib-page-hero { position: relative; overflow: hidden; padding: 72px 0 64px; background: linear-gradient(135deg, #eaf7f5 0%, #ffffff 58%, #fff7e5 100%); }
.cib-page-hero::after { content: ""; position: absolute; width: 320px; height: 320px; right: -100px; bottom: -190px; border-radius: 50%; background: rgba(220,165,59,.13); }
.cib-page-hero h1 { position: relative; z-index: 1; max-width: 900px; margin: 0 0 16px; font-size: clamp(2.6rem, 4.8vw, 4.35rem); }
.cib-page-hero .cib-container { position: relative; z-index: 1; }

/* Grids y tarjetas */
.cib-grid { display: grid; gap: 20px; margin-top: 30px; }
.cib-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cib-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cib-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cib-card { position: relative; min-width: 0; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; padding: 25px; border: 1px solid var(--cib-border); border-radius: var(--cib-radius); background: var(--cib-white); box-shadow: var(--cib-shadow-sm); overflow: hidden; }
.cib-card::after { content: ""; position: absolute; inset: auto -32px -48px auto; width: 100px; height: 100px; border-radius: 50%; background: var(--cib-primary-soft); opacity: .7; pointer-events: none; }
.cib-card p { position: relative; z-index: 1; margin: 0; color: #435a70; font-size: .96rem; }
.cib-card p + p { margin-top: 12px; }
.cib-card p:last-child { margin-bottom: 0; }
.cib-card > a:last-child { position: relative; z-index: 1; margin-top: auto; padding-top: 18px; color: var(--cib-primary-dark) !important; font-weight: 800; }
a.cib-card { display: flex !important; color: inherit !important; text-decoration: none !important; }
.cib-card--link { color: inherit !important; text-decoration: none !important; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.cib-card--link:hover { transform: translateY(-5px); border-color: rgba(15,131,121,.45); box-shadow: var(--cib-shadow); }
.cib-section--soft .cib-card { background: rgba(255,255,255,.94); }
.cib-section--dark .cib-grid { position: relative; z-index: 1; }
.cib-section--dark .cib-card { min-height: 210px; background: rgba(29,59,91,.86); border-color: rgba(142,194,217,.20); color: #edf4fa; box-shadow: none; }
.cib-section--dark .cib-card::after { background: rgba(96,223,207,.08); }
.cib-section--dark .cib-card h3 { color: #fff; }
.cib-section--dark .cib-card p { color: #cedbe7; }
.cib-section--dark .cib-card:hover { border-color: rgba(130,229,217,.46); background: rgba(32,68,103,.96); }

/* Tarjetas de servicios: numeración visual sin modificar contenido. */
#servicios .cib-grid { counter-reset: service; }
#servicios .cib-card { padding-top: 66px; }
#servicios .cib-card::before { counter-increment: service; content: "0" counter(service); position: absolute; left: 25px; top: 22px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--cib-primary-soft); color: var(--cib-primary-dark); font-size: .77rem; font-weight: 900; }
#servicios .cib-card:nth-child(3n+2)::before { background: var(--cib-accent-soft); color: #9b6c0d; }

/* Split y procesos */
.cib-split { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); gap: 54px; align-items: center; }
.cib-split > * { min-width: 0; }
.cib-split--reverse > :first-child { order: 2; }
.cib-split--reverse > :last-child { order: 1; }
.cib-steps { counter-reset: cibstep; padding: 0; margin: 24px 0 0; list-style: none; }
.cib-steps li { position: relative; padding: 2px 0 20px 48px; color: #30475f; }
.cib-steps li::before { counter-increment: cibstep; content: counter(cibstep); position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: var(--cib-primary); color: #fff; font-size: .86rem; font-weight: 900; box-shadow: 0 8px 18px rgba(15,131,121,.18); }
.cib-steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 35px; bottom: 3px; width: 2px; background: #d9e7e8; }
.cib-snippet { max-width: 900px; padding: 22px 25px; border-left: 4px solid var(--cib-accent); border-radius: 0 16px 16px 0; background: var(--cib-accent-soft); box-shadow: inset 0 0 0 1px rgba(220,165,59,.08); }
.cib-snippet strong { font-weight: 650; }
.cib-callout { max-width: 900px; margin: 26px 0; padding: 23px 26px; border: 1px solid #ead6a5; border-radius: var(--cib-radius); background: #fffaf0; }
.cib-callout ul:last-child { margin-bottom: 0; }
.cib-text-link { color: var(--cib-primary-dark) !important; font-weight: 850; text-decoration: none !important; }
.cib-text-link:hover { text-decoration: underline !important; }

/* CTA */
.cib-cta-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 38px; align-items: center; padding: 36px 40px; border: 1px solid rgba(15,131,121,.15); border-radius: var(--cib-radius-lg); background: rgba(255,255,255,.72); box-shadow: var(--cib-shadow-sm); }
.cib-cta-panel h2 { margin-bottom: 10px; }
.cib-cta-panel p { max-width: 750px; margin-bottom: 0; color: var(--cib-muted); }
.cib-final-cta { margin-top: 36px; margin-bottom: 58px; padding: 52px 40px; border-radius: var(--cib-radius-lg); background: linear-gradient(135deg, var(--cib-ink) 0%, #184970 100%); color: #fff; text-align: center; box-shadow: var(--cib-shadow); }
.cib-final-cta h2 { margin-inline: auto; color: #fff; }
.cib-final-cta p { max-width: 700px !important; margin-inline: auto; color: #dce7f1; }

/* FAQ */
.cib-faq { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 28px; }
.cib-faq details { min-width: 0; border: 1px solid var(--cib-border); border-radius: 16px; background: #fff; padding: 0 20px; box-shadow: 0 7px 22px rgba(16,36,62,.045); }
.cib-faq summary { position: relative; cursor: pointer; padding: 19px 34px 19px 0; list-style: none; font-weight: 800; color: var(--cib-ink); }
.cib-faq summary::-webkit-details-marker { display: none; }
.cib-faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--cib-primary-soft); color: var(--cib-primary-dark); font-size: 1.25rem; transition: transform .2s ease; }
.cib-faq details[open] summary::after { content: "−"; transform: rotate(180deg); }
.cib-faq details[open] summary { border-bottom: 1px solid #edf1f3; }
.cib-faq details p { margin: 16px 0 20px; color: #435a70; }

/* Footer */
.cib-site-footer { padding: 54px 0 22px; background: #0a1c31; color: #d9e4ef; }
.cib-site-footer__grid { display: grid; grid-template-columns: 1.55fr .8fr .95fr; gap: 48px; }
.cib-site-footer__grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cib-site-footer__grid strong { color: #fff; }
.cib-site-footer__brand { font-size: 1.35rem; }
.cib-site-footer p { max-width: 460px; margin: 0; color: #afc0d2; line-height: 1.7; }
.cib-site-footer a { color: #d9e4ef !important; text-decoration: none !important; }
.cib-site-footer a:hover { color: #8ddbd3 !important; }
.cib-site-footer__bottom { margin-top: 36px; padding-top: 19px; border-top: 1px solid rgba(255,255,255,.12); color: #91a5ba; font-size: .84rem; }

/* WhatsApp global flotante */
.cib-whatsapp-float { position: fixed; right: 24px; bottom: 24px; z-index: 9997; display: inline-flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 17px 8px 9px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: #20b45a; color: #fff !important; text-decoration: none !important; box-shadow: 0 18px 40px rgba(10,70,38,.28); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.cib-whatsapp-float:hover { transform: translateY(-3px); background: #169e4c; box-shadow: 0 22px 46px rgba(10,70,38,.34); }
.cib-whatsapp-float__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.17); }
.cib-whatsapp-float__icon svg { width: 27px; height: 27px; fill: currentColor; }
.cib-whatsapp-float__label { font-size: .88rem; font-weight: 850; white-space: nowrap; }

/* Responsive */
@media (max-width: 1120px) {
  .cib-site-header__inner { gap: 13px; }
  .cib-primary-nav a { padding-inline: 7px; font-size: .82rem; }
  .cib-header-cta { padding-inline: 14px; }
  .cib-hero { grid-template-columns: minmax(0,1.06fr) minmax(340px,.94fr); gap: 40px; }
}

@media (max-width: 980px) {
  .cib-menu-toggle { display: block; margin-left: auto; }
  .cib-header-cta { display: none; }
  .cib-site-header__inner { min-height: 70px; justify-content: space-between; }
  .cib-primary-nav { position: absolute; top: calc(100% + 1px); left: 18px; right: 18px; display: none; padding: 12px; border: 1px solid var(--cib-border); border-radius: 16px; background: #fff; box-shadow: var(--cib-shadow); }
  .cib-primary-nav a { display: block; padding: 12px 14px; font-size: .95rem; }
  .cib-site-header.is-menu-open .cib-primary-nav { display: grid; }
  .cib-site-header.is-menu-open .cib-menu-toggle span:nth-of-type(2) { transform: translateY(6px) rotate(45deg); }
  .cib-site-header.is-menu-open .cib-menu-toggle span:nth-of-type(3) { opacity: 0; }
  .cib-site-header.is-menu-open .cib-menu-toggle span:nth-of-type(4) { transform: translateY(-6px) rotate(-45deg); }

  .cib-hero { grid-template-columns: 1fr; padding-top: 52px; }
  .cib-hero__content { max-width: 760px; }
  .cib-hero__visual { max-width: 680px; margin-inline: auto; }
  .cib-grid--4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cib-grid--3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cib-split { grid-template-columns: 1fr; gap: 34px; }
  .cib-split--reverse > :first-child,
  .cib-split--reverse > :last-child { order: initial; }
  .cib-split img { max-width: 650px; margin-inline: auto; }
  .cib-faq { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  body.admin-bar .cib-site-header { top: 46px; }
}

@media (max-width: 720px) {
  .cib-container { width: min(calc(100% - 28px), var(--cib-max)); }
  .cib-section { padding: 50px 0; }
  .cib-hero { padding-top: 42px; padding-bottom: 42px; gap: 30px; }
  .cib-hero h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .cib-hero__visual::before { left: 14px; bottom: 14px; }
  .cib-page-hero { padding: 52px 0 46px; }
  .cib-intro { grid-template-columns: 1fr; padding-bottom: 44px; }
  .cib-grid--2,
  .cib-grid--3,
  .cib-grid--4,
  .cib-cta-panel { grid-template-columns: 1fr; }
  .cib-card { padding: 22px; }
  #servicios .cib-card { padding-top: 62px; }
  .cib-button { width: 100%; box-sizing: border-box; }
  .cib-actions { display: grid; }
  .cib-trust-list { grid-template-columns: 1fr; }
  .cib-cta-panel { padding: 28px 24px; }
  .cib-final-cta { margin-inline: 14px; padding: 42px 22px; }
  .cib-brand__text small { display: none; }
  .cib-site-footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .cib-whatsapp-float { right: 14px; bottom: 14px; padding-right: 10px; }
  .cib-whatsapp-float__label { display: none; }
}

/* Ajustes heredados para contenido regenerado */
.cib-card h3 a { color: inherit !important; text-decoration: none !important; }
.cib-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.cib-cta-panel__action { display: grid; gap: 10px; justify-items: end; }
.cib-cta-panel__action small { color: var(--cib-muted); font-size: .78rem; text-align: right; }
@media (max-width: 720px) {
  .cib-cta-panel__action { justify-items: stretch; }
  .cib-cta-panel__action small { text-align: center; }
}

/* =========================================================
   Arquitectura y diseño 1.3
   ========================================================= */

/* La sección de especialidades de la home utiliza su propia
   cuadrícula para impedir tarjetas fantasma del tema/wpautop. */
.cib-specialty-showcase .cib-container { position: relative; z-index: 1; }
.cib-specialty-showcase__head { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: 42px; align-items: end; margin-bottom: 30px; }
.cib-specialty-showcase__head h2 { margin-bottom: 0; }
.cib-specialty-showcase__head > p { margin: 0 0 5px; color: #c8d7e5; line-height: 1.7; }
.cib-specialty-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.cib-specialty-grid > p:empty,
.cib-specialty-grid > br { display: none !important; }
.cib-specialty-card { min-width: 0; }
.cib-specialty-card > a { position: relative; min-height: 235px; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; padding: 27px; overflow: hidden; border: 1px solid rgba(143,197,218,.22); border-radius: 22px; background: linear-gradient(145deg,rgba(31,66,101,.96),rgba(25,55,87,.96)); color: #fff !important; text-decoration: none !important; transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease; }
.cib-specialty-card > a::after { content: ""; position: absolute; right: -38px; bottom: -50px; width: 130px; height: 130px; border-radius: 50%; background: rgba(94,218,204,.08); transition: transform .22s ease, background .22s ease; }
.cib-specialty-card > a:hover { transform: translateY(-5px); border-color: rgba(143,225,214,.58); background: linear-gradient(145deg,#244d76,#1b3f64); box-shadow: 0 20px 38px rgba(0,0,0,.18); }
.cib-specialty-card > a:hover::after { transform: scale(1.15); background: rgba(94,218,204,.14); }
.cib-specialty-card__number { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 26px; border-radius: 12px; background: rgba(126,225,213,.12); color: #8fe1d8; font-size: .76rem; font-weight: 900; letter-spacing: .06em; }
.cib-specialty-card h3 { margin: 0 0 11px; color: #fff; font-size: 1.24rem; }
.cib-specialty-card p { margin: 0; color: #cfdeea; font-size: .94rem; line-height: 1.65; }
.cib-specialty-card__link { position: relative; z-index: 1; margin-top: auto; padding-top: 24px; color: #95e7de; font-size: .85rem; font-weight: 850; }
.cib-specialty-showcase__cta { margin: 26px 0 0; text-align: center; }
.cib-specialty-showcase__cta .cib-button--secondary { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff !important; }
.cib-specialty-showcase__cta .cib-button--secondary:hover { background: #fff; color: var(--cib-ink) !important; }

/* Cuadrículas de páginas pilar. */
.cib-pillar-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-top: 28px; }
.cib-pillar-card-grid--4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.cib-pillar-card { position: relative; min-height: 205px; box-sizing: border-box; display: flex; flex-direction: column; padding: 27px; overflow: hidden; border: 1px solid var(--cib-border); border-radius: 22px; background: #fff; color: inherit !important; text-decoration: none !important; box-shadow: var(--cib-shadow-sm); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.cib-pillar-card::after { content: "→"; position: absolute; right: 22px; bottom: 20px; color: var(--cib-primary); font-weight: 900; }
.cib-pillar-card:hover { transform: translateY(-5px); border-color: rgba(15,131,121,.42); box-shadow: var(--cib-shadow); }
.cib-pillar-card > span { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 12px; background: var(--cib-primary-soft); color: var(--cib-primary-dark); font-size: .75rem; font-weight: 900; }
.cib-pillar-card h3 { margin-bottom: 10px; }
.cib-pillar-card p { margin: 0; padding-right: 20px; color: var(--cib-muted); font-size: .93rem; line-height: 1.6; }

/* Plantilla propia del índice del blog. */
.cib-blog-main,
.cib-resource-main { min-height: 70vh; background: #fff; }
.cib-blog-hero { position: relative; overflow: hidden; padding: 78px 0 66px; background: linear-gradient(135deg,#edf9f7 0%,#fff 60%,#fff7e7 100%); }
.cib-blog-hero::after { content: ""; position: absolute; right: -100px; top: -160px; width: 430px; height: 430px; border-radius: 50%; background: rgba(15,131,121,.07); }
.cib-blog-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); gap: 54px; align-items: center; }
.cib-blog-hero h1 { max-width: 780px; margin: 0 0 18px; color: var(--cib-ink); font-size: clamp(2.8rem,5vw,4.55rem); line-height: 1.04; letter-spacing: -.045em; }
.cib-blog-hero__grid > div:first-child > p { max-width: 720px; margin: 0; color: var(--cib-muted); font-size: 1.12rem; line-height: 1.7; }
.cib-blog-hero__route { padding: 27px; border: 1px solid rgba(15,131,121,.16); border-radius: 22px; background: rgba(255,255,255,.82); box-shadow: var(--cib-shadow-sm); }
.cib-blog-hero__route strong { color: var(--cib-ink); font-size: 1.05rem; }
.cib-blog-hero__route p { color: var(--cib-muted); line-height: 1.65; }
.cib-blog-hero__route a { color: var(--cib-primary-dark) !important; font-weight: 850; text-decoration: none !important; }
.cib-blog-library { padding-top: 58px; }
.cib-featured-post { display: grid; grid-template-columns: minmax(260px,.72fr) minmax(0,1.28fr); gap: 0; overflow: hidden; margin-bottom: 24px; border: 1px solid var(--cib-border); border-radius: 28px; background: #fff; box-shadow: var(--cib-shadow); }
.cib-featured-post__visual { min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; padding: 32px; background: linear-gradient(145deg,#0d263f,#184b6d); color: #fff; }
.cib-featured-post__visual span { font-size: 4.7rem; font-weight: 900; line-height: 1; color: rgba(143,225,216,.9); }
.cib-featured-post__visual strong { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.cib-featured-post__body { display: flex; flex-direction: column; justify-content: center; padding: 42px 46px; }
.cib-featured-post h2 { margin: 9px 0 15px; font-size: clamp(2rem,3.4vw,3.05rem); }
.cib-featured-post h2 a,
.cib-post-card h2 a { color: var(--cib-ink) !important; text-decoration: none !important; }
.cib-featured-post h2 a:hover,
.cib-post-card h2 a:hover { color: var(--cib-primary-dark) !important; }
.cib-featured-post p { color: var(--cib-muted); font-size: 1.03rem; line-height: 1.7; }
.cib-post-kicker { color: var(--cib-primary-dark); font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.cib-blog-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.cib-post-card { position: relative; min-height: 330px; display: flex; flex-direction: column; padding: 31px; overflow: hidden; border: 1px solid var(--cib-border); border-radius: 24px; background: #fff; box-shadow: var(--cib-shadow-sm); }
.cib-post-card__number { position: absolute; right: 22px; top: 18px; color: #e7eff2; font-size: 4rem; font-weight: 900; line-height: 1; }
.cib-post-card h2 { position: relative; z-index: 1; max-width: 88%; margin: 18px 0 14px; font-size: 1.65rem; line-height: 1.2; }
.cib-post-card > p { position: relative; z-index: 1; margin: 0; color: var(--cib-muted); line-height: 1.68; }
.cib-post-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; padding-top: 26px; color: #718296; font-size: .84rem; }
.cib-post-card__meta a { color: var(--cib-primary-dark) !important; font-weight: 850; text-decoration: none !important; }
.cib-empty-library { padding: 50px; border: 1px dashed var(--cib-border); border-radius: 24px; text-align: center; }

/* Plantilla de entradas de especialidades, servicios, universidades y blog. */
.cib-article-hero { padding: 52px 0 58px; background: linear-gradient(180deg,#f6fafb 0%,#fff 100%); border-bottom: 1px solid #edf1f3; }
.cib-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 42px; color: #718296; font-size: .82rem; }
.cib-breadcrumbs a { color: var(--cib-primary-dark) !important; text-decoration: none !important; }
.cib-breadcrumbs span[aria-current="page"] { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cib-article-hero__grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: 58px; align-items: end; }
.cib-article-hero h1 { max-width: 880px; margin: 0 0 18px; color: var(--cib-ink); font-size: clamp(2.75rem,5vw,4.6rem); line-height: 1.04; letter-spacing: -.045em; }
.cib-article-deck { max-width: 780px; margin: 0; color: var(--cib-muted); font-size: 1.12rem; line-height: 1.7; }
.cib-article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 25px; color: #718296; font-size: .82rem; }
.cib-article-meta span + span::before { content: "•"; margin-right: 18px; }
.cib-article-hero__note { padding: 25px; border-left: 4px solid var(--cib-accent); border-radius: 0 18px 18px 0; background: var(--cib-accent-soft); }
.cib-article-hero__note strong { color: var(--cib-ink); }
.cib-article-hero__note p { margin: 8px 0 0; color: #5e6370; line-height: 1.65; }
.cib-article-layout { display: grid; grid-template-columns: minmax(0,790px) minmax(230px,280px); justify-content: space-between; gap: 70px; padding-top: 58px; padding-bottom: 78px; }
.cib-article-content { min-width: 0; color: #263d55; font-size: 1.04rem; }
.cib-article-content > p,
.cib-article-content > ul,
.cib-article-content > ol { max-width: 760px; }
.cib-article-content p { margin: 0 0 22px; line-height: 1.82; }
.cib-article-content .cib-article-intro { margin-bottom: 40px; padding: 24px 27px; border: 1px solid #dbe8ea; border-radius: 20px; background: #f3faf9; color: #294960; font-size: 1.12rem; }
.cib-article-content h2 { scroll-margin-top: 118px; margin: 56px 0 17px; color: var(--cib-ink); font-size: clamp(1.85rem,3vw,2.55rem); line-height: 1.14; letter-spacing: -.028em; }
.cib-article-content h3 { margin: 34px 0 12px; color: var(--cib-ink); font-size: 1.35rem; }
.cib-article-content ul,
.cib-article-content ol { margin: 0 0 25px; padding-left: 1.35em; }
.cib-article-content li { margin-bottom: 9px; line-height: 1.72; }
.cib-article-content .cib-callout { margin: 36px 0 0; }
.cib-article-sidebar { min-width: 0; }
.cib-toc-card { position: sticky; top: 112px; padding: 24px; border: 1px solid var(--cib-border); border-radius: 20px; background: #fff; box-shadow: var(--cib-shadow-sm); }
body.admin-bar .cib-toc-card { top: 144px; }
.cib-toc-card > strong { color: var(--cib-ink); font-size: .95rem; }
.cib-toc-card ol { margin: 17px 0 20px; padding: 0; list-style: none; counter-reset: toc; }
.cib-toc-card li { position: relative; counter-increment: toc; padding-left: 28px; margin-bottom: 12px; }
.cib-toc-card li::before { content: counter(toc,decimal-leading-zero); position: absolute; left: 0; top: 1px; color: #8aa0b3; font-size: .68rem; font-weight: 900; }
.cib-toc-card a { color: #425a70 !important; font-size: .84rem; line-height: 1.45; text-decoration: none !important; }
.cib-toc-card a:hover { color: var(--cib-primary-dark) !important; }
.cib-toc-card__pillar { display: block; padding-top: 17px; border-top: 1px solid #e7edef; color: var(--cib-primary-dark) !important; font-weight: 850; }
.cib-upward-path { margin-top: 64px; padding: 34px; border-radius: 26px; background: linear-gradient(145deg,#0e2741,#174a6e); color: #fff; }
.cib-upward-path h2 { margin-top: 0; color: #fff; }
.cib-upward-path > p { color: #ccdae6; }
.cib-upward-path__steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.cib-upward-path__steps a { min-width: 0; display: flex; flex-direction: column; padding: 20px; border: 1px solid rgba(255,255,255,.14); border-radius: 17px; background: rgba(255,255,255,.06); color: #fff !important; text-decoration: none !important; }
.cib-upward-path__steps a:hover { background: rgba(255,255,255,.11); }
.cib-upward-path__steps span { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 10px; background: #7ed9ce; color: #0e3046; font-size: .76rem; font-weight: 900; }
.cib-upward-path__steps strong { line-height: 1.35; }
.cib-upward-path__steps small { margin-top: 8px; color: #afc1d1; line-height: 1.4; }
.cib-article-cta { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 28px; align-items: center; margin-top: 26px; padding: 32px; border: 1px solid rgba(15,131,121,.17); border-radius: 24px; background: linear-gradient(135deg,#edf9f7,#fff9eb); }
.cib-article-cta h2 { margin: 0 0 8px; font-size: 2rem; }
.cib-article-cta p { margin-bottom: 0; }

/* Respaldo por si el tema intenta añadir metadatos, comentarios o navegación. */
body.cib-generated-post .wp-block-post-author,
body.cib-generated-post .wp-block-post-date,
body.cib-generated-post .wp-block-post-terms,
body.cib-generated-post .wp-block-comments,
body.cib-generated-post .comments-area,
body.cib-generated-post .comment-respond,
body.cib-generated-post .post-navigation,
body.cib-generated-post .wp-block-post-navigation-link,
body.cib-generated-post .wp-block-query-title { display: none !important; }

@media (max-width: 980px) {
  .cib-specialty-showcase__head,
  .cib-blog-hero__grid,
  .cib-article-hero__grid { grid-template-columns: 1fr; gap: 25px; }
  .cib-specialty-grid,
  .cib-pillar-card-grid,
  .cib-pillar-card-grid--4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cib-article-layout { grid-template-columns: 1fr; gap: 34px; }
  .cib-article-sidebar { order: -1; }
  .cib-toc-card { position: static; }
  .cib-toc-card ol { columns: 2; column-gap: 30px; }
}

@media (max-width: 720px) {
  .cib-specialty-grid,
  .cib-pillar-card-grid,
  .cib-pillar-card-grid--4,
  .cib-blog-grid,
  .cib-upward-path__steps,
  .cib-article-cta { grid-template-columns: 1fr; }
  .cib-specialty-card > a { min-height: 0; }
  .cib-featured-post { grid-template-columns: 1fr; }
  .cib-featured-post__visual { min-height: 210px; }
  .cib-featured-post__body { padding: 30px 24px; }
  .cib-post-card { min-height: 300px; padding: 25px; }
  .cib-article-hero { padding-top: 38px; }
  .cib-breadcrumbs { margin-bottom: 30px; }
  .cib-breadcrumbs span[aria-current="page"] { display: none; }
  .cib-article-meta span + span::before { display: none; }
  .cib-article-layout { padding-top: 36px; padding-bottom: 55px; }
  .cib-toc-card ol { columns: 1; }
  .cib-upward-path { padding: 27px 22px; }
  .cib-article-cta { padding: 27px 22px; }
}

/* =========================================================
   Diseño fotográfico 1.4
   ========================================================= */
.cib-photo,
.cib-page-hero__image,
.cib-blog-hero__image,
.cib-featured-post__image,
.cib-article-hero__image,
.cib-card__image {
  margin: 0;
  overflow: hidden;
  background: #eaf1f4;
}
.cib-photo img,
.cib-page-hero__image img,
.cib-blog-hero__image img,
.cib-featured-post__image img,
.cib-article-hero__image img,
.cib-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cib-photo--hero,
.cib-photo--section,
.cib-page-hero__image,
.cib-blog-hero__image,
.cib-article-hero__image { aspect-ratio: 3 / 2; border-radius: 28px; box-shadow: var(--cib-shadow); }
.cib-photo--hero img { object-position: center; }
.cib-photo--section { min-height: 390px; }
.cib-photo--wide { aspect-ratio: 21 / 8; margin: 30px 0 34px; border-radius: 28px; box-shadow: var(--cib-shadow-sm); }
.cib-photo--wide img { object-position: center 42%; }

/* Hero de páginas pilar con imagen real. */
.cib-page-hero__grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(340px,.92fr); gap: 54px; align-items: center; }
.cib-page-hero__grid > div:first-child { min-width: 0; }
.cib-page-hero__image { position: relative; border: 7px solid rgba(255,255,255,.92); }
.cib-page-hero__image::after { content: ""; position: absolute; inset: auto 22px -16px 22px; height: 30px; z-index: -1; border-radius: 50%; background: rgba(16,36,62,.18); filter: blur(18px); }

/* Tarjetas por grado con fotografía. */
.cib-card--media { padding: 0 !important; overflow: hidden; }
.cib-card--media::before { display: none !important; }
.cib-card--media .cib-card__image { aspect-ratio: 3 / 2; border-radius: 0; }
.cib-card--media .cib-card__body { position: relative; display: flex; flex: 1; flex-direction: column; padding: 25px 25px 27px; }
.cib-card--media .cib-card__body a { margin-top: auto; padding-top: 14px; color: var(--cib-primary-dark) !important; font-weight: 850; text-decoration: none !important; }

/* Blog visual. */
.cib-blog-hero__visual { position: relative; padding-bottom: 54px; }
.cib-blog-hero__image { border: 7px solid rgba(255,255,255,.96); }
.cib-blog-hero__route { position: absolute; left: -28px; right: 24px; bottom: 0; z-index: 2; padding: 22px 24px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.cib-featured-post__visual { position: relative; min-height: 350px; padding: 0; background: #0d263f; }
.cib-featured-post__image { position: absolute; inset: 0; border-radius: 0; }
.cib-featured-post__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(7,25,43,.04),rgba(7,25,43,.78)); }
.cib-featured-post__visual span,
.cib-featured-post__visual strong { position: absolute; z-index: 2; }
.cib-featured-post__visual span { left: 28px; top: 26px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: rgba(13,38,63,.82); color: #fff; font-size: 1.05rem; backdrop-filter: blur(8px); }
.cib-featured-post__visual strong { left: 30px; right: 30px; bottom: 28px; color: #fff; }
.cib-post-card__media { display: block; height: 190px; margin: -31px -31px 24px; overflow: hidden; background: #eaf1f4; text-decoration: none !important; }
.cib-post-card__image { width: 100%; height: 100%; border-radius: 0; transition: transform .35s ease; }
.cib-post-card:hover .cib-post-card__image { transform: scale(1.035); }
.cib-post-card__number { top: 174px; right: 20px; width: 52px; height: 52px; display: grid; place-items: center; border: 5px solid #fff; border-radius: 17px; background: var(--cib-primary); color: #fff; font-size: .86rem; box-shadow: 0 9px 20px rgba(16,36,62,.14); }
.cib-post-card h2 { max-width: 100%; }

/* Imagen en cabeceras de entradas. */
.cib-article-hero__grid { align-items: center; }
.cib-article-hero__media { display: grid; gap: 14px; }
.cib-article-hero__image { border: 6px solid #fff; box-shadow: var(--cib-shadow); }
.cib-article-hero__note { border-left-width: 3px; border-radius: 16px; }

@media (max-width: 980px) {
  .cib-page-hero__grid { grid-template-columns: 1fr; gap: 30px; }
  .cib-page-hero__image { max-width: 720px; }
  .cib-blog-hero__visual { max-width: 720px; }
  .cib-photo--section { min-height: 0; }
}

@media (max-width: 720px) {
  .cib-photo--wide { aspect-ratio: 3 / 2; margin: 24px 0 28px; }
  .cib-blog-hero__visual { padding-bottom: 0; }
  .cib-blog-hero__route { position: relative; left: auto; right: auto; bottom: auto; margin: -28px 14px 0; }
  .cib-post-card__media { height: 175px; margin: -25px -25px 22px; }
  .cib-post-card__number { top: 158px; }
  .cib-featured-post__visual { min-height: 240px; }
  .cib-page-hero__image,
  .cib-photo--hero,
  .cib-photo--section,
  .cib-blog-hero__image,
  .cib-article-hero__image { border-radius: 20px; }
}
