/* ========================================
   Mabrok Landing Page - Mobile-First CSS
   Color Scheme: #BF1E2B (Mabrok Red)
======================================== */

:root {
  --primary-color: #bf1e2b;
  --primary-hover: #a01823;
  --background-color: #f7f7f7;
  --white: #ffffff;
  --font-family: "Tahoma", sans-serif;
  --shadow-base: 0 4px 15px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
  --transition-base: 0.3s ease;
}

/* ========================================
   RESET & BASE STYLES
======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, var(--background-color) 0%, #e8e8e8 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  direction: rtl;
  position: relative;
  overflow-x: hidden;
}

/* ========================================
   BACKGROUND DECORATION
======================================== */

.background-decoration {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  top: 0;
  left: 0;
  pointer-events: none;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg,
      rgba(191, 30, 43, 0.1),
      rgba(191, 30, 43, 0.05));
  animation: float 6s ease-in-out infinite;
}

.bg-circle:nth-child(1) {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.bg-circle:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.bg-circle:nth-child(3) {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.7;
  }
}

/* ========================================
   LANGUAGE SWITCHER
======================================== */

.language-switcher {
  position: fixed;
  top: clamp(15px, 3vh, 25px);
  left: clamp(15px, 3vw, 25px);
  background: var(--white);
  border: 2px solid var(--primary-color);
  border-radius: 25px;
  padding: 8px 16px;
  font-size: clamp(12px, 2.5vw, 14px);
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-base);
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-switcher:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.lang-option {
  color: #666;
  transition: color var(--transition-base);
  cursor: pointer;
}

.lang-option.active {
  color: var(--primary-color);
}

.lang-divider {
  color: #ccc;
}

/* ========================================
   CONTAINER & LAYOUT
======================================== */

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  padding: clamp(15px, 3vw, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ========================================
   LOGO
======================================== */

.logo-container {
  /* UPDATED: Fixed position in top corner */
  position: fixed;
  top: clamp(15px, 2vh, 25px);
  right: clamp(15px, 3vw, 25px);
  /* Arabic (RTL): Top right */
  left: auto;
  z-index: 100;
  animation: logoEntrance 1s ease-out;
  transition:
    left 0.3s ease,
    right 0.3s ease;
  /* Smooth transition when switching languages */
}

/* English (LTR): Logo moves to top LEFT */
html[dir="ltr"] .logo-container {
  right: auto;
  left: clamp(15px, 3vw, 25px);
  /* Top left for English */
}

.logo-container img {
  /* SMALLER SIZE */
  width: clamp(80px,
      18vw,
      140px) !important;
  /* Reduced from 180-280px to 80-140px */
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  display: block;
  max-width: 100%;
}

@keyframes logoEntrance {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   WELCOME CARD
======================================== */

.welcome-card {
  background: var(--white);
  border-radius: clamp(20px, 4vw, 25px);
  /* margin-top: clamp(150px, 5vw, 150px); */
  margin-top: 8em;
  padding: clamp(25px, 5vw, 40px) clamp(20px, 4vw, 30px);
  box-shadow: var(--shadow-lg);
  text-align: center;
  margin-bottom: clamp(25px, 5vh, 40px);
  animation: cardSlideUp 0.8s ease-out 0.3s both;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.welcome-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg,
      var(--primary-color),
      #ff6b6b,
      var(--primary-color));
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-title {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: clamp(20px, 4vh, 25px);
  line-height: 1.3;
}

.welcome-message {
  font-size: clamp(14px, 3.5vw, 18px);
  color: #333;
  line-height: 1.6;
  margin-top: clamp(15px, 3vh, 20px);
}

/* ========================================
   PHOTO SLIDER
======================================== */

.slider-container {
  width: 100%;
  margin: clamp(20px, 4vh, 25px) 0;
  border-radius: clamp(12px, 3vw, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-base);

  /* LANDSCAPE IMAGES: 1200×900 = 4:3 aspect ratio */
  aspect-ratio: 4/3;
  /* Landscape/horizontal orientation */
  min-height: 200px;
  max-height: min(320px, 35vh);
  /* Reasonable height for landscape on mobile */
  height: auto;

  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.slider-container .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;

  /* Match container dimensions */
  width: 100%;
  height: 100%;
}

.slider-container .swiper-slide img {
  width: 100%;
  height: 100%;
  /* PERFECT FIT: Container is 4:3 (landscape) and images are 1200×900 (4:3) - no cropping! */
  object-fit: scale-down;
  /* Fills container perfectly - no white space */
  object-position: center;
  /* Centers the image */
  display: block;
}

/* Swiper Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.9);
  width: clamp(30px, 6vw, 40px);
  height: clamp(30px, 6vw, 40px);
  border-radius: 50%;
  box-shadow: var(--shadow-base);
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: clamp(14px, 3vw, 18px);
  font-weight: bold;
}

/* Swiper Pagination */
.swiper-pagination-bullet {
  background: #ccc;
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: var(--primary-color);
}

/* ========================================
   FEATURES / SOCIAL SHARE
======================================== */

.features {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 30px);
  margin-top: clamp(20px, 4vh, 25px);
  flex-wrap: wrap;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 2vw, 10px);
  opacity: 0;
  animation: featureFloat 0.6s ease-out forwards;
}

