/* ========================================
   RTL & Language Switcher Styles
   ======================================== */

/* ===== Language Switcher - Desktop ===== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  color: #d97706;
}

/* .lang-btn.active {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
} */

.lang-divider {
  color: #d1d5db;
  font-weight: 300;
  user-select: none;
}

/* ===== Language Switcher - Mobile ===== */
.lang-switcher-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.lang-btn-mobile {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.lang-btn-mobile:hover {
  color: #fbbf24;
}

.lang-btn-mobile.active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
}

.lang-divider-mobile {
  color: rgba(255, 255, 255, 0.3);
  user-select: none;
}

/* Desktop lang-switcher: hide on mobile */
@media (max-width: 1024px) {
  .lang-switcher {
    display: none !important;
  }
}

/* Mobile lang-switcher: hidden by default, shown only on mobile */
.lang-switcher-mobile {
  display: none;
}

@media (max-width: 1024px) {
  .lang-switcher-mobile {
    display: flex;
  }
}

/* ========================================
   RTL Global Overrides
   ======================================== */

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

html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] a.special i {
  transform: scaleX(-1);
  display: inline-block;
}

/* ===== Navbar RTL ===== */
/* html[dir="rtl"] .navbar-inner {
  flex-direction: row-reverse;
} */

/* html[dir="rtl"] .navbar-links {
  flex-direction: row-reverse;
} */

html[dir="rtl"] .navbar-contact {
  margin-left: 0;
  margin-right: auto;
  /* text-align: right; */
  margin-left: 2rem;
}

html[dir="rtl"] .hero-bg-overlay {
  position: absolute;
  inset: 0;
  top: 90px;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.5),
    transparent,
    transparent
  );
}

html[dir="rtl"] .navbar-links a::after {
  left: auto;
  right: 0;
}

@media (max-width: 1024px) {
  html[dir="rtl"] .navbar-links {
    flex-direction: column;
  }
  html[dir="rtl"] .navbar-inner {
    flex-direction: row-reverse;
  }
}

@media (max-width: 1024px) {
  .lang-switcher-mobile {
    display: none;
  }

  .navbar-links.active .lang-switcher-mobile {
    display: flex;
  }
}

@media (min-width: 769px) {
  html[dir="rtl"] .navbar-logo img {
    padding-left: 0;
    padding-right: 30px;
  }
}

/* ===== Section Headers RTL ===== */
html[dir="rtl"] .section-header {
  /* flex-direction: row-reverse; */
  text-align: right;
}

html[dir="rtl"] .section-header > div {
  text-align: right;
}

/* ===== Footer RTL ===== */
html[dir="rtl"] .footer {
  text-align: right;
}

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

html[dir="rtl"] .footer-social {
  justify-content: flex-start;
}

/* ===== Buttons RTL ===== */
html[dir="rtl"] .btn i,
html[dir="rtl"] .btn .fas,
html[dir="rtl"] .btn .fab {
  margin-left: 0.5rem;
  margin-right: 0;
}

html[dir="ltr"] .btn i,
html[dir="ltr"] .btn .fas,
html[dir="ltr"] .btn .fab {
  margin-right: 0.5rem;
  margin-left: 0;
}

/* ===== Generic text alignment ===== */
/* html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  text-align: inherit;
} */

html[dir="rtl"] .topic-card h3 {
  text-align: center;
}
/* ===== Cards and Grids RTL ===== */
html[dir="rtl"] .why-cards,
html[dir="rtl"] .numbers-grid,
html[dir="rtl"] .eligibility-grid,
html[dir="rtl"] .partner-grid,
html[dir="rtl"] .phone-cards,
html[dir="rtl"] .gallery-grid,
html[dir="rtl"] .recap-videos {
  direction: rtl;
}

/* ===== Icon alignment in cards ===== */
html[dir="rtl"] .elig-card {
  /* flex-direction: row-reverse; */
  text-align: right;
}

html[dir="rtl"] .elig-card i {
  margin-left: 1rem;
  margin-right: 0;
}

/* ===== Pricing cards RTL ===== */
html[dir="rtl"] .pricing-cards {
  direction: rtl;
}

html[dir="rtl"] .pricing-card ul {
  padding-right: 1.5rem;
  padding-left: 0;
}

/* ===== FAQ RTL ===== */
html[dir="rtl"] .faq-question {
  /* flex-direction: row-reverse; */
  text-align: right;
}

html[dir="rtl"] .faq-answer {
  text-align: right;
}

