/* ==========================================================================
   SCAM ALERT – Premium Mobile-First Responsive Stylesheet
   Font: Poppins throughout
   Optimized for all screen sizes: 320px, 360px, 390px, 430px, tablet, and desktop
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Color Palette */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #0f172a;       /* Dark Navy / Charcoal */
  --text-secondary: #334155;     /* Medium Dark Slate */
  --text-muted: #64748b;         /* Neutral Slate */
  --border-light: #e2e8f0;       /* Crisp Border */
  --border-subtle: #f1f5f9;

  /* Risk Badges */
  --risk-high-text: #b91c1c;
  --risk-high-bg: #fef2f2;
  --risk-high-border: #fecaca;
  --risk-high-dot: #dc2626;

  --risk-med-text: #c2410c;
  --risk-med-bg: #fff7ed;
  --risk-med-border: #fed7aa;
  --risk-med-dot: #ea580c;

  /* Section Headings Accents (Strict Spec) */
  --accent-blue: #2563eb;       /* What is happening? */
  --accent-blue-bg: #eff6ff;
  --accent-blue-border: #bfdbfe;

  --accent-purple: #7c3aed;     /* How they trick you */
  --accent-purple-bg: #faf5ff;
  --accent-purple-border: #ddd6fe;

  --accent-orange: #d97706;     /* Three warning signs */
  --accent-orange-bg: #fffbeb;
  --accent-orange-border: #fde68a;

  --accent-green: #16a34a;      /* What should you do? */
  --accent-green-bg: #f0fdf4;
  --accent-green-border: #bbf7d0;

  /* Typography & Layout */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-card: 20px;
  --radius-inner: 14px;
  --radius-btn: 12px;
  --radius-pill: 9999px;
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-btn: 0 2px 8px rgba(15, 23, 42, 0.08);
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-drawer: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* --- Sticky Minimal Mobile Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.header-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  user-select: none;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
  flex-shrink: 0;
}

