/* ---------- Aptos font (ads only) ---------- */
/* Self-hosted in wwwroot/fonts/aptos/: Regular (400), Bold (700) and ExtraBold (800) */
@font-face {
  font-family: "Aptos";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: local("Aptos"), local("Aptos-Regular"),
       url("/fonts/aptos/Aptos.woff2") format("woff2"),
       url("/fonts/aptos/Aptos.woff") format("woff"),
       url("/fonts/aptos/Aptos.ttf") format("truetype");
}

@font-face {
  font-family: "Aptos";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local("Aptos Bold"), local("Aptos-Bold"),
       url("/fonts/aptos/Aptos-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Aptos";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: local("Aptos ExtraBold"), local("Aptos-ExtraBold"),
       url("/fonts/aptos/Aptos-ExtraBold.woff2") format("woff2");
}

.ad-top-banner,
.ad-popup {
  font-family: "Aptos", "Montserrat", sans-serif;
z-index:99999;
}
/* site.css sets Montserrat directly on p, li, .btn...: force the ads' font on everything inside */
.ad-top-banner *,
.ad-popup * {
  font-family: inherit;
}
.ad-top-banner strong,
.ad-popup strong,
.ad-popup h1, .ad-popup h2, .ad-popup h3, .ad-popup h4 {
  font-weight: 700;
}

/* ---------- Top banner ---------- */
.ad-top-banner {
  position: relative;
  color: #fff;
  background: #000 url("/img/ads/Top-banner-background-HD-smooth.png") no-repeat right center / cover;
  border-bottom: 1px solid #FFFFFF33;
}
.ad-top-banner__inner,
.ad-popup__content img {
  max-width: 100%;
}
.ad-top-banner__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 40px);
  padding: 10px clamp(16px, 3vw, 48px) 18px;
}
.ad-top-banner img {
  height: auto;
}
.ad-top-banner__logos {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: clamp(10px, 1.4vw, 24px);
  padding-top: clamp(4px, 0.6vw, 10px);
}
.ad-top-banner__logo-inaxsys {
  width: clamp(135px, 15vw, 240px);
  position: relative;
  top: clamp(3px, 0.45vw, 8px);
}
.ad-top-banner__logo-ict {
  width: clamp(45px, 5.2vw, 82px);
}
.ad-top-banner__divider {
  align-self: stretch;
  width: 1px;
  background: rgba(255, 255, 255, 0.7);
}
.ad-top-banner__text {
  flex: 1;
  text-align: left;
  margin: 0;
  padding-top: clamp(4px, 0.6vw, 10px);
  font-size: clamp(15px, 2.2vw, 32px);
  letter-spacing: 0.015rem;
  font-weight: 800;
  line-height: 1.25;
}
.ad-top-banner__text > span {
  display: block;
}
/* Gradient used on the highlighted text, the button border and the arrow */
.ad-grad-text {
  background: linear-gradient(90deg, #e85400, #bb162b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.ad-cta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: clamp(4px, 0.6vw, 9px);
  gap: 0.6em;
  padding: 0.45em 1.2em;
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(#000, #000) padding-box, linear-gradient(90deg, #e85400, #bb162b) border-box;
  color: #fff;
  font-size: clamp(13px, 1.15vw, 20px);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
/* Hover: gradient fill sweeps in from the left, a light shine crosses the button, arrow turns white and slides */
.ad-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.ad-cta::before,
.ad-cta::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.ad-cta::before {
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #e85400, #bb162b);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ad-cta::after {
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  opacity: 0;
}
.ad-cta:hover,
.ad-cta:focus-visible {
  color: #fff;
  box-shadow: 0 6px 22px rgba(232, 84, 0, 0.5);
}
.ad-cta:hover::before,
.ad-cta:focus-visible::before {
  transform: scaleX(1);
}
.ad-cta:hover::after,
.ad-cta:focus-visible::after {
  opacity: 1;
  left: 120%;
  transition: left 0.7s ease 0.1s;
}
.ad-cta:active {
  transform: translateY(0) scale(0.97);
}
.ad-cta svg {
  width: 1.2em;
  height: 1.2em;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.ad-cta:hover svg,
.ad-cta:focus-visible svg {
  transform: translateX(6px);
}
.ad-cta:hover svg path,
.ad-cta:focus-visible svg path {
  fill: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .ad-cta,
  .ad-cta::before,
  .ad-cta::after,
  .ad-cta svg { transition: none !important; }
}

/* ---------- Login popup ---------- */
.ad-popup {
  position: fixed;
  inset: 0;
  /* Above site.css elements with huge z-index (mobile header logo 99999, back-to-top 999999, search results 9999999) */
  z-index: 100000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.9);
}
.ad-popup__box {
  position: relative;
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  max-height: 90vh;
  overflow: auto;
  color: #fff;
  background: #000 url("/img/ads/popup-background.jpg") no-repeat right bottom / cover;
  border: 1px solid #ffffff44;
  border-radius: 20px;
  /* Glow: orange (#e85400) on the left blending into red (#bb162b) on the right */
  box-shadow: 0px 0 20px -9px rgba(232, 84, 0, 0.45),
              22px 0 100px -4px rgba(187, 22, 43, 0.45),
              0 12px 40px rgba(0, 0, 0, 0.5);
}
.ad-popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  line-height: 0;
  color: #fff;
  opacity: 0.8;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ad-popup__close:hover,
.ad-popup__close:focus-visible {
  opacity: 1;
  transform: scale(1.1);
}
.ad-popup__close svg {
  display: block;
  width: 40px;
  height: 40px;
}
@media (prefers-reduced-motion: reduce) {
  .ad-popup__close { transition: none; }
}

/* ---------- Login popup content (sizes follow the popup width via container units) ---------- */
.ad-popup__box {
  container-type: inline-size;
}
.ad-popup__content img {
  height: auto;
}
.ad-popup-ad {
  padding: clamp(18px, 3.75cqw, 36px);
  padding-right: clamp(36px, 7cqw, 72px);
}
.ad-popup-ad__logos {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.2cqw, 22px);
}
.ad-popup-ad__logo-inaxsys {
  width: clamp(110px, 26.5cqw, 254px);
  position: relative;
  top: clamp(3px, 0.8cqw, 8px);
}
.ad-popup-ad__logo-ict {
  width: clamp(40px, 8.3cqw, 80px);
}
.ad-popup-ad__divider {
  align-self: stretch;
  width: 1px;
  background: rgba(255, 255, 255, 0.6);
}
.ad-popup-ad__text {
  margin: clamp(18px, 6.5cqw, 62px) 0 clamp(18px, 5.5cqw, 52px);
  font-size: clamp(17px, 3.8cqw, 36px);
  letter-spacing: 0.015rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: left;
}
.ad-popup-ad__text > span {
  display: block;
}
.ad-popup .ad-cta {
  margin-top: 0;
  padding: 0.55em 1.5em;
  font-size: clamp(15px, 2.5cqw, 24px);
}

@media (max-width: 575px) {
  .ad-popup { padding: 8px; }
}

/* xs, sm and md: square popup with the tablet/mobile background */
@media (max-width: 991px) {
  .ad-popup__box {
    width: min(100%, 90vh, 960px);
    aspect-ratio: 1 / 1;
    background: #000 url("/img/ads/popup-background-tablet.webp") no-repeat right bottom / cover;
  }
  /* Same logo sizes as lg and up (they may shrink if the box is too narrow to fit them) */
  .ad-popup-ad__logo-inaxsys { width: 254px; min-width: 0; }
  .ad-popup-ad__logo-ict { width: 80px; min-width: 0; }
  /* Larger text and button */
  .ad-popup-ad__text {
    font-size: clamp(21px, 5cqw, 38px);
    margin: clamp(30px, 9cqw, 80px) 0 clamp(36px, 11cqw, 96px);
  }
  .ad-popup .ad-cta { font-size: clamp(19px, 4.2cqw, 32px); }
}

/* xs and sm: smaller popup logos and text */
@media (max-width: 767px) {
  .ad-popup-ad__logo-inaxsys { width: clamp(120px, 36cqw, 200px); }
  .ad-popup-ad__logo-ict { width: clamp(42px, 11.5cqw, 64px); }
  .ad-popup-ad__text { font-size: clamp(16px, 4.2cqw, 28px); }
  .ad-popup .ad-cta { font-size: clamp(14px, 3.4cqw, 24px); }
}

@media (max-width: 991px) {
  .ad-top-banner__inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding-top: 12px;
    padding-bottom: 20px;
  }
  .ad-top-banner__divider { height: 36px; align-self: auto; }
  .ad-top-banner__text { text-align: center; flex: 1 1 100%; font-size: clamp(14px, 3.4vw, 20px); }
  .ad-cta { font-size: clamp(13px, 3vw, 16px); }
}

/* Phones and md screens: logo, 2-line text and button stay on a single row */
@media (max-width: 991px) {
  .ad-top-banner__inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
    padding: 8px 10px 10px;
  }
  .ad-top-banner__logos { padding-top: 0; }
  .ad-top-banner__logo-ict { width: clamp(30px, 8vw, 60px); }
  .ad-top-banner__text {
    flex: 1 1 0;
    min-width: 0;
    padding-top: 0;
    text-align: left;
    font-size: clamp(8px, 2.2vw, 20px);
    letter-spacing: 0;
    line-height: 1.2;
  }
  .ad-top-banner .ad-cta {
    margin-top: 0;
    gap: 0.4em;
    padding: 0.35em 0.8em;
    font-size: clamp(9px, 2.4vw, 16px);
  }
}

