/* ================================================== */
/* RTL Custom Styles for AIvent Arabic Version */
/* Created for full Arabic localization support */
/* ================================================== */

/* CRITICAL: Exclude icon elements from Arabic font override */
html[lang="ar"] i.fa,
html[lang="ar"] i[class*="fa-"],
html[lang="ar"] i[class^="fa-"],
html[lang="ar"] i.icofont,
html[lang="ar"] i[class*="icofont-"],
html[lang="ar"] i[class^="icofont-"],
html[lang="ar"] span.fa,
html[lang="ar"] span[class*="fa-"],
html[lang="ar"] span[class^="fa-"] {
  font-family: FontAwesome !important;
}

body[dir="rtl"] i.fa,
body[dir="rtl"] i[class*="fa-"],
body[dir="rtl"] i[class^="fa-"] {
  font-family: FontAwesome !important;
}

/* Logo Styling */
#logo img,
.logo-main,
.logo-scroll,
.logo-mobile {
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
}

#logo svg,
#logo img[src*="fekrhub-logo.svg"] {
  max-height: 60px;
  width: auto;
  height: auto;
}

/* Base RTL Settings */
body[dir="rtl"] {
  text-align: right;
  direction: rtl;
}

html[lang="ar"] {
  direction: rtl;
}

/* ================================================== */
/* NAVIGATION & MENU */
/* ================================================== */

#mainmenu {
  direction: rtl;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
}

/* Mobile Menu - Stack items vertically */
@media (max-width: 991px) {
  #mainmenu {
    display: block !important;
    flex-direction: column !important;
  }
  
  #mainmenu > li {
    display: block !important;
    width: 100% !important;
    float: none !important;
  }
}

#mainmenu > li {
  float: none;
  display: inline-block;
}

#mainmenu ul li {
  float: right;
}

#mainmenu > li > a {
  text-align: right;
}

/* Mega Menu RTL */
.mega {
  direction: rtl;
  text-align: right;
}

/* Mobile Menu */
#menu-btn {
  left: auto;
  right: 20px;
}

@media (max-width: 991px) {
  #mainmenu {
    text-align: right;
    right: 0;
    left: auto;
  }

  #mainmenu li {
    text-align: right;
  }
  
  #mainmenu a.menu-item {
    text-align: right;
    padding-right: 15px;
    padding-left: 15px;
  }
}

/* Mobile Menu - Enhanced RTL Support */
@media (max-width: 767px) {
  /* Hamburger Button */
  #menu-btn {
    right: 15px;
    left: auto;
  }
  
  /* Mobile Menu Dropdown */
  #mainmenu {
    right: 0 !important;
    left: auto !important;
    text-align: right;
    direction: rtl;
    display: block !important;
    flex-direction: column !important;
  }
  
  #mainmenu > li {
    display: block !important;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
  }
  
  #mainmenu li {
    text-align: right;
    border-bottom: solid 1px rgba(255, 255, 255, 0.1);
    display: block !important;
  }
  
  #mainmenu a.menu-item {
    text-align: right !important;
    padding: 12px 15px;
    display: block !important;
    width: 100%;
  }
  
  /* Menu Side Area */
  .menu_side_area {
    text-align: left;
    margin-right: 10px;
  }
  
  /* Header de-flex for RTL */
  header .de-flex {
    justify-content: space-between;
  }
  
  header .de-flex-col:last-child {
    margin-right: 0;
    margin-left: auto;
  }
}

/* ================================================== */
/* LAYOUT & POSITIONING */
/* ================================================== */

/* Float Fixes */
.float-start {
  float: right !important;
}

.float-end {
  float: left !important;
}

.float-left {
  float: right !important;
}

.float-right {
  float: left !important;
}

/* Text Alignment */
.text-start {
  text-align: right !important;
}

.text-end {
  text-align: left !important;
}

.text-left {
  text-align: right !important;
}

.text-right {
  text-align: left !important;
}

/* ================================================== */
/* SPACING - PADDING & MARGIN */
/* ================================================== */

