
/* ===== RESET ANTI-CSS-ANTIGUO + MÓVIL FULL WIDTH ===== */
html { width:100% !important; max-width:100% !important; overflow-x:hidden !important; }
body.irph-nuevo {
  width:100% !important; max-width:100% !important; overflow-x:hidden !important;
  margin:0 !important; padding:0 !important;
  box-sizing:border-box !important;
}
body.irph-nuevo *, body.irph-nuevo *::before, body.irph-nuevo *::after { box-sizing:border-box; }
body.irph-nuevo .irph-wrap {
  width:100% !important; max-width:none !important;
  margin:0 !important; padding-left:10px !important; padding-right:10px !important;
}
body.irph-nuevo .irph-topbar,
body.irph-nuevo .irph-topbar .irph-wrap {
  width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important;
}
body.irph-nuevo img.imagenrotulo {
  width:100% !important; max-width:none !important; height:auto !important;
  display:block !important; margin:0 !important; border:0 !important;
}
/* Menú horizontal: anular ul/li del CSS viejo */
body.irph-nuevo .irph-nav,
body.irph-nuevo .irph-secondary {
  width:100% !important; max-width:none !important;
}
body.irph-nuevo .irph-nav ul,
body.irph-nuevo .irph-secondary ul {
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  align-items:center !important;
  list-style:none !important;
  margin:0 !important;
  padding:6px 4px !important;
  width:100% !important;
  float:none !important;
}
body.irph-nuevo .irph-nav li,
body.irph-nuevo .irph-secondary li {
  display:inline-flex !important;
  float:none !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  background:none !important;
}
body.irph-nuevo .irph-nav a,
body.irph-nuevo .irph-secondary a {
  display:inline-flex !important;
  float:none !important;
  width:auto !important;
  white-space:nowrap !important;
}
body.irph-nuevo .irph-secondary {
  background: #9a0000 !important;
}
body.irph-nuevo .irph-secondary a {
  color: #ffffff !important;
}
body.irph-nuevo .irph-secondary a i {
  color: #ffffff !important;
}
body.irph-nuevo .irph-secondary a:hover {
  background: rgba(0,0,0,0.2) !important;
  color: #ffffff !important;
}
body.irph-nuevo .irph-main,
body.irph-nuevo .irph-footer {
  width:100% !important; max-width:none !important;
}
@media (max-width: 700px) {
  body.irph-nuevo .irph-wrap { padding-left:8px !important; padding-right:8px !important; }
  body.irph-nuevo .irph-login { max-width:none !important; width:100% !important; }
}
/* FULLWIDTH-FORCE */
html, body.irph-nuevo { width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; }
.irph-nuevo .irph-wrap { width:100% !important; max-width:none !important; margin:0 !important; }
.irph-nuevo img.imagenrotulo { width:100% !important; max-width:none !important; height:auto !important; display:block !important; }
/* =========================================================
   IRPH.es – Estilos limpios (CSS 100% aislado)
   Paleta clásica roja + rótulo histórico respetados
   Archivo: irph-nuevo.css
   ========================================================= */

:root {
  --irph-red: #c90000;
  --irph-dark: #a90000;
  --irph-darker: #8f0000;
  --irph-soft: #fff5f5;
  --irph-soft2: #fffafa;
  --irph-text: #222222;
  --irph-muted: #666666;
  --irph-border: #e8e8e8;
  --irph-shadow: 0 2px 12px rgba(0,0,0,0.06);
  --irph-radius: 10px;
}

/* Reset mínimo solo dentro de esta página */
.irph-nuevo *,
.irph-nuevo *::before,
.irph-nuevo *::after {
  box-sizing: border-box;
}

