/*
 * ========================================
 * PRICING PAGE RTL STYLES - FINAL VERSION
 * ========================================
 * 
 * This CSS file contains styles for the pricing page
 * with RTL (Right-to-Left) language support.
 * Optimized for cross-browser compatibility and performance.
 * 
 * Browser Support:
 * - Chrome 60+
 * - Firefox 55+
 * - Safari 12+
 * - Edge 79+
 * - Internet Explorer 11 (limited support)
 * 
 * Table of Contents:
 * 1. Font Declarations
 * 2. Base Styles & Reset
 * 3. Container & Layout
 * 4. Pricing Introduction Section
 * 5. Pricing Plans Section
 * 6. Pricing Table Styles
 * 7. Switch/Toggle Components
 * 8. Tooltip Components
 * 9. RTL Specific Overrides
 * 10. Responsive Design
 * 11. Animations & Transitions
 * 12. Cross-Browser Compatibility
 * 13. Performance Optimizations
 * ========================================
 */

/* ========================================
   1. FONT DECLARATIONS
   ======================================== */

/* English Fonts - Gilroy Family */
@font-face {
  font-family: "GilroyRegular";
  font-display: swap;
  src: url("../fonts/Radomir-Tinkov-Gilroy-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "GilroyMedium";
  font-display: swap;
  src: url("../fonts/Radomir-Tinkov-Gilroy-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "GilroyBold";
  font-display: swap;
  src: url("../fonts/Radomir-Tinkov-Gilroy-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "GilroySemiBold";
  font-display: swap;
  src: url("../fonts/Radomir-Tinkov-Gilroy-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "GilroyExtraBold";
  font-display: swap;
  src: url("../fonts/Gilroy-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
}

/* Arabic Fonts - Cairo Family */
@font-face {
  font-family: "CairoRegular";
  font-display: swap;
  src: url("../fonts/Cairo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

@font-face {
  font-family: "CairoMedium";
  font-display: swap;
  src: url("../fonts/Cairo-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

@font-face {
  font-family: "CairoBold";
  font-display: swap;
  src: url("../fonts/Cairo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

@font-face {
  font-family: "CairoSemiBold";
  font-display: swap;
  src: url("../fonts/Cairo-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

@font-face {
  font-family: "CairoExtraBold";
  font-display: swap;
  src: url("../fonts/Cairo-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

/* Alternative Arabic Fonts - RB Family */
@font-face {
  font-family: "RbBold";
  font-display: swap;
  src: url("../fonts/RB-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

@font-face {
  font-family: "RbRegular";
  font-display: swap;
  src: url("../fonts/RB-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

/* ========================================
   2. BASE STYLES & RESET
   ======================================== */

/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Root variables for consistent theming */
:root {
  --primary-color: #0053BD;
  --secondary-color: #213242;
  --accent-color: #42b72a;
  --text-primary: #0C2532;
  --text-secondary: #4E5381;
  --text-muted: #98A2B3;
  --border-color: #E6EBF2;
  --background-light: #F8FAFC;
  --background-table: #F6F8FA;
  --success-color: #29B80B;
  --highlight-color: #5ddcf2;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.4s ease;
  --border-radius-small: 4px;
  --border-radius-medium: 8px;
  --border-radius-large: 12px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
}

/* Basic element styles */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: "CairoRegular", "RbRegular", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Link styles with improved accessibility */
a {
  color: var(--secondary-color);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-normal);
  outline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--primary-color);
  text-decoration: none;
}

a:focus {
  outline: 2px solid var(--primary-color);
}

/* Button reset */
button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  outline-offset: 2px;
}

button:focus {
  outline: 2px solid var(--primary-color);
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   3. CONTAINER & LAYOUT
   ======================================== */

/* Bootstrap container overrides with improved responsive behavior */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* Responsive container max-widths */
@media (min-width: 576px) {
  .container, .container-sm {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container, .container-sm, .container-md {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container, .container-sm, .container-md, .container-lg {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl {
    max-width: 1300px;
  }
}

@media (min-width: 1400px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl {
    max-width: 1320px;
  }
}

/* ========================================
   4. PRICING INTRODUCTION SECTION
   ======================================== */

.pricing-intro-section {
  padding: 80px 0 60px 0;
  background-color: var(--background-light);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out;
}

/* Background gradient overlay with improved performance */
.pricing-intro-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 83, 189, 0.03) 0%, rgba(0, 83, 189, 0.01) 100%);
  pointer-events: none;
  will-change: transform;
}

.pricing-intro-section .container {
  position: relative;
  z-index: 1;
}

/* Main headline styling with improved typography */
.pricing-intro-headline {
  font-family: "CairoExtraBold", "RbBold", "GilroyExtraBold", sans-serif;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: color var(--transition-normal);
  font-feature-settings: "liga" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  text-align: center;
}

/* Paragraph styling with improved readability */
.pricing-intro-paragraph {
  font-family: "CairoMedium", "RbRegular", "GilroyMedium", sans-serif;
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 auto;
  max-width: 680px;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity var(--transition-normal);
  font-feature-settings: "liga" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  text-align: center;
}

/* ========================================
   5. PRICING PLANS SECTION
   ======================================== */

.mazayac-plans {
  background-color: #ffffff;
  position: relative;
  z-index: 1;
}

/* Sticky header for plans with improved performance */
.mazayac-plans-head {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: -webkit-sticky;
  position: sticky;
  top: 90px;
  background-color: #ffffff;
  z-index: 2;
  margin-bottom: -1px;
  transition: box-shadow var(--transition-normal);
  will-change: box-shadow;
}

.mazayac-plans-head.scrolled {
  box-shadow: 0 2px 8px var(--shadow-light);
}

/* Plans cards container with improved flex behavior */
.mazayac-plans-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  text-align: center;
}

/* Individual plan box with enhanced styling */
.mazayac-plans-box {
  border-inline-start: 1px solid var(--border-color);
  padding: var(--spacing-lg);
  color: var(--text-primary);
  flex: 1;
  min-width: 250px;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  background-color: #ffffff;
}

.mazayac-plans-cards .mazayac-plans-box:last-child .mazayac-billed span.d-none.d-md-inline-block,
.mazayac-plans-cards .mazayac-plans-box:last-child .month {
    color: #F1F5FA !important;
}

.mazayac-plans-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-light);
}

/* Premium plan highlight */
.mazayac-plans-box.premium-highlight {
  background-color: var(--highlight-color);
  border: 2px solid var(--highlight-color);
  position: relative;
}

.mazayac-plans-box.premium-highlight::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--highlight-color), var(--primary-color));
  z-index: -1;
  border-radius: var(--border-radius-medium);
}

/* Plan title styling with improved hierarchy */
.mazayac-plans-box-title {
  font-family: "GilroyBold", "CairoBold", "RbBold", sans-serif;
  color: var(--text-primary);
  font-size: clamp(20px, 3vw, 24px);
  line-height: 1.25;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.mazayac-plans-box-title span {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--secondary-color);
  font-family: "GilroyRegular", "CairoRegular", "RbRegular", sans-serif;
  display: block;
  margin-top: var(--spacing-sm);
  font-weight: 400;
}

/* Special styling for unlimited plan */
.mazayac-plans-box-title.unlimited-val .unlimit {
  color: #ffffff;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.6;
  font-family: "GilroyMedium", "CairoMedium", "RbRegular", sans-serif;
  background-color: rgba(255, 255, 255, 0.2);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-small);
  display: inline-block;
  margin-top: var(--spacing-xs);
}

/* Price container with improved layout */
.mazayac-plans-box .plan_box {
  height: auto;
  min-height: 55px;
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

/* Price number styling with better typography */
.mazayac-plans-box .price .number {
  font-family: "GilroyExtraBold", "CairoExtraBold", "RbBold", sans-serif;
  font-size: clamp(32px, 6vw, 47px);
  line-height: 1.1;
  color: var(--text-primary);
  font-weight: 800;
}

.mazayac-plans-box .price .number.fraction {
  font-family: "GilroyRegular", "CairoRegular", "RbRegular", sans-serif;
  font-size: clamp(16px, 3vw, 20px);
  margin-left: -4px;
  position: relative;
  top: -0.2em;
}

/* Price month/currency styling */
.mazayac-plans-box .price .month {
  font-family: "GilroyMedium", "CairoMedium", "RbRegular", sans-serif;
  color: var(--text-muted);
  font-size: clamp(12px, 2vw, 14px);
  line-height: 1.8;
  margin-left: var(--spacing-xs);
}

/* Billing information with improved readability */
.mazayac-plans-box .billed {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.6;
  font-family: "GilroyMedium", "CairoMedium", "RbRegular", sans-serif;
}

.mazayac-plans-box .billed span {
  margin-inline-end: 3px;
}

.mazayac-plans-box .billed-price {
  color: var(--text-secondary);
  font-weight: 600;
}

.mazayac-plans-box .billed-yearly {
  display: none;
}

/* Plan filter/switcher section */
.mazayac-plans-filter {
  flex-grow: 1;
  border: none;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   6. PRICING TABLE STYLES
   ======================================== */

/* Table wrapper for horizontal scrolling */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--spacing-lg);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Main table styling */
.plans-table-mazayac {
  table-layout: fixed;
  word-wrap: break-word;
  border: 1px solid var(--border-color);
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  min-width: 600px; /* Ensure minimum width for mobile scrolling */
}

/* Table header styling */
.plans-table-mazayac thead td {
  font-size: clamp(16px, 2.5vw, 20px);
  font-family: "GilroyBold", "CairoBold", "RbBold", sans-serif;
  padding: var(--spacing-lg) var(--spacing-lg);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  background: var(--background-table);
  font-weight: 700;
  position: relative;
}

/* Table cell styling */
.plans-table-mazayac td {
  border: 1px solid var(--border-color);
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: clamp(14px, 2vw, 18px);
  font-family: "GilroyMedium", "CairoMedium", "RbRegular", sans-serif;
  vertical-align: top;
  position: relative;
}

.plans-table-mazayac td p {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
}

/* Feature row styling with hover effects */
.plans-table-mazayac .table-tr-style > td {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--background-table);
  transition: background-color var(--transition-normal);
}

.plans-table-mazayac tbody tr {
  transition: background-color var(--transition-normal);
}

.plans-table-mazayac tbody tr:hover {
  background-color: rgba(0, 83, 189, 0.02);
}

/* First column width */
.plans-table-mazayac tr td:first-of-type {
  width: 32.8% !important;
  min-width: 200px;
}

/* Feature title styling */
.plans-table-mazayac .cell-title {
  margin: 0;
  font-size: clamp(16px, 2vw, 18px);
  font-family: "GilroySemiBold", "CairoSemiBold", "RbBold", sans-serif;
  font-weight: 600;
}

/* Check and X icons with improved accessibility */
.plans-table-mazayac td .check-icon {
  color: var(--success-color);
  font-size: clamp(16px, 2vw, 18px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.plans-table-mazayac td .x-icon {
  color: var(--border-color);
  font-size: clamp(16px, 2vw, 18px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Price display in table */
.plans-table-mazayac td p.selectable_cell .month {
  color: var(--text-muted);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.6;
}

/* ========================================
   7. SWITCH/TOGGLE COMPONENTS
   ======================================== */

/* Main switch container with improved accessibility */
.switch {
  position: relative;
  display: inline-block;
  margin: 0;
  transform: rotate(-90deg);
  margin-bottom: 5px;
  margin-top: 7px;
  width: 36px;
  height: 22px;
  margin-inline-start: -7px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

/* Switch slider with improved styling */
.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #A8ACC2;
  transition: var(--transition-slow);
  border-radius: 34px;
  outline: none;
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff;
  transition: var(--transition-slow);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Switch states with improved visual feedback */
.switch input:checked + .slider {
  background-color: var(--primary-color);
}

.switch input:focus + .slider {
  box-shadow: 0 0 0 2px rgba(0, 83, 189, 0.3);
}

.switch input:checked + .slider:before {
  transform: translateX(18px);
}

.switch:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Switcher text styling with improved typography */
.mazayac-plans-switcher p {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.3;
  font-family: "GilroyMedium", "CairoMedium", "RbRegular", sans-serif;
}

.mazayac-plans-switcher p .savings {
  text-decoration-line: line-through;
  text-decoration-color: rgba(217, 44, 32, 0.64);
  color:#5ddcf2;
  font-size: clamp(12px, 2vw, 14px);
  margin-left: var(--spacing-sm);
  background-color: rgba(66, 183, 42, 0.1);
  padding: 2px 6px;
  border-radius: var(--border-radius-small);
}

.mazayac-plans-switcher .monthly,
.mazayac-plans-switcher .annual {
  opacity: 0.5;
  transition: opacity var(--transition-normal);
}

.mazayac-plans-switcher .monthly.active,
.mazayac-plans-switcher .annual.active {
  opacity: 1;
  font-family: "GilroyBold", "CairoBold", "RbBold", sans-serif;
  color: var(--text-primary);
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.3;
  font-weight: 700;
}

.mazayac-plans-switcher .monthly.active .savings,
.mazayac-plans-switcher .annual.active .savings {
  text-decoration: none;
}

.mazayac-plans-switcher .billed-wrap-in {
  display: block;
}

.mazayac-plans-switcher .switch input:checked + .slider {
  background-color: #5ddcf2;
}

/* Monthly billing text */
p.monthly.billed-wrap-in {
  color: var(--text-muted);
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.6;
}

/* ========================================
   8. TOOLTIP COMPONENTS
   ======================================== */

/* Tooltip wrapper with improved layout */
.plans-table-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: var(--spacing-sm);
}

.plans-table-title-wrap > span {
  color: var(--text-primary);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
  align-items: center;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Tooltip icon with improved accessibility */
.tooltip-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-normal);
  border: none;
  background: none;
  padding: 2px;
  border-radius: var(--border-radius-small);
}

.tooltip-icon:hover,
.tooltip-icon:focus {
  color: var(--primary-color);
  background-color: rgba(0, 83, 189, 0.1);
}

.tooltip-icon:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Tooltip popup (hidden by default) */
.plans-table-title-wrap .tooltip-pop {
  display: none;
  background: rgba(0, 0, 0, 0.5);
  width: 15px;
  height: 15px;
  text-align: center;
  line-height: 10px;
  border-radius: 50%;
  margin: 0 5px;
}

.plans-table-title-wrap .tooltip-pop i {
  font-size: 9px;
  color: #ffffff;
}

/* Feature tooltip with improved styling */
.feature-tooltip {
  position: absolute;
  background: var(--text-primary);
  color: #ffffff;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-medium);
  box-shadow: 0 4px 12px var(--shadow-medium);
  z-index: 1000;
  max-width: 300px;
  display: none;
  top: 100%;
  left: 0;
  margin-top: var(--spacing-sm);
  animation: tooltipFadeIn 0.2s ease-out;
}

.feature-tooltip strong {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 600;
}

.feature-tooltip p {
  margin: 0;
  font-size: clamp(12px, 1.8vw, 14px);
  line-height: 1.5;
  opacity: 0.9;
}

/* Tooltip close button */
.tooltip-close {
  position: absolute;
  right: var(--spacing-sm);
  top: var(--spacing-sm);
  cursor: pointer;
  color: #ffffff;
  background: none;
  border: none;
  padding: 2px;
  border-radius: var(--border-radius-small);
  transition: background-color var(--transition-normal);
}

.tooltip-close:hover,
.tooltip-close:focus {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Tooltip arrow */
.box-polygon {
  position: absolute;
  top: -10px;
  left: 20px;
  width: 20px;
  height: 10px;
}

/* ========================================
   9. RTL SPECIFIC OVERRIDES
   ======================================== */

/* RTL text alignment and direction */
[dir="rtl"] .pricing-intro-section {
  text-align: right;
}

[dir="rtl"] .pricing-intro-headline {
  font-family: "CairoExtraBold", "RbBold", "GilroyExtraBold", sans-serif;
  text-align: center;
}

[dir="rtl"] .pricing-intro-paragraph {
  font-family: "CairoMedium", "RbRegular", "GilroyMedium", sans-serif;
  text-align: center;
  direction: rtl;
}

/* RTL font overrides for plans */
[dir="rtl"] .mazayac-plans-box-title {
  font-family: "RbBold", "CairoBold", "GilroyBold", sans-serif;
}

[dir="rtl"] .mazayac-plans-box-title span {
  font-family: "RbRegular", "CairoRegular", "GilroyRegular", sans-serif !important;
}

[dir="rtl"] .mazayac-plans-switcher .monthly.active, 
[dir="rtl"] .mazayac-plans-switcher .annual.active {
  font-family: "RbBold", "CairoBold", "GilroyBold", sans-serif !important;
  line-height: 1.2;
}

[dir="rtl"] .mazayac-plans-switcher p {
  line-height: 1.2;
}

/* RTL price display with improved layout */
[dir="rtl"] .plans-panels .price-box .price {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  line-height: 1.4;
  direction: ltr;
}

[dir="rtl"] .plans-panels .price-box .price .number {
  order: 2;
  font-family: "RbBold", "CairoBold", "GilroyExtraBold", sans-serif;
}

[dir="rtl"] .plans-panels .price-box .price .number.fraction {
  font-family: "RbBold", "CairoBold", "GilroyRegular", sans-serif;
  position: relative;
  top: -10px;
  order: 1;
  margin-left: -2px;
}

[dir="rtl"] .plans-panels .price-box .price .number.fraction span {
  float: left;
}

[dir="rtl"] .plans-panels .price-box .price .month {
  order: 3;
  font-family: "RbBold", "CairoBold", "GilroyMedium", sans-serif;
  position: relative;
  top: -10px;
  margin: 0 2px;
}

/* RTL table text with proper font stacks */
[dir="rtl"] .plans-table tr td .plans-table-title-wrap > span,
[dir="rtl"] .plans-table tr td .plans-table-title-wrap > span > span {
  font-family: "RbRegular", "CairoRegular", "Segoe UI", Helvetica, Tahoma, "Open Sans", arial, serif;
  font-weight: 600;
}

[dir="rtl"] .plans-table tr td p span.price {
  font-family: "RbRegular", "CairoRegular", "Segoe UI", Helvetica, Tahoma, "Open Sans", arial, serif;
  font-weight: 600;
  font-size: clamp(16px, 2.5vw, 20px);
}

[dir="rtl"] .plans-table tr td p span.month {
  font-family: "RbRegular", "CairoRegular", "Segoe UI", Helvetica, Tahoma, "Open Sans", arial, serif;
  font-weight: 600;
}

/* RTL table styling */
[dir="rtl"] .mazayac-plans .plans-table-mazayac td {
  font-family: "RbRegular", "CairoRegular", "GilroyMedium", sans-serif;
  font-size: clamp(14px, 2vw, 16px);
}

[dir="rtl"] .mazayac-plans .plans-table-mazayac .cell-title {
  font-family: "RbRegular", "CairoRegular", "GilroySemiBold", sans-serif;
}

[dir="rtl"] .mazayac-plans .plans-table-mazayac .cell-title .month {
  font-size: clamp(12px, 2vw, 14px);
}

[dir="rtl"] .mazayac-plans .plans-table-mazayac thead tr td {
  font-family: "RbBold", "CairoBold", "GilroyBold", sans-serif;
  font-size: clamp(16px, 2.5vw, 18px);
}

[dir="rtl"] .mazayac-plans-box .price .month {
  font-family: "RbRegular", "CairoRegular", "GilroyMedium", sans-serif;
}

[dir="rtl"] .mazayac-plans-box .billed span {
  font-family: "RbRegular", "CairoRegular", "GilroyMedium", sans-serif;
}

/* RTL switch positioning */
[dir="rtl"] .switch .slider:before {
  left: auto;
  right: 4px;
}

[dir="rtl"] .switch input:checked + .slider:before {
  transform: translateX(-14px);
}

[dir="rtl"] .switch {
  transform: rotate(90deg);
}

/* RTL tooltip positioning */
[dir="rtl"] .tooltip-close {
  position: absolute;
  left: var(--spacing-sm);
  right: auto;
}

[dir="rtl"] .feature-tooltip {
  left: auto;
  right: 0;
}

/* RTL plan value indicators */
[dir="rtl"] .plans-panels .price-box-title span.best-val {
  font-family: "RbBold", "CairoBold", "GilroyBold", sans-serif;
}

[dir="rtl"] .plans-panels .price-box-title span.unlimit {
  font-family: "RbBold", "CairoBold", "GilroyMedium", sans-serif;
}

/* ========================================
   10. RESPONSIVE DESIGN
   ======================================== */

/* Large tablets and small desktops (992px to 1199px) */
@media (max-width: 1199px) {
  .mazayac-plans-cards {
    gap: var(--spacing-sm);
  }
  
  .mazayac-plans-box {
    min-width: 220px;
  }
}

/* Tablets and below (768px to 991px) */
@media (max-width: 991px) {
  .pricing-intro-section {
    padding: 60px 0 40px 0;
  }
  
  /* Maintain 4-column layout but adjust spacing */
  .mazayac-plans-cards {
    flex-direction: row;
    gap: 0;
  }

  .mazayac-plans-box {
    border-inline-start: 1px solid var(--border-color);
    min-width: 25%;
    flex: 1;
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .mazayac-plans-box:first-child {
    border-inline-start: none;
  }

  .mazayac-plans-head {
    position: static;
    top: auto;
  }

  /* Adjust table for smaller screens */
  .plans-table-mazayac {
    font-size: 14px;
  }

  .plans-table-mazayac td {
    padding: 10px 12px;
    font-size: clamp(12px, 1.8vw, 14px);
  }

  .plans-table-mazayac thead td {
    padding: 12px;
    font-size: clamp(14px, 2vw, 16px);
  }

  /* Adjust plan titles and prices for tablets */
  .mazayac-plans-box-title {
    font-size: clamp(16px, 2.5vw, 18px);
    margin-bottom: var(--spacing-sm);
  }

  .mazayac-plans-box .price .number {
    font-size: clamp(24px, 4vw, 32px);
  }

  .mazayac-plans-box .price .number.fraction {
    font-size: clamp(12px, 2vw, 16px);
  }

  .mazayac-plans-box .price .month {
    font-size: clamp(10px, 1.5vw, 12px);
  }

  .mazayac-plans-box .billed {
    font-size: clamp(12px, 1.8vw, 14px);
  }
}

/* Mobile landscape and small tablets (576px to 767px) */
@media (max-width: 767px) {
  .pricing-intro-section {
    padding: 50px 0 30px 0;
  }

  /* Maintain 4-column layout at 25% each */
  .mazayac-plans-box {
    padding: var(--spacing-sm) var(--spacing-xs);
    width: 25%;
    min-width: 25%;
    flex: 0 0 25%;
  }

  .mazayac-plans-filter {
    width: 25%;
    min-width: 25%;
    flex: 0 0 25%;
    padding: var(--spacing-sm) var(--spacing-xs);
  }

  .mazayac-plans-switcher p {
    text-align: center;
    font-size: clamp(12px, 2vw, 14px);
  }

  /* Further reduce table cell padding and font sizes */
  .plans-table-mazayac td {
    padding: 8px 10px;
    font-size: clamp(11px, 1.5vw, 13px);
  }

  .plans-table-mazayac thead td {
    padding: 10px;
    font-size: clamp(12px, 1.8vw, 14px);
  }

  /* Adjust plan content for mobile landscape */
  .mazayac-plans-box-title {
    font-size: clamp(14px, 2vw, 16px);
    margin-bottom: 8px;
  }

  .mazayac-plans-box .price .number {
    font-size: clamp(20px, 3.5vw, 28px);
  }

  .mazayac-plans-box .price .number.fraction {
    font-size: clamp(10px, 1.8vw, 14px);
  }

  .mazayac-plans-box .price .month {
    font-size: clamp(8px, 1.2vw, 10px);
  }

  .mazayac-plans-box .billed {
    font-size: clamp(10px, 1.5vw, 12px);
  }

  .mazayac-plans-box-title.unlimited-val .unlimit {
    font-size: clamp(10px, 1.5vw, 12px);
    padding: 2px 4px;
  }

  /* Adjust tooltip for smaller screens */
  .feature-tooltip {
    max-width: 250px;
    padding: var(--spacing-sm);
    font-size: clamp(10px, 1.5vw, 12px);
  }

  .feature-tooltip strong {
    font-size: clamp(11px, 1.6vw, 13px);
  }
}

/* Mobile portrait (320px to 575px) */
@media (max-width: 575px) {
  .container {
    padding-right: 10px;
    padding-left: 10px;
  }

  .pricing-intro-section {
    padding: 40px 0 20px 0;
  }

  /* Maintain 4-column layout but with minimal padding */
  .mazayac-plans-box {
    padding: var(--spacing-xs) 4px;
    width: 25%;
    min-width: 25%;
    flex: 0 0 25%;
  }

  .mazayac-plans-filter {
    width: 25%;
    min-width: 25%;
    flex: 0 0 25%;
    padding: var(--spacing-xs) 4px;
  }

  /* Minimal table cell padding for mobile portrait */
  .plans-table-mazayac td {
    padding: 6px 8px;
    font-size: clamp(10px, 1.3vw, 12px);
  }

  .plans-table-mazayac thead td {
    padding: 8px;
    font-size: clamp(11px, 1.5vw, 13px);
  }

  /* Compact plan content for mobile portrait */
  .mazayac-plans-box-title {
    font-size: clamp(12px, 1.8vw, 14px);
    margin-bottom: 6px;
  }

  .mazayac-plans-box .price .number {
    font-size: clamp(16px, 3vw, 24px);
  }

  .mazayac-plans-box .price .number.fraction {
    font-size: clamp(8px, 1.5vw, 12px);
  }

  .mazayac-plans-box .price .month {
    font-size: clamp(7px, 1vw, 9px);
  }

  .mazayac-plans-box .billed {
    font-size: clamp(8px, 1.2vw, 10px);
  }

  .mazayac-plans-box-title.unlimited-val .unlimit {
    font-size: clamp(8px, 1.2vw, 10px);
    padding: 1px 3px;
  }

  /* Adjust switch for mobile */
  .switch {
    width: 32px;
    height: 20px;
  }

  .switch .slider:before {
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 4px;
  }

  .switch input:checked + .slider:before {
    transform: translateX(12px);
  }

  [dir="rtl"] .switch input:checked + .slider:before {
    transform: translateX(-12px);
  }

  /* Compact tooltip for mobile */
  .feature-tooltip {
    max-width: 200px;
    padding: var(--spacing-xs);
    font-size: 10px;
  }

  .feature-tooltip strong {
    font-size: 11px;
  }

  .feature-tooltip p {
    font-size: 9px;
  }
}

/* Extra small devices (below 320px) */
@media (max-width: 319px) {
  .container {
    padding-right: 8px;
    padding-left: 8px;
  }

  .pricing-intro-section {
    padding: 30px 0 15px 0;
  }

  .mazayac-plans-box {
    padding: 4px 2px;
    width: 25%;
    min-width: 25%;
    flex: 0 0 25%;
  }

  .mazayac-plans-filter {
    width: 25%;
    min-width: 25%;
    flex: 0 0 25%;
    padding: 4px 2px;
  }

  .mazayac-plans-box-title {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .mazayac-plans-box .price .number {
    font-size: 14px;
  }

  .mazayac-plans-box .price .number.fraction {
    font-size: 7px;
  }

  .mazayac-plans-box .price .month {
    font-size: 6px;
  }

  .mazayac-plans-box .billed {
    font-size: 7px;
  }

  .plans-table-mazayac td {
    padding: 4px 6px;
    font-size: 9px;
  }

  .plans-table-mazayac thead td {
    padding: 6px;
    font-size: 10px;
  }
}

/* ========================================
   11. ANIMATIONS & TRANSITIONS
   ======================================== */

/* Fade in animation for intro section */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tooltip fade in animation */
@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation for highlighted elements */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 83, 189, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 83, 189, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 83, 189, 0);
  }
}

/* Hover effects for interactive elements */
.mazayac-plans-box {
  will-change: transform, box-shadow;
}

/* Smooth transitions for all interactive elements */
.switch,
.tooltip-icon,
.plans-table-title-wrap > span,
.mazayac-plans-box,
.plans-table-mazayac tbody tr {
  will-change: auto;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .pricing-intro-section {
    animation: none;
  }
  
  .mazayac-plans-box:hover {
    transform: none;
  }
}

/* ========================================
   12. CROSS-BROWSER COMPATIBILITY
   ======================================== */

/* Flexbox fallbacks for older browsers */
.mazayac-plans-cards {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;
}

.mazayac-plans-box {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

/* Grid fallbacks for table layout */
@supports not (display: grid) {
  .plans-table-mazayac {
    width: 100%;
    table-layout: fixed;
  }
}

/* Sticky positioning fallbacks */
@supports not (position: sticky) {
  .mazayac-plans-head {
    position: relative;
  }
}

/* CSS custom properties fallbacks */
@supports not (color: var(--primary-color)) {
  .mazayac-plans-box {
    color: #0C2532;
  }
  
  .switch input:checked + .slider {
    background-color: #0053BD;
  }
  
  .plans-table-mazayac td .check-icon {
    color: #29B80B;
  }
}

/* Clamp function fallbacks for older browsers */
@supports not (font-size: clamp(16px, 2vw, 20px)) {
  .pricing-intro-headline {
    font-size: 48px;
  }
  
  @media (max-width: 768px) {
    .pricing-intro-headline {
      font-size: 36px;
    }
  }
  
  @media (max-width: 480px) {
    .pricing-intro-headline {
      font-size: 28px;
    }
  }
}

/* ========================================
   13. PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU acceleration for animations */
.mazayac-plans-box,
.switch .slider,
.feature-tooltip {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Optimize repaints and reflows */
.plans-table-mazayac tbody tr:hover {
  will-change: background-color;
}

.mazayac-plans-box:hover {
  will-change: transform, box-shadow;
}

/* Optimize font loading */
@font-face {
  font-family: "CairoRegular";
  font-display: swap;
  src: url("../fonts/Cairo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

/* Contain layout shifts */
.mazayac-plans-box {
  contain: layout style;
}

.plans-table-mazayac {
  contain: layout;
}

/* Optimize scroll performance */
.table-wrapper {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Critical rendering path optimization */
.pricing-intro-section {
  contain: layout style paint;
}

.mazayac-plans {
  contain: layout style;
}

/* Memory optimization for large tables */
.plans-table-mazayac tbody {
  contain: layout style;
}

/* Optimize hover states */
@media (hover: hover) {
  .mazayac-plans-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
  }
  
  .plans-table-mazayac tbody tr:hover {
    background-color: rgba(0, 83, 189, 0.02);
  }
}

/* Optimize for touch devices */
@media (hover: none) {
  .mazayac-plans-box:hover {
    transform: none;
    box-shadow: none;
  }
  
  .plans-table-mazayac tbody tr:hover {
    background-color: transparent;
  }
}

/* Print styles optimization */
@media print {
  .mazayac-plans-head {
    position: static;
  }
  
  .feature-tooltip {
    display: none;
  }
  
  .switch {
    display: none;
  }
  
  .mazayac-plans-box {
    break-inside: avoid;
  }
  
  .plans-table-mazayac {
    break-inside: avoid;
  }
}

