/* ============================================================
   theme.css  —  3dnexgen
   loaded after main.css.
   part 1: RTL to LTR conversion
   part 2: new components (topbar, header, slider, footer, homepage)
   no colour is hard-coded here: every value comes from the
   CSS variables that core/Theme.php builds from the admin settings.
   ============================================================ */

/* ---------- 1. LTR ---------- */

html { font-size: var(--base-size, 16px); }

body {
  direction: ltr;
  text-align: left;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, .sec-title, .band-title, .intro-title,
.page-h1, .latest-card h3, .foot-title, .brand-text {
  font-family: var(--font-head);
  letter-spacing: -0.01em;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 10px 18px;
}
.skip-link:focus { left: 8px; }

/* blocks that main.css aligns with border-right */
.page-content h2,
.hcs-content h2,
.page-section .section-title {
  border-right: 0;
  border-left: 3px solid var(--accent);
  padding-right: 0;
  padding-left: 12px;
}
.page-content blockquote {
  border-right: 0;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius) 0 0 var(--radius);
}
.page-content ul, .page-content ol,
.section-text .section-content ul, .section-text .section-content ol {
  padding-right: 0; padding-left: 24px;
}
.page-content thead th, .section-table th, .section-table caption { text-align: left; }
.toc-level-3 { padding-right: 0; padding-left: 16px; }

.form-field input, .form-field select, .form-field textarea,
.front-form input, .front-form select, .front-form textarea { direction: ltr; }

.faq-question { text-align: left; }

/* arrows and directions */
.children-list a::before { content: '›'; }
.children-list a:hover { padding-right: 0; padding-left: 8px; }
.foot-links a::before, .footer-links a::before { content: '›'; }
.related-item:hover { transform: translateX(3px); }
.related-item-arrow { transform: scaleX(-1); }
.related-item:hover .related-item-arrow { transform: scaleX(-1) translateX(-3px); }
.download-item:hover { transform: translateX(3px); }
.content-banner {
  border-right: 0; border-left: 4px solid var(--accent);
}
.content-banner:hover { transform: translateX(3px); }
.comment-reply { border-right: 0; border-left: 3px solid var(--accent); }
.qa-answer { border-inline-start: 3px solid var(--accent); }
.breadcrumb li + li::before { content: '›'; }
.news-item:hover { padding-right: 0; padding-left: 6px; }
.page-meta time + time {
  padding-right: 0; border-right: 0;
  padding-left: 14px; border-left: 1px solid var(--border);
}
.audio-time, .audio-bar { direction: ltr; text-align: left; }
.lb-close { left: auto; right: 18px; }
.lb-prev  { right: auto; left: 18px; }
.lb-next  { left: auto; right: 18px; }

/* legacy header/footer, no longer used */
.neff-header, .neff-footer, .mobile-contact-bar, .float-cta { display: none !important; }

/* ---------- 2. topbar ---------- */