html, body.irph-nuevo {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body.irph-nuevo {
  background: #ffffff;
  color: var(--irph-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* Contenedor principal - ANCHO COMPLETO */
.irph-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
}

/* ========== RÓTULO HISTÓRICO (ancho completo, sin márgenes) ========== */
.irph-topbar {
  background: #ffffff;
  padding: 0;
  line-height: 0;
  width: 100%;
  overflow: hidden;
}
.irph-topbar .irph-wrap {
  width: 100% !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}
.irph-topbar img.imagenrotulo {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
  border: 0;
  object-fit: cover;
}

/* ========== CABECERA (marca + login) ========== */
.irph-head {
  padding: 18px 0 16px;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}
.irph-head-grid {
  display: grid !important;
  grid-template-columns: minmax(180px, 0.9fr) minmax(320px, 1.4fr) minmax(220px, 0.85fr);
  gap: 14px 16px;
  align-items: center;
}
.irph-brand h1 {
  margin: 0;
  color: var(--irph-red);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.irph-brand h2 {
  margin: 4px 0 0;
  color: #a40000;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}
.irph-date {
  margin-top: 10px;
  color: #b00000;
  font-weight: 700;
  font-size: 13.5px;
}

/* Login moderno */
.irph-login {
  min-width: 300px;
  max-width: 340px;
}
.irph-login-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--irph-red);
  display: flex;
  align-items: center;
  gap: 6px;
}
.irph-login-title i {
  font-size: 14px;
}
.irph-login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.irph-input-wrap {
  position: relative;
}
.irph-input-wrap i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--irph-red);
  font-size: 13px;
  pointer-events: none;
}
.irph-input-wrap input[type="text"],
.irph-input-wrap input[type="password"] {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.irph-input-wrap input:focus {
  border-color: var(--irph-red);
  box-shadow: 0 0 0 3px rgba(201,0,0,0.08);
}
.irph-login-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.irph-login-actions label {
  font-size: 12.5px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}
.irph-btn-login {
  background: var(--irph-red);
  color: #fff;
  border: 1px solid var(--irph-red);
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.irph-btn-login:hover {
  background: var(--irph-dark);
  border-color: var(--irph-dark);
}
.irph-login-links {
  margin-top: 8px;
  font-size: 13px;
}
.irph-login-links a {
  color: var(--irph-red);
  text-decoration: none;
  font-weight: 600;
}
.irph-login-links a:hover {
  text-decoration: underline;
}
.irph-login-links .small {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 500;
}

/* ========== NAV PRINCIPAL ========== */
.irph-nav {
  background: linear-gradient(180deg, #d60000 0%, #b60000 100%);
  color: #fff;
  width: 100%;
}
.irph-nav .irph-wrap {
  padding-left: 0;
  padding-right: 0;
}
.irph-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.irph-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  transition: background 0.2s;
}
.irph-nav a:hover {
  background: rgba(0,0,0,0.18);
}
.irph-nav a i {
  font-size: 13px;
  opacity: 0.95;
}

/* ========== TICKER ========== */
.irph-ticker {
  border-bottom: 1px solid #eee;
  text-align: center;
  padding: 12px 12px;
  font-weight: 700;
  color: #b00000;
  background: #fff;
  font-size: 14.5px;
}
.irph-ticker span {
  color: var(--irph-red);
}

/* ========== NAV SECUNDARIA ========== */
.irph-secondary {
  background: #b90000;
  color: #fff;
  width: 100%;
}
.irph-secondary .irph-wrap {
  padding-left: 0;
  padding-right: 0;
}
.irph-secondary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.irph-secondary a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff !important;
  text-decoration: none;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  transition: background 0.2s;
}
.irph-secondary a * {
  color: #ffffff !important;
}
.irph-secondary a:hover {
  background: rgba(0,0,0,0.15);
}

/* ========== MAIN ========== */
.irph-main {
  padding: 28px 0 50px;
  background: #fafafa;
}
.irph-section-title {
  color: #b40000;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.3px;
}

/* Cards */
.irph-card {
  border: 1px solid var(--irph-border);
  border-radius: var(--irph-radius);
  background: #fff;
  box-shadow: var(--irph-shadow);
  padding: 22px;
}
.irph-card h3 {
  margin: 0 0 12px;
  font-size: 15.5px;
  font-weight: 700;
  color: #333;
}

/* Fila superior: valor actual | IRPH | Euríbor */
.irph-hero-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 1.2fr;
  gap: 14px;
  margin-bottom: 18px;
}

