/* Grid and flex layouts already mirror automatically because style.css uses
   logical properties (inset-inline-*, margin/padding/border-inline-*) and
   CSS Grid/Flexbox are direction-aware. This file only handles the bits
   that don't mirror on their own: directional glyphs and a couple of
   hand-tuned corner cases. */

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

/* Directional arrow & chevron glyphs should point toward the reading-start side */
html[dir="rtl"] .btn i.fa-arrow-right,
html[dir="rtl"] .btn i.fa-chevron-right,
html[dir="rtl"] .icon i.fa-arrow-right-arrow-left {
  transform: scaleX(-1);
}

/* Back-to-top glyph */
html[dir="rtl"] .top i {
  transform: scaleX(-1);
}

/* Plans Page RTL Adjustments */
html[dir="rtl"] .timeline-item {
  flex-direction: row-reverse;
}

html[dir="rtl"] .box-floating-badge {
  right: auto;
  left: 20px;
  text-align: left;
}

html[dir="rtl"] .box-spec {
  flex-direction: row-reverse;
}

html[dir="rtl"] .feature-tag {
  flex-direction: row-reverse;
}

html[dir="rtl"] .plan-crate-1 {
  transform: translateY(40px);
}

html[dir="rtl"] .plan-crate-3 {
  transform: translateY(20px);
}

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

html[dir="rtl"] .testimonial-featured {
  grid-template-columns: 1fr auto;
}

html[dir="rtl"] .testimonial-image {
  margin: 0 0 0 auto;
}

html[dir="rtl"] .testimonial-card-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .cta-feature {
  flex-direction: row-reverse;
}

html[dir="rtl"] .path-walker {
  animation: walkerMoveRTL 15s ease-in-out infinite;
}

@keyframes walkerMoveRTL {
  0%, 100% { transform: translateX(-50%) translateX(200px); }
  50% { transform: translateX(-50%) translateX(-200px); }
}

/* How It Works Page RTL Adjustments */
html[dir="rtl"] .hiw-hero-number {
  right: auto;
  left: 60px;
}

html[dir="rtl"] .hiw-curved-line {
  right: auto;
  left: 80px;
}

html[dir="rtl"] .box-preview {
  right: auto;
  left: -160px;
}

html[dir="rtl"] .box-type:hover .box-preview {
  right: auto;
  left: -180px;
  transform: translateY(-50%) scale(1.05);
}

html[dir="rtl"] .action-line::after {
  right: auto;
  left: -4px;
}

html[dir="rtl"] .flow-arrows {
  transform: scaleX(-1);
}

html[dir="rtl"] .delivery-journey {
  flex-direction: column;
}

html[dir="rtl"] .flow-arrows {
  transform: rotate(90deg) scaleX(-1);
}

html[dir="rtl"] .journey-stage {
  text-align: center;
}

html[dir="rtl"] .step-heading,
html[dir="rtl"] .step-description,
html[dir="rtl"] .rhythm-content,
html[dir="rtl"] .customize-text,
html[dir="rtl"] .delivery-text,
html[dir="rtl"] .life-heading,
html[dir="rtl"] .life-description {
  text-align: center;
}

html[dir="rtl"] .hiw-hero-content,
html[dir="rtl"] .hiw-finale-content {
  text-align: center;
}

html[dir="rtl"] .stage-icon,
html[dir="rtl"] .rhythm-pattern,
html[dir="rtl"] .flow-action,
html[dir="rtl"] .life-action {
  text-align: center;
}

html[dir="rtl"] .flow-action:hover {
  transform: translateX(-4px);
}

html[dir="rtl"] .life-action:hover .action-line {
  width: 80px;
}

html[dir="rtl"] .circular-arrow {
  animation-direction: reverse;
}

/* RTL Adjustments for new animations */
html[dir="rtl"] .delivery-step {
  animation: deliveryStepFloatRTL 3s ease-in-out infinite;
}

html[dir="rtl"] .delivery-step:nth-child(2) { animation-delay: 0.5s; }
html[dir="rtl"] .delivery-step:nth-child(3) { animation-delay: 1s; }
html[dir="rtl"] .delivery-step:nth-child(4) { animation-delay: 1.5s; }

@keyframes deliveryStepFloatRTL {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-8px); }
}

