/* Showcases Grid Layout Stylesheet */
.grid-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 40px;
  padding: 30px 0;
  padding-bottom: 10px;
  /* margin-bottom: 100px; */
}

.grid-row.right {
  direction: rtl;
}

.grid-row.left {
  direction: ltr;
}

/* Reset direction inside items so text alignment matches the language */
.grid-item {
  direction: ltr;
  position: relative;
  text-align: left;
}

body.RTL .grid-item {
  direction: rtl;
  text-align: right;
}

.grid-item.First {
  grid-row: span 2;
}

.grid-link {
  --frostRadius: 1.2rem;
  --brightness: 0.85;
  --saturation: 1.4;
  --cardRadius: 12px;

  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%;
  height: 100%;
  border-radius: var(--cardRadius);
  position: relative;
  background-color: #192c24;
  /* border: 1px solid rgba(255, 255, 255, 0.12); */
  overflow: hidden;
  text-decoration: none !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    border-color 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.grid-link:not(.First) {
  aspect-ratio: 4 / 3;
}

.grid-item.First .grid-link {
  height: 100%;
  min-height: 400px;
}

.grid-link:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.grid-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  grid-area: 1 / 1;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  user-select: none;
}

.grid-link:hover .grid-backdrop {
  transform: scale(1.08);
}

.grid-link::after {
  content: "";
  position: absolute;
  inset: -0.2rem;
  z-index: 1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(var(--frostRadius)) saturate(var(--saturation))
    brightness(var(--brightness));
  backdrop-filter: blur(var(--frostRadius)) saturate(var(--saturation))
    brightness(var(--brightness));
  background: linear-gradient(
    to bottom,
    rgba(17, 29, 24, 0) 0%,
    rgba(17, 29, 24, 0.7) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 35%,
    rgba(0, 0, 0, 0.6) 55%,
    black 80%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 35%,
    rgba(0, 0, 0, 0.6) 55%,
    black 80%
  );
  transition: opacity 0.3s ease;
}

.grid-content {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  /* background: linear-gradient(
    to top,
    rgba(17, 29, 24, 0.5) 0%,
    transparent 100%
  ); */
}

.grid-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
  display: none !important;
}

.grid-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  line-height: 1.35;
  transition: color 0.3s ease;
  text-align: left;
}

body.RTL .grid-card-title {
  text-align: right;
}

.grid-link:hover .grid-card-title {
  color: #ffffff;
}

.grid-description {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.grid-description p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  max-height: 2.8rem;
  /* Multi-line ceiling for stable card height */
  color: rgba(255, 255, 255, 0.75);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  min-width: 0;
  text-align: left;
}

body.RTL .grid-description p {
  text-align: right;
}

.grid-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
  flex-shrink: 0;
}

.grid-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

body.RTL .grid-arrow svg {
  transform: scaleX(-1);
}

.grid-link:hover .grid-arrow {
  background-color: var(--MainColor, #418163);
  border-color: var(--MainColor, #418163);
  color: #ffffff;
}

.grid-link:hover .grid-arrow svg {
  /* transform: translateX(4px); */
}

body.RTL .grid-link:hover .grid-arrow svg {
  transform: scaleX(-1);
}

/* Hero Cover Section (MWAN Service Page Style) */
.Hero {
  margin: 0 auto;
  position: relative;
  width: 100%;
  height: 120vh;
  min-height: 120vh;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  overflow: hidden;
  display: block;
}

.Hero::before {
  content: "";
  display: block;
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(185deg, rgba(21, 39, 67, 0.1) 0%, #418163 100%);
  mix-blend-mode: multiply;
  z-index: 1;
  pointer-events: none;
}

.Hero::after {
  content: "";
  display: block;
  position: absolute;
  height: 25vh;
  width: 100%;
  background: linear-gradient(0deg, #ecf0f3 0%, rgba(236, 240, 243, 0) 100%);
  mix-blend-mode: lighten;
  z-index: 2;
  pointer-events: none;
  bottom: 0px;
}

.HeroTexts {
  position: absolute;
  bottom: calc(30vh + 3rem);
  left: 8%;
  right: 8%;
  z-index: 3;
  color: #fff;
  text-align: left;
}

html[lang="Ar"] .HeroTexts,
body.RTL .HeroTexts {
  right: 8%;
  left: 8%;
  text-align: right;
}

.Hero h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.Hero h1 span {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  display: block;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #418163;
  margin-bottom: 10px;
}

.Hero p.hero-subtext {
  max-width: 800px;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 30px;
}

.Hero p.hero-subtext::after {
  content: "|";
  display: inline-block;
  animation: cursor 1s linear infinite;
}

@keyframes cursor {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.HeroCTADiv {
  margin-top: 15px;
  margin-bottom: 15px;
  display: inline-block;
  width: auto;
}

.HeroCTA {
  border-radius: 5px;
  padding: 12px 28px;
  background-color: transparent;
  color: #fff;
  border: 1px solid #fff;
  display: inline-block;
  width: auto;
  cursor: pointer;
  transition: all 400ms ease;
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  font-weight: 600;
}

.HeroCTA:hover {
  background-color: #fff;
  color: #418163;
}

.HeroCTA:hover .material-symbols-outlined {
  color: #418163;
}

.HeroWhatsapp {
  display: inline-block;
  font-size: 0px;
  width: 42px;
  height: 42px;
  background-image: url(../../../imgs/Icons/whatsapp.webp);
  background-size: 32px;
  background-position: center center;
  background-repeat: no-repeat;
  vertical-align: middle;
  margin-left: 12px;
  margin-right: 12px;
  transition: all 400ms ease;
}

.HeroWhatsapp:hover {
  transform: scale(1.1);
}

/* Responsive Overrides for Showcases Grid */
.PlusContainer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 40px;
}

/* Overlapping/Floating Layout structure */
.PlusContainer.floating-grid {
  position: relative;
  z-index: 5;
  margin-top: -10vh; /* Reduced overlap for more elegant whitespace */
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 40px 40px;
}

@media (max-width: 1024px) {
  .PlusContainer {
    padding: 50px 30px 40px;
  }
  .PlusContainer.floating-grid {
    margin-top: -8vh;
    padding: 50px 30px;
  }

  .PlusContainer {
    padding: 40px 20px 30px;
  }

  .PlusContainer.floating-grid {
    margin-top: -5vh;
    padding: 40px 40px;
  }

  .grid-row,
  .grid-row.right {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    direction: ltr !important;
    padding: 10px 0 !important;
    gap: 30px !important;
  }

  .grid-item.First {
    grid-row: auto !important;
  }

  .grid-link,
  .grid-item.First .grid-link {
    height: auto !important;
    min-height: auto !important;
    aspect-ratio: 1.5 !important;
  }

  .title {
    font-size: 1.4rem !important;
  }
}

@media (max-width: 768px) {
}