/* Padding Start/End */
.ps-1 {
  padding-right: 0.25rem !important;
  padding-left: 0 !important;
}
.ps-2 {
  padding-right: 0.5rem !important;
  padding-left: 0 !important;
}
.ps-3 {
  padding-right: 1rem !important;
  padding-left: 0 !important;
}
.ps-4 {
  padding-right: 1.5rem !important;
  padding-left: 0 !important;
}
.ps-5 {
  padding-right: 3rem !important;
  padding-left: 0 !important;
}

.pe-1 {
  padding-left: 0.25rem !important;
  padding-right: 0 !important;
}
.pe-2 {
  padding-left: 0.5rem !important;
  padding-right: 0 !important;
}
.pe-3 {
  padding-left: 1rem !important;
  padding-right: 0 !important;
}
.pe-4 {
  padding-left: 1.5rem !important;
  padding-right: 0 !important;
}
.pe-5 {
  padding-left: 3rem !important;
  padding-right: 0 !important;
}

/* Margin Start/End */
.ms-1 {
  margin-right: 0.25rem !important;
  margin-left: 0 !important;
}
.ms-2 {
  margin-right: 0.5rem !important;
  margin-left: 0 !important;
}
.ms-3 {
  margin-right: 1rem !important;
  margin-left: 0 !important;
}
.ms-4 {
  margin-right: 1.5rem !important;
  margin-left: 0 !important;
}
.ms-5 {
  margin-right: 3rem !important;
  margin-left: 0 !important;
}
.ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

.me-1 {
  margin-left: 0.25rem !important;
  margin-right: 0 !important;
}
.me-2 {
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
}
.me-3 {
  margin-left: 1rem !important;
  margin-right: 0 !important;
}
.me-4 {
  margin-left: 1.5rem !important;
  margin-right: 0 !important;
}
.me-5 {
  margin-left: 3rem !important;
  margin-right: 0 !important;
}
.me-auto {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* ================================================== */
/* ICONS & ARROWS */
/* ================================================== */

/* Icon Positioning */
.icon-start {
  margin-left: 10px;
  margin-right: 0;
}

.icon-end {
  margin-right: 10px;
  margin-left: 0;
}

/* Arrow Flipping */
body[dir="rtl"] .arrow-right::after,
body[dir="rtl"] .arrow-right::before {
  transform: scaleX(-1);
}

body[dir="rtl"] .arrow-left::after,
body[dir="rtl"] .arrow-left::before {
  transform: scaleX(-1);
}

/* Chevron Icons */
body[dir="rtl"] .icon-chevron-right:before {
  content: "\f053" !important;
}

body[dir="rtl"] .icon-chevron-left:before {
  content: "\f054" !important;
}

/* Font Awesome Icons Flip */
body[dir="rtl"] .fa-chevron-right:before {
  content: "\f053";
}

body[dir="rtl"] .fa-chevron-left:before {
  content: "\f054";
}

body[dir="rtl"] .fa-arrow-right:before {
  content: "\f060";
}

body[dir="rtl"] .fa-arrow-left:before {
  content: "\f061";
}

/* ================================================== */
/* FORMS */
/* ================================================== */

input[type="email"],
input[type="text"],
input[type="tel"],
input[type="password"],
input[type="number"],
textarea,
select {
  text-align: right;
  direction: rtl;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
  text-align: right;
}

.form-control {
  text-align: right;
  direction: rtl;
}

/* Form Labels */
label {
  text-align: right;
  display: block;
}

/* ================================================== */
/* NAVIGATION ELEMENTS */
/* ================================================== */

/* Breadcrumb */
.breadcrumb {
  direction: rtl;
}

.breadcrumb-item + .breadcrumb-item::before {
  float: right;
  padding-left: 0.5rem;
  padding-right: 0;
}

/* Pagination */
.pagination {
  direction: rtl;
}

/* ================================================== */
/* HEADER & LOGO */
/* ================================================== */

#logo {
  margin-left: 0;
  margin-right: 0;
}

.de-flex {
  direction: rtl;
}

