*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Cairo', sans-serif;
}

/* ──────────────────────────────────────────
   PAGE WRAPPER
────────────────────────────────────────── */
.page {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ──────────────────────────────────────────
   BACKGROUND VIDEO
────────────────────────────────────────── */
.bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

/* ──────────────────────────────────────────
   CONTENT STACK (sits above background)
────────────────────────────────────────── */
.content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

/* ──────────────────────────────────────────
   LOGO HEADER
────────────────────────────────────────── */
.logo-bar {
  height: 180px;
  display: flex;
  align-items: center;
  padding: 0 60px;
  flex-shrink: 0;
}
.logo-wrap {
  position: relative;
  width: 253px;
  height: 58px;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-wrap > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.logo-overlay {
  position: absolute;
  top: 80.48%;
  right: 0.12%;
  bottom: 13.21%;
  left: 42.55%;
}
.logo-overlay > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ──────────────────────────────────────────
   HERO – Watch Demo Reel
────────────────────────────────────────── */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 100px;
}
.play-btn {
  display: flex;
  align-items: center;
  gap: 0px;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
}
.play-icon-wrap {
  position: relative;
  width: 136px;
  height: 109px;
  flex-shrink: 0;
}
.play-icon-wrap .ring {
  position: absolute;
  top: 1.16%;
  right: 29.51%;
  bottom: 6.89%;
  left: 0.86%;
}
.play-icon-wrap .ring > img {
  position: absolute;
  inset: -1.62% -1.58% -1.65% -1.58%;
  display: block;
  width: calc(100% + 3.16%);
  height: calc(100% + 3.27%);
  transition: opacity 0.2s ease;
}
.play-icon-wrap .arrow {
  position: absolute;
  top: 53.73%;
  right: 8.37%;
  bottom: 0;
  left: 14.03%;
}
.play-icon-wrap .arrow > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: opacity 0.2s ease;
}

/* Hover state image swap */
.play-icon-wrap .img-hover { opacity: 0; }
.play-btn:hover .play-icon-wrap .img-default { opacity: 0; }
.play-btn:hover .play-icon-wrap .img-hover { opacity: 1; }
.play-label {
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  line-height: 30px;
  white-space: nowrap;
  text-align: left;
}
.play-label strong {
  display: block;
  font-weight: 700;
}

/* ──────────────────────────────────────────
   WHATSAPP BUTTON
   Desktop: absolute inside .footer, sits just above the wave
   Mobile:  fixed, always bottom-right of screen
────────────────────────────────────────── */
.whatsapp {
  position: absolute;
  z-index: 10;
  right: 40px;
  bottom: 85%;
  margin-bottom: 16px;
  height: 108px;
  display: block;
  transition: transform 0.2s ease;
}
.whatsapp:hover {
  transform: scale(1.08);
}
.whatsapp img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ──────────────────────────────────────────
   YOUTUBE POPUP MODAL
────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.is-open {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
  animation: fadeIn 0.25s ease;
}
.modal-content {
  position: relative;
  z-index: 1;
  width: min(900px, 92vw);
  background: #0d0d0d;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255,255,255,0.06);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}
.modal-close:hover {
  background: #be2028;
  border-color: #be2028;
  transform: rotate(90deg);
}
.modal-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}
.modal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

/* ──────────────────────────────────────────
   FOOTER
────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Wave transition */
.footer-wave {
  position: relative;
  width: 100%;
  height: 113px;
  overflow: hidden;
}

/* BGFooter — full-size background layer */
.ts-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Positioned vector shapes */
.ts-vec {
  position: absolute;
  display: block;
  width: auto;
}
.ts-vec-1 { left: 2.5%;    top: 8.69%;  height: 45.46%; }
.ts-vec-2 { left: 8.333%;  top: 65.70%; height: 24%;    }
.ts-vec-3 { left: 12.065%; top: 0;      height: 51.51%; }

/* Logo box — centered */
.ts-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  height: 93.32%;
  width: auto;
}

/* Mobile wave: single image, hidden on desktop */
.ts-mobile { display: none; }

/* Red bar */
.footer-bar {
  background: #be2028;
  width: 100%;
  display: flex;
  align-items: stretch;
  padding: 30px 0;
}

/* ── COLUMN: CONTACT (left on desktop) ── */
.col-contact {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  order: 1;
  width: 40%;
  justify-content: flex-end;
}

/* ── COLUMN SEPARATOR ── */
.col-sep {
  width: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
}
.col-sep img {
  width: 8px;
  height: 100%;
  object-fit: fill;
  display: block;
}
.col-sep-1 { order: 2; }
.col-sep-2 { order: 4; }

