/* INTEGRITY-AI Visibility — Public Styles */

:root {
  --iv-navy:   #0B3D55;
  --iv-gold:   #D49500;
  --iv-orange: #BC5C05;
  --iv-sand:   #E3DAC9;
  --iv-cream:  #F7F4EF;
  --iv-teal:   #6BAAAF;
  --iv-text:   #4D4D4D;
  --iv-border: rgba(11,61,85,.1);
}

/* SHARED COMPONENTS */
.ivb-label, .ivm-label {
  display: inline-flex; align-items: center; gap: .7rem;
  margin-bottom: 1rem;
}
.ivb-label::before, .ivm-label::before {
  content: ''; width: 24px; height: 2px;
  background: var(--iv-gold); flex-shrink: 0;
}
.ivb-label span, .ivm-label span {
  font-size: .68rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--iv-gold);
}

.ivb-h2, .ivm-h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 700; line-height: 1.15;
  color: var(--iv-navy); margin-bottom: .8rem;
}

.iv-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  background: #fff;
  border: 1.5px dashed rgba(11,61,85,.2);
  border-radius: 12px; padding: 3.5rem 2rem; text-align: center;
  margin-top: 1.5rem;
}
.iv-empty-icon {
  width: 52px; height: 52px; background: var(--iv-sand);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.iv-empty-icon svg { width: 24px; height: 24px; }
.iv-empty-title { font-size: 1rem; font-weight: 700; color: var(--iv-navy); margin: 0; }
.iv-empty-sub   { font-size: .85rem; color: var(--iv-text); margin: 0; max-width: 340px; }

.iv-reveal {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s ease;
}

/* BLOQUE A — BOLETINES */
.ivb-section {
  /* Full-width breakout: rompe el contenedor del tema y ocupa todo el viewport */
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin: 0 -50vw;
  padding: 6rem 2rem;
  background: #ffffff;
  font-family: 'LinearGrotest', 'Helvetica Neue', Arial, sans-serif;
  box-sizing: border-box;
}
.ivb-container { max-width: 1080px; margin: 0 auto; }

.ivb-tabs {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 2px solid var(--iv-sand);
  margin-bottom: 0;
}
.ivb-tab {
  padding: .75rem 1.6rem;
  font-size: .88rem; font-weight: 700;
  color: var(--iv-text);
  background: var(--iv-cream);
  border: none; cursor: pointer;
  border-radius: 8px 8px 0 0;
  margin-right: 4px;
  transition: background .2s, color .2s;
  position: relative; bottom: -2px;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.ivb-tab:hover    { background: var(--iv-sand); color: var(--iv-navy); }
.ivb-tab.ivb-active {
  background: var(--iv-orange); color: #fff;
  border-bottom: 2px solid var(--iv-orange);
}

.ivb-panel { display: none; padding: 2.5rem 0 0; }
.ivb-panel.ivb-open { display: block; }

.ivb-panel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media(max-width: 768px) { .ivb-panel-inner { grid-template-columns: 1fr; gap: 2rem; } }

.ivb-book-wrap { position: relative; display: flex; justify-content: center; }
.ivb-book {
  position: relative; width: 100%; max-width: 420px;
  border-radius: 6px; overflow: hidden;
  box-shadow:
    -6px 6px 0 0 rgba(11,61,85,.08),
    -12px 12px 0 0 rgba(11,61,85,.05),
    0 20px 48px rgba(11,61,85,.18);
}
.ivb-book::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 14px; height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,.04));
  z-index: 2; pointer-events: none;
}
.ivb-book img { display: block; width: 100%; height: auto; object-fit: cover; }

.ivb-book-placeholder {
  width: 100%; max-width: 420px; aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--iv-navy), #1a5a78);
  border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  box-shadow: 0 20px 48px rgba(11,61,85,.2);
}
.ivb-book-placeholder svg { width: 48px; height: 48px; opacity: .5; }
.ivb-book-placeholder span { font-size: .82rem; color: rgba(255,255,255,.5); font-weight: 500; }

.ivb-info-tag {
  font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--iv-gold); margin-bottom: .6rem;
}
.ivb-info-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700; color: var(--iv-navy);
  line-height: 1.2; margin-bottom: .5rem;
}
.ivb-info-fecha {
  font-size: .82rem; color: var(--iv-text);
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .4rem;
}
.ivb-info-fecha svg { width: 14px; height: 14px; opacity: .5; }
.ivb-info-desc {
  font-size: .93rem; color: var(--iv-text);
  line-height: 1.78; margin-bottom: 1.5rem;
}
.ivb-download-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--iv-navy); color: #fff;
  font-family: inherit;
  font-size: .9rem; font-weight: 700;
  border: none; cursor: pointer; text-decoration: none;
  border-radius: 10px; padding: .85rem 1.6rem;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(11,61,85,.2);
}
.ivb-download-btn:hover {
  background: var(--iv-gold); transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212,149,0,.25);
  color: #fff;
}
.ivb-download-btn.ivb-loading { opacity: .7; cursor: wait; pointer-events: none; }
.ivb-download-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.ivb-coming-soon {
  display: inline-block;
  font-size: .82rem; color: var(--iv-text);
  font-style: italic;
  border: 1px dashed rgba(11,61,85,.2);
  border-radius: 20px; padding: .4rem 1rem;
}
.ivb-dl-count {
  font-size: .75rem; color: var(--iv-text); opacity: .6;
  margin-top: .6rem;
}