.topbar {
  background: var(--tp-bg);
  color: var(--tp-text);
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 38px; flex-wrap: wrap;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; }
.tb-item {
  color: var(--tp-text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
}
.tb-item:hover { color: var(--accent); }
.tb-social { display: flex; align-items: center; gap: 6px; }
.tb-soc {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .06); color: var(--tp-text);
  font-size: 13px; text-decoration: none; transition: .18s;
}
.tb-soc:hover { background: var(--accent); color: #fff; }

/* language switcher */
.lang-switch { position: relative; }
.lang-current {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; padding: 4px 8px; border-radius: var(--radius);
  font-weight: 600; letter-spacing: .04em;
}
.lang-current:hover { background: rgba(0, 0, 0, .06); }
.lang-menu {
  position: absolute; top: 100%; right: 0; min-width: 150px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 12px 34px rgba(0, 0, 0, .12);
  padding: 6px; z-index: 300;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: .18s;
}
.lang-switch:hover .lang-menu, .lang-switch.open .lang-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.lang-menu a {
  display: block; padding: 7px 12px; font-size: 13px;
  color: var(--text-light); text-decoration: none; border-radius: 6px;
}
.lang-menu a:hover { background: var(--bg-light); color: var(--accent); }
.lang-menu a.is-active { color: var(--accent); font-weight: 700; }

/* Google Translate widget */
.gt-widget { position: fixed; bottom: 12px; left: 12px; z-index: 700; }

/* ---------- 3. header ---------- */

.site-head {
  background: var(--hd-bg);
  color: var(--hd-text);
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.site-head.is-sticky { position: sticky; top: 0; }
.head-inner {
  display: flex; align-items: center; gap: 24px; min-height: 76px;
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand img { height: 54px; width: auto; display: block; }
.brand-text {
  font-size: 20px; font-weight: 800; color: var(--hd-text);
  letter-spacing: -.02em;
}

.main-nav { margin-left: auto; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav-li { position: relative; }
.nav-li > a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: var(--radius);
  color: var(--hd-text); font-size: 15px; font-weight: 500;
  text-decoration: none; white-space: nowrap; transition: .18s;
}
.nav-li > a:hover, .nav-li.open > a { color: var(--hd-hover); }
.nav-li > a i { font-size: 11px; opacity: .7; transition: transform .2s; }
.nav-li.open > a i { transform: rotate(180deg); }

.sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px;
  list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: 0 14px 40px rgba(0, 0, 0, .14);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: .18s; z-index: 210;
}
.nav-li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu a {
  display: block; padding: 9px 12px; border-radius: 6px;
  font-size: 14px; color: var(--text-light); text-decoration: none;
}
.sub-menu a:hover { background: var(--bg-light); color: var(--accent); }

.head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.head-search { position: relative; display: flex; align-items: center; }
.head-search input {
  width: 150px; height: 38px; padding: 0 36px 0 14px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: var(--hd-text);
  font-family: inherit; font-size: 13px; outline: none; transition: width .25s, background .2s;
}
.head-search input::placeholder { color: var(--hd-text); opacity: .6; }
.head-search input:focus { width: 210px; background: rgba(255, 255, 255, .18); }
.head-search button {
  position: absolute; right: 10px; background: none; border: 0;
  color: var(--hd-text); opacity: .75; cursor: pointer; padding: 4px; line-height: 0;
}
.head-search button:hover { opacity: 1; color: var(--hd-hover); }

.btn-cta {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700;
  border-radius: 999px; text-decoration: none; white-space: nowrap; transition: .2s;
}
.btn-cta:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--hd-text); transition: .25s;
}
.nav-close { display: none; }
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5);
  z-index: 190; opacity: 0; visibility: hidden; transition: .25s;
}
.nav-backdrop.show { opacity: 1; visibility: visible; }

@media (max-width: 1024px) {
  .head-search { display: none; }
}
@media (max-width: 960px) {
  .nav-burger { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: -320px; width: min(320px, 88vw); height: 100%;
    background: var(--hd-bg); z-index: 200; overflow-y: auto;
    padding: 60px 12px 24px; transition: right .3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, .25);
  }
  .main-nav.open { right: 0; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-li > a { justify-content: space-between; padding: 13px 14px; font-size: 15px; }
  .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; background: transparent; border: 0; box-shadow: none;
    border-left: 2px solid var(--hd-hover); border-radius: 0;
    margin: 2px 0 6px 14px; padding: 0;
  }
  .nav-li.open > .sub-menu { display: block; }
  .sub-menu a { color: var(--hd-text); opacity: .85; }
  .sub-menu a:hover { background: rgba(255, 255, 255, .08); color: var(--hd-hover); }
  .nav-close {
    display: block; position: absolute; top: 14px; right: 14px;
    background: none; border: 0; color: var(--hd-text); font-size: 20px; cursor: pointer;
  }
  .btn-cta { display: none; }
  .brand img { height: 44px; }
  .head-inner { min-height: 64px; gap: 12px; }
}

/* ---------- 4. homepage slider ---------- */

.hero-slider { position: relative; background: var(--bg-light); }
.hero-slider .swiper { width: 100%; }
.hero-slider .swiper-slide { position: relative; }
.hero-slider img {
  width: 100%; height: clamp(240px, 42vw, 560px);
  object-fit: cover; display: block;
}
.slide-caption {
  position: absolute; inset: 0; display: flex; align-items: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .18) 55%, transparent 100%);
}
.slide-caption h2 {
  margin: 0 0 12px; color: #fff; max-width: 18ch;
  font-size: clamp(24px, 4vw, 46px); font-weight: 800; line-height: 1.2;
  text-transform: uppercase;
}
.slide-caption p {
  margin: 0 0 18px; color: rgba(255, 255, 255, .88);
  max-width: 42ch; font-size: clamp(13px, 1.4vw, 17px); line-height: 1.7;
}
.slide-btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 26px;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-weight: 700; font-size: 14px; text-decoration: none; transition: .2s;
}
.slide-btn:hover { background: var(--accent-dark); color: #fff; }

.hero-slider .swiper-pagination-bullet { background: #fff; opacity: .55; }
.hero-slider .swiper-pagination-bullet-active { opacity: 1; width: 22px; border-radius: 4px; }
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .18); backdrop-filter: blur(4px); color: #fff;
}
.hero-slider .swiper-button-next::after,
.hero-slider .swiper-button-prev::after { font-size: 15px; font-weight: 900; }

