/**
 * AR My Work Showcase Widget Stylesheet
 * 
 * Preserves the original layout, animations, swipe strip, and responsive design.
 * Designed to allow seamless Elementor style overrides without !important.
 *
 * @package AR_My_Work_Showcase
 */

.ar-work {
  --ar-teal: #178f8e;
  --ar-text: #111111;
  --ar-muted: #555555;
  --ar-line: rgba(0, 0, 0, 0.12);
  --ar-panel: #ffffff;
  font-family: inherit;
  color: var(--ar-text);
  padding: 110px 20px;
  background: #ffffff;
  position: relative;
  width: 100%;
}

.ar-work * {
  box-sizing: border-box;
}

.ar-work__in {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.ar-work__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.ar-work__head h2,
.ar-work__head .ar-work__title {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  margin: 0 0 14px;
  color: #111111;
  font-weight: 700;
}

.ar-work__head p,
.ar-work__head .ar-work__head-desc {
  max-width: 520px;
  margin: 0;
  color: var(--ar-muted);
  font-size: 17px;
  line-height: 1.6;
}

.ar-btn-ghost {
  display: inline-block;
  padding: 12px 26px;
  border: 1.5px solid #111111;
  border-radius: 40px;
  color: #111111;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  background: transparent;
  text-align: center;
}

.ar-btn-ghost:hover,
.ar-btn-ghost:focus-visible {
  background: #111111;
  color: #ffffff;
  outline: none;
}

.ar-work__stage {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 28px;
  align-items: start;
}

.ar-work__main {
  min-width: 0;
}

.ar-work__screen {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f1f1;
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  outline: 1px solid var(--ar-line);
  width: 100%;
}

.ar-work__screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
	
}

.ar-work__screen video.is-on {
  opacity: 1;
  pointer-events: auto;
}

.ar-work__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(0, 0, 0, 0.25);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  text-align: center;
  padding: 20px;
  background: radial-gradient(circle at 30% 30%, rgba(43, 181, 180, 0.18), transparent 60%), #f4f4f4;
  pointer-events: none;
  user-select: none;
}

.ar-work__sound {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  border: 0;
  border-radius: 30px;
  padding: 9px 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, color 0.2s ease;
}

.ar-work__sound:hover,
.ar-work__sound:focus-visible {
  background: var(--ar-teal);
  color: #ffffff;
  outline: none;
}

.ar-work__caption {
  padding: 24px 4px 0;
}

.ar-work__caption h3,
.ar-work__caption .ar-work__caption-title {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  color: #111111;
  line-height: 1.2;
}

.ar-work__meta {
  color: var(--ar-teal);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.4;
}

.ar-work__caption p.ar-work__desc {
  margin: 0;
  color: var(--ar-muted);
  line-height: 1.65;
  font-size: 16px;
  max-width: 640px;
}

.ar-work__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ar-line);
}

.ar-work__item {
  border-bottom: 1px solid var(--ar-line);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ar-work__item button {
  all: unset;
  display: flex;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 18px 6px;
  cursor: pointer;
  position: relative;
  text-align: left;
  box-sizing: border-box;
  background: transparent;
}

.ar-work__item button:focus-visible {
  outline: 2px solid var(--ar-teal);
  outline-offset: 2px;
  border-radius: 6px;
}

.ar-work__thumb {
  flex: 0 0 92px;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: #eeeeee;
  outline: 1px solid var(--ar-line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ar-work__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.6);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.ar-work__item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ar-work__item-title {
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: rgba(17, 17, 17, 0.55);
  transition: color 0.25s ease;
  line-height: 1.3;
}

.ar-work__item-sub {
  display: block;
  font-size: 13.5px;
  color: rgba(85, 85, 85, 0.85);
  margin-top: 3px;
  line-height: 1.4;
}

.ar-work__item button:hover .ar-work__item-title {
  color: #111111;
}

.ar-work__item.is-active .ar-work__item-title {
  color: #111111;
}

.ar-work__item.is-active .ar-work__thumb img {
  filter: none;
  opacity: 1;
}

.ar-work__bar {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--ar-teal);
  transition: width 0.1s linear;
}

.ar-work__item.is-active .ar-work__bar {
  width: var(--p, 0%);
}

.ar-work__list::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   Responsive Breakpoints (Preserving Original Design)
   ========================================================================== */

/* Laptop / Small Desktop */
@media (max-width: 1180px) {
  .ar-work {
    padding: clamp(70px, 9vw, 110px) clamp(16px, 4vw, 32px);
  }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
  .ar-work__stage {
    grid-template-columns: 1.4fr 1fr;
    gap: 22px;
  }
  .ar-work__thumb {
    flex-basis: 76px;
  }
  .ar-work__item button {
    padding: 14px 4px;
    gap: 12px;
  }
  .ar-work__item-title {
    font-size: 17px;
  }
  .ar-work__caption h3,
  .ar-work__caption .ar-work__caption-title {
    font-size: 24px;
  }
}

/* Tablet Portrait + Phones: Player, swipeable strip, description */
@media (max-width: 900px) {
  .ar-work__head {
    margin-bottom: 30px;
    gap: 20px;
  }
  .ar-work__stage {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .ar-work__main {
    display: contents;
  }
  .ar-work__screen {
    order: 1;
  }
  .ar-work__list {
    order: 2;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border: 0;
    padding: 16px 2px 4px;
    margin: 0 -2px;
  }
  .ar-work__item {
    flex: 0 0 clamp(170px, 30vw, 240px);
    scroll-snap-align: start;
    border: 0;
  }
  .ar-work__item button {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0 0 10px;
  }
  .ar-work__thumb {
    flex: none;
    width: 100%;
  }
  .ar-work__bar {
    bottom: 0;
  }
  .ar-work__item-sub {
    font-size: 13px;
  }
  .ar-work__caption {
    order: 3;
    padding: 18px 2px 0;
  }
}

/* Phones */
@media (max-width: 600px) {
  .ar-work__head h2,
  .ar-work__head .ar-work__title {
    font-size: 34px;
    margin-bottom: 10px;
  }
  .ar-work__head p,
  .ar-work__head .ar-work__head-desc {
    font-size: 15.5px;
  }
  .ar-work__head .ar-btn-ghost {
    padding: 10px 22px;
    font-size: 14px;
  }
  .ar-work__screen {
    border-radius: 10px;
  }
	
  .ar-work__sound {
    right: 10px;
    bottom: 10px;
    padding: 7px 12px;
    font-size: 12px;
  }
  .ar-work__item {
    flex-basis: 62%;
  }
  .ar-work__item-title {
    font-size: 16px;
  }
  .ar-work__caption h3,
  .ar-work__caption .ar-work__caption-title {
    font-size: 22px;
  }
  .ar-work__meta {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .ar-work__caption p.ar-work__desc {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* Small Phones */
@media (max-width: 380px) {
  .ar-work__head h2,
  .ar-work__head .ar-work__title {
    font-size: 30px;
  }
  .ar-work__item {
    flex-basis: 72%;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .ar-work__screen video {
    transition: none;
  }
}
