/**
 * PowerEn Phase 07 — homepage feed and promotional sidebar.
 * Every visual rule is scoped to one reversible body class.
 */

body.poweren-modern-home-content {
  --pw-feed-ink: #10263f;
  --pw-feed-muted: #617286;
  --pw-feed-line: #dfeaf1;
  --pw-feed-soft: #f4f8fb;
  --pw-feed-accent: #00a8e8;
  --pw-feed-accent-dark: #007fac;
}

body.poweren-modern-home-content .pw-home-feed,
body.poweren-modern-home-content .pw-home-sidebar {
  direction: rtl;
  text-align: right;
}

body.poweren-modern-home-content .pw-home-feed {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  clear: both;
  margin: 34px 0 20px;
  overflow: visible;
  padding: 0;
}

body.poweren-modern-home-content .pw-home-feed > .titleall {
  align-items: stretch;
  background: linear-gradient(135deg, #fff 0%, #f3f9fc 100%);
  border: 1px solid var(--pw-feed-line);
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(16, 38, 63, .055);
  display: flex;
  direction: rtl;
  flex-direction: column;
  float: none;
  gap: 5px;
  margin: 0 10px 22px;
  overflow: hidden;
  padding: 18px 24px 18px 28px;
  position: relative;
  text-align: right;
  width: calc(100% - 20px);
}

body.poweren-modern-home-content .pw-home-feed > .titleall::after,
body.poweren-modern-home-content .pw-home-feed > .titleall::before,
body.poweren-modern-home-content .pw-home-feed > .titleall h2::after,
body.poweren-modern-home-content .pw-home-feed > .titleall h2::before {
  display: none;
}

body.poweren-modern-home-content .pw-home-feed > .titleall::before {
  background: linear-gradient(180deg, var(--pw-feed-accent) 0%, var(--pw-feed-accent-dark) 100%);
  border-radius: 4px 0 0 4px;
  bottom: 14px;
  content: "";
  display: block;
  position: absolute;
  right: 0;
  top: 14px;
  width: 4px;
}

body.poweren-modern-home-content .pw-home-feed > .titleall::after {
  background-image: radial-gradient(circle, rgba(0, 168, 232, .55) 0 2px, transparent 2.5px);
  background-size: 13px 13px;
  content: "";
  display: block;
  height: 58px;
  left: 22px;
  opacity: .24;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 84px;
}

body.poweren-modern-home-content .pw-home-feed__eyebrow {
  align-items: center;
  align-self: flex-start;
  background: rgba(0, 168, 232, .09);
  border: 1px solid rgba(0, 127, 172, .13);
  border-radius: 999px;
  color: var(--pw-feed-accent-dark);
  direction: rtl;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.1px;
  line-height: 1.7;
  padding: 3px 10px;
  text-align: right;
  width: max-content;
  z-index: 1;
}

body.poweren-modern-home-content .pw-home-feed__eyebrow::before {
  background: var(--pw-feed-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0, 168, 232, .1);
  content: "";
  height: 6px;
  margin-left: 7px;
  width: 6px;
}

body.poweren-modern-home-content .pw-home-feed > .titleall h2 {
  color: var(--pw-feed-ink);
  direction: rtl;
  font-size: clamp(25px, 2.4vw, 34px);
  font-weight: 900;
  line-height: 1.55;
  margin: 0;
  text-align: right;
  width: 100%;
  z-index: 1;
}

body.poweren-modern-home-content .pw-home-feed__grid {
  clear: both;
  display: grid;
  float: none;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 10px;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-feed__grid > .show-posts {
  float: none;
  height: auto;
  margin: 0;
  min-width: 0;
  overflow: visible;
  padding: 0;
  width: auto;
}

body.poweren-modern-home-content .pw-home-post-card .wapper-show-post {
  background: #fff;
  border: 1px solid var(--pw-feed-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(16, 38, 63, .055);
  display: flex;
  flex-direction: column;
  float: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  transform: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  width: 100%;
  z-index: 1;
}

body.poweren-modern-home-content .pw-home-post-card .thumb {
  aspect-ratio: 16 / 9;
  background: #eaf1f5;
  float: none;
  height: auto;
  overflow: hidden;
  position: relative;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-post-card .thumb > a {
  display: block;
  height: 100%;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-post-card .thumb img,
body.poweren-modern-home-content .pw-home-post-card .thumb .pw-home-post-card__image,
body.poweren-modern-home-content .pw-home-post-card .thumb .post-thumb {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.001);
  transition: transform .35s ease;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-post-card .thumb .view_count {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(10, 32, 52, .78);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  bottom: 12px;
  color: #fff;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  height: auto;
  inset-inline-start: auto;
  inset-inline-end: 12px;
  line-height: 1.7;
  max-width: calc(100% - 24px);
  opacity: 1;
  overflow: hidden;
  padding: 5px 10px;
  position: absolute;
  right: 12px;
  text-overflow: ellipsis;
  top: auto;
  visibility: visible;
  white-space: nowrap;
  width: auto;
}

body.poweren-modern-home-content .pw-home-post-card .thumb .view_count::before {
  display: none;
}

body.poweren-modern-home-content .pw-home-post-card .metapad {
  display: flex;
  flex: 1;
  flex-direction: column;
  float: none;
  min-height: 220px;
  padding: 20px 20px 0;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-post-card .title {
  float: none;
  height: auto;
  min-height: 66px;
  overflow: visible;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-post-card a .title h2 {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--pw-feed-ink);
  display: -webkit-box;
  font-size: 17px;
  font-weight: 850;
  height: auto;
  line-height: 1.85;
  margin: 0;
  overflow: hidden;
  text-align: right;
  unicode-bidi: plaintext;
}

body.poweren-modern-home-content .pw-home-post-card .content_text {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--pw-feed-muted);
  display: -webkit-box;
  float: none;
  font-size: 13px;
  height: auto;
  line-height: 1.95;
  margin: 10px 0 17px;
  min-height: 76px;
  overflow: hidden;
  text-align: right;
  unicode-bidi: plaintext;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-post-card .content_text p {
  margin: 0;
}

body.poweren-modern-home-content .pw-home-post-card .readmore {
  align-items: center;
  border-top: 1px solid #edf2f5;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: auto;
  min-height: 52px;
  position: static;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-post-card .readmore > a {
  align-items: center;
  background: transparent;
  border-radius: 0;
  color: var(--pw-feed-accent-dark);
  display: inline-flex;
  float: none;
  font-size: 12px;
  font-weight: 850;
  gap: 6px;
  padding: 13px 0 13px 10px;
}

body.poweren-modern-home-content .pw-home-post-card .readmore > a::after {
  content: "←";
  font-size: 15px;
  line-height: 1;
}

body.poweren-modern-home-content .pw-home-post-card .pw-home-post-card__date {
  align-items: center;
  color: #788797 !important;
  display: inline-flex;
  float: none !important;
  font-size: 11px !important;
  gap: 5px;
  padding: 13px 10px 13px 0 !important;
}

body.poweren-modern-home-content .pw-home-post-card .pw-home-post-card__date::before {
  color: #9ba9b5;
  content: "\f073";
  font-family: Font Awesome;
  font-size: 11px;
}

body.poweren-modern-home-content .pw-home-feed__grid > .producter-more-category {
  grid-column: 1 / -1;
  margin: 8px 0 0;
}

body.poweren-modern-home-content .pw-home-feed__grid > .producter-more-category a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--pw-feed-line);
  border-radius: 12px;
  color: var(--pw-feed-ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  justify-content: center;
  margin: 0;
  min-height: 48px;
  padding: 10px 24px;
}

body.poweren-modern-home-content .pw-home-feed__grid > .producter-more-category a::after {
  color: var(--pw-feed-accent-dark);
  content: "←";
  font-size: 17px;
  margin-right: 9px;
}

body.poweren-modern-home-content .pw-home-sidebar {
  color: var(--pw-feed-ink);
}

body.poweren-modern-home-content .pw-home-sidebar .Iranwp-sidebar {
  border-radius: 0;
}

body.poweren-modern-home-content .pw-home-sidebar-promos {
  display: grid;
  gap: 14px;
}

body.poweren-modern-home-content .pw-home-sidebar-promos > * {
  background: #fff;
  border: 1px solid var(--pw-feed-line);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(16, 38, 63, .05);
  margin: 0 !important;
  overflow: hidden;
}

body.poweren-modern-home-content .pw-home-sidebar-promos > :nth-child(n + 4) {
  display: none !important;
}

body.poweren-modern-home-content .pw-home-sidebar-promos img {
  border-radius: 0;
  display: block;
  height: auto;
  margin: 0 !important;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-sidebar .fill-widget-tab {
  background: #fff;
  border: 1px solid var(--pw-feed-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(16, 38, 63, .055);
  margin-top: 18px;
  overflow: hidden;
}

body.poweren-modern-home-content .pw-home-sidebar .tab_menu {
  background: var(--pw-feed-soft);
  border-radius: 0;
  float: none;
}

body.poweren-modern-home-content .pw-home-sidebar .tab_menu::after,
body.poweren-modern-home-content .pw-home-sidebar .tab_menu::before {
  display: none;
}

body.poweren-modern-home-content .pw-home-sidebar .tab_menu ul.tabs-menu {
  border: 0;
  display: flex;
  float: none;
  margin: 0;
  padding: 7px;
}

body.poweren-modern-home-content .pw-home-sidebar .tab_menu ul.tabs-menu li {
  float: none;
  width: 50%;
}

body.poweren-modern-home-content .pw-home-sidebar .tab_menu ul.tabs-menu li a {
  align-items: center;
  border-radius: 9px;
  color: var(--pw-feed-muted);
  display: flex;
  float: none;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  justify-content: center;
  min-height: 42px;
  padding: 8px 5px;
}

body.poweren-modern-home-content .pw-home-sidebar .tab_menu ul.tabs-menu li.current a,
body.poweren-modern-home-content .pw-home-sidebar .tab_menu ul.tabs-menu li a:focus,
body.poweren-modern-home-content .pw-home-sidebar .tab_menu ul.tabs-menu li a:hover {
  background: #fff;
  color: var(--pw-feed-accent-dark);
}

body.poweren-modern-home-content .pw-home-sidebar .tabcontent {
  border: 0;
  box-shadow: none;
}

body.poweren-modern-home-content .pw-home-sidebar .tabcontent li {
  align-items: center;
  border-bottom: 1px solid #edf2f5;
  display: grid;
  float: none;
  gap: 5px 11px;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 92px;
  padding: 10px;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-sidebar .tabcontent li:last-child {
  border-bottom: 0;
}

body.poweren-modern-home-content .pw-home-sidebar .post-thumbnail-poweren {
  grid-column: 1;
  grid-row: 1 / span 2;
}

body.poweren-modern-home-content .pw-home-sidebar .post-thumbnail-poweren a,
body.poweren-modern-home-content .pw-home-sidebar .post-thumbnail-poweren img {
  border-radius: 9px;
  display: block;
  height: 60px;
  object-fit: cover;
  width: 72px;
}

body.poweren-modern-home-content .pw-home-sidebar .tab1-right {
  grid-column: 2;
  min-width: 0;
}

body.poweren-modern-home-content .pw-home-sidebar .tabcontent h3 {
  float: none;
  height: auto;
  padding: 0;
  width: 100%;
}

body.poweren-modern-home-content .pw-home-sidebar .tabcontent h3 a {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--pw-feed-ink);
  display: -webkit-box;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.75;
  overflow: hidden;
  text-align: right;
  text-overflow: clip;
  unicode-bidi: plaintext;
  white-space: normal;
}

body.poweren-modern-home-content .pw-home-sidebar .smallthing {
  color: #8593a0;
  float: none;
  font-size: 10px;
  grid-column: 2;
  margin: 0;
  width: auto;
}

body.poweren-modern-home-content .pw-home-post-card a:focus-visible,
body.poweren-modern-home-content .pw-home-feed__grid > .producter-more-category a:focus-visible,
body.poweren-modern-home-content .pw-home-sidebar a:focus-visible {
  outline: 3px solid rgba(0, 168, 232, .34);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  body.poweren-modern-home-content .pw-home-post-card .wapper-show-post:hover {
    border-color: rgba(0, 168, 232, .34);
    box-shadow: 0 15px 36px rgba(16, 38, 63, .11);
    transform: translateY(-4px);
    z-index: 2;
  }

  body.poweren-modern-home-content .pw-home-post-card .wapper-show-post:hover .thumb img {
    transform: scale(1.035);
  }

  body.poweren-modern-home-content .pw-home-post-card .wapper-show-post:hover .readmore > a,
  body.poweren-modern-home-content .pw-home-feed__grid > .producter-more-category a:hover {
    background: transparent;
    color: var(--pw-feed-accent-dark);
  }
}

@media (max-width: 991px) {
  body.poweren-modern-home-content .pw-home-feed__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.poweren-modern-home-content .pw-home-sidebar {
    clear: both;
    display: block;
    float: none;
    padding: 24px 12px 0;
    width: 100%;
  }

  body.poweren-modern-home-content .pw-home-sidebar .sidearea {
    overflow: hidden !important;
  }

  body.poweren-modern-home-content .pw-home-sidebar-promos {
    display: grid;
    gap: 12px;
    grid-auto-columns: min(78vw, 320px);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 2px 2px 14px;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
  }

  body.poweren-modern-home-content .pw-home-sidebar-promos > * {
    align-items: center;
    display: flex;
    height: 230px;
    justify-content: center;
    scroll-snap-align: start;
  }

  body.poweren-modern-home-content .pw-home-sidebar-promos > :nth-child(n + 4) {
    display: none !important;
  }

  body.poweren-modern-home-content .pw-home-sidebar-promos img {
    height: 100%;
    object-fit: contain;
    width: 100%;
  }

  body.poweren-modern-home-content .pw-home-sidebar .fill-widget-tab {
    margin-top: 8px;
  }
}

@media (max-width: 620px) {
  body.poweren-modern-home-content .pw-home-feed {
    margin-top: 26px;
  }

  body.poweren-modern-home-content .pw-home-feed > .titleall {
    border-radius: 14px;
    margin: 0 0 16px;
    padding: 15px 18px;
    width: 100%;
  }

  body.poweren-modern-home-content .pw-home-feed > .titleall::before {
    bottom: 12px;
    top: 12px;
  }

  body.poweren-modern-home-content .pw-home-feed > .titleall::after {
    left: 12px;
    opacity: .18;
    width: 54px;
  }

  body.poweren-modern-home-content .pw-home-feed__eyebrow {
    font-size: 12px;
    padding: 2px 9px;
  }

  body.poweren-modern-home-content .pw-home-feed > .titleall h2 {
    font-size: 25px;
  }

  body.poweren-modern-home-content .pw-home-feed__grid {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }

  body.poweren-modern-home-content .pw-home-post-card .metapad {
    min-height: 198px;
    padding: 14px 17px 0;
  }

  body.poweren-modern-home-content .pw-home-post-card .title {
    min-height: 58px;
  }

  body.poweren-modern-home-content .pw-home-post-card a .title h2 {
    font-size: 16px;
  }

  body.poweren-modern-home-content .pw-home-post-card .content_text {
    -webkit-line-clamp: 2;
    margin: 8px 0 12px;
    min-height: 47px;
  }

  body.poweren-modern-home-content .pw-home-sidebar {
    padding-inline: 0;
  }

  body.poweren-modern-home-content .pw-home-sidebar-promos {
    grid-auto-columns: min(84vw, 310px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.poweren-modern-home-content .pw-home-post-card .wapper-show-post,
  body.poweren-modern-home-content .pw-home-post-card .thumb img {
    scroll-behavior: auto;
    transition: none;
  }
}