/* ---------- 5. intro block ---------- */

.home-intro { padding: 72px 0; background: var(--bg); }
.intro-grid {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 56px; align-items: center;
}
/* single column when the intro block has no image */
.home-intro.no-media .intro-grid { grid-template-columns: 1fr; }
.home-intro.no-media .intro-body { max-width: 900px; }

.home-intro.img-left .intro-body  { order: 2; }
.home-intro.img-left .intro-media { order: 1; }
.intro-title {
  font-size: clamp(24px, 3.2vw, 38px); font-weight: 800;
  line-height: 1.25; margin: 0 0 22px; color: var(--text);
}
.intro-text {
  font-size: 16px; line-height: 1.95; color: var(--text-light);
  text-align: justify;
}
.intro-text p { margin: 0 0 14px; }
.intro-media img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-xl); box-shadow: 0 18px 44px rgba(0, 0, 0, .1);
}
.btn-solid {
  display: inline-flex; align-items: center; margin-top: 22px;
  height: 46px; padding: 0 28px; background: var(--accent); color: #fff;
  border-radius: 999px; font-weight: 700; font-size: 15px;
  text-decoration: none; transition: .2s;
}
.btn-solid:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }

@media (max-width: 900px) {
  .home-intro { padding: 44px 0; }
  .intro-grid { grid-template-columns: 1fr; gap: 26px; }
  .home-intro.img-left .intro-body,
  .home-intro.img-left .intro-media { order: initial; }
}

/* ---------- 6. highlights strip ---------- */