html[dir="rtl"] .life-action:hover {
  transform: translateX(-8px);
}

/* How It Works visual refinements */
html[dir="rtl"] .page-how-it-works .hiw-hero-overlay {
  background: linear-gradient(270deg, rgba(255,248,233,.97) 0%, rgba(255,248,233,.88) 30%, rgba(255,248,233,.34) 54%, rgba(31,7,13,.05) 76%, rgba(31,7,13,.12) 100%);
}

html[dir="rtl"] .page-how-it-works .hiw-hero-copy {
  text-align: right;
}

html[dir="rtl"] .page-how-it-works .hiw-hero-route {
  right: auto;
  left: 8%;
  transform: rotate(11deg);
}

html[dir="rtl"] .page-how-it-works .hiw-hero-route::after {
  right: auto;
  left: 12%;
}

html[dir="rtl"] .page-how-it-works .leaf-one {
  right: auto;
  left: 43%;
}

html[dir="rtl"] .page-how-it-works .leaf-two {
  right: auto;
  left: 11%;
}

html[dir="rtl"] .page-how-it-works .spark-one {
  right: auto;
  left: 34%;
}

html[dir="rtl"] .page-how-it-works .spark-two {
  right: auto;
  left: 17%;
}

html[dir="rtl"] .page-how-it-works .hiw-hero-number {
  right: auto;
  left: 12px;
}

html[dir="rtl"] .page-how-it-works .hiw-curved-line {
  right: auto;
  left: 6%;
}

html[dir="rtl"] .page-how-it-works .box-type {
  text-align: right;
}

html[dir="rtl"] .page-how-it-works .box-type:hover .box-name,
html[dir="rtl"] .page-how-it-works .box-type.active .box-name {
  transform: translateX(-6px);
}

html[dir="rtl"] .page-how-it-works .box-type:hover .box-arrow,
html[dir="rtl"] .page-how-it-works .box-type.active .box-arrow {
  transform: scaleX(-1) translateX(5px);
}

html[dir="rtl"] .page-how-it-works .box-arrow i,
html[dir="rtl"] .page-how-it-works .hiw-box-caption,
html[dir="rtl"] .page-how-it-works .hiw-box-note {
  direction: rtl;
}

html[dir="rtl"] .page-how-it-works .flow-action:hover {
  transform: translateX(-6px);
}

html[dir="rtl"] .page-how-it-works .hiw-box-note {
  right: auto;
  left: 0;
}

@media (max-width: 768px) {
  html[dir="rtl"] .page-how-it-works .hiw-hero-overlay {
    background: linear-gradient(180deg, rgba(255,248,233,.22) 0%, rgba(255,248,233,.70) 48%, rgba(255,248,233,.96) 72%, rgba(255,248,233,.99));
  }
  html[dir="rtl"] .page-how-it-works .hiw-hero-copy {
    text-align: right;
  }
}

/* RTL: Section 3 - Plan cards: mirror circular notch to top-right */
html[dir="rtl"] .plan-editorial-card::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .plan-arch-photo {
  -webkit-mask-image: radial-gradient(circle 56px at calc(100% - 56px) 56px, transparent 56px, black 57px);
  mask-image: radial-gradient(circle 56px at calc(100% - 56px) 56px, transparent 56px, black 57px);
}

/* =====================================================================
   SAMPLE BOX PAGE — RTL (merged from the former sample-box.css)
   ===================================================================== */

/* ===================================================
   Sample Box Page - Premium Interactive Experience
   FreshRhythm Grocery Subscription Service
   =================================================== */

/* Base Setup */

/* Custom Cursor for Desktop */

/* ===================================================
   SECTION 1 — HALF-VIEWPORT SAMPLE BOX BANNER
   Layout: Layered composition with parallax
   Animation: Parallax + Staggered Text + Curtain Reveal
   =================================================== */

/* Floating Produce Elements */

/* CTA Button Effects */

/* Parallax Effect */

/* Responsive Design */

/* ===================================================
   SECTION 2 — INTERACTIVE SAMPLE BOX IMAGE SLIDER
   Layout: Large central image with preview strip
   Animation: Wipe Reveal + Ripple + 3D Tilt
   =================================================== */

/* Wipe Effect */

/* Shimmer Effect on Image */

/* Navigation Controls */

