/* Module 1 — Hero (full viewport) */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background-color: #f5f5f7;
  background-image: url("../assets/images/home/page1_bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.hero__inner::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 160px;
  background: linear-gradient(180deg, rgba(232, 232, 239, 0) 0%, rgba(232, 232, 239, 1) 100%);
  pointer-events: none;
  z-index: 2;
}

.hero__nav,
.hero__body {
  position: relative;
  z-index: 1;
}

.hero__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 28px 0 0;
}

.hero__nav-start {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero__nav-end {
  display: flex;
  align-items: center;
  gap: 36px;
}

.hero__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1a1a2e;
}

.hero__logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.hero__logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero__menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.hero__menu-link {
  font-size: 15px;
  font-weight: 500;
  color: #555;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 4px;
}

.hero__menu-link:hover {
  color: #1a1a2e;
}

.hero__menu-link--active {
  color: #e34d3d;
}

.hero__menu-link--active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #e34d3d;
  border-radius: 1px;
}

.hero__btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #e34d3d;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 24px;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.hero__btn-download:hover {
  background: #c93d2e;
  transform: translateY(-1px);
}

.hero__body {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 20px 0 0;
  min-height: 0;
}

.hero__visual {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  position: relative;
  min-height: 0;
}

.hero__phone-wrap {
  position: relative;
  width: min(380px, 42vw);
  aspect-ratio: 380 / 780;
  max-height: 100%;
}

.hero__phone {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  position: relative;
  z-index: 2;
}

.hero__float {
  position: absolute;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  opacity: 0;
  animation: heroFloatIn 0.7s ease forwards;
  z-index: 3;
  white-space: nowrap;
}

.hero__float img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.hero__float-text {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.3;
}

.hero__float--1 {
  top: 22%;
  left: -18%;
  animation-delay: 0.4s;
}

.hero__float--2 {
  top: 24%;
  right: -22%;
  animation-delay: 0.9s;
}

.hero__float--3 {
  top: 38%;
  left: -24%;
  animation-delay: 1.4s;
}

.hero__float--4 {
  top: 40%;
  right: -20%;
  animation-delay: 1.9s;
}

@keyframes heroFloatIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(1);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1.3);
  }
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  align-self: center;
  padding-left: 20px;
  max-width: 520px;
}

.hero__title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero__subtitle {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero__desc {
  font-size: 16px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 400px;
}

.hero__appstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px 12px 20px;
  background: #1a1a2e;
  color: #fff;
  border-radius: 14px;
  transition: background 0.2s, transform 0.15s;
}

.hero__appstore:hover {
  background: #2d2d44;
  transform: translateY(-2px);
}

.hero__appstore img {
  width: 28px;
  height: 28px;
}

.hero__appstore-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hero__appstore-small {
  font-size: 11px;
  opacity: 0.85;
}

.hero__appstore-large {
  font-size: 18px;
  font-weight: 600;
}

/* RTL layout for Arabic */
html[dir="rtl"] .hero__inner {
  direction: rtl;
}

html[dir="rtl"] .hero__logo-text,
html[dir="rtl"] .hero__title {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] .hero__content {
  align-items: flex-end;
  padding-left: 0;
  padding-right: 20px;
}

html[dir="rtl"] .hero__float--1 {
  left: auto;
  right: -18%;
}

html[dir="rtl"] .hero__float--2 {
  right: auto;
  left: -22%;
}

html[dir="rtl"] .hero__float--3 {
  left: auto;
  right: -24%;
}

html[dir="rtl"] .hero__float--4 {
  right: auto;
  left: -20%;
}

@media (max-width: 1024px) {
  .hero__inner {
    padding: 0 32px;
  }

  .hero__body {
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
    padding-bottom: 0;
  }

  .hero__visual {
    align-self: auto;
    width: 100%;
    flex: 0 1 auto;
  }

  .hero__content {
    align-self: center;
    flex: 0 0 auto;
  }

  .hero__content {
    align-items: center;
    text-align: center;
    padding-left: 0;
    max-width: 100%;
  }

  .hero__desc {
    max-width: 100%;
  }

  html[dir="rtl"] .hero__content {
    align-items: center;
    padding-right: 0;
  }

  .hero__phone-wrap {
    width: min(280px, 70vw);
  }

  .hero__float {
    padding: 8px 10px;
    gap: 8px;
  }

  .hero__float img {
    width: 32px;
    height: 32px;
  }

  .hero__float-text {
    font-size: 11px;
  }

  .hero__float--1 { top: 6%; left: -8%; }
  .hero__float--2 { top: 2%; right: -10%; }
  .hero__float--3 { top: 36%; left: -12%; }
  .hero__float--4 { top: 32%; right: -8%; }

  html[dir="rtl"] .hero__float--1 { right: -8%; left: auto; }
  html[dir="rtl"] .hero__float--2 { left: -10%; right: auto; }
  html[dir="rtl"] .hero__float--3 { right: -12%; left: auto; }
  html[dir="rtl"] .hero__float--4 { left: -8%; right: auto; }
}

@media (max-width: 640px) {
  .hero__nav {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
  }

  .hero__nav-end {
    gap: 16px;
  }

  .hero__menu {
    gap: 16px;
  }

  .hero__menu-link {
    font-size: 14px;
  }

  .hero__float--1,
  .hero__float--3 {
    left: -4%;
  }

  .hero__float--2,
  .hero__float--4 {
    right: -4%;
  }

  html[dir="rtl"] .hero__float--1,
  html[dir="rtl"] .hero__float--3 {
    right: -4%;
    left: auto;
  }

  html[dir="rtl"] .hero__float--2,
  html[dir="rtl"] .hero__float--4 {
    left: -4%;
    right: auto;
  }
}