.home-band {
  background: var(--hd-bg); color: var(--hd-text);
  padding: 54px 0 60px;
}
.band-title {
  margin: 0 0 30px; text-align: center;
  font-size: clamp(20px, 2.6vw, 30px); font-weight: 800;
  color: var(--hd-text); opacity: .92;
}
.band-strip { position: relative; }
.strip-track {
  display: flex; gap: 18px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 2px 14px; scrollbar-width: none;
}
.strip-track::-webkit-scrollbar { display: none; }
.strip-card {
  flex: 0 0 clamp(180px, 22vw, 230px); scroll-snap-align: start;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; transition: .22s;
  display: flex; flex-direction: column;
}
.strip-card:hover {
  transform: translateY(-4px);
  border-color: var(--hd-hover);
  background: rgba(255, 255, 255, .1);
}
.strip-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: rgba(0, 0, 0, .2); }
.strip-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s; }
.strip-card:hover .strip-img img { transform: scale(1.06); }
.strip-title {
  display: block; padding: 12px 14px; font-size: 14px; font-weight: 600;
  line-height: 1.5; color: var(--hd-text);
}
.strip-card:hover .strip-title { color: var(--hd-hover); }
.strip-nav {
  position: absolute; top: 38%; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: var(--hd-text);
  display: flex; align-items: center; justify-content: center; transition: .18s;
}
.strip-nav:hover { background: var(--accent); color: #fff; }
.strip-prev { left: -10px; }
.strip-next { right: -10px; }
@media (max-width: 700px) { .strip-nav { display: none; } }

/* ---------- 7. latest posts ---------- */

.home-latest { padding: 64px 0; background: var(--bg-light); }
.sec-title {
  margin: 0 0 32px; font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 800; color: var(--text); text-align: center;
}
.sec-title::after {
  content: ''; display: block; width: 46px; height: 3px;
  background: var(--accent); border-radius: 2px; margin: 12px auto 0;
}
.latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.latest-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; transition: .22s;
}
.latest-card:hover {
  transform: translateY(-5px); border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .09);
}
.latest-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-light); }
.latest-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s; }
.latest-card:hover .latest-img img { transform: scale(1.05); }
.latest-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.latest-body h3 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 700; }
.latest-body h3 a { color: var(--text); text-decoration: none; }
.latest-body h3 a:hover { color: var(--accent); }
.latest-body p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--text-light); flex: 1; }
.latest-body time { font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 900px) {
  .home-latest { padding: 44px 0; }
  .latest-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- 8. stats ---------- */

.home-stats { padding: 60px 0; background: var(--bg); }
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px; max-width: 900px; margin: 0 auto;
}
.stat-box {
  text-align: center; padding: 28px 18px;
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: var(--radius-lg); transition: .2s;
}
.stat-box:hover { transform: translateY(-3px); border-color: var(--accent); }
.stat-box.is-highlight { background: var(--accent); border-color: var(--accent); }
.stat-box.is-highlight .stat-num,
.stat-box.is-highlight .stat-label { color: #fff; }
.stat-num {
  display: block; font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 42px); font-weight: 800;
  color: var(--accent); line-height: 1.1; margin-bottom: 8px;
}
.stat-label { display: block; font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ---------- 9. homepage FAQ ---------- */

.home-faq { padding: 60px 0; background: var(--bg-light); }
.home-faq .faq-list { max-width: 840px; margin: 0 auto; gap: 10px; }
.home-faq .faq-item { background: #fff; }

/* ---------- 10. footer ---------- */

.site-foot {
  background: var(--ft-bg); color: var(--ft-text);
  margin-top: 0; position: relative;
}
.foot-inner {
  display: grid; grid-template-columns: .8fr 1.6fr .9fr;
  gap: 48px; padding: 60px 0 48px;
}
.foot-title {
  margin: 0 0 18px; font-size: 15px; font-weight: 700;
  color: var(--ft-title); letter-spacing: .02em;
}
.foot-title-lg { font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; margin: 0 0 16px; }
.foot-brand-title {
  margin: 0 0 8px; font-size: 15px; font-weight: 600;
  color: var(--ft-title); opacity: .85;
}
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.foot-links a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ft-text); font-size: 14px; text-decoration: none; transition: .15s;
}
.foot-links a::before { color: var(--ft-hover); font-size: 14px; }
.foot-links a:hover { color: var(--ft-title); padding-left: 3px; }
.foot-text {
  font-size: 15px; line-height: 1.85; color: var(--ft-text);
  margin-bottom: 18px; max-width: 62ch;
}
.foot-contact { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.foot-contact li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; color: var(--ft-text);
}
.foot-contact li i { color: var(--ft-hover); width: 16px; }
.foot-contact li span { opacity: .7; }
.foot-contact a { color: var(--ft-hover); text-decoration: none; }
.foot-contact a:hover { text-decoration: underline; }
.foot-social { display: flex; gap: 9px; flex-wrap: wrap; }
.foot-social a {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .1); color: var(--ft-title);
  font-size: 16px; text-decoration: none; transition: .2s;
}
.foot-social a:hover { background: var(--ft-hover); color: #fff; transform: translateY(-3px); }
.foot-logo-col { display: flex; align-items: flex-start; justify-content: flex-end; }
.foot-logo-col img { max-width: 190px; height: auto; opacity: .95; }
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 16px 0; font-size: 12.5px; color: var(--ft-text); opacity: .7;
}
@media (max-width: 960px) {
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 32px; padding: 44px 0 32px; }
  .foot-logo-col { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 620px) {
  .foot-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- 11. floating WhatsApp button ---------- */

.wa-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 750;
  display: inline-flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 20px; border-radius: 999px;
  background: #25d366; color: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); transition: .2s;
}
.wa-float:hover { transform: translateY(-2px); color: #fff; }
.wa-float i { font-size: 20px; }
@media (max-width: 520px) { .wa-float span { display: none; } .wa-float { padding: 0; width: 48px; justify-content: center; } }

/* ---------- 12. inner pages ---------- */

.page-article { max-width: var(--container); margin: 0 auto; padding: 40px 24px 64px; }
.breadcrumb { background: var(--bg-light); border-bottom: 1px solid var(--border); }
.page-h1 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.35; }
.related-list { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) {
  .page-article { padding: 22px 16px 44px; }
  .container { padding: 0 16px; }
}

/* ---------- 13. share buttons ---------- */

/* Facebook replaces the removed Eitaa button; main.css has no base rule for it,
   so without this the circle stays transparent until :hover. */
.share-facebook { background: #1877f2; }

/* ---------- 14. FAQ section (faq2) — LTR ---------- */

.faq2-q { text-align: left; }
.faq2-q-text { text-align: left; }
.faq2-a-inner { text-align: left; }
.faq2-a-inner ul, .faq2-a-inner ol { padding-right: 0; padding-left: 22px; }

/* ---------- 15. highlights strip states ---------- */

/* nothing to scroll: no arrows, cards centred */
.band-strip.no-scroll .strip-nav { display: none; }
.band-strip.no-scroll .strip-track { justify-content: center; flex-wrap: wrap; }
/* reached one end */
.strip-nav.is-off { opacity: .3; pointer-events: none; }
