/* ===================================================================
   Studmob — Short News feed (Inshorts-style, premium, mobile-first)
   Loaded only on the short-news archive.
   =================================================================== */

.snf-wrap {
  --snf-text: #1a1a2e;
  --snf-muted: #6b7280;
  --snf-light: #9aa1ad;
  --snf-accent: #4a1a6e;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  width: 100%;
  background: #fff;
  box-sizing: border-box;
}
.snf-wrap * { box-sizing: border-box; }

/* Full-screen vertical snap feed */
.snf-snap-mode {
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.snf-snap-mode::-webkit-scrollbar { display: none; }

.snf-feed { max-width: 480px; margin: 0 auto; }

/* Card = one screen */
.snf-card {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* Image — top portion */
.snf-img {
  position: relative;
  flex: 0 0 34%;
  max-height: 34%;
  overflow: hidden;
  background: #eef0f3;
}
.snf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.snf-img::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 36%;
  background: linear-gradient(to top, rgba(0,0,0,0.16), rgba(0,0,0,0));
  pointer-events: none;
}

/* Body */
.snf-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 20px 22px 96px;
  overflow: hidden;
}

/* Top row: date (left) + share (right) */
.snf-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.snf-date {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--snf-light);
  letter-spacing: 0.2px;
}

/* Headline — Inshorts sizing */
.snf-headline {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.3px;
  margin: 0 0 12px;
}
.snf-headline a { color: var(--snf-text); text-decoration: none; }
.snf-headline a:hover { color: var(--snf-accent); }

/* Summary */
.snf-text {
  font-size: 17px;
  line-height: 1.7;
  color: #3f4756;
  margin: 0;
  font-weight: 400;
}

/* Sticky share button (CSS-drawn icon, theme-proof) */
.snf-share {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #4a1a6e;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(74,26,110,0.35);
  transition: background 0.15s, transform 0.12s;
  padding: 0;
}
.snf-share:hover { background: #5e2589; }
.snf-share:active { transform: scale(0.93); }

.snf-share-box {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
}
.snf-share-box .snf-d {
  position: absolute;
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
}
.snf-share-box .snf-d1 { top: 0;    right: 1px; }
.snf-share-box .snf-d2 { top: 7px;  left: 1px; }
.snf-share-box .snf-d3 { bottom: 0; right: 1px; }
.snf-share-box .snf-l {
  position: absolute;
  height: 2px;
  width: 12px;
  background: #fff;
  border-radius: 2px;
  left: 4px;
  transform-origin: left center;
}
.snf-share-box .snf-l1 { top: 5px;  transform: rotate(-30deg); }
.snf-share-box .snf-l2 { top: 11px; transform: rotate(30deg); }

/* Desktop share sheet */
.snf-share-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,17,26,0.55);
  z-index: 9999;
  align-items: flex-end;
  justify-content: center;
}
.snf-share-overlay.open { display: flex; }
.snf-share-sheet {
  background: #fff;
  width: 100%;
  max-width: 460px;
  border-radius: 18px 18px 0 0;
  padding: 6px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  animation: snfUp 0.22s ease;
}
@keyframes snfUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.snf-share-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f2f4f7;
  font-size: 15px; font-weight: 700; color: var(--snf-text);
}
.snf-share-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: #f2f4f7; border: none; font-size: 20px;
  color: var(--snf-text); cursor: pointer; line-height: 1;
}
.snf-share-options { padding: 8px 10px; }
.snf-share-opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 13px 12px;
  background: none; border: none;
  font-size: 15px; font-weight: 500; color: var(--snf-text);
  text-decoration: none; cursor: pointer; border-radius: 12px;
  font-family: inherit;
}
.snf-share-opt:hover { background: #f6f7f9; }
.snf-opt-ico {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff; font-weight: 700; font-size: 15px;
}

/* Desktop refinements */
@media (min-width: 721px) {
  .snf-body { padding-bottom: 36px; }
  .snf-headline { font-size: 21px; }
  .snf-share-overlay { align-items: center; }
  .snf-share-sheet { border-radius: 18px; max-width: 380px; animation: snfPop 0.18s ease; }
  @keyframes snfPop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}
