/* ============================================================
   Aptomix — Hero Slider Widget CSS
   Enqueued by: Aptomix_Hero_Widget::get_style_depends()
   Google Fonts: enqueued separately via wp_enqueue_style()
   ============================================================ */

/* ── Scoped reset ────────────────────────────────────────── */
.aptomix-hero *,
.aptomix-hero *::before,
.aptomix-hero *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Hero wrapper ────────────────────────────────────────── */
.aptomix-hero {
  position: relative;
  width: 100%;
  height: 700px;            /* overridden by Elementor hero_height control */
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
  background: #060E18;
  scroll-margin-top: 72px; /* matches header height */
}

/* ── Slides track ────────────────────────────────────────── */
.am-slides {
  display: flex;
  height: 100%;
  /* transition duration set by JS from data-transition-speed */
  transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── Individual slide ────────────────────────────────────── */
.am-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ── Background image layer ──────────────────────────────── */
/*
 * Background image is set via inline style from the Elementor media control.
 * The fallback gradient fires when no image has been uploaded yet.
 */
.am-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  /* Fallback: visible even before an image is selected */
  background-color: #0d1b2a;
  background-image: linear-gradient(135deg, #0d2b40 0%, #061525 100%);
  transform: scale(1.06);
  transition: transform 7s ease;
}

/* Inline style from PHP overrides the fallback above — no extra specificity needed */

/* Ken-Burns zoom-out on active slide */
.am-slide.active .am-slide-bg {
  transform: scale(1.0);
}

/* ── Dark gradient overlay ───────────────────────────────── */
/*
 * Stronger dark-left → transparent-right gradient so text stays readable
 * while the right side of the image stays vivid and unobscured.
 * CSS custom props let per-slide overlay_color override the left stop.
 */
.am-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    var(--am-overlay-start, rgba(6, 14, 24, 0.88)) 0%,
    var(--am-overlay-mid,   rgba(6, 14, 24, 0.52)) 38%,
    var(--am-overlay-end,   rgba(6, 14, 24, 0.10)) 68%,
    rgba(6, 14, 24, 0.00) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Vertical accent line ────────────────────────────────── */
.am-slide-line {
  position: absolute;
  left: 7.5%;
  bottom: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, #00B0F0 0%, rgba(0, 176, 240, 0.4) 70%, transparent 100%);
  z-index: 3;
  transition: height 0.6s ease 0.2s;
}

.am-slide.active .am-slide-line {
  height: 56%;              /* taller line — matches reference more closely */
}

/* ── Slide content (text + CTA) ──────────────────────────── */
.am-slide-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 46% 0 8%;      /* right padding keeps text out of image territory */
  max-width: none;          /* let padding do the constraining, not max-width */
}

.aptomix-hero--content-center .am-slide-content,
.aptomix-hero--content-center .aptomix-hero .am-slide-content {
  align-items: center;
  text-align: center;
  padding: 0 18%;
}

.aptomix-hero--content-center .am-slide-desc,
.aptomix-hero--content-center .aptomix-hero .am-slide-desc {
  margin-left: auto;
  margin-right: auto;
}

.aptomix-hero--content-right .am-slide-content,
.aptomix-hero--content-right .aptomix-hero .am-slide-content {
  align-items: flex-end;
  text-align: right;
  padding: 0 8% 0 46%;
}

.aptomix-hero--content-right .am-slide-desc,
.aptomix-hero--content-right .aptomix-hero .am-slide-desc {
  margin-left: auto;
}

.aptomix-hero--content-center .am-slide-line,
.aptomix-hero--content-center .aptomix-hero .am-slide-line,
.aptomix-hero--content-right .am-slide-line,
.aptomix-hero--content-right .aptomix-hero .am-slide-line,
.aptomix-hero--hide-text-line-yes .am-slide-line,
.aptomix-hero--hide-text-line-yes .aptomix-hero .am-slide-line,
.aptomix-hero--hide-text-line .am-slide-line {
  display: none;
}

/* ── Eyebrow tag ──────────────────────────────────────────── */
.am-slide-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 176, 240, 0.10);
  border: 1px solid rgba(0, 176, 240, 0.40);
  color: #00B0F0;
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 2px;
  width: fit-content;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.50s ease 0.10s, transform 0.50s ease 0.10s;
}

/* ── Main heading ────────────────────────────────────────── */
.am-slide-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 58px;          /* slightly larger for stronger hierarchy */
  font-weight: 700;
  line-height: 1.06;
  color: #fff;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.60s ease 0.22s, transform 0.60s ease 0.22s;
}

/* Heading accent word — brand blue, overridden by Elementor accent_color control */
.am-slide-heading .am-slide-heading__accent {
  color: #00B0F0;
}

/* ── Description ─────────────────────────────────────────── */
.am-slide-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 16.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.68;
  max-width: 440px;
  margin-bottom: 34px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.60s ease 0.34s, transform 0.60s ease 0.34s;
}

/* ── CTA button ──────────────────────────────────────────── */
.am-slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  padding: 13px 32px;       /* more horizontal padding — matches reference width */
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  width: fit-content;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity      0.55s ease 0.46s,
    transform    0.55s ease 0.46s,
    background-color 0.22s ease,
    border-color     0.22s ease;
}