/* Border Trace Effect */

/* Image Counter */

/* Image Caption */

/* Preview Strip */

/* Responsive Design */

/* Touch-friendly swipe indicator */

/* ===================================================
   SECTION 4 — SAMPLE BOX JOURNEY / SCROLL STORY
   Layout: Vertical scrollytelling with sticky stages
   Animation: Scroll Reveal + Sticky + SVG Path Drawing
   =================================================== */

/* Journey Path */

/* Journey Stages */

/* Alternating Layout */

/* Stage Number */

/* Stage Content */

/* Stage Visual */

/* Background Changes */

/* Counter Animation */

/* Responsive Design */

/* Responsive Design */

/* ===================================================
   SECTION 6 — FRESHNESS & QUALITY
   Layout: Typography + Photography with spotlight
   Animation: Kinetic Typography + Spotlight + Liquid Motion
   =================================================== */

/* Large Typography */

/* Kinetic Marquee */

/* Photography Grid */

/* Spotlight Effect */

/* Floating Labels */

/* Supporting Points */

/* Liquid Blob Background */

/* Typewriter Effect */

/* Responsive Design */

/* ===================================================
   SECTION 7 — FINAL SAMPLE BOX CTA
   Layout: Premium conversion with layered composition
   Animation: Curtain Reveal + Ripple + Glow + 3D Tilt
   =================================================== */

/* CTA Content */

/* Counter */

/* CTA Buttons */

/* Ripple Effect */

/* CTA Visual */

/* Emerging Products */

/* Particle Effects */

/* Decorative Lines */

/* Glow Effect */

/* Responsive Design */

/* ===================================================
   REDUCED MOTION SUPPORT
   =================================================== */

/* ===================================================
   ACCESSIBILITY ENHANCEMENTS
   =================================================== */

/* Focus States */

/* High Contrast Mode Support */

/* ===================================================
   RTL SUPPORT
   =================================================== */

/* Hero Section RTL */

html[dir="rtl"] .sb-hero-content {
  grid-template-columns: 1.2fr 1fr;
}

html[dir="rtl"] .sb-hero-visual {
  order: -1;
}

html[dir="rtl"] body.sample-box-page .produce-1 {
  right: auto;
  left: -30px;
}

html[dir="rtl"] body.sample-box-page .produce-2 {
  left: auto;
  right: -25px;
}

html[dir="rtl"] body.sample-box-page .produce-3 {
  right: auto;
  left: -40px;
}

html[dir="rtl"] body.sample-box-page .produce-4 {
  left: auto;
  right: -35px;
}

/* Slider Section RTL */

html[dir="rtl"] .sb-slider-prev {
  left: auto;
  right: 20px;
}

html[dir="rtl"] .sb-slider-next {
  right: auto;
  left: 20px;
}

html[dir="rtl"] .sb-slider-caption {
  left: auto;
  right: 30px;
  text-align: right;
}

html[dir="rtl"] .sb-slider-strip {
  direction: rtl;
}

/* Exploded Section RTL */

/* Journey Section RTL */

html[dir="rtl"] .sb-journey-path {
  left: auto;
  right: 50%;
}

html[dir="rtl"] .sb-journey-progress {
  left: auto;
  right: 50%;
}

html[dir="rtl"] .sb-stage-number {
  left: auto;
  right: 50%;
}

html[dir="rtl"] .sb-journey-stage:nth-child(odd) .sb-journey-content {
  order: 2;
}

html[dir="rtl"] .sb-journey-stage:nth-child(odd) .sb-journey-visual {
  order: 1;
}

html[dir="rtl"] .sb-journey-stage:nth-child(even) .sb-journey-content {
  order: 1;
}

html[dir="rtl"] .sb-journey-stage:nth-child(even) .sb-journey-visual {
  order: 2;
}

html[dir="rtl"] .sb-journey-stage:nth-child(1) {
  background: linear-gradient(270deg, transparent 40%, var(--bg-soft) 40%);
}

html[dir="rtl"] .sb-journey-stage:nth-child(2) {
  background: linear-gradient(270deg, var(--bg-soft) 60%, transparent 60%);
}

html[dir="rtl"] .sb-journey-stage:nth-child(3) {
  background: linear-gradient(270deg, transparent 40%, var(--bg-soft) 40%);
}

