/* =========================================================
   M2FORUM ADS — MINIMAL MEDIA CARD
   /assets/banners/header/m2-ads.css
========================================================= */

.m2-ad-shell {
  /* LIGHT MODE */
  --ad-bg: #F3F4F6;
  --ad-shell-border: rgba(31, 41, 55, .08);
  --ad-divider: rgba(31, 41, 55, .07);

  --ad-muted: #667085;

  --ad-link: #535FDB;
  --ad-link-hover: #434FC7;

  --ad-title-opacity: .88;

  --ad-shadow:
    0 8px 24px rgba(15, 23, 42, .055);

  --ad-shadow-hover:
    0 11px 28px rgba(15, 23, 42, .075);

  position: relative;

  width: max(1024px, 53.333vw);
  max-width: calc(100vw - 40px);

  left: 50%;
  transform: translateX(-50%);

margin-top: 15px;
margin-bottom: 15px;

  overflow: hidden;

  box-sizing: border-box;

  border: 1px solid var(--ad-shell-border);
  border-radius: 11px;

  background: var(--ad-bg);

  box-shadow: var(--ad-shadow);

  transition:
    box-shadow .25s ease,
    background .25s ease,
    border-color .25s ease;
}


/* =========================================================
   DARK MODE
========================================================= */

.dark .m2-ad-shell {
  --ad-bg: #172238;
  --ad-shell-border: #2D3748;

  --ad-divider: rgba(255, 255, 255, .065);

  --ad-muted: #79859c;

  --ad-link: #929aff;
  --ad-link-hover: #aeb4ff;

  --ad-title-opacity: .78;

  --ad-shadow:
    0 9px 25px rgba(0, 0, 0, .13);

  --ad-shadow-hover:
    0 12px 30px rgba(0, 0, 0, .17);
}


/* =========================================================
   TOP META BAR
========================================================= */

.m2-ad-meta {
  display: grid;

  grid-template-columns:
    max-content
    minmax(0, 1fr)
    max-content;

  align-items: center;

  min-height: 28px;

  padding: 0 8px;

  box-sizing: border-box;

  border-bottom: 1px solid var(--ad-divider);

  background: var(--ad-bg);
}


/* =========================================================
   PROMOVAT
========================================================= */

.m2-ad-promoted {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: var(--ad-muted);

  font-size: 11px;
  font-weight: 600;

  line-height: 1;

  letter-spacing: .18px;

  white-space: nowrap;
}


/* static purple dot */

.m2-ad-promoted::before {
  content: "";

  width: 6px;
  height: 6px;

  flex: 0 0 6px;

  border-radius: 50%;

  background: #535FDB;
}


/* =========================================================
   ACTIVE BANNER TITLE
========================================================= */

.m2-ad-title {
  min-width: 0;

  padding: 0 14px;

  overflow: hidden;

  color: var(--ad-muted);

  font-size: 11px;
  font-weight: 500;

  line-height: 1;

  text-align: center;

  white-space: nowrap;
  text-overflow: ellipsis;

  opacity: 0;

  visibility: hidden;

  transform: translateY(1px);

  transition:
    opacity .18s ease,
    visibility .18s ease,
    transform .18s ease;
}


.m2-ad-title.is-visible {
  opacity: var(--ad-title-opacity);

  visibility: visible;

  transform: translateY(0);
}


/* =========================================================
   RECLAMA TA AICI — SIMPLE LINK
========================================================= */

.m2-ad-buy {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  padding: 3px 2px;

  color: var(--ad-link);

  font-size: 11px;
  font-weight: 650;

  line-height: 1;

  text-decoration: none;

  white-space: nowrap;

  opacity: .88;

  transition:
    color .2s ease,
    opacity .2s ease;
}


.m2-ad-buy::before {
  content: "";

  width: 12px;
  height: 12px;

  flex: 0 0 12px;

  background: currentColor;

  -webkit-mask: url("info.svg") center / contain no-repeat;
  mask: url("info.svg") center / contain no-repeat;

  opacity: .8;

  transition:
    opacity .2s ease;
}


.m2-ad-buy:hover {
  color: var(--ad-link-hover);

  opacity: 1;

  text-decoration: none;
}


.m2-ad-buy:hover::before {
  opacity: 1;
}


/* =========================================================
   BANNER AREA
   PRESERVES EXACT 1024x96 RATIO
========================================================= */

.m2-ad-shell .banner-container {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;

  aspect-ratio: 1024 / 96;
  height: auto;

  margin: 0;
  padding: 0;

  overflow: hidden;

  box-sizing: border-box;

  background: #10192b;
}


/* =========================================================
   SUBTLE M2FORUM ACCENT
========================================================= */