/* Gráfico dual a ancho completo */
.irph-dual-wide {
  margin-bottom: 36px;
}
.irph-dual-wide .irph-card h3 {
  font-size: 15px;
}
.irph-current {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.irph-current .label {
  font-weight: 700;
  font-size: 13.5px;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.irph-current .value {
  font-size: 46px;
  line-height: 1.05;
  color: var(--irph-red);
  font-weight: 800;
  margin: 18px 0 8px;
}
.irph-current .change {
  font-weight: 700;
  color: #333;
  font-size: 14px;
}
.irph-current .source {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--irph-muted);
}

/* Botones */
.irph-button {
  display: inline-block;
  margin-top: 16px;
  border-radius: 7px;
  border: 1px solid #e00000;
  background: var(--irph-red);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 18px;
  font-size: 13.5px;
  transition: background 0.2s, transform 0.15s;
}
.irph-button:hover {
  background: var(--irph-dark);
  border-color: var(--irph-dark);
}
.irph-button-outline {
  background: #fff;
  color: #c00000 !important;
  border: 1px solid #e0a0a0;
}
.irph-button-outline:hover {
  background: var(--irph-soft);
  border-color: var(--irph-red);
}

/* Graph placeholder */
.irph-graph-box {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--irph-soft2);
  border: 1px dashed #e1b0b0;
  border-radius: 8px;
  color: #777;
  padding: 20px;
  font-size: 14px;
  margin: 8px 0 14px;
}
.irph-graph-box strong {
  color: #b40000;
}

/* News list */
.irph-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.irph-news-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 13.5px;
  line-height: 1.45;
}
.irph-news-list li:last-child {
  border-bottom: none;
}
.irph-news-list strong {
  color: #b40000;
  font-weight: 700;
}