html[dir="rtl"] .faq-question .arrow {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .q-prefix {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* ===== Category nav RTL ===== */
html[dir="rtl"] .category-nav {
  direction: rtl;
}

/* ===== Hackathon Roadmap RTL ===== */
html[dir="rtl"] .roadmap-step {
  flex-direction: row-reverse;
}

html[dir="rtl"] .step-content,
html[dir="rtl"] .step-empty {
  text-align: right;
}

/* Flip the alternating layout for RTL */
html[dir="rtl"] .roadmap-step:nth-child(even) {
  flex-direction: row-reverse;
}

html[dir="rtl"] .roadmap-step:nth-child(odd) {
  flex-direction: row-reverse;
}

/* ===== Visit page RTL ===== */
html[dir="rtl"] .info-grid {
  direction: rtl;
}

html[dir="rtl"] .info-item {
  text-align: right;
}

html[dir="rtl"] .info-item i {
  margin-left: 1rem;
  margin-right: 0;
}

html[dir="rtl"] .visa-list li {
  padding-right: 1.5rem;
  padding-left: 0;
}

html[dir="rtl"] .visa-list li::before {
  left: auto;
  right: 0;
}

/* ===== About page RTL ===== */
html[dir="rtl"] .about-org-grid {
  direction: rtl;
}

html[dir="rtl"] .about-org-text {
  text-align: right;
}

html[dir="rtl"] .what-cards {
  direction: rtl;
}

html[dir="rtl"] .topic-card {
  text-align: right;
}

html[dir="rtl"] .topic-card ul {
  padding-right: 1.2rem;
  padding-left: 0;
}

html[dir="rtl"] .event-card .event-overlay {
  text-align: right;
}

html[dir="rtl"] .attend-grid {
  direction: rtl;
}

/* ===== Timeline RTL ===== */
html[dir="rtl"] .timeline-h-track {
  direction: rtl;
}

/* ===== Sponsors Pyramid RTL ===== */
html[dir="rtl"] .pyramid-info ul {
  padding-right: 1.2rem;
  padding-left: 0;
}

/* ===== Home page hero RTL ===== */
html[dir="rtl"] .hero-content {
  text-align: center;
}

/* ===== Overview section RTL ===== */
html[dir="rtl"] .overview-text {
  text-align: right;
}

/* ===== Stats RTL ===== */
html[dir="rtl"] .stats-row {
  direction: rtl;
}

/* ===== Highlights RTL ===== */
html[dir="rtl"] .highlights-grid {
  direction: rtl;
}

html[dir="rtl"] .highlight-card {
  text-align: right;
}

/* ===== CTA sections RTL ===== */
html[dir="rtl"] .cta-section {
  text-align: center;
}

/* ===== Contact section RTL ===== */
html[dir="rtl"] .contact-section {
  text-align: center;
}

/* ===== Email list RTL ===== */
html[dir="rtl"] .email-item {
  flex-direction: row-reverse;
}

/* ===== Waiver section RTL ===== */
html[dir="rtl"] .waiver-section {
  text-align: right;
}

/* ===== Venue section RTL ===== */
html[dir="rtl"] .venue-text {
  text-align: right;
}

/* ===== Slide content RTL ===== */
html[dir="rtl"] .slide-content {
  text-align: right;
}

/* ===== Sponsor phone cards RTL ===== */
html[dir="rtl"] .phone-label {
  text-align: right;
}

/* ===== Partner cards RTL ===== */
html[dir="rtl"] .partner-contact-card,
html[dir="rtl"] .partner-download-card,
html[dir="rtl"] .partner-inkind-card {
  text-align: right;
}

/* ===== Pyramid discount RTL ===== */
html[dir="rtl"] .pyramid-discount {
  text-align: right;
}

/* ===== Gallery overlay RTL ===== */
html[dir="rtl"] .gallery-overlay {
  text-align: center;
}

/* ===== Why card RTL ===== */

/* ===== Number card RTL ===== */
html[dir="rtl"] .number-card {
  text-align: center;
}

/* ===== Hackathon intro RTL ===== */
html[dir="rtl"] .hackathon-intro-text {
  text-align: right;
}

/* ===== Why participate cards RTL ===== */
html[dir="rtl"] .why-participate-card {
  text-align: right;
}

/* ===== Benefit cards RTL ===== */
html[dir="rtl"] .benefit-card {
  text-align: right;
}

/* ===== Misc RTL fixes ===== */
html[dir="rtl"] .fade-up {
  text-align: center;
}

/* Ensure centered text stays centered in RTL */
html[dir="rtl"] [style*="text-align: center"],
html[dir="rtl"] [style*="text-align:center"] {
  text-align: center !important;
}