.m2-ad-shell .banner-container::after {
  content: "";

  position: absolute;

  left: 50%;
  bottom: 0;

  z-index: 5;

  width: 24%;
  height: 1px;

  transform: translateX(-50%);

  pointer-events: none;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(84, 121, 255, .42),
      rgba(120, 82, 231, .42),
      transparent
    );

  opacity: .7;
}


/* =========================================================
   INDIVIDUAL BANNERS
========================================================= */

.m2-ad-shell .banner {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;

  pointer-events: none;

  transition:
    opacity .5s ease-out;

  z-index: 1;
}


.m2-ad-shell .banner.active {
  opacity: 1;

  pointer-events: auto;
}


.m2-ad-shell .banner > a {
  position: absolute;
  inset: 0;

  display: block;

  overflow: hidden;

  text-decoration: none;
}


/* =========================================================
   IMAGE / VIDEO
   NEVER CROPPED
========================================================= */

.m2-ad-shell .banner img,
.m2-ad-shell .banner video {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: center;
}


/* =========================================================
   HOVER OVERLAY
========================================================= */

.banner-overlay {
  position: absolute;
  inset: 0;

  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;

  opacity: 0;

  pointer-events: none;

  /* Solid tint instead of backdrop-filter: blurring a playing video
     is recalculated on every frame. */
  background: rgba(6, 11, 22, .45);

  transition:
    opacity .22s ease;
}


.banner:hover .banner-overlay {
  opacity: 1;
}


/* =========================================================
   ACCESEAZA BUTTON
========================================================= */

.banner-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  padding: 9px 14px;

  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 7px;

  background: rgba(12, 21, 38, .92);

  color: rgba(255, 255, 255, .96);

  font-size: 12px;
  font-weight: 600;

  line-height: 1;

  box-shadow:
    0 5px 16px rgba(0, 0, 0, .22);
}


.banner-overlay span::after {
  content: "";

  width: 16px;
  height: 16px;

  flex: 0 0 16px;

  background: #8996ff;

  -webkit-mask: url("arrow.svg") center / contain no-repeat;
  mask: url("arrow.svg") center / contain no-repeat;
}


/* =========================================================
   DESKTOP HOVER
========================================================= */

@media (hover: hover) {

  .m2-ad-shell:hover {
    box-shadow: var(--ad-shadow-hover);
  }

}


/* =========================================================
   TOUCH DEVICES
========================================================= */

@media (hover: none) {

  .banner-overlay {
    display: none;
  }

}


/* =========================================================
   LARGE / HIGH-RESOLUTION SCREENS
   Scale topbar together with the banner so it stays readable
========================================================= */

@media (min-width: 1921px) {

  .m2-ad-meta {
    min-height: 1.458333vw;
    padding: 0 .416667vw;
  }


  .m2-ad-promoted {
    gap: .364583vw;
    font-size: .572917vw;
  }


  .m2-ad-promoted::before {
    width: .3125vw;
    height: .3125vw;
    flex-basis: .3125vw;
  }


  .m2-ad-title {
    padding: 0 .729167vw;
    font-size: .572917vw;
  }


  .m2-ad-buy {
    gap: .260417vw;
    padding: .15625vw .104167vw;
    font-size: .572917vw;
  }


  .m2-ad-buy::before {
    width: .625vw;
    height: .625vw;
    flex-basis: .625vw;
  }

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1160px) {

  .m2-ad-shell {
    width: 90%;
  }

}


@media (max-width: 700px) {

  .m2-ad-title {
    padding: 0 8px;

    font-size: 10px;
  }

}


@media (max-width: 480px) {

  .m2-ad-shell {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);

    left: auto;
    transform: none;

    margin: 18px auto;

    border-radius: 7px;
  }


  .m2-ad-meta {
    min-height: 25px;

    padding: 0 6px;
  }


  .m2-ad-promoted {
    font-size: 10px;

    gap: 6px;
  }


  .m2-ad-promoted::before {
    width: 5px;
    height: 5px;

    flex-basis: 5px;
  }


  .m2-ad-title {
    padding: 0 6px;

    font-size: 9px;
  }


  .m2-ad-buy {
    gap: 4px;

    padding: 3px 1px;

    font-size: 10px;
  }


  .m2-ad-buy::before {
    width: 10px;
    height: 10px;

    flex-basis: 10px;
  }

}


/* =========================================================
   VERY SMALL SCREENS

   Hide the optional center title if there is no meaningful
   room for it. Promovat + CTA always remain intact.
========================================================= */

@media (max-width: 360px) {

  .m2-ad-title {
    padding: 0 4px;
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .m2-ad-shell,
  .m2-ad-shell .banner,
  .m2-ad-buy,
  .m2-ad-buy::before,
  .banner-overlay,
  .m2-ad-title {
    transition: none !important;
  }

}
