.remi-home-widget {
  --remi-widget-ink: #101722;
  --remi-widget-muted: #697484;
  --remi-widget-gold: #b99449;
  container-type: inline-size;
  width: 100%;
  box-sizing: border-box;
  margin: 28px 0;
  padding: clamp(22px, 3.5vw, 38px);
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-top: 4px solid var(--remi-widget-gold);
  border-radius: 18px;
  color: var(--remi-widget-ink);
  background: #fff;
  box-shadow: 0 10px 30px rgba(18, 25, 38, .07);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.remi-home-widget *,
.remi-home-widget *::before,
.remi-home-widget *::after {
  box-sizing: border-box;
}

.remi-home-widget-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--remi-widget-ink);
}

.remi-home-widget-header > div > span {
  display: block;
  margin-bottom: 7px;
  color: var(--remi-widget-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.remi-home-widget-header h2 {
  margin: 0;
  color: var(--remi-widget-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(29px, 4.5cqi, 46px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.remi-home-widget-header p {
  margin: 9px 0 0;
  color: var(--remi-widget-muted);
  font-size: 13px;
  line-height: 1.5;
}

.remi-home-widget-header > a {
  flex: 0 0 auto;
  padding: 10px 15px;
  border: 1px solid #cfd5dc;
  border-radius: 999px;
  color: var(--remi-widget-ink);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.remi-home-widget-header > a:hover,
.remi-home-widget-header > a:focus-visible {
  border-color: var(--remi-widget-gold);
  color: #7d5b1e;
}

.remi-home-widget-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.remi-home-widget-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e0e4e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(18, 25, 38, .05);
}

.remi-home-widget-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  color: #d7bd7c;
  background: linear-gradient(135deg, #08131f, #1b2b3b);
  text-decoration: none;
}

.remi-home-widget-media img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform .25s ease;
}

.remi-home-widget-card:hover .remi-home-widget-media img {
  transform: scale(1.025);
}

.remi-home-widget-media > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  text-align: center;
}

.remi-home-widget-body {
  padding: 15px;
}

.remi-home-widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 20px;
}

.remi-home-widget-tags span {
  padding: 4px 7px;
  border-radius: 3px;
  color: #795a1e;
  background: #f1ead9;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.remi-home-widget-tags span:nth-child(2) {
  color: #556171;
  background: #edf0f3;
}

.remi-home-widget-card h3 {
  margin: 11px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2.1cqi, 23px);
  font-weight: 700;
  line-height: 1.15;
  hyphens: none;
  overflow-wrap: break-word;
  word-break: normal;
}

.remi-home-widget-card h3 a {
  color: var(--remi-widget-ink);
  text-decoration: none;
}

.remi-home-widget-card h3 a:hover,
.remi-home-widget-card h3 a:focus-visible {
  color: #8f262d;
}

.remi-home-widget-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid #eceff2;
  color: var(--remi-widget-muted);
  font-size: 9px;
}

.remi-home-widget-meta span,
.remi-home-widget-meta time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remi-home-widget-empty {
  margin: 0;
  padding: 30px;
  color: var(--remi-widget-muted);
  text-align: center;
}

@container (max-width: 860px) {
  .remi-home-widget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 520px) {
  .remi-home-widget-header { align-items: flex-start; flex-direction: column; }
  .remi-home-widget-grid { grid-template-columns: 1fr; }
  .remi-home-widget-card { display: block; width: 100%; }
  .remi-home-widget-media { width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .remi-home-widget-body { width: 100%; padding: 14px; }
  .remi-home-widget-card h3 { font-size: 19px; line-height: 1.2; }
  .remi-home-widget-meta { align-items: center; }
}

@container (max-width: 340px) {
  .remi-home-widget-header h2 {
    font-size: 30px !important;
    line-height: 1.02 !important;
    letter-spacing: -.025em;
  }
  .remi-home-widget-header > a {
    display: flex;
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .remi-home-widget-card h3 { font-size: 18px; }
  .remi-home-widget-meta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
  .widget_remi_monitor,
  .widget_remi_monitor.sidebar-box {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .ep-home-middle:has(.widget_remi_monitor) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .remi-home-widget {
    width: 100% !important;
    min-width: 0;
    margin: 20px 0 !important;
    padding: 20px !important;
    border-radius: 14px;
  }

  body.home .ep-home-middle .widget_remi_monitor > .remi-home-widget {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
    box-sizing: border-box !important;
  }

  .remi-home-widget-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
  }

  .remi-home-widget-header h2 {
    max-width: 100%;
    font-size: clamp(30px, 9vw, 38px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.025em;
    hyphens: none !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .remi-home-widget-header p {
    font-size: 14px;
  }

  .remi-home-widget-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .remi-home-widget-card {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .remi-home-widget-media {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .remi-home-widget-body {
    width: 100%;
    padding: 14px;
  }

  .remi-home-widget-card h3,
  .remi-home-widget-card h3 a {
    max-width: 100%;
    font-size: 19px;
    line-height: 1.2;
    hyphens: none !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
}

@media (max-width: 380px) {
  .remi-home-widget { padding: 16px !important; }
  .remi-home-widget-header h2 { font-size: 30px !important; }
  .remi-home-widget-header > a {
    display: flex;
    width: 100%;
    justify-content: center;
  }
  .remi-home-widget-card h3,
  .remi-home-widget-card h3 a { font-size: 18px; }
}
