/* /var/www/relyn/static_src/css/excellence.css */

/* SECTION */
.excellence-section {
  width: 100%;
  display: flex;
  justify-content: center;
  color: #FFFFFF;
  font-family: "Urbanist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* SHELL (W=1920, H=849) */
.excellence-shell {
  position: relative;
  width: 100%;
  max-width: 1920px;
  height: 849px;
  overflow: hidden;

  /* Blur placement for this section */
  --blur-top: 58%;
  --blur-h: 560px;

  /* Animation + responsive scaling controls (DESKTOP defaults keep output identical) */
  --ex-video-ty: 0px;
  --ex-main-ty: 0px;
  --ex-video-scale: 1;
  --ex-main-scale: 1;

  /* Mobile/tablet portrait overlap sizing defaults */
  --ex-stack-pad-x: 20px;
  --ex-stack-video-w: 420px;
  --ex-stack-video-h: 420px;
  --ex-stack-gap-top: 34px;
}

/* BLUR LAYER */
.excellence-blur-layer {
  position: absolute;
  left: 50%;
  top: var(--blur-top);
  transform: translate(-50%, -50%);
  width: 1920px;
  max-width: 100%;
  height: var(--blur-h);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(99, 62, 178, 0.36) 0%,
    rgba(99, 62, 178, 0.22) 35%,
    rgba(0, 0, 0, 0.00) 72%
  );
  filter: blur(34px);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

/* VIDEO PLAYER (DESKTOP: 600 × 600, left 207, top 130) */
.excellence-video-box {
  position: absolute;
  left: 207px;
  top: 130px;
  width: 600px;
  height: 600px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
  z-index: 3;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 1;

  transform: translateY(var(--ex-video-ty)) scale(var(--ex-video-scale));
  transform-origin: top left;
}

.excellence-video-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.excellence-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* MAIN LAYOUT ROW (anchors the main box position) */
.excellence-layout-row {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* MAIN BOX (DESKTOP: 1180 × 450, right 207, top 215) */
.excellence-main-box {
  position: absolute;
  right: 207px;
  top: 215px;
  width: 1180px;
  height: 450px;
  overflow: visible;
  opacity: 1;

  transform: translateY(var(--ex-main-ty)) scale(var(--ex-main-scale));
  transform-origin: top right;
}

/* Reveal animation only if JS loaded */
.has-js .excellence-main-box,
.has-js .excellence-video-box {
  opacity: 0;
  --ex-video-ty: 18px;
  --ex-main-ty: 18px;
  transition: transform 0.85s ease, opacity 0.85s ease;
}

.has-js .excellence-main-box.is-inview,
.has-js .excellence-video-box.is-inview {
  opacity: 1;
  --ex-video-ty: 0px;
  --ex-main-ty: 0px;
}

/* SVG BG */
.excellence-main-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* DESKTOP TEXT POSITIONING (UNCHANGED) */
.excellence-main-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.excellence-main-text-block {
  position: absolute;
  left: 348px;   /* DESKTOP exact */
  top: 130px;    /* DESKTOP exact */
  max-width: 760px;
  text-align: left;
  color: #FFFFFF;
}

.excellence-main-heading {
  margin: 0;
  font-size: 40px;
  font-weight: 600; /* Semibold */
  line-height: 1.2;
  color: #FFFFFF;
}

.excellence-main-body {
  margin: 34px 0 0;
  font-size: 24px;
  font-weight: 400; /* Regular */
  line-height: 35px;
  color: #FFFFFF;
  opacity: 0.95;
}

/* MINI BOX (DESKTOP: 272 × 50) */
.excellence-mini-box {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 272px;
  height: 50px;
  border-radius: 20px;
  background: linear-gradient(90deg, #633EB2 0%, #1a0b3f 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  z-index: 5;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: transform 0.18s ease-out, filter 0.18s ease-out, box-shadow 0.18s ease-out;
}

.excellence-mini-box:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.95);
}

.excellence-mini-box:active {
  transform: translateY(0);
}

.excellence-mini-box.is-pressed {
  transform: translateY(0) scale(0.98);
}

.excellence-mini-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  width: 100%;
}

.excellence-mini-cta-text {
  font-size: 20px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1;
  white-space: nowrap;
}

.excellence-mini-cta-icon {
  font-size: 20px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1;
}

/* =========================================================
   LAPTOP + TABLET (LANDSCAPE): MORE left padding on text
   ========================================================= */
@media (max-width: 1400px) and (min-width: 1101px) {
  .excellence-shell {
    height: 849px;
    min-height: 849px;
  }

  .excellence-video-box {
    left: 60px;
    top: 154px;              /* (kept) a little bit down */
    --ex-video-scale: 0.86;  /* (kept) slightly smaller */
  }

  .excellence-main-box {
    right: 60px;
    top: 215px;
    --ex-main-scale: 0.88;
  }

  /* ✅ Increase left padding MORE */
  .excellence-main-text-block {
    padding-left: 44px;      /* ✅ increased */
    max-width: 660px;
  }

  .excellence-main-heading {
    font-size: 32px;
    line-height: 1.16;
  }

  .excellence-main-body {
    font-size: 19px;
    line-height: 29px;
    margin-top: 22px;
  }

  .excellence-mini-cta-text,
  .excellence-mini-cta-icon {
    font-size: 17px;
  }

  .excellence-mini-inner {
    gap: 20px;
  }
}

