/* GR Updates v1.5.3 — overflow fix + stability */
.gru-wrap{
  --gru-bg:#0b0f17; --gru-bg2:#111827; --gru-bg-img:none;
  --gru-text:#e6eefc; --gru-accent:#00e0ff; --gru-heading:#7cff6b;
  --gru-heading-size:26px; --gru-content:17px; --gru-meta:12px; --gru-thumb:64px;
  --gru-item1:#0e1522; --gru-item2:#0b1220;
  --gru-wrap-pad-top:8px; --gru-wrap-pad-x:14px; --gru-wrap-pad-bottom:14px;
  color:var(--gru-text);
  border:1px solid #1a2333; border-radius:14px;
  padding: var(--gru-wrap-pad-top) var(--gru-wrap-pad-x) var(--gru-wrap-pad-bottom);
  background-color: var(--gru-bg);
  background-image: var(--gru-bg-img), linear-gradient(135deg, var(--gru-bg), var(--gru-bg2));
  background-size: cover, auto; background-position:center, center;
  position:relative;
  overflow:hidden;         /* keep children inside */
  contain: layout paint;   /* isolate for layout stability */
}
/* universal safety within widget */
.gru-wrap, .gru-wrap *{ box-sizing:border-box; }

.gru-heading{display:flex;align-items:center;gap:10px;margin:4px 0 12px;padding-bottom:8px;border-bottom:1px solid #1f2a44}
.gru-heading-text{font-size:var(--gru-heading-size);margin:0;color:var(--gru-heading)}

.gru-updates{display:grid;gap:12px;align-items:start; grid-auto-rows:minmax(min-content, auto);}
.gru-updates.gru-grid2{grid-template-columns:repeat(2,minmax(0,1fr))}
.gru-updates.gru-grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:900px){ .gru-updates.gru-grid3{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:640px){ .gru-updates.gru-grid2,.gru-updates.gru-grid3{grid-template-columns:1fr;} }

.gru-item{
  display:grid;grid-template-columns:auto 1fr;gap:12px;
  border:1px solid #1c2740;border-radius:12px;padding:10px 12px;
  background:linear-gradient(135deg,var(--gru-item1),var(--gru-item2));
  box-shadow:0 8px 18px rgba(0,0,0,.18);
  overflow:hidden;         /* prevent inner overflow */
  max-width:100%;
}
.gru-media{min-width:0;}
.gru-body{min-width:0;}    /* allow text to shrink inside grid */
.gru-thumb{width:var(--gru-thumb);height:var(--gru-thumb);object-fit:cover;border-radius:8px;box-shadow:0 0 0 1px rgba(124,255,107,.15);max-width:100%}
.gru-content{ color: var(--gru-text-item, var(--gru-text));
  font-size:var(--gru-content); line-height:1.6;
  word-break:break-word; overflow-wrap:anywhere; white-space:normal;
}
.gru-content p{margin:.35rem 0}
.gru-meta{ color: var(--gru-text-item, var(--gru-text));font-size:var(--gru-meta);opacity:.85;display:flex;gap:8px;margin:.45rem 0 0;flex-wrap:wrap}
.gru-link{display:inline-block;margin-top:.35rem;text-decoration:none;color:var(--gru-accent);font-weight:700}

/* Ticker */
.gru-ticker{overflow:hidden;border:1px solid #1c2740;border-radius:12px;background:linear-gradient(135deg,var(--gru-item1),var(--gru-item2))}
.gru-ticker-track{display:flex;gap:28px;white-space:nowrap;animation:gru-marquee var(--gru-ticker-speed) linear infinite;padding:10px;min-width:100%}
.gru-tick{display:inline-flex;gap:8px;align-items:center;min-width:0}
.gru-tick-title{min-width:0;word-break:break-word;overflow-wrap:anywhere}
@keyframes gru-marquee{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}

/* Images & iframes safety */
.gru-wrap img, .gru-wrap video, .gru-wrap iframe{max-width:100%;height:auto;border:0}

/* RTL */
html[dir="rtl"] .gru-heading-text, html[dir="rtl"] .gru-content, html[dir="rtl"] .gru-meta{ color: var(--gru-text-item, var(--gru-text)); text-align:right }
