/* ==========================================================================
   ALFNR Responsive Styles
   ==========================================================================

   Handles ALL responsive breakpoints and full RTL support.

   Breakpoints:
     - >= 1400px : Large desktop (xl)
     - >= 1200px : Desktop (lg)
     - 992-1199px: Tablet landscape (md)
     - 768-991px : Tablet (sm)
     - 576-767px : Large mobile (xs)
     - < 576px   : Mobile (xxs)

   Table of Contents:
   1.  Typography Scale
   2.  Navbar
   3.  Hero Section
   4.  Trust Bar
   5.  Sections (Global Spacing)
   6.  Cards
   7.  Footer
   8.  Buttons
   9.  Forms
   10. Tabs
   11. Device Placeholder
   12. Product Showcase
   13. Comparison Grid
   14. Steps / Flow
   15. Modal
   16. Page Hero
   17. Legal Page
   18. App Shell (Sidebar + Content)
   19. RTL Support
   ========================================================================== */


/* ==========================================================================
   1. TYPOGRAPHY SCALE
   ========================================================================== */

/* --- Large Desktop (>= 1400px) ---
   Full-size type scale, no reductions needed.
   ========================================================================== */
@media (min-width: 1400px) {
  .display-1 {
    font-size: 4.5rem;    /* 72px */
    line-height: 1.1;
  }
  .display-2 {
    font-size: 3.75rem;   /* 60px */
    line-height: 1.12;
  }
  h1, .h1 {
    font-size: 3rem;      /* 48px */
    line-height: 1.15;
  }
  h2, .h2 {
    font-size: 2.25rem;   /* 36px */
    line-height: 1.2;
  }
  h3, .h3 {
    font-size: 1.75rem;   /* 28px */
    line-height: 1.25;
  }
  h4, .h4 {
    font-size: 1.375rem;  /* 22px */
    line-height: 1.3;
  }
  h5, .h5 {
    font-size: 1.125rem;  /* 18px */
    line-height: 1.35;
  }
  h6, .h6 {
    font-size: 1rem;      /* 16px */
    line-height: 1.4;
  }
}

/* --- Desktop (>= 1200px, < 1400px) ---
   Slight scale-down on largest headings.
   ========================================================================== */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .display-1 {
    font-size: 4rem;      /* 64px */
    line-height: 1.1;
  }
  .display-2 {
    font-size: 3.25rem;   /* 52px */
    line-height: 1.12;
  }
  h1, .h1 {
    font-size: 2.75rem;   /* 44px */
    line-height: 1.15;
  }
  h2, .h2 {
    font-size: 2rem;      /* 32px */
    line-height: 1.2;
  }
  h3, .h3 {
    font-size: 1.625rem;  /* 26px */
    line-height: 1.25;
  }
}

