/* rtl.css — pornabc.com/ar/ — correzioni RTL sopra il CSS del tema (myporn-new-lastomar) e agli stili inline della home.
   Regola: selettori con html[dir="rtl"] davanti (specificità più alta), !important solo dove il tema lo usa già. */

/* ---------- font ---------- */
html[dir="rtl"] body,
html[dir="rtl"] .about,
html[dir="rtl"] .markfav,
html[dir="rtl"] .text-bottom,
html[dir="rtl"] .about-section,
html[dir="rtl"] .popover,
html[dir="rtl"] .toc-name,
html[dir="rtl"] .toc-subtitle,
html[dir="rtl"] .mobile-text-info h1,
html[dir="rtl"] .footer {
  font-family: 'Noto Sans Arabic', 'Open Sans', Tahoma, Arial, sans-serif;
}
html[dir="rtl"] .item_title h2 span,
html[dir="rtl"] .about-section h2,
html[dir="rtl"] .about-section h3,
html[dir="rtl"] .about-section h4,
html[dir="rtl"] .about-section h5,
html[dir="rtl"] .live-stats-header h3,
html[dir="rtl"] .whats-new-header h3 {
  font-family: 'Noto Sans Arabic', 'Syne', 'Open Sans', Tahoma, Arial, sans-serif;
}
/* i nomi dei siti restano latini: lasciano il font del tema (Roboto Condensed) */
html[dir="rtl"] .about,
html[dir="rtl"] .text-bottom p,
html[dir="rtl"] .text-bottom li,
html[dir="rtl"] .about-section p,
html[dir="rtl"] .popover-content { line-height: 1.75; }

/* ---------- header: layout identico all'inglese (logo, nuvoletta, barra "salva"), solo i testi in RTL.
   Con dir=rtl l'header, più largo dello schermo su tablet, traboccava a sinistra e tagliava la mascotte. */
html[dir="rtl"] .header_container { direction: ltr; }
html[dir="rtl"] .header .about .default { direction: rtl; text-align: right; unicode-bidi: isolate; }
html[dir="rtl"] .header .bookmark { background-image: none !important; }   /* l'icona passa sul link, così resta attaccata al testo */
html[dir="rtl"] .header .bookmark a {
  direction: rtl; text-align: left; unicode-bidi: isolate; display: inline-block; white-space: nowrap;
  padding-right: 22px;
  background: url('https://pornabc.com/wp-content/uploads/2014/09/pornabc-favicon.png') right 2px top 50% / 16px 16px no-repeat;
}
html[dir="rtl"] .mobile-text-info h1 { direction: rtl; unicode-bidi: isolate; }

/* ---------- griglia: titolo gruppo e teaser ---------- */
html[dir="rtl"] .item_title h2 { direction: rtl; }
html[dir="rtl"] .markfav { direction: rtl; text-align: center !important; }

/* ---------- griglia: scheda (numero + favicon a destra, tag a sinistra) ---------- */
html[dir="rtl"] .custom_container_class .item_wrap .item_group li {
  direction: rtl;
  text-align: right !important;
  padding-left: 0 !important;
  padding-right: 51px !important;
}
html[dir="rtl"] .custom_container_class .item_wrap .item_group li:before {
  left: auto !important;
  right: 5px !important;
  text-align: left !important;
}
html[dir="rtl"] .custom_container_class .item_wrap .item_group li .icon {
  left: auto !important;
  right: 24px !important;
  margin: 0 !important;
}
html[dir="rtl"] .custom_container_class ol li.individualLiMagnigying a.link {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-right: 2px !important;
  padding-left: 10px !important;
  direction: rtl;            /* il link segue il verso della scheda: nome da destra, badge alla sua sinistra */
  text-align: right;
  justify-content: flex-start;   /* vale per i link con badge, che sotto 991px sono inline-flex */
}
html[dir="rtl"] .custom_container_class ol li.individualLiMagnigying a.link .bookmark-title {
  direction: ltr;            /* il nome è latino */
  unicode-bidi: isolate;
}
html[dir="rtl"] .custom_container_class ol li.individualLiMagnigying a.link .icon_show_sale,
html[dir="rtl"] .custom_container_class ol li.individualLiMagnigying a.link .icon_show_aibadge,
html[dir="rtl"] .custom_container_class ol li.individualLiMagnigying a.link .icon_show_newicon {
  margin-left: 0 !important;
  margin-right: 4px !important;
  left: auto !important;
  position: static !important;
}
html[dir="rtl"] .container .item_wrap .item_group li div.tag { right: auto; left: 0; }
html[dir="rtl"] .item_wrap li:hover .site-teaser { padding-right: 0 !important; padding-left: 2px !important; }
html[dir="rtl"] .icon_show_aibadge + .icon_show_newicon,
html[dir="rtl"] .icon_show_aibadge { margin-left: 0 !important; margin-right: 3px !important; }