.am-slide-btn:hover {
  background-color: #00B0F0;
  border-color: #00B0F0;
  color: #fff;
}

.am-slide-btn svg {
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.am-slide-btn:hover svg {
  transform: translateX(5px);
}

/* ── Activate entrance animations on active slide ─────────── */
.am-slide.active .am-slide-tag,
.am-slide.active .am-slide-heading,
.am-slide.active .am-slide-desc,
.am-slide.active .am-slide-btn {
  opacity: 1;
  transform: translateY(0);
}

/* ── Side slide number index ─────────────────────────────── */
.am-slide-index {
  position: absolute;
  right: 3.5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.am-idx-num {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.20);
  letter-spacing: 1.5px;
  writing-mode: vertical-rl;
  transition: color 0.35s ease;
  user-select: none;
}

.am-idx-num.cur {
  color: rgba(255, 255, 255, 0.75);
}

.am-idx-line {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.12);
}

/* ── Bottom nav bar (dots + counter) ─────────────────────── */
.am-nav {
  position: absolute;
  bottom: 28px;
  left: 8%;                 /* left-aligned under the content block */
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 14, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 40px;
  padding: 8px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.aptomix-hero--nav-center .am-nav,
.aptomix-hero--nav-center .aptomix-hero .am-nav {
  left: 50%;
  transform: translateX(-50%);
}

.aptomix-hero--nav-right .am-nav,
.aptomix-hero--nav-right .aptomix-hero .am-nav {
  left: auto;
  right: 8%;
}

.am-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  margin: 0 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.am-dot.active {
  background: #00B0F0;
  width: 20px;
  border-radius: 3px;
}

.am-dot:focus-visible {
  outline: 2px solid #00B0F0;
  outline-offset: 2px;
}

.am-nav-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 8px;
  flex-shrink: 0;
}

.am-nav-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.36);
  letter-spacing: 0.8px;
  white-space: nowrap;
  user-select: none;
}

.am-nav-count span {
  color: rgba(255, 255, 255, 0.75);
}

/* ── Arrow buttons ───────────────────────────────────────── */
.am-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 14, 24, 0.50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.80);
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
  padding: 0;
}

.am-arrow:hover {
  background-color: rgba(0, 176, 240, 0.85);
  border-color: rgba(0, 176, 240, 0.60);
  color: #ffffff;
}

.am-arrow:focus-visible {
  outline: 2px solid #00B0F0;
  outline-offset: 3px;
}

.am-arrow-prev { left: 32px; }
.am-arrow-next { right: 32px; }

/* ── Progress bar ────────────────────────────────────────── */
.am-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #00B0F0;
  z-index: 10;
  /* transition duration set dynamically by JS */
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1200px) {
  .am-slide-content    { padding: 0 42% 0 7%; }
  .aptomix-hero--content-center .am-slide-content,
  .aptomix-hero--content-center .aptomix-hero .am-slide-content { padding: 0 14%; }
  .aptomix-hero--content-right .am-slide-content,
  .aptomix-hero--content-right .aptomix-hero .am-slide-content { padding: 0 7% 0 42%; }
  .am-slide-heading    { font-size: 50px; }
}

@media (max-width: 1024px) {
  .aptomix-hero        { height: 560px; }
  .am-slide-content    { padding: 0 10% 0 7%; } /* on tablet, content can use more width */
  .aptomix-hero--content-center .am-slide-content,
  .aptomix-hero--content-center .aptomix-hero .am-slide-content { padding: 0 10%; }
  .aptomix-hero--content-right .am-slide-content,
  .aptomix-hero--content-right .aptomix-hero .am-slide-content { padding: 0 7% 0 10%; }
  .am-slide-heading    { font-size: 42px; }
}

@media (max-width: 900px) {
  .aptomix-hero        { height: 500px; }
  .am-slide-content    { padding: 0 8% 0 6%; }
  .am-slide-heading    { font-size: 34px; letter-spacing: -0.8px; }
  .am-slide-desc       { font-size: 14.5px; max-width: 100%; }
  .am-slide-index      { display: none; }
  .am-arrow-prev       { left: 14px; }
  .am-arrow-next       { right: 14px; }
  .am-nav              { left: 50%; transform: translateX(-50%); } /* re-center on tablet */
  .aptomix-hero--nav-right .am-nav,
  .aptomix-hero--nav-right .aptomix-hero .am-nav { left: 50%; right: auto; transform: translateX(-50%); }
}

@media (max-width: 600px) {
  .aptomix-hero        { height: 460px; }
  .am-slide-content    { padding: 0 20px; }
  .aptomix-hero--content-center .am-slide-content,
  .aptomix-hero--content-center .aptomix-hero .am-slide-content,
  .aptomix-hero--content-right .am-slide-content,
  .aptomix-hero--content-right .aptomix-hero .am-slide-content { padding: 0 20px; }
  .am-slide-heading    { font-size: 28px; letter-spacing: -0.5px; }
  .am-slide-desc       { font-size: 14px; margin-bottom: 26px; }
  .am-slide-btn        { font-size: 9.5px; padding: 11px 22px; letter-spacing: 1.8px; }
  .am-slide-tag        { font-size: 9.5px; padding: 5px 12px; letter-spacing: 2px; }
  .am-arrow            { display: none; }
  .am-nav              { left: 50%; transform: translateX(-50%); }
}