/* ── COLUMN: PORTFOLIO (center) ── */
.col-mid {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  order: 3;
  width: 20%;
}

/* ── COLUMN: SERVICES (right on desktop) ── */
.col-services {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  order: 5;
  width: 40%;
}

/* ── CONTACT INTERNALS ── */
.contact-row {
  display: flex;
  gap: 24px;
  align-items: center;
}
.contact-email {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}
.contact-email > a {
  display: contents;
}
.contact-email > a > img,
.contact-email > img {
  width: 43px;
  height: 43px;
  object-fit: contain;
  flex-shrink: 0;
}
.contact-email > a > span,
.contact-email > span {
  color: #fff;
  font-size: 16px;
  font-weight: 300;
  line-height: 30px;
  white-space: nowrap;
}
.socials {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.socials > a {
  display: contents;
}
.socials > a > img,
.socials > img {
  width: 43px;
  height: 43px;
  object-fit: contain;
}
.flags {
  display: flow;
  gap: 8px;
  align-items: center;
}
.flags > img {
  width: 43px;
  height: 43px;
  object-fit: contain;
}
.flags > .flag-sa {
  width: 42px;
  height: 54px;
}

/* ── PORTFOLIO BUTTONS ── */
.portfolio-btns {
  display: flex;
  gap: 16px;
  width: 100%;
}
.btn-portfolio {
  flex: 1;
  background: #be2028;
  border: 1px solid #fff;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px;
}
.btn-portfolio:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-portfolio > img {
  width: 16px;
  height: 17px;
  object-fit: contain;
  flex-shrink: 0;
}
.btn-portfolio > span {
  white-space: nowrap;
}

/* ── SERVICES ── */
.services-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.services-title {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
  white-space: nowrap;
}
.services-desc {
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: justify;
  max-width: 600px;
}
.services-icons {
  display: flex;
  align-items: center;
  row-gap: 10px;
  flex-wrap: wrap;
}
.svc-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 97px;
  flex-shrink: 0;
}
.svc-item > img {
  width: 63px;
  height: 44px;
  object-fit: contain;
}
.svc-label {
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 12px;
  text-align: center;
  white-space: nowrap;
}
.svc-sep {
  width: 8px;
  height: 50px;
  flex-shrink: 0;
}
.svc-sep > img {
  width: 8px;
  height: 100%;
  object-fit: fill;
  display: block;
}


/* ══════════════════════════════════════════
   MOBILE  (≤ 991px)
══════════════════════════════════════════ */
@media (max-width: 991px) {
  html, body { height: auto; }

  .page {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* Logo: centered */
  .logo-bar {
    justify-content: center;
    height: 140px;
    padding: 0 40px;
  }

  /* Hero: centered */
  .hero {
    justify-content: center;
    padding: 20px;
    min-height: 460px;
  }

  /* WhatsApp: fixed floating bottom-right on mobile */
  .whatsapp {
    position: fixed;
    right: 24px;
    bottom: 50px;
    top: auto;
    margin-bottom: 0;
    height: 65px;
    z-index: 200;
  }

  /* Footer wave: mobile height */
  .footer-wave { height: 80px; }
  .ts-mobile {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
  }

  /* Red bar: stacked vertically */
  .footer-bar {
    flex-direction: column;
    height: auto;
    align-items: stretch;
  }

  /* Reorder on mobile: Portfolio → Services → Contact */
  .col-contact {
    order: 3;
    padding: 16px 40px 32px;
    align-items: center;
    gap: 16px;
    width: 100%;
  }
  .col-sep { display: none; }
  .col-mid {
    order: 1;
    width: 100%;
    padding: 24px 40px 16px;
  }
  .col-services {
    order: 2;
    padding: 16px 40px 24px;
    align-items: stretch;
    width: 100%;
  }

  /* Portfolio buttons: stacked */
  .portfolio-btns {
    flex-direction: column;
  }

  /* Services icons: 2-column grid */
  .services-icons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
  }
  .svc-sep { display: none; }
  .svc-item { width: 100%; }
  .svc-label { white-space: normal; }

  /* Contact row wraps */
  .contact-row {
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    padding: 0;
  }
  .contact-email {
    min-width: 0;
  }

  /* Flags: smaller, centered */
  .flags {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }
  .flags > img,
  .flags > .flag-sa {
    width: 26px;
    height: 26px;
  }
  .flags > .flag-sa {
    height: 32px;
  }

  /* Modal: full-width video on mobile */
  .modal-content {
    width: 96vw;
  }
  .modal-close {
    top: -44px;
  }
}
