/* Stories row */
.wp-stories { width: 100%; }
.wp-stories-track {
  display: flex;
  gap: 16px;
  justify-content: center; /* center stories */
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 10px 2px;
}
.wp-story-item {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  min-width: 86px;
  scroll-snap-align: start;
  text-align: center;
}
.wp-story-ring{
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  margin: 0 auto;
  background: conic-gradient(from 180deg, #ff4d4d, #ffb84d, #ff4dd2, #7a5cff, #ff4d4d);
  padding: 3px;
  overflow: hidden; /* keep inner icon inside circle */
  box-sizing: border-box;
}
.wp-story-item.is-seen .wp-story-ring{
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  margin: 0 auto;
  background: conic-gradient(from 180deg, #ff4d4d, #ffb84d, #ff4dd2, #7a5cff, #ff4d4d);
  padding: 3px;
  overflow: hidden; /* keep inner icon inside circle */
  box-sizing: border-box;
}
.wp-story-icon{
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover; /* square images crop nicely */
  display: block;
  border: 3px solid #fff;
  box-sizing: border-box;
  box-shadow: none;
}
.wp-story-name{
  display:block !important;
  margin-top:8px;
  font-size:14px;
  font-weight:600;
  color:#175000;
  text-align:center;
}


/* Modal */
.wp-story-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}
.wp-story-modal.is-open { display: block; }

.wp-story-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.wp-story-modal-dialog {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(520px, 92vw);

  /* Use dynamic viewport height so footer/CTA stays on-screen on mobile */
  height: min(92dvh, 860px);
  padding-bottom: env(safe-area-inset-bottom);

  background: #0b0b0c;
  border-radius: 18px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.5);
  overflow: hidden;

  display: grid;
  grid-template-rows: 1fr auto;

  /* Make this a positioning context for nav buttons */
  position: absolute;
}

/* Progress */
.wp-story-progress{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.10);
  z-index: 2;
}
.wp-story-progress-bar{
  display:block;
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.85);
  transition: width .06s linear;
}

.wp-story-modal-close{
  position: absolute;
  top: 12px;
  right: 12px;

  width: 40px;
  height: 40px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.45);
  color: #fff;

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

  font-size: 22px;
  line-height: 1;

  cursor: pointer;

  /* always above media/footer */
  z-index: 1000;

  box-shadow: none;
}

.wp-story-modal-body {
  padding: 20px 14px 10px 14px;
  display: grid;
  place-items: center;
  position: relative;
}

.wp-story-modal-media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.wp-story-image,
.wp-story-video {
  max-width: 100%;
  /* Keep media inside modal with footer/CTA visible */
  max-height: calc(92dvh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  background: #111;
}

/* Footer CTA */
.wp-story-modal-footer {
  padding: 12px 14px 16px 14px;
  background: linear-gradient(180deg, rgba(11,11,12,0) 0%, rgba(11,11,12,0.85) 35%, rgba(11,11,12,0.95) 100%);
}

.wp-story-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  padding:14px 16px;
  border-radius:16px;
  text-decoration:none;
  font-weight:600;
  font-size:15px;

  background:#25D366; /* WhatsApp green */
  color:#ffffff;
  border:none;

  transition: transform .15s ease, opacity .15s ease;
}



/* Prev/Next */
.wp-story-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 44px;
  height: 64px;

  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.30);
  color: #fff;

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

  font-size: 34px;
  line-height: 1;

  cursor: pointer;
  z-index: 900;
  user-select: none;

  box-shadow: none;
}
.wp-story-prev{ left: 12px; }

.wp-story-next{ right: 12px; }

.wp-story-nav.is-disabled{
  opacity: 0.35;
  cursor: not-allowed;
}

/* Body lock */
body.wp-story-modal-open { overflow: hidden; }