/* BLOQUE B — MEDIOS */
.ivm-section {
  /* Full-width breakout: rompe el contenedor del tema y ocupa todo el viewport */
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin: 0 -50vw;
  padding: 6rem 2rem;
  background: var(--iv-cream);
  font-family: 'LinearGrotest', 'Helvetica Neue', Arial, sans-serif;
  box-sizing: border-box;
}
.ivm-container { max-width: 1080px; margin: 0 auto; }

.ivm-intro {
  font-size: .97rem; color: var(--iv-text);
  line-height: 1.75; margin-bottom: 2.5rem;
  max-width: 660px;
}

.ivm-filters {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1.2rem;
}
.ivm-filter-btn {
  padding: .38rem .9rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  background: #fff;
  border: 1.5px solid rgba(11,61,85,.15);
  border-radius: 100px; cursor: pointer; color: var(--iv-text);
  font-family: inherit;
  transition: all .2s;
}
.ivm-filter-btn:hover  { border-color: var(--iv-navy); color: var(--iv-navy); }
.ivm-filter-btn.ivm-active { background: var(--iv-navy); color: #fff; border-color: var(--iv-navy); }

.ivm-count {
  font-size: .78rem; color: var(--iv-text);
  margin-bottom: 1.2rem;
}
.ivm-count strong { color: var(--iv-navy); }

.ivm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}
.ivm-grid.ivm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ivm-grid.ivm-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ivm-grid.ivm-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media(max-width: 640px) {
  .ivm-grid,
  .ivm-grid.ivm-cols-3,
  .ivm-grid.ivm-cols-4 { grid-template-columns: 1fr; }
}

.ivm-card {
  background: #fff;
  border: 1.5px solid var(--iv-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: .85rem;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.ivm-card:hover {
  border-color: var(--iv-teal);
  box-shadow: 0 8px 28px rgba(11,61,85,.09);
  transform: translateY(-3px);
}
.ivm-card[data-hidden="true"] { display: none; }

.ivm-card-top {
  display: flex; justify-content: space-between;
  align-items: center; gap: .75rem;
}
.ivm-medio-logo {
  height: 28px; max-width: 120px;
  object-fit: contain; display: block;
}
.ivm-medio-name {
  font-size: .82rem; font-weight: 700; color: var(--iv-navy);
}
.ivm-tipo-badge {
  flex-shrink: 0;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  border-radius: 6px; padding: .2rem .55rem;
}
.ivm-tipo--articulo     { background: var(--iv-sand); color: var(--iv-navy); }
.ivm-tipo--entrevista   { background: rgba(107,170,175,.15); color: #3d8a8f; }
.ivm-tipo--video        { background: rgba(188,92,5,.12); color: var(--iv-orange); }
.ivm-tipo--podcast      { background: rgba(212,149,0,.12); color: #a67600; }
.ivm-tipo--notaprensa   { background: rgba(11,61,85,.08); color: var(--iv-navy); }

.ivm-titular {
  font-size: .93rem; font-weight: 700;
  color: var(--iv-navy); line-height: 1.45; flex: 1;
}

.ivm-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: .6rem;
  border-top: 1px solid rgba(11,61,85,.08);
}
.ivm-fecha {
  font-size: .76rem; color: var(--iv-text);
  display: flex; align-items: center; gap: .35rem;
}
.ivm-fecha svg { width: 12px; height: 12px; opacity: .5; }

.ivm-card-actions {
  display: flex; align-items: center; gap: .6rem;
}
.ivm-click-count {
  font-size: .7rem; color: var(--iv-text); opacity: .6;
  white-space: nowrap;
}
.ivm-link-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--iv-cream);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.ivm-card:hover .ivm-link-btn { background: var(--iv-navy); }
.ivm-link-btn svg { width: 13px; height: 13px; }
.ivm-link-btn svg path, .ivm-link-btn svg polyline, .ivm-link-btn svg line {
  stroke: var(--iv-navy); transition: stroke .2s;
}
.ivm-card:hover .ivm-link-btn svg path,
.ivm-card:hover .ivm-link-btn svg polyline,
.ivm-card:hover .ivm-link-btn svg line { stroke: #fff; }
.ivm-link-btn.ivm-loading { opacity: .6; cursor: wait; pointer-events: none; }