.de-flex-col {
  text-align: right;
}

/* Header Utilities */
header .social-icons {
  margin-left: 0;
  margin-right: 20px;
}

/* ================================================== */
/* FOOTER */
/* ================================================== */

footer {
  direction: rtl;
  text-align: right;
}

footer .col-md-6:first-child {
  text-align: right;
}

footer .col-md-6:last-child {
  text-align: left;
}

footer ul {
  padding-right: 0;
  padding-left: 0;
}

footer li {
  text-align: right;
}

/* Social Icons in Footer */
.social-icons {
  direction: rtl;
}

.social-icons li {
  float: right;
  margin-left: 10px;
  margin-right: 0;
}

/* ================================================== */
/* BUTTONS */
/* ================================================== */

.btn {
  direction: rtl;
}

.btn i {
  margin-left: 8px;
  margin-right: 0;
}

.btn-icon-left i {
  margin-right: 8px;
  margin-left: 0;
}

.btn-icon-right i {
  margin-left: 8px;
  margin-right: 0;
}

/* ================================================== */
/* LISTS */
/* ================================================== */

ul,
ol {
  padding-right: 20px;
  padding-left: 0;
}

li {
  text-align: right;
}

/* Custom Lists */
.list-unstyled {
  padding-right: 0;
}

/* ================================================== */
/* CARDS & BOXES */
/* ================================================== */

.card {
  text-align: right;
  direction: rtl;
}

.card-body {
  text-align: right;
}

/* ================================================== */
/* TABLES */
/* ================================================== */

table {
  direction: rtl;
  text-align: right;
}

th,
td {
  text-align: right;
}

/* ================================================== */
/* MODALS */
/* ================================================== */

.modal {
  direction: rtl;
}

.modal-header {
  text-align: right;
}

.modal-body {
  text-align: right;
}

.modal-footer {
  justify-content: flex-start;
}

.modal-header .close,
.modal-header .btn-close {
  margin-left: 0;
  margin-right: auto;
}

/* ================================================== */
/* DROPDOWNS */
/* ================================================== */

.dropdown-menu {
  text-align: right;
  direction: rtl;
  right: 0;
  left: auto;
}

/* ================================================== */
/* TOOLTIPS & POPOVERS */
/* ================================================== */

.tooltip {
  direction: rtl;
  text-align: right;
}

.popover {
  direction: rtl;
  text-align: right;
}

/* ================================================== */
/* SLIDERS & CAROUSELS */
/* ================================================== */

/* Swiper RTL */
.swiper {
  direction: rtl;
}

.swiper-button-next {
  left: 10px;
  right: auto;
}

.swiper-button-prev {
  right: 10px;
  left: auto;
}

/* Owl Carousel */
.owl-carousel {
  direction: rtl;
}

.owl-nav {
  direction: ltr;
}

/* Owl Carousel RTL - Tickets/Prizes Section */
.owl-2-dots.owl-carousel {
  direction: rtl !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
}

.owl-2-dots .owl-stage-outer {
  overflow: visible !important;
  width: 100% !important;
  display: block !important;
}

.owl-2-dots .owl-stage {
  display: flex !important;
  flex-direction: row-reverse !important;
  justify-content: center !important;
  align-items: stretch !important;
  width: 100% !important;
  transform: translate3d(0, 0, 0) !important;
  gap: 25px !important;
}

.owl-2-dots .owl-item {
  direction: rtl !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  float: none !important;
  min-height: 1px !important;
  flex: 0 0 auto !important;
}

.owl-2-dots .owl-item .item {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 100% !important;
}

.owl-2-dots .owl-item .item > div {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.owl-2-dots .owl-dots {
  display: none !important;
}

/* Responsive widths for prize cards - Equal width */
@media (min-width: 1200px) {
  .owl-2-dots .owl-item {
    width: calc(33.333% - 17px) !important;
    max-width: none !important;
  }

  .owl-2-dots .owl-stage {
    justify-content: center !important;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .owl-2-dots .owl-item {
    width: calc(50% - 13px) !important;
  }
}

@media (max-width: 767px) {
  .owl-2-dots .owl-item {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
  }

  .owl-2-dots .owl-stage {
    justify-content: center !important;
  }
}

/* Ensure prize cards are visible */
#section-tickets {
  display: block !important;
  visibility: visible !important;
}

#section-tickets .owl-carousel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#section-tickets .item {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
}