.wp-story-item:focus{
  outline: none;
}
.wp-story-item:focus-visible .wp-story-ring{
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  margin: 0 auto;
  background: conic-gradient(from 180deg, #ff4d4d, #ffb84d, #ff4dd2, #7a5cff, #ff4d4d);
  padding: 3px;
  overflow: hidden; /* keep inner icon inside circle */
  box-sizing: border-box;
}



/* Footer CTA always visible */
.wp-story-modal-footer{
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}


/* Footer is hidden by default (CTA shown only when story opens) */
.wp-story-modal-footer{ display:none; }


/* Seen state should not fade icons */
.wp-story-item.is-seen{ opacity: 1 !important; }
.wp-story-item.is-seen .wp-story-icon{
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover; /* square images crop nicely */
  display: block;
  border: 3px solid #fff;
  box-sizing: border-box;
  box-shadow: none;
}

/* Ensure no theme hover background leaks */
.wp-story-item:hover,
.wp-story-item:focus,
.wp-story-item:active{
  background:transparent !important;
  box-shadow:none !important;
}



/* === Mobile: Instagram-like stories row (single-line slider) === */
@media (max-width: 767px){
  .wp-stories{
    width:100% !important;
  }

  .wp-stories-track{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    align-items:flex-start !important;

    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;

    gap:14px !important;
    padding:10px 6px !important;

    /* no visible scrollbar / no line under */
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
    border-bottom:none !important;
    box-shadow:none !important;
    background:transparent !important;
  }
  .wp-stories-track::-webkit-scrollbar{ display:none !important; height:0 !important; }

  .wp-story-item{
    flex:0 0 auto !important;
    width:86px !important;
    max-width:86px !important;
    background:transparent !important;
    box-shadow:none !important;
  }

  .wp-story-name{

    display:block !important;
    margin-top:8px !important;
    text-align:center !important;
    color:#175000 !important;

    /* show full title on mobile */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
    hyphens: auto !important;

    /* responsive font */
    font-size: clamp(10px, 3.2vw, 13px) !important;
    line-height: 1.15 !important;

  }
}


/* === Hide native video controls (including sound button) === */
.wp-story-video{ outline:none; }
.wp-story-video::-webkit-media-controls,
.wp-story-video::-webkit-media-controls-enclosure,
.wp-story-video::-webkit-media-controls-panel,
.wp-story-video::-webkit-media-controls-play-button,
.wp-story-video::-webkit-media-controls-volume-slider,
.wp-story-video::-webkit-media-controls-mute-button,
.wp-story-video::-webkit-media-controls-timeline,
.wp-story-video::-webkit-media-controls-current-time-display,
.wp-story-video::-webkit-media-controls-time-remaining-display,
.wp-story-video::-webkit-media-controls-fullscreen-button{
  display:none !important;
}


/* === CTA: keep hover text white (override theme) === */
.wp-story-modal a.wp-story-cta,
.wp-story-modal a.wp-story-cta:hover,
.wp-story-modal a.wp-story-cta:focus,
.wp-story-modal a.wp-story-cta:active,
.wp-story-modal a.wp-story-cta:visited{
  color:#ffffff !important;
  text-decoration:none !important;
}

/* keep WhatsApp green stable on hover */
.wp-story-modal a


/* === Override Astra underline rule inside our Stories UI only === */
.ast-single-post .entry-content .wp-stories a,
.ast-single-post .entry-content .wp-story-modal a{
  text-decoration: none !important;
}




/* Mobile */
@media (max-width: 767px){
  .wp-stories .wp-story-name{
    max-width: 96px !important;
    font-size: clamp(10px, 3.2vw, 13px) !important;
    line-height: 1.15 !important;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px){
  .wp-stories .wp-story-name{
    max-width: 110px !important;
    font-size: clamp(11px, 1.4vw, 14px) !important;
    line-height: 1.2 !important;
  }
}

/* Desktop */
@media (min-width: 1025px){
  .wp-stories .wp-story-name{
    max-width: 120px !important;
    font-size: clamp(12px, 0.9vw, 14px) !important;
    line-height: 1.2 !important;
  }
}



/* === Story title: single-line, FULL text (no ...), responsive per device (only this change) === */
.wp-stories .wp-story-name{
  white-space: nowrap !important;   /* single line */
  overflow: visible !important;     /* no clipping */
  text-overflow: clip !important;   /* no ellipsis */
}

/* Mobile */
@media (max-width: 767px){
  .wp-stories .wp-story-name{
    font-size: clamp(9px, 3.0vw, 13px) !important;
    line-height: 1.15 !important;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px){
  .wp-stories .wp-story-name{
    font-size: clamp(11px, 1.3vw, 14px) !important;
    line-height: 1.2 !important;
  }
}

/* Desktop */
@media (min-width: 1025px){
  .wp-stories .wp-story-name{
    font-size: clamp(12px, 0.9vw, 15px) !important;
    line-height: 1.2 !important;
  }
}



/* === Desktop only: make stories slightly larger === */
@media (min-width: 1025px){
  .wp-stories .wp-story-item{
    width: 110px !important;
    max-width: 110px !important;
  }

  .wp-stories .wp-story-ring{
    width: 92px !important;
    height: 92px !important;
  }

  .wp-stories .wp-story-icon{
    width: 80px !important;
    height: 80px !important;
  }
}



/* === Desktop only: center stories horizontally === */
@media (min-width: 1025px){
  .wp-stories .wp-stories-track{
    justify-content: center !important;
  }
}



/* === Desktop: center ring + icon inside each story item (shortcode area) === */
@media (min-width: 1025px){
  .wp-stories .wp-story-item{
    text-align: center !important;
  }
  .wp-stories .wp-story-ring{
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .wp-stories .wp-story-icon{
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Center the whole row on desktop (without breaking mobile slider) */
  .wp-stories{
    text-align: center !important;
  }
  .wp-stories .wp-stories-track{
    display: inline-flex !important;
    justify-content: center !important;
  }
}



/* === 4K+ (ultra-wide): align stories block with page/container width === */
@media (min-width: 2560px){
  .wp-stories{
    max-width: var(--ast-container-width, 1200px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