/* ========== CALCULADORAS ========== */
.irph-tools {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.irph-tool {
  text-align: center;
  padding: 20px 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.irph-tool:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.irph-tool .icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: #fff0f0;
  color: #c40000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.irph-tool h3 {
  font-size: 14px;
  margin: 0 0 6px;
  color: #333;
}
.irph-tool p {
  font-size: 12.5px;
  color: var(--irph-muted);
  margin: 0 0 12px;
  line-height: 1.4;
  min-height: 36px;
}
.irph-tools-more {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 36px;
}

/* ========== FORO + CTA ========== */
.irph-forum-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
.irph-comment {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.irph-comment:last-child {
  border-bottom: none;
}
.irph-comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.irph-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.irph-comment-body {
  flex: 1;
  min-width: 0;
}
.irph-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12.5px;
}
.irph-comment-meta .author {
  font-weight: 700;
  color: #b40000;
}
.irph-comment-meta .date {
  color: var(--irph-muted);
}
.irph-comment-meta .votes {
  display: flex;
  gap: 8px;
  margin-left: auto;
  font-size: 12px;
}
.irph-comment-meta .votes span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.irph-comment-content {
  font-size: 13.5px;
  color: #333;
  line-height: 1.45;
}
.irph-comment-content a {
  color: var(--irph-red);
  font-weight: 600;
  text-decoration: none;
  font-size: 12.5px;
}
.irph-comment-content a:hover {
  text-decoration: underline;
}

/* CTA */
.irph-cta {
  background: #fff;
  border: 1px solid #eee;
  border-radius: var(--irph-radius);
  box-shadow: var(--irph-shadow);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.irph-cta h3 {
  margin: 0;
  padding: 14px 16px;
  text-align: center;
  background: var(--irph-red);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.irph-cta .inside {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.irph-cta p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}
.irph-cta ul {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
}
.irph-cta li {
  margin: 8px 0;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.irph-cta li::before {
  content: "✓";
  color: #1a9e4a;
  font-weight: 800;
  flex-shrink: 0;
}
.irph-cta .irph-button {
  margin-top: auto;
  text-align: center;
  width: 100%;
}

/* ========== ARTÍCULOS ========== */
.irph-articles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 10px;
}
.irph-article {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.irph-article:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.irph-article-img {
  height: 120px;
  background: linear-gradient(135deg, #f0d0d0, #e8b0b0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a00000;
  font-size: 28px;
}
.irph-article-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.irph-article-body h3 {
  font-size: 14px;
  margin: 0 0 8px;
  line-height: 1.35;
  color: #222;
}
.irph-article-body p {
  font-size: 12.5px;
  color: var(--irph-muted);
  margin: 0 0 12px;
  flex: 1;
}
.irph-article-body a {
  font-size: 13px;
  font-weight: 700;
  color: var(--irph-red);
  text-decoration: none;
}
.irph-article-body a:hover {
  text-decoration: underline;
}

/* ========== FOOTER ========== */
.irph-footer {
  background: #a90000;
  color: #fff;
  padding: 40px 0 30px;
}
.irph-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}
.irph-footer h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.irph-footer p,
.irph-footer a {
  color: rgba(255,255,255,0.92);
  font-size: 13.5px;
  line-height: 1.6;
  text-decoration: none;
}
.irph-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.irph-footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.2);
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 980px) {
  .irph-hero-grid {
    grid-template-columns: 1fr;
  }
  .irph-tools {
    grid-template-columns: repeat(3, 1fr);
  }
  .irph-articles {
    grid-template-columns: repeat(2, 1fr);
  }
  .irph-forum-grid {
    grid-template-columns: 1fr;
  }
  .irph-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  /* Cabecera compacta */
  .irph-head {
    padding: 10px 0 8px !important;
  }
  .irph-head-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .irph-brand h1 {
    font-size: 26px !important;
    margin: 0 0 2px !important;
    letter-spacing: -0.5px;
  }
  .irph-brand h2 {
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 0 4px !important;
    font-weight: 600 !important;
    color: #666 !important;
  }
  .irph-date {
    font-size: 12px !important;
    color: #999 !important;
    margin: 0 !important;
  }

  /* Login compacto en una tarjeta */
  .irph-login {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 10px 12px !important;
    background: #fafafa !important;
    border: 1px solid #eee !important;
    border-radius: 10px !important;
  }
  .irph-login-title {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }
  .irph-input-wrap input {
    font-size: 15px !important;
    padding: 10px 10px 10px 36px !important;
  }
  .irph-login-links {
    font-size: 12px !important;
  }

  /* MENÚ: una sola fila horizontal con scroll (no apilar) */
  body.irph-nuevo .irph-nav {
    position: sticky;
    top: 0;
    z-index: 50;
  }
  body.irph-nuevo .irph-nav ul,
  body.irph-nuevo .irph-secondary ul {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px !important;
    padding: 4px 8px !important;
  }
  body.irph-nuevo .irph-nav ul::-webkit-scrollbar,
  body.irph-nuevo .irph-secondary ul::-webkit-scrollbar {
    display: none;
  }
  body.irph-nuevo .irph-nav li,
  body.irph-nuevo .irph-secondary li {
    flex: 0 0 auto !important;
  }
  body.irph-nuevo .irph-nav a,
  body.irph-nuevo .irph-secondary a {
    padding: 8px 12px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }
  body.irph-nuevo .irph-nav a i {
    font-size: 12px !important;
  }

  .irph-secondary {
    padding: 2px 0 !important;
  }
  .irph-secondary a {
    font-size: 12px !important;
    color: #a00000 !important;
  }

  .irph-tools {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .irph-articles {
    grid-template-columns: 1fr;
  }
  .irph-footer-grid {
    grid-template-columns: 1fr;
  }
  .irph-current .value {
    font-size: 34px !important;
  }
  .irph-ticker {
    font-size: 12px !important;
    padding: 6px 8px !important;
  }
  .irph-section-title {
    font-size: 16px !important;
    margin: 16px 0 10px !important;
  }
  .irph-card {
    padding: 12px !important;
    border-radius: 10px !important;
  }
  .irph-card h3 {
    font-size: 14px !important;
  }
}


/* Evitar desborde de las 3 cajas superiores y gráficos en móvil */
body.irph-nuevo .irph-hero-grid {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  gap: 10px !important;
}
body.irph-nuevo .irph-hero-grid > * {
  min-width: 0 !important;
  max-width: 100% !important;
}
body.irph-nuevo .irph-card {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
body.irph-nuevo .irph-card canvas {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
}
body.irph-nuevo .irph-dual-wide,
body.irph-nuevo .irph-dual-wide .irph-card {
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
}
@media (max-width: 700px) {
  body.irph-nuevo .irph-hero-grid {
    grid-template-columns: 1fr !important;
    justify-items: stretch !important;
  }
  body.irph-nuevo .irph-hero-grid .irph-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* ===== FOTO BIENVENIDA (hueco marca–login) ===== */
.irph-head-grid {
  display: grid !important;
  grid-template-columns: minmax(200px, 1.1fr) minmax(180px, 0.9fr) minmax(240px, 280px);
  gap: 14px 16px;
  align-items: center;
}
.irph-welcome {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  background: #f5f0eb;
}
.irph-welcome img,
.irph-welcome picture,
.irph-welcome picture img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  aspect-ratio: 2.4 / 1;
  object-fit: cover;
  object-position: center 22%;
}
@media (max-width: 980px) {
  .irph-head-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .irph-welcome {
    grid-column: 1 / -1;
    max-height: 220px;
  }
  .irph-welcome img {
    aspect-ratio: 16 / 9;
    max-height: 220px;
  }
}
@media (max-width: 640px) {
  .irph-head-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .irph-welcome {
    grid-column: auto;
    order: 2;
    max-height: 180px;
    border-radius: 10px;
  }
  .irph-brand { order: 1; }
  .irph-login { order: 3; }
  .irph-welcome img {
    aspect-ratio: 4 / 3;
    max-height: 180px;
    object-position: center 15%;
  }
}

/* Rótulo móvil: más alto y legible (versión B) */
@media (max-width: 700px) {
  body.irph-nuevo .irph-topbar,
  body.irph-nuevo .irph-topbar .irph-wrap,
  body.irph-nuevo .irph-topbar picture {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  body.irph-nuevo .irph-topbar {
    background: transparent !important;
    padding: 0 !important;
  }
  body.irph-nuevo img.imagenrotulo {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}


/* ===== MÓVIL: orden fecha → IRPH actual → foto → login ===== */
.irph-mobile-current { display: none; }

@media (max-width: 640px) {
  .irph-head-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .irph-brand { order: 1 !important; }
  .irph-mobile-current {
    display: block !important;
    order: 2 !important;
    background: #fff;
    border: 1px solid #f0c0c0;
    border-radius: 10px;
    padding: 12px 14px;
    text-align: center;
  }
  .irph-mobile-current .m-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .irph-mobile-current .m-value {
    font-size: 28px;
    font-weight: 800;
    color: #c90000;
    line-height: 1.15;
    margin: 4px 0;
  }
  .irph-mobile-current .m-change {
    font-size: 12px;
    color: #666;
  }
  .irph-mobile-current .m-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #c90000;
    text-decoration: none;
  }
  .irph-welcome {
    order: 3 !important;
    max-height: 200px !important;
  }
  .irph-welcome img {
    max-height: 200px !important;
    aspect-ratio: 16 / 10 !important;
    object-position: center 20% !important;
  }
  .irph-login { order: 4 !important; }

  /* En móvil ocultar la caja IRPH actual del hero (ya está arriba) */
  .irph-hero-grid > .irph-current {
    display: none !important;
  }
  .irph-hero-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Foto cabecera: no dominar en escritorio */
@media (min-width: 981px) {
  .irph-head-grid {
    grid-template-columns: minmax(200px, 0.9fr) minmax(380px, 1.5fr) minmax(240px, 0.85fr) !important;
    align-items: center !important;
  }
  .irph-welcome {
    max-width: 100% !important;
  }
  .irph-welcome img,
  .irph-welcome picture img {
    max-height: 190px !important;
    aspect-ratio: 2.4 / 1 !important;
    object-fit: cover !important;
    object-position: center 18% !important;
  }
  .irph-brand h1 { font-size: 30px !important; }
  .irph-login { min-width: 240px; }
}
@media (min-width: 1200px) {
  .irph-welcome img,
  .irph-welcome picture img {
    max-height: 210px !important;
  }
}
@media (max-width: 1100px) and (min-width: 981px) {
  .irph-welcome img,
  .irph-welcome picture img {
    max-height: 160px !important;
  }
}
@media (max-width: 980px) and (min-width: 641px) {
  .irph-welcome {
    max-width: 280px !important;
    max-height: 140px;
  }
  .irph-welcome img { max-height: 140px !important; }
}

/* dual chart: espacio para etiquetas de años en móvil */
@media (max-width: 700px) {
  .irph-dual-wide .irph-card {
    min-height: 280px;
  }
  .irph-dual-wide canvas {
    min-height: 240px !important;
  }
}


/* ===== FOTO CHICA: desktop grande/alargada y responsive; móvil con piernas ===== */
.irph-welcome {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  line-height: 0 !important;
}
.irph-welcome img,
.irph-welcome picture img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
}

/* Escritorio ancho: foto grande y alargada */
@media (min-width: 1200px) {
  .irph-head-grid {
    grid-template-columns: minmax(200px, 0.85fr) minmax(420px, 1.6fr) minmax(240px, 0.85fr) !important;
  }
  .irph-welcome img,
  .irph-welcome picture img {
    max-height: 210px !important;
    aspect-ratio: 2.5 / 1 !important;
    object-position: center 18% !important;
  }
}

/* Escritorio medio: se reduce */
@media (min-width: 981px) and (max-width: 1199px) {
  .irph-head-grid {
    grid-template-columns: minmax(180px, 0.9fr) minmax(300px, 1.3fr) minmax(220px, 0.9fr) !important;
  }
  .irph-welcome img,
  .irph-welcome picture img {
    max-height: 160px !important;
    aspect-ratio: 2.3 / 1 !important;
    object-position: center 18% !important;
  }
}

/* Tablet: más pequeña */
@media (min-width: 641px) and (max-width: 980px) {
  .irph-welcome {
    grid-column: 1 / -1;
    max-width: 480px !important;
    margin: 0 auto !important;
  }
  .irph-welcome img,
  .irph-welcome picture img {
    max-height: 150px !important;
    aspect-ratio: 2.2 / 1 !important;
    object-position: center 20% !important;
  }
}

/* Móvil: como antes, más alta, se ven las piernas */
@media (max-width: 640px) {
  .irph-welcome {
    order: 3 !important;
    max-width: 100% !important;
    max-height: none !important;
  }
  .irph-welcome img,
  .irph-welcome picture img {
    max-height: 280px !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    object-position: center 28% !important;
  }
}


/* Columna marca: arriba + texto SEO */
.irph-brand {
  align-self: start !important;
  padding-top: 4px;
}
.irph-brand h1 {
  margin: 0 0 4px !important;
  line-height: 1.1 !important;
}
.irph-brand h2 {
  margin: 0 0 8px !important;
}
.irph-seo {
  margin: 0 0 12px !important;
  font-size: 15px;
  line-height: 1.5;
  color: #444;
  max-width: 340px;
}
@media (min-width: 981px) {
  .irph-seo {
    font-size: 15.5px !important;
    line-height: 1.55 !important;
  }
}
.irph-seo strong {
  color: #c90000;
}
.irph-date {
  margin-top: 2px !important;
}
@media (max-width: 640px) {
  .irph-seo {
    font-size: 13px;
    max-width: none;
  }
  /* Móvil: foto completa con piernas (igual que el archivo) */
  .irph-welcome img,
  .irph-welcome picture img {
    max-height: 260px !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    object-position: center 25% !important;
  }
}
@media (min-width: 981px) {
  .irph-head-grid {
    align-items: start !important;
  }
  .irph-login {
    align-self: start !important;
    padding-top: 4px;
  }
  .irph-welcome {
    align-self: center !important;
  }
}


/* Rótulo siempre visible (móvil y escritorio) */
body.irph-nuevo .irph-topbar,
body.irph-nuevo .irph-topbar .irph-wrap,
body.irph-nuevo .irph-topbar picture {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}
body.irph-nuevo img.imagenrotulo {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  min-height: 48px !important;
  object-fit: contain !important;
  visibility: visible !important;
  opacity: 1 !important;
}
@media (max-width: 700px) {
  body.irph-nuevo img.imagenrotulo {
    min-height: 56px !important;
    max-height: none !important;
  }
}


/* ===== TABLET: cabecera equilibrada ===== */
@media (min-width: 641px) and (max-width: 980px) {
  .irph-head {
    padding: 14px 0 12px !important;
  }
  .irph-head-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px 18px !important;
    align-items: start !important;
  }
  .irph-brand {
    grid-column: 1;
    grid-row: 1;
    order: unset !important;
  }
  .irph-login {
    grid-column: 2;
    grid-row: 1;
    order: unset !important;
    width: 100% !important;
    max-width: none !important;
  }
  .irph-welcome {
    grid-column: 1 / -1 !important;
    grid-row: 2;
    order: unset !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .irph-welcome img,
  .irph-welcome picture img {
    width: 100% !important;
    max-height: 200px !important;
    aspect-ratio: 2.2 / 1 !important;
    object-fit: cover !important;
    object-position: center 20% !important;
  }
  .irph-mobile-current {
    display: none !important;
  }
  .irph-seo {
    font-size: 14.5px !important;
    max-width: none !important;
  }
}