/* lg screens: slightly larger button text */
@media (min-width: 992px) and (max-width: 1199px) {
  .ad-top-banner .ad-cta { font-size: clamp(15px, 1.5vw, 18px); }
}

/* xl screens: slightly larger button text */
@media (min-width: 1200px) and (max-width: 1399px) {
  .ad-top-banner .ad-cta { font-size: clamp(17px, 1.4vw, 20px); }
}

/* xs screens: slightly larger text and button */
@media (max-width: 575px) {
  .ad-top-banner__text { font-size: clamp(9px, 2.7vw, 14px); }
  .ad-top-banner .ad-cta { font-size: clamp(10px, 2.9vw, 14px); }
}

/* sm screens: slightly larger text and button */
@media (min-width: 576px) and (max-width: 767px) {
  .ad-top-banner__text { font-size: clamp(14px, 2.6vw, 20px); }
  .ad-top-banner .ad-cta { font-size: clamp(14px, 2.5vw, 19px); }
}

/* md screens: slightly larger text and button */
@media (min-width: 768px) and (max-width: 991px) {
  .ad-top-banner__text { font-size: clamp(19px, 2.7vw, 26px); }
  .ad-top-banner .ad-cta { font-size: clamp(15px, 2.1vw, 20px); }
  .ad-top-banner__logos { padding-left: 16px; padding-right: 16px; }
  .ad-top-banner__logo-ict { width: clamp(56px, 7.5vw, 72px); }
}
