:root{
  --ws-width: 600px;         /* left column width */
  --poll-width: 350px;       /* right column width */
  --gap: 20px;
  --accent-yellow: #f9b202;
  --accent-deep: #001f60;
  --accent-red: #bf0709;
  --muted: #6b6b6b;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 4px 16px rgba(0,0,0,0.06);
}

.FlexBoxx,
.common_sectionn { box-sizing: border-box; }

/* Primary flex row for desktop */
.FlexBoxx {
  display: flex;
  justify-content: center;    /* center two columns */
  align-items: flex-start;
  gap: var(--gap);
  width: 100%;
  box-sizing: border-box;
  padding: 0 12px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

/* If you prefer the container name .common_sectionn be used as row */
.common_sectionn { display: block; } /* left column handled below */

/* -------------------------
   LEFT: WebStories wrapper
   ------------------------- */
.common_sectionn,
.webStory_wrapper {
  width: var(--ws-width);
  min-width: var(--ws-width);
  box-sizing: border-box;
  padding: 12px;
}

/* Header styles inside left wrapper */
.common_sectionn .commonHD,
.webStory_wrapper .commonHD,
.commonHD {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.commonHD h2 { margin: 0; font-size: 20px; color:#99003b; font-weight: 800; }
.commonHD a.moreNews { color: #99003b; text-decoration: none; font-weight: 600;font-size: 15px;; }

/* -------------------------
   WebStories / Swiper safe rules
   ------------------------- */
.webStories {
  width: 100%;
  overflow: hidden;            /* hide transform overflow */
  padding-bottom: 36px;        /* room for pagination */
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

/* Keep swiper-wrapper safe in flex */
.webStories .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  will-change: transform;
  align-items: stretch;
}

/* Desktop thumbnail width (matches your inline examples) */
.webStories .swiper-slide {
  box-sizing: border-box;
  width: 146px;                /* thumbnail width on desktop */
  margin-right: 15px;
  -webkit-tap-highlight-color: transparent;
  display: block;
}

/* SCOPED image_wrap: only inside WebStories */
.webStories .image_wrap {
  border-radius: 16px;
  overflow: hidden;
  background: #eee;
}
.webStories .image_wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: inherit;
  max-width: 100%;
}

/* Slide title: allow wrapping (no forced ellipsis). If you want clamp, change here */
.webStories .swiper-slide h4 {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  line-height: 1.25;
  display: block;
  white-space: normal;     /* wrap naturally */
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  position: relative;
  z-index: 5;              /* stays above pagination */
}

/* Pagination bullets — placed visually below slides */
.webStories .swiper-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  text-align: center;
  z-index: 4;
}
.webStories .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #030a54;
  opacity: .18;
  margin: 0 4px;
  border-radius: 999px;
  display: inline-block;
}
.webStories .swiper-pagination-bullet-active {
  background: var(--accent-red);
  opacity: 1;
}

/* Ensure no child forces parent overflow */
.common_sectionn, .webStory_wrapper, .webStories, .webStories .swiper-wrapper {
  min-width: 0;
  
}

/* -------------------------
   RIGHT: Polls sidebar
   ------------------------- */
   
   
.polls_wrapper {
  width: var(--poll-width);
  min-width: var(--poll-width);
  max-width: var(--poll-width);
  background: #ffffff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-soft);
  box-sizing: border-box;
  color: #111;
  font-family: inherit;
}

/* Poll internal container */
#polls-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Header */
#polls-container .poll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.poll-headline {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #99003b;
  padding-left: 8px;
  border-left: 6px solid var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.more-polls {
  color: #99003b;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.more-polls:hover { text-decoration: underline; }

/* Poll card */
.poll-card {
  background: #fbfbfb;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.poll-card .poll-question {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
}

/* Options list and rows */
.poll-options { display:flex; flex-direction:column; gap:8px; }
.poll-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 24px;
  background: #f2f2f2;
  min-height: 44px;
  overflow: hidden;
  cursor: pointer;
}
.poll-option input[type="radio"] {
  transform: scale(1.05);
  cursor: pointer;
  accent-color: #99003b;
  margin: 0;
  z-index: 2;
}
.option-label {
  flex: 1;
  font-size: 14px;
  color: #222;
  z-index: 2;
}
.option-percent {
  font-size: 13px;
  font-weight: 700;
  color: #c0392b;
  min-width: 44px;
  text-align: right;
  z-index: 2;
}

/* Animated bar behind option (width set by JS or inline style) */
.poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  z-index: 1;
  opacity: 0.45;
  transition: width 0.6s cubic-bezier(.2,.8,.2,1);
}
.poll-bar.blue  { background: #d3eafd; }
.poll-bar.red   { background: #f7b7b3; }
.poll-bar.green { background: #d1f0d1; }

/* Vote alert / confirmation */
.vote-alert {
  display: none;
  background: #fff3cd;
  color: #856404;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ffeeba;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

/* Submit button */
.submit-button {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-pill);
  background: #99003b;
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,35,102,0.12);
  transition: transform .16s ease, filter .16s ease;
}
.submit-button:hover { transform: translateY(-2px); filter: brightness(1.03); }

/* Poll status */
.poll-status-bottom {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 18px;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
}
.poll-status-bottom.active { background: #eafaf1; color: #27ae60; }
.poll-status-bottom.closed { background: #fceeee; color: #e74c3c; }

/* Accessibility focus outlines */
.polls_wrapper a:focus, .submit-button:focus, .poll-option input:focus, .poll-option:focus-within {
  outline: 3px solid rgba(0,31,96,0.12);
  outline-offset: 2px;
}

/* Prevent accidental horizontal scroll from poll content */
.polls_wrapper, #polls-container, .poll-card { -webkit-overflow-scrolling: touch; }

/* -------------------------
   Responsive: Mobile & Tablet
   ------------------------- */
/* Stack columns and make elements touch-friendly at 1024px */
@media (max-width: 1024px) {
  .FlexBoxx { flex-direction: column; align-items: stretch; gap: 14px; padding: 12px; }
  .common_sectionn, .webStory_wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 10px;
    border-radius: 10px;
  }

  /* WebStories becomes card-peek by default on mobile */
  .webStories { width: 100% !important; padding-bottom: 36px; }
  .webStories .swiper-slide { width: 76% !important; max-width: 420px; margin-right: 12px; }

  /* constrain image height so they don't become huge */
  .webStories .image_wrap { border-radius: 12px; overflow: hidden; max-height: 60vh; }
  .webStories .image_wrap img { width: 100%; height: 100%; object-fit: cover; max-height: 60vh; display: block; }

  /* Polls full-width + touch-friendly targets */
  .polls_wrapper { width: 100% !important; min-width: 0 !important; max-width: 100% !important; padding: 12px !important; border-radius: 10px !important; }
  .poll-card { padding: 12px; gap: 10px; }
  .poll-option { padding: 12px 14px; min-height: 52px; border-radius: 28px; }
  .option-label { font-size: 16px; }
  .submit-button { padding: 12px; font-size: 16px; border-radius: 999px; }
}

/* Very small screens */
@media (max-width: 420px) {
  /* WebStories: show each card at 85% width for "card peek" look */
  .webStories .swiper-slide { 
    width: 85% !important; 
    margin-right: 12px !important; 
  }

  /* WebStories image wrapper: cap height so images don’t blow up */
  .webStories .image_wrap {
    border-radius: 10px;
    max-height: 50vh;    /* 50% of viewport height */
    overflow: hidden;
  }
  .webStories .image_wrap img {
    width: 100%;
    height: 100%;
    max-height: 50vh;
    object-fit: cover;   /* crop instead of stretching */
    display: block;
  }

  /* Polls adjustments */
  .poll-option { 
    padding: 10px 12px; 
    min-height: 48px; 
  }
  .poll-headline { font-size: 16px; }
  .option-label { font-size: 15px; }
}
@media (max-width: 760px) {
 .webStories .swiper-slide { 
    width: 48% !important;   /* 2 per row with a small gap */
    margin-right: 4% !important;
  }

  /* Make sure images scale properly */
  .webStories .image_wrap {
    border-radius: 10px;
    max-height: 40vh;  /* adjust if images are too tall */
    overflow: hidden;
  }
  .webStories .image_wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  /* Polls adjustments */
  .polls_wrapper { 
    width: 100% !important;   /* stack full width on mobile */
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 12px;
    border-radius: 10px;
  }
  .poll-option { 
    padding: 12px 14px; 
    min-height: 50px; 
  }
  .poll-headline { font-size: 18px; }
  .option-label { font-size: 16px; }
}