/* BW Awards — front + VC-safe styles
   ------------------------------------------------------------------ */

:root{
  --bw-aw-radius: 0;
  --bw-aw-shadow: 0 10px 24px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.05);
  --bw-aw-shadow-hover: 0 16px 36px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
  --aw-dur-bg: 380ms;
  --aw-dur-fg: 260ms;
  --aw-ease: cubic-bezier(.22,.61,.36,1);
}

/* Scope to this component only */
.bw-awards .swiper{ overflow: hidden; width: 100%; }
.bw-awards .swiper-slide{ width: auto; }
.bw-awards .swiper-wrapper{ transition-timing-function: linear !important; }

/* Tile */
.bw-awards__slide{
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 350px;
  min-height: 260px;

  /* CSS var defaults + fallbacks */
  background: #e9e9e9;
  background: var(--bg, #e9e9e9);
  color: #111;
  color: var(--fg, #111);

  border-radius: var(--bw-aw-radius);
  box-shadow: var(--bw-aw-shadow);
  transition:
    background var(--aw-dur-bg) var(--aw-ease),
    color      var(--aw-dur-fg) var(--aw-ease),
    box-shadow var(--aw-dur-bg) var(--aw-ease),
    transform  220ms var(--aw-ease);
  will-change: background, color, box-shadow, transform;
  padding: 28px 28px 56px;
}
.bw-awards__slide:hover{
  background: #000;
  background: var(--hover-bg, #000);
  color: #e31e24;
  color: var(--hover-fg, #e31e24);
  box-shadow: var(--bw-aw-shadow-hover);
  transform: translateY(-1px);
}

/* Year */
.bw-awards__year{
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 18px;
  margin-bottom: 8px;
  opacity: .95;
  transition: color var(--aw-dur-fg) var(--aw-ease), opacity 220ms var(--aw-ease);
}

/* Icon (Font Awesome or similar) */
.bw-awards__ico{
  position: absolute;
  top: 18px; right: 18px;
  font-size: 28px;
  line-height: 1;
  opacity: .9;
  transition: color var(--aw-dur-fg) var(--aw-ease), opacity 220ms var(--aw-ease);
}

/* Title */
.bw-awards__title{
  margin: 18px 0 8px;
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.02;
  transition: color var(--aw-dur-fg) var(--aw-ease);
}

/* Subtitle revealed on hover/focus */
.bw-awards__subtitle{
  font-size: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  height: 0;
  margin: 0;
  overflow: hidden;
  transition:
    opacity   240ms var(--aw-ease),
    transform 240ms var(--aw-ease),
    color     var(--aw-dur-fg) var(--aw-ease);
}
.bw-awards__slide:hover .bw-awards__subtitle,
.bw-awards__slide:focus-within .bw-awards__subtitle{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  height: auto;
  margin-top: 6px;
  overflow: visible;
}

/* Ribbon revealed on hover/focus */
.bw-awards__ribbon{
  position: absolute;
  left: 0; bottom: 0;
  height: 50px;

  background: #e31e24;
  background: var(--accent, #e31e24);

  color: #fff;
  display: inline-flex;
  align-items: center;
  padding: 0 28px 0 22px;
  border-bottom-left-radius: var(--bw-aw-radius);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;

  /* zig cut */
  clip-path: polygon(0 0, 88% 0, 100% 100%, 0% 100%);
  -webkit-clip-path: polygon(0 0, 88% 0, 100% 100%, 0% 100%);

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity          260ms var(--aw-ease),
    transform        260ms var(--aw-ease),
    background-color var(--aw-dur-fg) var(--aw-ease),
    color            var(--aw-dur-fg) var(--aw-ease);
  pointer-events: none;
}
.bw-awards__ribbon span{ transform: translateY(1px); }
.bw-awards__slide:hover .bw-awards__ribbon,
.bw-awards__slide:focus-within .bw-awards__ribbon{
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}

/* Clickable overlay (hidden in backend via admin-safe rules below) */
.bw-awards__link{
  position: absolute; inset: 0; z-index: 3;
  border-radius: var(--bw-aw-radius);
}
.bw-awards__link:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(227,30,36,.28);
}

/* RTL: keep icon pinned visually to the outside edge */
[dir="rtl"] .bw-awards__ico { right: auto; left: 18px; }

/* Responsive */
@media (max-width:1024px){ .bw-awards__slide{ min-width: 350px; } }
@media (max-width:768px){  .bw-awards__slide{ min-width: 86vw; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .bw-awards .swiper-wrapper{ transition-timing-function: ease !important; }
  .bw-awards__slide,
  .bw-awards__year,
  .bw-awards__title,
  .bw-awards__subtitle,
  .bw-awards__ico,
  .bw-awards__ribbon{
    transition: none !important;
    transform: none !important;
  }
}

/* Ensure horizontal layout even if Swiper JS hasn't initialized yet */
.bw-awards .swiper-wrapper { display: flex; }
.bw-awards .swiper-slide   { flex: 0 0 auto; }

/* --- WPBakery backend safety (no clicks/animations in admin) --- */
.vc_editor .bw-awards .swiper-wrapper,
.vc_backend-editor .bw-awards .swiper-wrapper{
  transition: none !important;
}

.vc_editor .bw-awards__link,
.vc_backend-editor .bw-awards__link{
  display: none !important;
  pointer-events: none !important;
}

.vc_editor .bw-awards__slide:hover,
.vc_backend-editor .bw-awards__slide:hover{
  transform: none !important;
  box-shadow: var(--bw-aw-shadow) !important;
}