html[dir="rtl"] .sb-journey-stage:nth-child(4) {
  background: linear-gradient(270deg, var(--bg-soft) 60%, transparent 60%);
}

html[dir="rtl"] .sb-journey-stage:nth-child(5) {
  background: linear-gradient(270deg, transparent 40%, var(--bg-soft) 40%);
}

/* Freshness Section RTL */

html[dir="rtl"] .sb-kinetic-text {
  animation-direction: reverse;
}

html[dir="rtl"] body.sample-box-page .label-1 {
  left: auto;
  right: 20px;
}

html[dir="rtl"] body.sample-box-page .label-2 {
  right: auto;
  left: 20px;
}

html[dir="rtl"] body.sample-box-page .label-3 {
  left: auto;
  right: 50%;
  transform: translate(50%, -50%);
}

/* CTA Section RTL */

html[dir="rtl"] .sb-cta-container {
  grid-template-columns: 1fr 1fr;
}

html[dir="rtl"] .sb-cta-visual {
  order: -1;
  transform: translateX(-30px);
}

html[dir="rtl"] .sb-cta-visual.revealed {
  transform: translateX(0);
}

html[dir="rtl"] body.sample-box-page .emerging-1 {
  right: auto;
  left: -30px;
}

html[dir="rtl"] body.sample-box-page .emerging-2 {
  left: auto;
  right: -25px;
}

html[dir="rtl"] body.sample-box-page .emerging-3 {
  right: auto;
  left: -40px;
}

html[dir="rtl"] body.sample-box-page .line-1 {
  left: auto;
  right: 10%;
}

html[dir="rtl"] body.sample-box-page .line-2 {
  right: auto;
  left: 15%;
}

/* RTL Responsive Adjustments */

@media (max-width: 1023px) {
  html[dir="rtl"] .sb-hero-content {
    grid-template-columns: 1fr;
  }

  html[dir="rtl"] .sb-hero-visual {
    order: 2;
  }

  html[dir="rtl"] .sb-journey-path {
    right: 30px;
    left: auto;
  }

  html[dir="rtl"] .sb-journey-progress {
    right: 30px;
    left: auto;
  }

  html[dir="rtl"] .sb-stage-number {
    right: 30px;
    left: auto;
  }

  html[dir="rtl"] .sb-journey-content {
    padding: 0 60px 0 0;
  }

  html[dir="rtl"] .sb-journey-stage:nth-child(odd) .sb-journey-content,
html[dir="rtl"] .sb-journey-stage:nth-child(even) .sb-journey-content {
    order: 1;
  }

  html[dir="rtl"] .sb-journey-stage:nth-child(odd) .sb-journey-visual,
html[dir="rtl"] .sb-journey-stage:nth-child(even) .sb-journey-visual {
    order: 2;
  }

  html[dir="rtl"] .sb-journey-stage:nth-child(odd),
html[dir="rtl"] .sb-journey-stage:nth-child(even) {
    background: none;
  }

  html[dir="rtl"] .sb-cta-container {
    grid-template-columns: 1fr;
  }

  html[dir="rtl"] .sb-cta-visual {
    order: 2;
  }
}

@media (max-width: 767px) {
  html[dir="rtl"] .sb-slider-prev {
    right: 10px;
    left: auto;
  }

  html[dir="rtl"] .sb-slider-next {
    left: 10px;
    right: auto;
  }

  html[dir="rtl"] .sb-slider-caption {
    right: 20px;
    left: auto;
  }

  html[dir="rtl"] .sb-journey-content {
    padding: 0 50px 0 0;
  }
}

/* Section 5 (choose your box) — RTL */
html[dir="rtl"] .sb-vx-arrow {
  transform: scaleX(-1);
  translate: 10px 0;
}
html[dir="rtl"] .sb-vx-item:hover .sb-vx-arrow,
html[dir="rtl"] .sb-vx-item.is-active .sb-vx-arrow {
  translate: 0 0;
}
html[dir="rtl"] .sb-vx-item.is-active .sb-vx-name {
  translate: -14px 0;
}
html[dir="rtl"] .sb-vx-bar {
  transform-origin: right center;
}
html[dir="rtl"] .sb-vx-detail-row {
  padding: 14px 14px 0 0;
}