.logo-text {
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.logo-accent {
  color: #dc2626;
  font-weight: 800;
}

.logo-badge {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #dc2626;
  border-radius: 50%;
  margin-left: 2px;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: #16a34a;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

/* --- Disclaimer Note --- */
.disclaimer-strip {
  background: linear-gradient(90deg, #eff6ff, #f0fdf4);
  border-bottom: 1px solid #dbeafe;
  padding: 7px 16px;
  font-size: 0.75rem;
  color: #1e40af;
  text-align: center;
}

.disclaimer-content {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
}

/* --- Main Feed Container --- */
.feed-container {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 14px 12px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   POST CARD (Strict Order: Image -> Headline -> Risk -> Summary -> Read More -> Source)
   ========================================================================== */
.scam-post {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

/* --- Section A: IMAGE (16:9 Aspect Ratio at top of post) --- */
.post-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #0f172a;
  overflow: hidden;
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.scam-post:hover .post-image {
  transform: scale(1.02);
}

/* Category Tag Pill over Image */
.media-pill-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: clamp(0.68rem, 2.2vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Quick Share icon button over Image */
.media-share-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-smooth);
}

.media-share-btn:hover {
  background: #0f172a;
  transform: scale(1.08);
}

.media-share-btn:active {
  transform: scale(0.92);
}

/* --- Post Body Content --- */
.post-body {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- Section B: HEADLINE (Immediately below image) --- */
.post-headline {
  font-size: clamp(1.2rem, 4.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.32;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

/* --- Section C: RISK LEVEL INDICATOR --- */
.risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: clamp(0.7rem, 2.3vw, 0.775rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.risk-badge .risk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* High Risk Variant */
.risk-badge.risk-high {
  color: var(--risk-high-text);
  background-color: var(--risk-high-bg);
  border-color: var(--risk-high-border);
}
.risk-badge.risk-high .risk-dot {
  background-color: var(--risk-high-dot);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.post-time-meta {
  font-size: clamp(0.7rem, 2.2vw, 0.775rem);
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Section D: SHORT SUMMARY (~30-40 words) --- */
.post-summary {
  font-size: clamp(0.9rem, 2.8vw, 0.965rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* --- Section E: FULLY RESPONSIVE SMOOTH READ MORE / READ LESS BUTTON --- */
.toggle-btn-wrapper {
  display: flex;
  width: 100%;
}

.toggle-read-btn {
  font-family: var(--font-family);
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  color: #1e293b;
  font-size: clamp(0.85rem, 2.5vw, 0.925rem);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
  transition: all var(--transition-smooth);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
  user-select: none;
  min-height: 44px;
}

.toggle-read-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.toggle-read-btn:active {
  transform: scale(0.97);
  background: #e2e8f0;
}

.toggle-read-btn[aria-expanded="true"] {
  background: #eff6ff;
  border-color: var(--accent-blue-border);
  color: var(--accent-blue);
  max-width: 200px;
}

.toggle-icon {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-drawer);
  flex-shrink: 0;
}

.toggle-read-btn[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

/* --- EXPANDED CONTENT DRAWER --- */
.post-expanded-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-drawer);
}

.post-expanded-drawer.is-open {
  grid-template-rows: 1fr;
  margin-top: 8px;
}

.drawer-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

/* --- 4 Structured Detail Section Blocks --- */
.detail-block {
  border-radius: var(--radius-inner);
  padding: 14px 16px;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Block 1: What is happening? (Blue) */
.detail-block.block-happening {
  background-color: var(--accent-blue-bg);
  border-color: var(--accent-blue-border);
}
.detail-block.block-happening .block-badge {
  background-color: #dbeafe;
  color: var(--accent-blue);
}
.detail-block.block-happening .block-title-text {
  color: var(--accent-blue);
}

/* Block 2: How they trick you (Purple) */
.detail-block.block-trick {
  background-color: var(--accent-purple-bg);
  border-color: var(--accent-purple-border);
}
.detail-block.block-trick .block-badge {
  background-color: #ede9fe;
  color: var(--accent-purple);
}
.detail-block.block-trick .block-title-text {
  color: var(--accent-purple);
}

/* Block 3: Three warning signs (Orange) */
.detail-block.block-warning {
  background-color: var(--accent-orange-bg);
  border-color: var(--accent-orange-border);
}
.detail-block.block-warning .block-badge {
  background-color: #fef3c7;
  color: var(--accent-orange);
}
.detail-block.block-warning .block-title-text {
  color: var(--accent-orange);
}

/* Block 4: What should you do? (Green) */
.detail-block.block-action {
  background-color: var(--accent-green-bg);
  border-color: var(--accent-green-border);
}
.detail-block.block-action .block-badge {
  background-color: #dcfce7;
  color: var(--accent-green);
}
.detail-block.block-action .block-title-text {
  color: var(--accent-green);
}

.block-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.block-title-text {
  font-size: clamp(0.9rem, 2.7vw, 0.975rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Bullet list inside blocks */
.block-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 2px;
}

.block-list li {
  font-size: clamp(0.85rem, 2.5vw, 0.9rem);
  line-height: 1.5;
  color: #1e293b;
  position: relative;
  padding-left: 20px;
}

.block-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--text-muted);
}

.detail-block.block-warning .block-list li::before {
  content: "⚠️";
  left: 0;
  top: 1px;
  font-size: 0.75rem;
}

.detail-block.block-action .block-list li::before {
  content: "✓";
  left: 1px;
  top: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-green);
}

/* --- Section F: CLEAN, ATTRACTIVE SOURCE BUTTON (WITHOUT DOMAIN NAME) --- */
.post-footer {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.source-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-size: clamp(0.875rem, 2.8vw, 0.95rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid #334155;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  transition: all var(--transition-smooth);
  min-height: 48px; /* Accessible mobile touch area */
  user-select: none;
  text-align: center;
}

.source-btn:hover {
  background: linear-gradient(135deg, #334155, #1e293b);
  border-color: #475569;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.24);
  color: #ffffff;
}

.source-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.source-btn svg {
  width: 17px;
  height: 17px;
  transition: transform var(--transition-smooth);
  flex-shrink: 0;
}

.source-btn:hover svg {
  transform: translate(2px, -2px);
}

/* --- HIGH-PRIORITY NATIONAL HELPLINE CARD (WELL-STRUCTURED & FULLY RESPONSIVE) --- */
.helpline-card {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border-radius: var(--radius-card);
  color: #ffffff;
  padding: 20px 18px;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.18), 0 2px 8px -1px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #334155;
  position: relative;
  overflow: hidden;
}

.helpline-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #3b82f6);
}

.helpline-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.helpline-icon-wrap {
  width: 46px;
  height: 46px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.1) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.2);
}

.helpline-header-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.helpline-title {
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.helpline-subtitle {
  font-size: clamp(0.725rem, 2.3vw, 0.8rem);
  color: #94a3b8;
  line-height: 1.4;
  font-weight: 500;
}

/* Responsive Action Buttons */
.helpline-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 360px) {
  .helpline-actions {
    grid-template-columns: 1fr;
  }
}

.helpline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: var(--radius-btn);
  font-size: clamp(0.825rem, 2.6vw, 0.9rem);
  font-weight: 700;
  text-decoration: none;
  min-height: 48px;
  transition: all var(--transition-smooth);
  user-select: none;
  white-space: nowrap;
}

.helpline-btn:active {
  transform: scale(0.97);
}

/* Call 1930 Button */
.helpline-btn-call {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  border: 1px solid #f87171;
}

.helpline-btn-call:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
}

.helpline-btn-call svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* cybercrime.gov.in Portal Button */
.helpline-btn-portal {
  background: linear-gradient(135deg, #334155, #1e293b);
  color: #f8fafc;
  border: 1px solid #475569;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.helpline-btn-portal:hover {
  background: linear-gradient(135deg, #475569, #334155);
  border-color: #64748b;
  color: #ffffff;
}

.helpline-btn-portal svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
}

.helpline-note {
  font-size: 0.725rem;
  color: #94a3b8;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.helpline-note-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #22c55e;
}

/* --- Site Footer --- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  background-color: #ffffff;
  padding: 24px 16px 36px;
  text-align: center;
}

.footer-container {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  padding: 10px 14px;
  background-color: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

/* --- Toast Notice --- */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #0f172a;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Desktop Centered Adaptation (Max Width 680px) --- */
@media (min-width: 640px) {
  .feed-container {
    padding: 24px 16px 40px;
    gap: 28px;
  }

  .post-body {
    padding: 20px;
    gap: 14px;
  }

  .detail-block {
    padding: 16px 20px;
  }

  .toggle-read-btn {
    width: auto;
  }
}