#section-tickets .owl-carousel .item {
  display: block !important;
}

#section-tickets .owl-stage {
  display: flex !important;
}

#section-tickets .owl-stage-outer {
  overflow: visible !important;
  display: block !important;
}

/* Fallback: Display cards as grid if carousel doesn't work */
#section-tickets .owl-carousel:not(.owl-loaded),
#section-tickets .owl-carousel.owl-loaded {
  display: block !important;
  visibility: visible !important;
}

#section-tickets .owl-carousel .owl-stage {
  display: flex !important;
}

#section-tickets .owl-carousel .owl-stage .owl-item {
  display: block !important;
  visibility: visible !important;
}

/* Ensure all 3 cards are visible */
#section-tickets .owl-carousel .item {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
}

/* Ticket Cards RTL */
.item .ul-check {
  padding-right: 20px;
  padding-left: 0;
  text-align: right;
}

.item .ul-check li {
  text-align: right;
  direction: rtl;
}

/* ================================================== */
/* SCROLL ELEMENTS */
/* ================================================== */

.float-text {
  right: auto;
  left: 20px;
}

.scrollbar-v {
  left: 0;
  right: auto;
}

/* ================================================== */
/* COUNTDOWN */
/* ================================================== */

.countdown {
  direction: rtl;
}

.countdown-section {
  text-align: center;
}

/* ================================================== */
/* RESPONSIVE ADJUSTMENTS */
/* ================================================== */

@media (max-width: 991px) {
  #mainmenu {
    text-align: right;
  }

  .mobile-hide {
    display: none;
  }

  #logo {
    text-align: right;
  }

  header .social-icons {
    text-align: right;
  }
}

@media (max-width: 768px) {
  .text-md-start {
    text-align: right !important;
  }

  .text-md-end {
    text-align: left !important;
  }
}

@media (max-width: 576px) {
  .text-sm-start {
    text-align: right !important;
  }

  .text-sm-end {
    text-align: left !important;
  }
}

/* ================================================== */
/* CUSTOM COMPONENTS */
/* ================================================== */

/* Speaker Cards */
.speaker-card {
  text-align: center;
}

/* Schedule Items */
.schedule-item {
  direction: rtl;
  text-align: right;
}

/* News Cards */
.news-card {
  direction: rtl;
  text-align: right;
}

/* Ticket Cards */
.ticket-card {
  text-align: center;
}

/* ================================================== */
/* ICONS FIX - Ensure all icons display correctly */
/* ================================================== */