/* ---------- popover (descrizione al passaggio del mouse) ---------- */
html[dir="rtl"] .popover { direction: rtl; text-align: right; }
html[dir="rtl"] .popover .popover-title { direction: ltr; text-align: right; } /* nome sito latino */

/* ---------- TOC (menu categorie mobile) ---------- */
html[dir="rtl"] #hamburgerTOC { left: auto; right: 15px; }
html[dir="rtl"] #tocOverlay { transform: translateX(100%); }
html[dir="rtl"] #tocOverlay.active { transform: translateX(0); }
html[dir="rtl"] .toc-close { left: auto; right: 20px; }
html[dir="rtl"] .toc-list a { direction: rtl; text-align: right; }
html[dir="rtl"] .toc-cat-icon { margin-right: 0; margin-left: 12px; }
html[dir="rtl"] .toc-bullet { margin-right: 0; margin-left: 10px; }
html[dir="rtl"] .premium-badge,
html[dir="rtl"] .toc-count { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .toc-arrow { right: auto; left: 15px; margin-left: 0; margin-right: 10px; }
html[dir="rtl"] .toc-sites { direction: ltr; justify-content: flex-end; }

/* ---------- blocco testo in fondo ---------- */
html[dir="rtl"] .text-bottom { direction: rtl; text-align: right; }
html[dir="rtl"] .text-bottom ul,
html[dir="rtl"] .text-bottom ol { padding-left: 0; padding-right: 0; }

/* ---------- About ---------- */
html[dir="rtl"] .about-section { direction: rtl; }
html[dir="rtl"] .about-section p,
html[dir="rtl"] .about-section h3,
html[dir="rtl"] .about-section h4,
html[dir="rtl"] .about-section h5,
html[dir="rtl"] .about-section .criteria-item,
html[dir="rtl"] .about-section .reject-item,
html[dir="rtl"] .about-section .whats-new-item { text-align: right; }
html[dir="rtl"] .about-section .about-header,
html[dir="rtl"] .about-section .about-intro,
html[dir="rtl"] .about-section .section-header,
html[dir="rtl"] .about-section .criteria-title,
html[dir="rtl"] .about-section .archive-proof,
html[dir="rtl"] .about-section .archive-proof p,
html[dir="rtl"] .about-section .trust-footer,
html[dir="rtl"] .about-section .trust-footer p,
html[dir="rtl"] .about-section .commitment-section,
html[dir="rtl"] .about-section .commitment-section p,
html[dir="rtl"] .about-section .live-stat-item,
html[dir="rtl"] .about-section .live-stats-footer,
html[dir="rtl"] .about-section .stat-card { text-align: center; }
html[dir="rtl"] .about-label,
html[dir="rtl"] .archive-proof-label { letter-spacing: 0; }   /* la spaziatura lettere rompe l'arabo */
html[dir="rtl"] .toc-subtitle { letter-spacing: 0; }
html[dir="rtl"] .archive-proof-link { letter-spacing: 0; }

/* ---------- footer ---------- */
html[dir="rtl"] .footer { direction: rtl; }

/* ---------- switch di lingua ----------
   telefoni (<768): pillola in alto a sinistra (hamburger a destra)
   tablet (768-1023): pillola in alto a destra (niente barra "salva", niente mascotte destra)
   desktop (>=1024): voce nella barra "salva", pillola nascosta */
html[dir="rtl"] .header .bookmark a.lang-switch {
  background: none; padding: 0; margin-left: 14px; direction: ltr; white-space: nowrap;
  font-weight: 600; color: #fff; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,.6);
}
html[dir="rtl"] .lang-switch-float { position: absolute; z-index: 50; direction: ltr; top: 18px; left: 15px; }
html[dir="rtl"] .lang-switch-float a.lang-switch-pill,
html[dir="rtl"] .toc-header-left a.lang-switch-toc {
  display: inline-block; padding: 4px 11px; border-radius: 14px; font-size: 12px; line-height: 1.4; font-weight: 600;
  color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); text-decoration: none; white-space: nowrap; direction: ltr;
}
@media (min-width: 768px) and (max-width: 1023px) {
  html[dir="rtl"] .lang-switch-float { top: 10px; left: auto; right: 14px; }
}
@media (min-width: 1024px) {
  html[dir="rtl"] .lang-switch-float { display: none; }
}
html[dir="rtl"] .toc-header-left { display: flex; align-items: center; gap: 14px; }