/* --- Tablet Landscape (992px - 1199px) ---
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .display-1 {
    font-size: 3.5rem;    /* 56px */
    line-height: 1.12;
  }
  .display-2 {
    font-size: 2.75rem;   /* 44px */
    line-height: 1.15;
  }
  h1, .h1 {
    font-size: 2.5rem;    /* 40px */
    line-height: 1.15;
  }
  h2, .h2 {
    font-size: 1.875rem;  /* 30px */
    line-height: 1.2;
  }
  h3, .h3 {
    font-size: 1.5rem;    /* 24px */
    line-height: 1.25;
  }
  h4, .h4 {
    font-size: 1.25rem;   /* 20px */
    line-height: 1.3;
  }
}

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .display-1 {
    font-size: 3rem;      /* 48px */
    line-height: 1.15;
  }
  .display-2 {
    font-size: 2.5rem;    /* 40px */
    line-height: 1.15;
  }
  h1, .h1 {
    font-size: 2.25rem;   /* 36px */
    line-height: 1.18;
  }
  h2, .h2 {
    font-size: 1.75rem;   /* 28px */
    line-height: 1.22;
  }
  h3, .h3 {
    font-size: 1.375rem;  /* 22px */
    line-height: 1.28;
  }
  h4, .h4 {
    font-size: 1.125rem;  /* 18px */
    line-height: 1.3;
  }
  h5, .h5 {
    font-size: 1rem;      /* 16px */
    line-height: 1.35;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .display-1 {
    font-size: 2.5rem;    /* 40px */
    line-height: 1.15;
  }
  .display-2 {
    font-size: 2.125rem;  /* 34px */
    line-height: 1.18;
  }
  h1, .h1 {
    font-size: 2rem;      /* 32px */
    line-height: 1.2;
  }
  h2, .h2 {
    font-size: 1.5rem;    /* 24px */
    line-height: 1.25;
  }
  h3, .h3 {
    font-size: 1.25rem;   /* 20px */
    line-height: 1.3;
  }
  h4, .h4 {
    font-size: 1.063rem;  /* 17px */
    line-height: 1.35;
  }
  h5, .h5 {
    font-size: 0.938rem;  /* 15px */
    line-height: 1.4;
  }
  h6, .h6 {
    font-size: 0.875rem;  /* 14px */
    line-height: 1.45;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .display-1 {
    font-size: 2rem;      /* 32px */
    line-height: 1.18;
  }
  .display-2 {
    font-size: 1.75rem;   /* 28px */
    line-height: 1.2;
  }
  h1, .h1 {
    font-size: 1.75rem;   /* 28px */
    line-height: 1.2;
  }
  h2, .h2 {
    font-size: 1.375rem;  /* 22px */
    line-height: 1.25;
  }
  h3, .h3 {
    font-size: 1.125rem;  /* 18px */
    line-height: 1.3;
  }
  h4, .h4 {
    font-size: 1rem;      /* 16px */
    line-height: 1.35;
  }
  h5, .h5 {
    font-size: 0.875rem;  /* 14px */
    line-height: 1.4;
  }
  h6, .h6 {
    font-size: 0.813rem;  /* 13px */
    line-height: 1.45;
  }
  body {
    font-size: 0.938rem;  /* 15px */
    line-height: 1.6;
  }
}


/* ==========================================================================
   2. NAVBAR
   ========================================================================== */

/* --- Tablet Landscape (992px - 1199px) ---
   Slightly compressed nav items.
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .navbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .navbar__nav {
    gap: 20px;
  }
  .navbar__logo img {
    height: 32px;
  }
}

/* --- Below 992px: Collapse Nav, Show Hamburger ---
   ========================================================================== */
@media (max-width: 991.98px) {
  .navbar {
    padding: 12px 16px;
    position: relative;
  }
  .navbar__logo img {
    height: 28px;
  }
  .navbar__nav {
    display: none;
  }
  .navbar__cta {
    display: none;
  }
  .navbar__hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .navbar__hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* --- Off-canvas Mobile Menu --- */
  .navbar__mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: var(--color-bg, #fff);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
  }
  .navbar__mobile-menu.is-open {
    transform: translateX(0);
  }
  .navbar__mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    flex-shrink: 0;
  }
  .navbar__mobile-menu-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .navbar__mobile-menu-body {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .navbar__mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary, #1a1a2e);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.15s ease;
  }
  .navbar__mobile-nav-link:hover,
  .navbar__mobile-nav-link:focus-visible {
    background-color: var(--color-bg-subtle, #f5f5f7);
  }
  .navbar__mobile-nav-link.is-active {
    color: var(--color-primary, #2563eb);
    background-color: var(--color-primary-bg, #eff6ff);
    font-weight: 600;
  }
  .navbar__mobile-menu-footer {
    padding: 16px;
    border-top: 1px solid var(--color-border, #e5e7eb);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Body scroll lock when menu open */
  body.mobile-menu-open {
    overflow: hidden;
  }
}

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .navbar__mobile-menu-body {
    padding: 32px 24px;
  }
  .navbar__mobile-nav-link {
    font-size: 1.063rem;
    padding: 16px 20px;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .navbar {
    padding: 10px 12px;
  }
  .navbar__logo img {
    height: 24px;
  }
}


/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */

/* --- Tablet Landscape (992px - 1199px) ---
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero {
    min-height: 620px;
    padding: 80px 0 72px;
  }
  .hero__inner {
    gap: 40px;
  }
  .hero__content {
    max-width: 520px;
  }
  .hero__media {
    max-width: 480px;
  }
}

/* --- Tablet (768px - 991px) ---
   Reduce height, begin stacking layout.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero {
    min-height: 560px;
    padding: 72px 0 64px;
  }
  .hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 48px;
  }
  .hero__content {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  .hero__media {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero__subtitle {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero {
    min-height: auto;
    padding: 64px 0 48px;
  }
  .hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }
  .hero__content {
    max-width: 100%;
  }
  .hero__actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
  .hero__media {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- Mobile (< 576px) ---
   Full stack, compact spacing.
   ========================================================================== */
@media (max-width: 575.98px) {
  .hero {
    min-height: auto;
    padding: 64px 0 48px;
  }
  .hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }
  .hero__content {
    max-width: 100%;
  }
  .hero__subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }
  .hero__actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
  .hero__media {
    max-width: 100%;
  }
  .hero__badge {
    font-size: 0.813rem;
  }
}


/* ==========================================================================
   4. TRUST BAR
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .trust-bar {
    padding: 32px 0;
  }
  .trust-bar__list {
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .trust-bar {
    padding: 24px 0;
  }
  .trust-bar__list {
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .trust-bar__item img {
    height: 24px;
  }
}

/* --- Mobile (< 576px) ---
   Horizontal scroll for trust items.
   ========================================================================== */
@media (max-width: 575.98px) {
  .trust-bar {
    padding: 20px 0;
    overflow: hidden;
  }
  .trust-bar__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 16px;
  }
  .trust-bar__list::-webkit-scrollbar {
    display: none;
  }
  .trust-bar__item {
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  .trust-bar__item img {
    height: 20px;
  }
  .trust-bar__label {
    font-size: 0.75rem;
  }
}


/* ==========================================================================
   5. SECTIONS (Global Spacing)
   ========================================================================== */

/* --- Tablet Landscape (992px - 1199px) ---
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .section {
    padding-top: 80px;
    padding-bottom: 80px;
  }
  .section--compact {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .section--compact {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .section__header {
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .section--compact {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .section--compact {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .section--hero-mobile {
    padding-top: 64px;
    padding-bottom: 48px;
  }
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .section__header {
    margin-bottom: 32px;
  }
  .section__header p {
    font-size: 0.938rem;
  }
}


/* ==========================================================================
   6. CARDS
   ========================================================================== */

/* --- Tablet Landscape (992px - 1199px) ---
   3-column to 2-column where needed.
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .cards-grid--three {
    grid-template-columns: repeat(3, 1fr);
  }
  .card {
    padding: 28px;
  }
}

/* --- Tablet (768px - 991px) ---
   2-column grid.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .cards-grid,
  .cards-grid--three,
  .cards-grid--four {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .card {
    padding: 24px;
  }
  .card__title {
    font-size: 1.125rem;
  }
  .card__description {
    font-size: 0.938rem;
  }
  .card__icon {
    width: 44px;
    height: 44px;
  }
}

/* --- Large Mobile (576px - 767px) ---
   2-column for smaller cards, single for feature cards.
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cards-grid--compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card {
    padding: 20px;
  }
  .card__icon {
    width: 40px;
    height: 40px;
  }
}

/* --- Mobile (< 576px) ---
   Single column stack.
   ========================================================================== */
@media (max-width: 575.98px) {
  .cards-grid,
  .cards-grid--two,
  .cards-grid--three,
  .cards-grid--four,
  .cards-grid--compact {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card {
    padding: 20px;
  }
  .card__title {
    font-size: 1.063rem;
  }
  .card__description {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  .card__icon {
    width: 36px;
    height: 36px;
  }
  .card__actions {
    flex-direction: column;
    gap: 8px;
  }
  .card__actions .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   7. FOOTER
   ========================================================================== */

/* --- Tablet Landscape (992px - 1199px) ---
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .footer__grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 32px;
  }
  .footer {
    padding: 64px 0 32px;
  }
}

/* --- Tablet (768px - 991px) ---
   2-3 column grid.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .footer {
    padding: 56px 0 28px;
  }
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
  }
  .footer__brand {
    grid-column: 1 / -1;
    max-width: 480px;
  }
  .footer__nav-group {
    padding: 0;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .footer {
    padding: 48px 0 24px;
  }
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* --- Mobile (< 576px) ---
   Single column, stacked.
   ========================================================================== */
@media (max-width: 575.98px) {
  .footer {
    padding: 40px 0 20px;
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer__brand {
    text-align: center;
  }
  .footer__brand-logo img {
    height: 28px;
  }
  .footer__brand-description {
    font-size: 0.875rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .footer__nav-group {
    text-align: center;
  }
  .footer__nav-title {
    font-size: 0.875rem;
    margin-bottom: 12px;
  }
  .footer__nav-link {
    font-size: 0.875rem;
    padding: 6px 0;
  }
  .footer__social {
    justify-content: center;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding-top: 20px;
  }
  .footer__bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
  }
  .footer__copyright {
    font-size: 0.813rem;
  }
}


/* ==========================================================================
   8. BUTTONS
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .btn--lg {
    height: 48px;
    padding: 0 24px;
    font-size: 0.938rem;
  }
}

/* --- Mobile (< 768px) ---
   Full-width on small screens where appropriate, reduced height.
   ========================================================================== */
@media (max-width: 767.98px) {
  .btn--lg {
    height: 46px;
    padding: 0 20px;
    font-size: 0.938rem;
  }
  .btn--block-mobile {
    width: 100%;
    justify-content: center;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .btn {
    height: 42px;
    padding: 0 16px;
    font-size: 0.875rem;
    border-radius: 8px;
  }
  .btn--lg {
    height: 44px;
    padding: 0 20px;
    font-size: 0.875rem;
  }
  .btn--sm {
    height: 34px;
    padding: 0 12px;
    font-size: 0.813rem;
  }
  .btn-group {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   9. FORMS
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .form-grid .form-group--full {
    grid-column: 1 / -1;
  }
}

/* --- Mobile (< 768px) ---
   Full-width inputs.
   ========================================================================== */
@media (max-width: 767.98px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .form-input,
  .form-select,
  .form-textarea {
    width: 100%;
    height: 44px;
    font-size: 1rem;
  }
  .form-textarea {
    height: auto;
    min-height: 100px;
  }
  .form-label {
    font-size: 0.875rem;
    margin-bottom: 6px;
  }
  .form-help {
    font-size: 0.813rem;
  }
  .form-group {
    margin-bottom: 16px;
  }
}

/* --- Mobile (< 576px) ---
   Slightly smaller inputs, tighter layout.
   ========================================================================== */
@media (max-width: 575.98px) {
  .form-input,
  .form-select {
    height: 42px;
    padding: 0 12px;
    font-size: 0.938rem;
    border-radius: 8px;
  }
  .form-textarea {
    padding: 10px 12px;
    font-size: 0.938rem;
    border-radius: 8px;
  }
  .form-inline {
    flex-direction: column;
    gap: 12px;
  }
  .form-inline .btn {
    width: 100%;
  }
  .form-row {
    flex-direction: column;
    gap: 16px;
  }
  .form-checkbox-label,
  .form-radio-label {
    font-size: 0.875rem;
  }
}


/* ==========================================================================
   10. TABS
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .tabs__nav {
    gap: 4px;
  }
  .tabs__pill {
    padding: 10px 18px;
    font-size: 0.875rem;
  }
  .tabs__content {
    padding: 24px;
  }
}

/* --- Mobile (< 768px) ---
   Horizontal scroll for tab pills.
   ========================================================================== */
@media (max-width: 767.98px) {
  .tabs__nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding-bottom: 4px;
    margin-bottom: 20px;
    scroll-snap-type: x proximity;
  }
  .tabs__nav::-webkit-scrollbar {
    display: none;
  }
  .tabs__pill {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 0.875rem;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  .tabs__content {
    padding: 20px;
    width: 100%;
  }
  .tabs__panel {
    width: 100%;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .tabs__pill {
    padding: 8px 14px;
    font-size: 0.813rem;
    border-radius: 6px;
  }
  .tabs__content {
    padding: 16px;
    border-radius: 8px;
  }
}


/* ==========================================================================
   11. DEVICE PLACEHOLDER
   ========================================================================== */

/* --- Tablet Landscape (992px - 1199px) ---
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .device-placeholder {
    max-width: 480px;
  }
  .device-placeholder--secondary {
    max-width: 240px;
  }
}

/* --- Tablet (768px - 991px) ---
   Scale down proportionally.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .device-placeholder {
    max-width: 400px;
    margin: 0 auto;
  }
  .device-placeholder--secondary {
    max-width: 200px;
  }
  .device-placeholder__frame {
    border-radius: 16px;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .device-placeholder {
    max-width: 340px;
    margin: 0 auto;
  }
  .device-placeholder--secondary {
    display: none;
  }
  .device-placeholder__frame {
    border-radius: 14px;
  }
}

/* --- Mobile (< 576px) ---
   Hide secondary device, scale down primary.
   ========================================================================== */
@media (max-width: 575.98px) {
  .device-placeholder {
    max-width: 280px;
    margin: 0 auto;
  }
  .device-placeholder--secondary {
    display: none;
  }
  .device-placeholder__frame {
    border-radius: 12px;
    padding: 8px;
  }
  .device-placeholder__notch {
    width: 100px;
  }
}


/* ==========================================================================
   12. PRODUCT SHOWCASE
   ========================================================================== */

/* --- Tablet Landscape (992px - 1199px) ---
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .product-showcase__inner {
    gap: 40px;
  }
  .product-showcase__content {
    max-width: 480px;
  }
  .product-showcase__media {
    max-width: 500px;
  }
}

/* --- Tablet (768px - 991px) ---
   Stack to vertical.
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .product-showcase__inner {
    flex-direction: column;
    gap: 48px;
    text-align: center;
  }
  .product-showcase__content {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    order: 1;
  }
  .product-showcase__media {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    order: 2;
  }
  .product-showcase__features {
    justify-content: center;
  }
  .product-showcase__actions {
    justify-content: center;
  }

  /* Alternate rows keep consistent stack order */
  .product-showcase--reversed .product-showcase__inner {
    flex-direction: column;
  }
  .product-showcase--reversed .product-showcase__content {
    order: 1;
  }
  .product-showcase--reversed .product-showcase__media {
    order: 2;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .product-showcase__inner {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }
  .product-showcase__content {
    max-width: 100%;
  }
  .product-showcase__media {
    max-width: 400px;
    margin: 0 auto;
  }
  .product-showcase--reversed .product-showcase__inner {
    flex-direction: column;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .product-showcase__inner {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }
  .product-showcase__content,
  .product-showcase__media {
    max-width: 100%;
  }
  .product-showcase--reversed .product-showcase__inner {
    flex-direction: column;
  }
  .product-showcase__feature-item {
    font-size: 0.875rem;
  }
  .product-showcase__actions {
    flex-direction: column;
    gap: 10px;
  }
  .product-showcase__actions .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   13. COMPARISON GRID
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .comparison-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .comparison-grid__table {
    min-width: 600px;
  }
  .comparison-grid__cell {
    padding: 14px 16px;
    font-size: 0.875rem;
  }
}

/* --- Mobile (< 768px) ---
   Stack comparison items.
   ========================================================================== */
@media (max-width: 767.98px) {
  .comparison-grid__table {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .comparison-grid__row {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
  }
  .comparison-grid__header-row {
    display: none;
  }
  .comparison-grid__cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
  }
  .comparison-grid__cell:last-child {
    border-bottom: none;
  }
  .comparison-grid__cell::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.813rem;
    color: var(--color-text-secondary, #6b7280);
    flex-shrink: 0;
    margin-right: 16px;
  }
  .comparison-grid__cell--feature {
    background-color: var(--color-bg-subtle, #f5f5f7);
    font-weight: 600;
    font-size: 0.938rem;
  }
  .comparison-grid__cell--feature::before {
    display: none;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .comparison-grid__cell {
    padding: 10px 14px;
    font-size: 0.875rem;
  }
}


/* ==========================================================================
   14. STEPS / FLOW
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .steps {
    gap: 24px;
  }
  .steps__item {
    padding: 24px;
  }
  .steps__connector {
    width: 32px;
  }
}

/* --- Mobile (< 768px) ---
   Vertical layout with connecting line.
   ========================================================================== */
@media (max-width: 767.98px) {
  .steps {
    flex-direction: column;
    gap: 0;
    position: relative;
  }
  .steps__item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    position: relative;
  }
  .steps__number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
    z-index: 1;
    position: relative;
  }
  .steps__content {
    flex: 1;
    padding-top: 6px;
  }
  .steps__title {
    font-size: 1.063rem;
    margin-bottom: 4px;
  }
  .steps__description {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  /* Vertical connecting line */
  .steps__connector {
    display: none;
  }
  .steps__item::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 60px;
    bottom: 0;
    width: 2px;
    background-color: var(--color-border, #e5e7eb);
  }
  .steps__item:last-child::before {
    display: none;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .steps__item {
    gap: 12px;
    padding: 16px 0;
  }
  .steps__number {
    width: 36px;
    height: 36px;
    font-size: 0.813rem;
  }
  .steps__item::before {
    left: 17px;
    top: 52px;
  }
}


/* ==========================================================================
   15. MODAL
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .modal__dialog {
    max-width: 560px;
    margin: 40px auto;
  }
  .modal__body {
    padding: 24px;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .modal__dialog {
    max-width: calc(100vw - 32px);
    margin: 24px auto;
  }
  .modal__body {
    padding: 20px;
  }
  .modal__header {
    padding: 16px 20px;
  }
  .modal__footer {
    padding: 16px 20px;
  }
}

/* --- Mobile (< 576px) ---
   Full-width modal, optional bottom sheet style.
   ========================================================================== */
@media (max-width: 575.98px) {
  .modal__dialog {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin: 16px;
    border-radius: 16px;
  }
  .modal__header {
    padding: 14px 16px;
  }
  .modal__header-title {
    font-size: 1.063rem;
  }
  .modal__body {
    padding: 16px;
  }
  .modal__footer {
    padding: 14px 16px;
    flex-direction: column;
    gap: 8px;
  }
  .modal__footer .btn {
    width: 100%;
    justify-content: center;
  }
  .modal__close {
    width: 36px;
    height: 36px;
  }

  /* Bottom sheet variant */
  .modal--bottom-sheet .modal__dialog {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideUpModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .modal--bottom-sheet .modal__dialog::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    background-color: var(--color-border, #e5e7eb);
    border-radius: 2px;
    margin: 8px auto 4px;
  }

  @keyframes slideUpModal {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }
}


/* ==========================================================================
   16. PAGE HERO
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .page-hero {
    padding: 56px 0 48px;
  }
  .page-hero__title {
    font-size: 2rem;
  }
  .page-hero__subtitle {
    font-size: 1.063rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- Large Mobile (576px - 767px) ---
   ========================================================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
  .page-hero {
    padding: 48px 0 40px;
  }
  .page-hero__title {
    font-size: 1.75rem;
  }
  .page-hero__subtitle {
    font-size: 1rem;
  }
  .page-hero__breadcrumbs {
    font-size: 0.813rem;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .page-hero {
    padding: 40px 0 32px;
  }
  .page-hero__title {
    font-size: 1.5rem;
  }
  .page-hero__subtitle {
    font-size: 0.938rem;
    line-height: 1.5;
  }
  .page-hero__breadcrumbs {
    font-size: 0.75rem;
    margin-bottom: 16px;
  }
  .page-hero__breadcrumbs-separator {
    margin: 0 6px;
  }
}


/* ==========================================================================
   17. LEGAL PAGE
   ========================================================================== */

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .legal-layout {
    flex-direction: column;
    gap: 32px;
  }
  .legal-layout__toc {
    position: static;
    width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    padding-bottom: 24px;
  }
  .legal-layout__toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .legal-layout__toc-link {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.813rem;
    background-color: var(--color-bg-subtle, #f5f5f7);
    white-space: nowrap;
  }
  .legal-layout__toc-link.is-active {
    background-color: var(--color-primary, #2563eb);
    color: #fff;
  }
  .legal-layout__content {
    max-width: 100%;
  }
}

/* --- Mobile (< 768px) ---
   ToC collapses, full-width content.
   ========================================================================== */
@media (max-width: 767.98px) {
  .legal-layout {
    flex-direction: column;
    gap: 24px;
  }
  .legal-layout__toc {
    position: static;
    width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    padding-bottom: 16px;
  }
  .legal-layout__toc-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 4px;
  }
  .legal-layout__toc-list::-webkit-scrollbar {
    display: none;
  }
  .legal-layout__toc-link {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    background-color: var(--color-bg-subtle, #f5f5f7);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .legal-layout__content {
    max-width: 100%;
  }
  .legal-layout__content h2 {
    font-size: 1.375rem;
    margin-top: 40px;
  }
  .legal-layout__content h3 {
    font-size: 1.125rem;
    margin-top: 32px;
  }
  .legal-layout__content p,
  .legal-layout__content li {
    font-size: 0.938rem;
    line-height: 1.65;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .legal-layout__content h2 {
    font-size: 1.25rem;
    margin-top: 36px;
  }
  .legal-layout__content h3 {
    font-size: 1.063rem;
    margin-top: 28px;
  }
  .legal-layout__content p,
  .legal-layout__content li {
    font-size: 0.875rem;
    line-height: 1.6;
  }
}


/* ==========================================================================
   18. APP SHELL (Sidebar + Content)
   ========================================================================== */

/* --- Desktop (>= 1200px) ---
   Full sidebar visible.
   ========================================================================== */
@media (min-width: 1200px) {
  .app-shell {
    display: flex;
    min-height: 100vh;
  }
  .app-shell__sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
  .app-shell__content {
    flex: 1;
    min-width: 0;
  }
  .app-shell__mobile-trigger {
    display: none;
  }
}

/* --- Tablet Landscape (992px - 1199px) ---
   Collapsed sidebar icon rail.
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .app-shell {
    display: flex;
    min-height: 100vh;
  }
  .app-shell__sidebar {
    width: 72px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .app-shell__sidebar-label {
    display: none;
  }
  .app-shell__sidebar-icon {
    margin: 0 auto;
  }
  .app-shell__sidebar-logo-text {
    display: none;
  }
  .app-shell__content {
    flex: 1;
    min-width: 0;
  }
  .app-shell__mobile-trigger {
    display: none;
  }
}

/* --- Below 992px: Hide Sidebar, Show Mobile Trigger ---
   ========================================================================== */
@media (max-width: 991.98px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  .app-shell__sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: var(--color-bg, #fff);
    box-shadow: none;
  }
  .app-shell__sidebar.is-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }
  .app-shell__sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .app-shell__sidebar-overlay.is-visible {
    display: block;
    opacity: 1;
  }
  .app-shell__content {
    flex: 1;
    width: 100%;
    min-width: 0;
  }

  /* Top bar adjustments */
  .app-shell__topbar {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .app-shell__mobile-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .app-shell__mobile-trigger:hover,
  .app-shell__mobile-trigger:focus-visible {
    background-color: var(--color-bg-subtle, #f5f5f7);
  }

  /* Scroll lock when sidebar is open */
  body.app-sidebar-open {
    overflow: hidden;
  }
}

/* --- Tablet (768px - 991px) ---
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .app-shell__sidebar {
    width: 300px;
  }
  .app-shell__content-inner {
    padding: 24px;
  }
}

/* --- Mobile (< 576px) ---
   ========================================================================== */
@media (max-width: 575.98px) {
  .app-shell__sidebar {
    width: 280px;
  }
  .app-shell__topbar {
    padding: 10px 12px;
  }
  .app-shell__content-inner {
    padding: 16px;
  }
  .app-shell__topbar-title {
    font-size: 1rem;
  }
  .app-shell__topbar-actions {
    gap: 4px;
  }
}


/* ==========================================================================
   19. RTL SUPPORT
   ==========================================================================
   Applied via [dir="rtl"] on the html/body or .rtl class.
   Uses the Tajawal font family for Arabic content.
   Numbers remain LTR where needed.
   ========================================================================== */

/* --- Base RTL ---
   ========================================================================== */
[dir="rtl"],
.rtl {
  direction: rtl;
  text-align: right;
  font-family: "Tajawal", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Keep numbers and code LTR */
[dir="rtl"] .num,
[dir="rtl"] .number,
[dir="rtl"] [data-number],
[dir="rtl"] code,
[dir="rtl"] pre,
[dir="rtl"] .ltr,
.rtl .num,
.rtl .number,
.rtl [data-number],
.rtl code,
.rtl pre,
.rtl .ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* --- RTL: Navbar ---
   Logo right, hamburger left.
   ========================================================================== */
[dir="rtl"] .navbar__inner,
.rtl .navbar__inner {
  flex-direction: row-reverse;
}
[dir="rtl"] .navbar__nav,
.rtl .navbar__nav {
  flex-direction: row-reverse;
}
[dir="rtl"] .navbar__logo,
.rtl .navbar__logo {
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 991.98px) {
  [dir="rtl"] .navbar__hamburger,
  .rtl .navbar__hamburger {
    order: -1;
  }
  [dir="rtl"] .navbar__logo,
  .rtl .navbar__logo {
    order: 1;
  }
  /* Off-canvas from right */
  [dir="rtl"] .navbar__mobile-menu,
  .rtl .navbar__mobile-menu {
    left: auto;
    right: 0;
    transform: translateX(100%);
  }
  [dir="rtl"] .navbar__mobile-menu.is-open,
  .rtl .navbar__mobile-menu.is-open {
    transform: translateX(0);
  }
  [dir="rtl"] .navbar__mobile-menu-header,
  .rtl .navbar__mobile-menu-header {
    flex-direction: row-reverse;
  }
  [dir="rtl"] .navbar__mobile-nav-link,
  .rtl .navbar__mobile-nav-link {
    text-align: right;
  }
}

/* --- RTL: Hero ---
   Flip split layout.
   ========================================================================== */
[dir="rtl"] .hero__inner,
.rtl .hero__inner {
  flex-direction: row-reverse;
}
[dir="rtl"] .hero__content,
.rtl .hero__content {
  text-align: right;
}
[dir="rtl"] .hero__actions,
.rtl .hero__actions {
  flex-direction: row-reverse;
}

@media (max-width: 991.98px) {
  [dir="rtl"] .hero__inner,
  .rtl .hero__inner {
    flex-direction: column;
    text-align: center;
  }
  [dir="rtl"] .hero__actions,
  .rtl .hero__actions {
    flex-direction: row;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  [dir="rtl"] .hero__actions,
  .rtl .hero__actions {
    flex-direction: column;
  }
}

/* --- RTL: Cards ---
   RTL text alignment.
   ========================================================================== */
[dir="rtl"] .card,
.rtl .card {
  text-align: right;
}
[dir="rtl"] .card__header,
.rtl .card__header {
  flex-direction: row-reverse;
}
[dir="rtl"] .card__icon,
.rtl .card__icon {
  margin-left: 12px;
  margin-right: 0;
}
[dir="rtl"] .card__actions,
.rtl .card__actions {
  flex-direction: row-reverse;
}
[dir="rtl"] .card__badge,
.rtl .card__badge {
  left: auto;
  right: 16px;
}
[dir="rtl"] .card__arrow,
.rtl .card__arrow {
  transform: scaleX(-1);
}

/* --- RTL: Footer ---
   RTL column order and alignment.
   ========================================================================== */
[dir="rtl"] .footer__grid,
.rtl .footer__grid {
  direction: rtl;
}
[dir="rtl"] .footer__nav-group,
.rtl .footer__nav-group {
  text-align: right;
}
[dir="rtl"] .footer__bottom,
.rtl .footer__bottom {
  flex-direction: row-reverse;
}

@media (max-width: 575.98px) {
  [dir="rtl"] .footer__brand,
  .rtl .footer__brand {
    text-align: center;
  }
  [dir="rtl"] .footer__nav-group,
  .rtl .footer__nav-group {
    text-align: center;
  }
  [dir="rtl"] .footer__bottom,
  .rtl .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* --- RTL: Forms ---
   Right-aligned labels, flipped input padding.
   ========================================================================== */
[dir="rtl"] .form-label,
.rtl .form-label {
  text-align: right;
}
[dir="rtl"] .form-input,
[dir="rtl"] .form-select,
[dir="rtl"] .form-textarea,
.rtl .form-input,
.rtl .form-select,
.rtl .form-textarea {
  text-align: right;
  padding-left: 12px;
  padding-right: 12px;
}
[dir="rtl"] .form-input--icon,
.rtl .form-input--icon {
  padding-left: 12px;
  padding-right: 40px;
}
[dir="rtl"] .form-input-icon,
.rtl .form-input-icon {
  left: auto;
  right: 12px;
}
[dir="rtl"] .form-select,
.rtl .form-select {
  padding-left: 36px;
  padding-right: 12px;
  background-position: left 12px center;
}
[dir="rtl"] .form-help,
.rtl .form-help {
  text-align: right;
}
[dir="rtl"] .form-error,
.rtl .form-error {
  text-align: right;
}
[dir="rtl"] .form-checkbox,
[dir="rtl"] .form-radio,
.rtl .form-checkbox,
.rtl .form-radio {
  flex-direction: row-reverse;
  gap: 8px;
}
[dir="rtl"] .form-inline,
.rtl .form-inline {
  flex-direction: row-reverse;
}

/* --- RTL: Tabs ---
   ========================================================================== */
[dir="rtl"] .tabs__nav,
.rtl .tabs__nav {
  flex-direction: row-reverse;
}
[dir="rtl"] .tabs__content,
.rtl .tabs__content {
  text-align: right;
}

@media (max-width: 767.98px) {
  [dir="rtl"] .tabs__nav,
  .rtl .tabs__nav {
    flex-direction: row-reverse;
  }
}

/* --- RTL: Accordion ---
   Flip chevron/icon to left side.
   ========================================================================== */
[dir="rtl"] .accordion__header,
.rtl .accordion__header {
  flex-direction: row-reverse;
  text-align: right;
}
[dir="rtl"] .accordion__icon,
.rtl .accordion__icon {
  margin-left: 0;
  margin-right: auto;
  order: -1;
}
[dir="rtl"] .accordion__chevron,
.rtl .accordion__chevron {
  margin-right: 0;
  margin-left: 0;
  order: -1;
}
[dir="rtl"] .accordion__leading-icon,
.rtl .accordion__leading-icon {
  margin-left: 12px;
  margin-right: 0;
}
[dir="rtl"] .accordion__body,
.rtl .accordion__body {
  text-align: right;
}

/* --- RTL: Steps ---
   Flip direction, line on right side.
   ========================================================================== */
[dir="rtl"] .steps,
.rtl .steps {
  flex-direction: row-reverse;
}
[dir="rtl"] .steps__connector,
.rtl .steps__connector {
  transform: scaleX(-1);
}

@media (max-width: 767.98px) {
  [dir="rtl"] .steps,
  .rtl .steps {
    flex-direction: column;
  }
  [dir="rtl"] .steps__item,
  .rtl .steps__item {
    flex-direction: row-reverse;
  }
  [dir="rtl"] .steps__content,
  .rtl .steps__content {
    text-align: right;
  }
  /* Connecting line on right side */
  [dir="rtl"] .steps__item::before,
  .rtl .steps__item::before {
    left: auto;
    right: 19px;
  }
}

@media (max-width: 575.98px) {
  [dir="rtl"] .steps__item::before,
  .rtl .steps__item::before {
    left: auto;
    right: 17px;
  }
}

/* --- RTL: Product Showcase ---
   ========================================================================== */
[dir="rtl"] .product-showcase__inner,
.rtl .product-showcase__inner {
  flex-direction: row-reverse;
}
[dir="rtl"] .product-showcase__content,
.rtl .product-showcase__content {
  text-align: right;
}
[dir="rtl"] .product-showcase--reversed .product-showcase__inner,
.rtl .product-showcase--reversed .product-showcase__inner {
  flex-direction: row;
}

@media (max-width: 991.98px) {
  [dir="rtl"] .product-showcase__inner,
  [dir="rtl"] .product-showcase--reversed .product-showcase__inner,
  .rtl .product-showcase__inner,
  .rtl .product-showcase--reversed .product-showcase__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* --- RTL: Comparison Grid ---
   ========================================================================== */
[dir="rtl"] .comparison-grid__cell,
.rtl .comparison-grid__cell {
  text-align: right;
}

@media (max-width: 767.98px) {
  [dir="rtl"] .comparison-grid__cell,
  .rtl .comparison-grid__cell {
    flex-direction: row-reverse;
  }
  [dir="rtl"] .comparison-grid__cell::before,
  .rtl .comparison-grid__cell::before {
    margin-right: 0;
    margin-left: 16px;
  }
}

/* --- RTL: Breadcrumbs ---
   Flip separator direction.
   ========================================================================== */
[dir="rtl"] .breadcrumbs,
.rtl .breadcrumbs {
  flex-direction: row-reverse;
}
[dir="rtl"] .breadcrumbs__separator,
.rtl .breadcrumbs__separator {
  transform: scaleX(-1);
}
[dir="rtl"] .page-hero__breadcrumbs,
.rtl .page-hero__breadcrumbs {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
[dir="rtl"] .page-hero__breadcrumbs-separator,
.rtl .page-hero__breadcrumbs-separator {
  transform: scaleX(-1);
}

/* --- RTL: Trust Bar ---
   ========================================================================== */
[dir="rtl"] .trust-bar__list,
.rtl .trust-bar__list {
  flex-direction: row-reverse;
}

@media (max-width: 575.98px) {
  [dir="rtl"] .trust-bar__list,
  .rtl .trust-bar__list {
    flex-direction: row;
    direction: rtl;
  }
}

/* --- RTL: Modal ---
   ========================================================================== */
[dir="rtl"] .modal__header,
.rtl .modal__header {
  flex-direction: row-reverse;
}
[dir="rtl"] .modal__close,
.rtl .modal__close {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .modal__body,
.rtl .modal__body {
  text-align: right;
}
[dir="rtl"] .modal__footer,
.rtl .modal__footer {
  flex-direction: row-reverse;
}

@media (max-width: 575.98px) {
  [dir="rtl"] .modal__footer,
  .rtl .modal__footer {
    flex-direction: column;
  }
}

/* --- RTL: Legal Page ---
   ========================================================================== */
[dir="rtl"] .legal-layout,
.rtl .legal-layout {
  flex-direction: row-reverse;
}
[dir="rtl"] .legal-layout__toc,
.rtl .legal-layout__toc {
  border-right: none;
  border-left: 1px solid var(--color-border, #e5e7eb);
}
[dir="rtl"] .legal-layout__content,
.rtl .legal-layout__content {
  text-align: right;
}

@media (max-width: 991.98px) {
  [dir="rtl"] .legal-layout,
  .rtl .legal-layout {
    flex-direction: column;
  }
  [dir="rtl"] .legal-layout__toc,
  .rtl .legal-layout__toc {
    border-left: none;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
  }
}

/* --- RTL: App Shell / Sidebar ---
   Flip sidebar to right side.
   ========================================================================== */
@media (min-width: 1200px) {
  [dir="rtl"] .app-shell,
  .rtl .app-shell {
    flex-direction: row-reverse;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  [dir="rtl"] .app-shell,
  .rtl .app-shell {
    flex-direction: row-reverse;
  }
}

@media (max-width: 991.98px) {
  [dir="rtl"] .app-shell__sidebar,
  .rtl .app-shell__sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
  }
  [dir="rtl"] .app-shell__sidebar.is-open,
  .rtl .app-shell__sidebar.is-open {
    transform: translateX(0);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  }
  [dir="rtl"] .app-shell__topbar,
  .rtl .app-shell__topbar {
    flex-direction: row-reverse;
  }
}

/* --- RTL: Buttons ---
   Flip icon margins in buttons.
   ========================================================================== */
[dir="rtl"] .btn__icon--leading,
.rtl .btn__icon--leading {
  margin-right: 0;
  margin-left: 8px;
}
[dir="rtl"] .btn__icon--trailing,
.rtl .btn__icon--trailing {
  margin-left: 0;
  margin-right: 8px;
}
[dir="rtl"] .btn__icon--trailing svg,
.rtl .btn__icon--trailing svg {
  transform: scaleX(-1);
}

/* --- RTL: Device Placeholder ---
   ========================================================================== */
[dir="rtl"] .device-placeholder__group,
.rtl .device-placeholder__group {
  flex-direction: row-reverse;
}

/* --- RTL: Section Headers ---
   ========================================================================== */
[dir="rtl"] .section__header,
.rtl .section__header {
  text-align: right;
}

@media (max-width: 991.98px) {
  [dir="rtl"] .section__header,
  .rtl .section__header {
    text-align: center;
  }
}

/* --- RTL: Utility Spacing Overrides ---
   Mirror common directional margins and paddings.
   ========================================================================== */
[dir="rtl"] .ml-auto,
.rtl .ml-auto {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .mr-auto,
.rtl .mr-auto {
  margin-right: 0;
  margin-left: auto;
}
[dir="rtl"] .pl-0,
.rtl .pl-0 {
  padding-left: initial;
  padding-right: 0;
}
[dir="rtl"] .pr-0,
.rtl .pr-0 {
  padding-right: initial;
  padding-left: 0;
}
[dir="rtl"] .text-left,
.rtl .text-left {
  text-align: right;
}
[dir="rtl"] .text-right,
.rtl .text-right {
  text-align: left;
}
[dir="rtl"] .float-left,
.rtl .float-left {
  float: right;
}
[dir="rtl"] .float-right,
.rtl .float-right {
  float: left;
}
[dir="rtl"] .border-left,
.rtl .border-left {
  border-left: none;
  border-right: 1px solid var(--color-border, #e5e7eb);
}
[dir="rtl"] .border-right,
.rtl .border-right {
  border-right: none;
  border-left: 1px solid var(--color-border, #e5e7eb);
}

/* --- RTL: Lists ---
   ========================================================================== */
[dir="rtl"] ul,
[dir="rtl"] ol,
.rtl ul,
.rtl ol {
  padding-left: 0;
  padding-right: 1.5em;
}

/* --- RTL: Page Hero ---
   ========================================================================== */
[dir="rtl"] .page-hero,
.rtl .page-hero {
  text-align: right;
}

@media (max-width: 767.98px) {
  [dir="rtl"] .page-hero,
  .rtl .page-hero {
    text-align: center;
  }
}