/* =========================================================
   TABLET (PORTRAIT) + MOBILE:
   - main box NO CURVE, radius 20px all corners
   - mini box centered on bottom border line (half in / half out)
   - keep video half in/out at top
   ========================================================= */
@media (max-width: 1100px) {
  .excellence-shell {
    height: auto;
    min-height: 0;
    padding: 0 0 84px;
    overflow: hidden;

    --blur-top: 55%;
    --blur-h: 620px;

    --ex-stack-video-w: 380px;
    --ex-stack-video-h: 380px;
    --ex-stack-gap-top: 18px;
  }

  .excellence-layout-row {
    height: auto;
    padding: 0 var(--ex-stack-pad-x);
  }

  /* MAIN BOX fits screen */
  .excellence-main-box {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    max-width: 760px;
    height: 450px;
    margin: 0 auto;
    --ex-main-scale: 1;
  }

  /* ✅ Remove curved SVG background in portrait/mobile */
  .excellence-main-bg {
    display: none;
  }

  /* ✅ Replace with rounded rectangle background + border (20px all corners) */
  .excellence-main-box::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(
      135deg,
      rgba(99, 62, 178, 0.82) 0%,
      rgba(99, 62, 178, 0.20) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.16);
    z-index: 1;
    pointer-events: none;
  }

  /* Ensure content stays above the ::before */
  .excellence-main-inner,
  .excellence-mini-box {
    z-index: 2;
  }

  /* VIDEO: on top side, half in/out */
  .excellence-video-box {
    position: relative;
    left: 0;
    top: 0;
    width: min(var(--ex-stack-video-w), calc(100% - (var(--ex-stack-pad-x) * 2)));
    height: var(--ex-stack-video-h);
    margin: var(--ex-stack-gap-top) auto calc(var(--ex-stack-video-h) * -0.5) auto;
    border-radius: 16px;
    --ex-video-scale: 1;
    transform-origin: top center;
  }

  /* TEXT: move upward + add bottom padding so it sits higher */
  .excellence-main-text-block {
    position: absolute;
    left: 22px;
    right: 22px;
    top: calc((var(--ex-stack-video-h) * 0.5) + 22px);
    max-width: none;
    padding-bottom: 92px; /* ✅ keeps text higher (away from centered mini box) */
  }

  .excellence-main-heading {
    font-size: 28px;
    line-height: 1.16;
  }

  .excellence-main-body {
    font-size: 16px;
    line-height: 26px;
    margin-top: 16px;
  }

  /* ✅ Mini box centered on bottom border line (half inside / half outside) */
  .excellence-mini-box {
    right: auto;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%); /* ✅ center on border line */
    width: 190px;
    height: 44px;
    border-radius: 14px;
    padding: 0 14px;
  }

  .excellence-mini-inner {
    gap: 12px;
  }

  .excellence-mini-cta-text,
  .excellence-mini-cta-icon {
    font-size: 16px;
  }

  /* ✅ Preserve hover/active/pressed transforms while centered */
  .excellence-mini-box:hover {
    transform: translate(-50%, calc(50% - 2px));
  }

  .excellence-mini-box:active {
    transform: translate(-50%, 50%);
  }

  .excellence-mini-box.is-pressed {
    transform: translate(-50%, 50%) scale(0.98);
  }
}

/* =========================================================
   MOBILE: tighter fit
   ========================================================= */
@media (max-width: 520px) {
  .excellence-shell {
    --ex-stack-pad-x: 16px;

    --ex-stack-video-w: 330px;
    --ex-stack-video-h: 330px;
    --ex-stack-gap-top: 14px;

    padding-bottom: 88px; /* ✅ room for mini box outside */
  }

  .excellence-main-box {
    height: 420px;
    max-width: 100%;
  }

  .excellence-video-box {
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.92);
  }

  .excellence-main-text-block {
    left: 18px;
    right: 18px;
    top: calc((var(--ex-stack-video-h) * 0.5) + 18px);
    padding-bottom: 94px;
  }

  .excellence-main-heading {
    font-size: 26px;
    line-height: 1.14;
  }

  .excellence-main-body {
    font-size: 15px;
    line-height: 24px;
    margin-top: 14px;
  }

  /* ✅ mini box even smaller, still centered */
  .excellence-mini-box {
    width: 176px;
    height: 42px;
    border-radius: 13px;
  }

  .excellence-mini-cta-text,
  .excellence-mini-cta-icon {
    font-size: 15px;
  }

  .excellence-mini-inner {
    gap: 10px;
  }
}