.feature:nth-child(1) {
  animation-delay: 0.9s;
}

.feature:nth-child(2) {
  animation-delay: 1.1s;
}

@keyframes featureFloat {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-icon {
  width: clamp(50px, 12vw, 70px);
  height: clamp(50px, 12vw, 70px);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-base);
  transition: transform var(--transition-base);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-icon:hover,
.feature-icon:active {
  transform: scale(1.1);
}

.feature-text {
  font-size: clamp(11px, 2.5vw, 13px);
  color: #666;
  font-weight: bold;
  text-align: center;
}

/* ========================================
   AGGREGATORS SECTION
======================================== */

.aggregators-section {
  width: 100%;
  margin-bottom: clamp(25px, 5vh, 40px);
}

.aggregators-title {
  font-size: clamp(16px, 4vw, 22px);
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: clamp(15px, 3vh, 20px);
}

.aggregators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,
      minmax(clamp(70px, 18vw, 100px), 1fr));
  gap: clamp(12px, 3vw, 20px);
  justify-items: center;
}

.aggregator-item {
  width: clamp(70px, 18vw, 120px);
  height: clamp(70px, 18vw, 120px);
  border-radius: clamp(12px, 3vw, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-base);
  transition: all var(--transition-base);
  background: var(--white);
  padding: clamp(8px, 2vw, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.aggregator-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.aggregator-item:hover,
.aggregator-item:active {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   FOOTER
======================================== */

.footer {
  width: 100%;
  text-align: center;
  padding: clamp(15px, 3vh, 20px) 0;
  margin-top: clamp(20px, 4vh, 30px);
}

.footer p {
  font-size: clamp(11px, 2.5vw, 13px);
  color: #666;
}

/* ========================================
   RESPONSIVE - TABLET (min-width: 768px)
======================================== */

@media (min-width: 768px) {
  .container {
    max-width: 700px;
    padding: 30px;
  }

  .logo-container img {
    width: clamp(220px, 25vw, 300px);
  }

  .welcome-card {
    padding: 45px 40px;
  }

  .welcome-title {
    font-size: clamp(26px, 4vw, 32px);
  }

  .welcome-message {
    font-size: clamp(16px, 2.5vw, 20px);
  }

  .slider-container {
    /* Tablet: Maintain 4:3 landscape aspect ratio */
    aspect-ratio: 4/3;
    min-height: 280px;
    max-height: min(420px, 45vh);
  }

  .slider-container .swiper-slide {
    width: 100%;
    height: 100%;
  }

  .aggregators-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 500px;
    margin: 0 auto;
    gap: clamp(15px, 3vw, 25px);
  }

  .aggregator-item {
    width: clamp(90px, 20vw, 130px);
    height: clamp(90px, 20vw, 130px);
  }

  .features {
    gap: clamp(30px, 6vw, 40px);
  }

  .feature-icon {
    width: clamp(60px, 14vw, 80px);
    height: clamp(60px, 14vw, 80px);
  }

  .feature-text {
    font-size: clamp(12px, 2.5vw, 14px);
  }
}

/* ========================================
   RESPONSIVE - DESKTOP (min-width: 1024px)
======================================== */

@media (min-width: 1024px) {
  .container {
    max-width: 900px;
    padding: 40px;
  }

  .logo-container img {
    width: clamp(250px, 22vw, 320px);
  }

  .welcome-card {
    padding: 50px 45px;
  }

  .welcome-title {
    font-size: clamp(28px, 3.5vw, 36px);
    margin-bottom: clamp(25px, 4vh, 30px);
  }

  .welcome-message {
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.7;
  }

  .slider-container {
    max-width: 700px;
    /* Wider for landscape images */
    margin-left: auto;
    margin-right: auto;
    /* Desktop: Maintain 4:3 landscape aspect ratio */
    aspect-ratio: 4/3;
    min-height: 350px;
    max-height: min(520px, 50vh);
  }

  .slider-container .swiper-slide {
    width: 100%;
    height: 100%;
  }

  .aggregators-grid {
    max-width: 600px;
    gap: clamp(20px, 2.5vw, 30px);
  }

  .aggregator-item {
    width: clamp(110px, 18vw, 140px);
    height: clamp(110px, 18vw, 140px);
  }

  .features {
    gap: clamp(40px, 5vw, 50px);
  }

  .feature-icon {
    width: clamp(70px, 12vw, 90px);
    height: clamp(70px, 12vw, 90px);
  }

  .feature-text {
    font-size: clamp(13px, 1.8vw, 15px);
  }

  /* Larger navigation arrows on desktop */
  .swiper-button-next,
  .swiper-button-prev {
    width: clamp(40px, 5vw, 50px);
    height: clamp(40px, 5vw, 50px);
  }

  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: clamp(18px, 2.5vw, 22px);
  }
}

/* ========================================
   RTL/LTR SUPPORT
======================================== */

body[dir="ltr"] {
  direction: ltr;
}

body[dir="ltr"] .language-switcher {
  left: auto;
  right: clamp(15px, 3vw, 25px);
}

/* Swiper handles RTL/LTR arrows automatically - don't override! */

/* ========================================
   ACCESSIBILITY
======================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ========================================
   RESPONSIVE - LARGE DESKTOP (min-width: 1440px) like my desktop here
======================================== */

@media (min-width: 1440px) {
  .container {
    max-width: 1000px;
    padding: 50px;
  }

  .logo-container img {
    width: clamp(280px, 20vw, 350px);
  }

  .welcome-card {
    margin-top: clamp(150px, 5vw, 200px);
    padding: 55px 50px;
  }

  .welcome-title {
    font-size: clamp(32px, 3vw, 40px);
  }

  .welcome-message {
    font-size: clamp(20px, 1.8vw, 24px);
  }

  .slider-container {
    max-width: 800px;
    /* Wider for landscape images */
    /* Large desktop: Maintain 4:3 landscape aspect ratio */
    aspect-ratio: 4/3;
    min-height: 400px;
    max-height: min(800px, 1000vh);
  }

  .slider-container .swiper-slide {
    width: 100%;
    height: 100%;
  }

  .aggregators-grid {
    max-width: 650px;
    gap: clamp(25px, 2vw, 35px);
  }

  .aggregator-item {
    width: clamp(120px, 16vw, 150px);
    height: clamp(120px, 16vw, 150px);
  }
}