/* FONT AWESOME ICONS - ENSURE DISPLAY IN RTL */
/* CRITICAL: Override Arabic font-family for icons */
html[lang="ar"] i.fa,
html[lang="ar"] i.fas,
html[lang="ar"] i.far,
html[lang="ar"] i.fab,
html[lang="ar"] i[class*="fa-"],
html[lang="ar"] i[class^="fa-"],
body[dir="rtl"] i.fa,
body[dir="rtl"] i.fas,
body[dir="rtl"] i.far,
body[dir="rtl"] i.fab,
body[dir="rtl"] i[class*="fa-"],
body[dir="rtl"] i[class^="fa-"],
html[lang="ar"] .fa,
html[lang="ar"] .fas,
html[lang="ar"] .far,
html[lang="ar"] .fab,
html[lang="ar"] [class*="fa-"],
body[dir="rtl"] .fa,
body[dir="rtl"] .fas,
body[dir="rtl"] .far,
body[dir="rtl"] .fab,
body[dir="rtl"] [class*="fa-"],
.fa,
.fas,
.far,
.fab,
[class*="fa-"],
i.fa,
i.fas,
i.far,
i.fab {
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-family: FontAwesome !important;
  font-weight: normal !important;
  speak: none !important;
  text-transform: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.fa-brands,
i.fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* Force FontAwesome ::before pseudo-element rendering */
html[lang="ar"] .fa::before,
html[lang="ar"] .fas::before,
html[lang="ar"] .far::before,
html[lang="ar"] .fab::before,
body[dir="rtl"] .fa::before,
body[dir="rtl"] .fas::before,
body[dir="rtl"] .far::before,
body[dir="rtl"] .fab::before,
.fa::before,
.fas::before,
.far::before,
.fab::before {
  font-family: FontAwesome !important;
  font-weight: normal !important;
  font-style: normal !important;
  display: inline-block !important;
  text-decoration: inherit !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-variant: normal !important;
  text-transform: none !important;
  line-height: 1 !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Specific FontAwesome icons used in the site */
.fa-trophy,
.fa-quote-left,
.fa-map-marker,
.fa-envelope,
.fa-calendar {
  font-family: FontAwesome !important;
  font-weight: normal !important;
  font-style: normal !important;
}

html[lang="ar"] i.fa-trophy,
html[lang="ar"] i.fa-quote-left,
html[lang="ar"] i.fa-map-marker,
html[lang="ar"] i.fa-envelope,
html[lang="ar"] i.fa-calendar {
  font-family: FontAwesome !important;
  font-weight: normal !important;
}

/* VENUE SECTION ICONS - FontAwesome */
#section-venue .fa,
#section-venue [class*="fa-"],
#section-venue i.fa {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 60px !important;
  color: var(--primary-color) !important;
  font-family: FontAwesome !important;
  font-weight: normal !important;
}

#section-venue .d-flex {
  display: flex !important;
  align-items: center !important;
  flex-direction: row-reverse;
}

#section-venue .d-flex i {
  flex-shrink: 0;
  margin-right: 0 !important;
  margin-left: 1rem !important;
  font-family: IcoFont !important;
}

/* FOOTER SOCIAL ICONS */
.social-icons i,
.social-icons [class*="fa-"] {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* OTHER SECTIONS ICONS */
.fs-60 {
  font-size: 60px !important;
}

.fs-40 {
  font-size: 40px !important;
}

i.id-color,
[class*="icofont-"].id-color,
[class*="fa-"].id-color {
  color: var(--primary-color) !important;
}

/* ================================================== */
/* UTILITIES */
/* ================================================== */

.rtl-flip {
  transform: scaleX(-1);
}

.rtl-hidden {
  display: none;
}

/* Border Radius RTL */
.rounded-start {
  border-top-right-radius: 0.25rem !important;
  border-bottom-right-radius: 0.25rem !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.rounded-end {
  border-top-left-radius: 0.25rem !important;
  border-bottom-left-radius: 0.25rem !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* ================================================== */
/* ANIMATIONS */
/* ================================================== */

/* Slide animations RTL fix */
@keyframes slideInRight {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* ================================================== */
/* MARQUEE TEXT SCROLLING FIX */
/* ================================================== */

.de-marquee-list-1,
.de-marquee-list-2 {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.de-marquee-list-1 span,
.de-marquee-list-2 span {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 60px !important;
  margin: 0 1rem !important;
  color: #fff !important;
}

/* Ensure marquee wrapper is visible */
.js-marquee-wrapper {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.js-marquee {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ================================================== */
/* GOALS SECTION - 3 CARDS GRID */
/* ================================================== */

#section-why-attend .row.g-4 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

#section-why-attend .row.g-4 .col-lg-4 {
  flex: 0 0 auto;
  width: 33.333%;
}

@media (max-width: 991px) {
  #section-why-attend .row.g-4 .col-lg-4 {
    width: 50%;
  }
}

@media (max-width: 767px) {
  #section-why-attend .row.g-4 .col-lg-4 {
    width: 100%;
  }
}

/* ================================================== */
/* PRINT */
/* ================================================== */

@media print {
  body {
    direction: rtl;
    text-align: right;
  }
}
