/* ================================================================
   PHARMA PORTAL — Mobile CSS (max-width: 768px)
   Separate file — NO conflicts with mobile.css, styles.css, tablet.css
   All selectors scoped with .pharma- prefix
   ================================================================ */

/* ═══ PREVENT HORIZONTAL SCROLL ═══ */
.pharma-portal,
.pharma-portal * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* ═══ CONTAINER ═══ */
.pharma-portal {
  padding: 0 0 40px !important;
  width: 100% !important;
}

/* ═══ HERO — Full impact on small screens ═══ */
.pharma-hero {
  border-radius: 0 0 18px 18px;
  padding: 28px 20px 24px;
  margin-bottom: 0;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.pharma-hero-bg {
  top: -30%;
  right: -25%;
  width: 300px;
  height: 300px;
}

.pharma-hero-inner {
  flex-direction: column;
  gap: 0;
}

.pharma-hero-left {
  width: 100%;
}

.pharma-hero-badge {
  padding: 5px 12px;
  font-size: 11px;
  margin-bottom: 12px;
}

.pharma-hero-badge-icon {
  font-size: 14px;
}

.pharma-hero-title {
  font-size: 26px;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.pharma-hero-sub {
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
  max-width: 100%;
}

.pharma-hero-actions {
  flex-direction: row;
  gap: 10px;
}

.pharma-hero-btn {
  padding: 10px 18px;
  font-size: 12px;
  border-radius: 10px;
  flex: 1;
  justify-content: center;
  white-space: nowrap;
}

/* ═══ Hero Stats — 4 across on mobile ═══ */
.pharma-hero-stats {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100% !important;
  margin-top: 20px;
}

.pharma-hero-stat {
  border-radius: 10px;
  padding: 12px 6px;
}

.pharma-stat-icon {
  font-size: 16px;
  margin-bottom: 4px;
}

.pharma-stat-icon [data-icon] {
  font-size: 16px;
}

.pharma-stat-val {
  font-size: 18px;
  margin-bottom: 2px;
}

.pharma-stat-label {
  font-size: 8px;
  letter-spacing: 0.2px;
}

/* ═══ BODIES STRIP — 3-column grid (2 rows) on mobile ═══ */
.pharma-bodies-strip {
  margin-bottom: 0;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 0 4px;
}

.pharma-bodies-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 16px 12px;
  width: 100%;
  overflow-x: hidden;
}

.pharma-body-card {
  width: 100% !important;
  padding: 14px 10px;
  border-radius: 12px;
  text-align: center;
}

.pharma-body-name {
  font-size: 15px;
  margin-bottom: 3px;
}

.pharma-body-full {
  font-size: 8px;
  line-height: 1.25;
  margin-bottom: 3px;
}

.pharma-body-desc {
  display: none;
}

/* ═══ SECTION TITLES ═══ */
.pharma-section-title {
  margin-top: 24px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.pharma-stitle-icon {
  font-size: 18px;
}

.pharma-section-title h2 {
  font-size: 18px;
}

/* ═══ FEATURED NEWS — Stacked cards ═══ */
.pharma-featured-grid {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.pharma-feat-large {
  grid-row: auto;
}

.pharma-feat-card {
  border-radius: 14px;
}

.pharma-feat-img {
  min-height: 160px;
}

.pharma-feat-large .pharma-feat-img {
  min-height: 180px;
}

.pharma-feat-placeholder,
.pharma-feat-large .pharma-feat-placeholder {
  min-height: 160px;
}

.pharma-feat-placeholder [data-icon] {
  font-size: 36px;
}

.pharma-feat-tag {
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  font-size: 10px;
}

.pharma-feat-body {
  padding: 14px;
}

.pharma-feat-body h3 {
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pharma-feat-body p {
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.5;
}

/* REVERTABLE: Extended for large first story card */
.pharma-feat-large .pharma-feat-body p {
  -webkit-line-clamp: 3;
}

.pharma-feat-meta {
  margin-top: 10px;
  padding-top: 10px;
  font-size: 11px;
}

/* ═══ SUBMIT CTA — Beautiful centered card ═══ */
.pharma-submit-cta {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 20px;
  border-radius: 16px;
  margin-top: 24px;
  margin-bottom: 0;
}

.pharma-submit-inner {
  flex-direction: column;
  gap: 16px;
}

.pharma-submit-left {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.pharma-submit-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 22px;
}

.pharma-submit-icon [data-icon] {
  font-size: 22px;
}

.pharma-submit-title {
  font-size: 16px;
  line-height: 1.35;
}

.pharma-submit-desc {
  font-size: 12px;
  line-height: 1.55;
}

.pharma-submit-right {
  width: 100%;
  flex-direction: column;
  gap: 10px;
}

.pharma-submit-btn {
  justify-content: center;
  padding: 12px 20px;
  font-size: 13px;
  border-radius: 12px;
}

/* ═══ NEWS GRID — Stacked cards with clean spacing ═══ */
.pharma-news-grid {
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 0;
}

.pharma-news-card {
  padding: 16px;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-bottom: none;
  position: relative;
}



/* Faded separator line between news cards */
.pharma-news-card:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(to right, transparent, #000000 20%, #000000 80%, transparent);
  pointer-events: none;
  opacity: 0.7;
}

.pharma-news-card:last-child {
  border-bottom: none;
}

.pharma-news-card-top {
  margin-bottom: 8px;
}

.pharma-news-tag {
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 5px;
}

.pharma-news-time {
  font-size: 10px;
}

.pharma-news-title {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 6px;
  -webkit-line-clamp: 2;
}

.pharma-news-excerpt {
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.pharma-news-footer {
  padding-top: 10px;
}

.pharma-news-author {
  font-size: 11px;
}

.pharma-news-readmore {
  font-size: 11px;
}

/* ═══ BOTTOM CTA ═══ */
.pharma-bottom-cta {
  border-radius: 16px;
  padding: 24px 20px;
  margin: 24px 0 0 0 !important;
  width: 100% !important;
}

.pharma-bottom-inner h3 {
  font-size: 16px;
  line-height: 1.35;
}

.pharma-bottom-inner p {
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.pharma-bottom-actions {
  flex-direction: row;
  gap: 10px;
  justify-content: center;
}

.pharma-social-btn {
  padding: 10px 16px;
  font-size: 12px;
  border-radius: 10px;
  flex: 1;
  justify-content: center;
  max-width: none;
}

/* ═══ DATA STAMP ═══ */
.pharma-data-stamp {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 14px 16px;
  font-size: 10px;
}

/* ═══ RESTORE STYLES OVERRIDDEN BY mobile.css ═══ */

/* Restore backgrounds on pharma cards */
.pharma-portal .pharma-body-card,
.pharma-portal .pharma-feat-card,
.pharma-portal .pharma-news-card,
.pharma-portal .pharma-hero-stat,
.pharma-portal .pharma-submit-cta,
.pharma-portal .pharma-bottom-cta {
  background: var(--pharma-surface, #ffffff) !important;
  border-radius: 12px !important;
  border: 1px solid var(--pharma-border, #d1fae5) !important;
}

.pharma-portal .pharma-hero {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 30%, #f8fafc 70%, #f0f9ff 100%) !important;
  border-radius: 0 0 18px 18px !important;
  border: none !important;
}

.pharma-portal .pharma-bottom-cta {
  background: #064e3b !important;
  border: none !important;
}

.pharma-portal .pharma-submit-icon {
  background: #059669 !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(5,150,105,0.25) !important;
}

.pharma-portal .pharma-submit-btn {
  background: #059669 !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(5,150,105,0.2) !important;
}

.pharma-portal .pharma-submit-btn-alt {
  background: #ffffff !important;
  border: 1px solid #d1fae5 !important;
  box-shadow: none !important;
}

/* Restore hover effects */
.pharma-portal .pharma-body-card:hover {
  box-shadow: 0 4px 16px rgba(5,150,105,0.08) !important;
  transform: translateY(-2px) !important;
}

.pharma-portal .pharma-feat-card:hover {
  box-shadow: 0 8px 24px rgba(5,150,105,0.1) !important;
  transform: translateY(-3px) !important;
}

.pharma-portal .pharma-hero-stat:hover {
  box-shadow: 0 4px 16px rgba(5,150,105,0.1) !important;
  transform: translateY(-2px) !important;
}

/* Restore social button styles */
.pharma-portal .pharma-social-btn {
  background: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 10px !important;
}

/* Restore tag/badge backgrounds */
.pharma-portal .pharma-feat-tag {
  background: #059669 !important;
  border-radius: 6px !important;
  border: none !important;
}

.pharma-portal .pharma-news-tag {
  background: rgba(5,150,105,0.1) !important;
  border-radius: 5px !important;
  border: none !important;
}

.pharma-portal .pharma-hero-badge {
  background: rgba(5,150,105,0.1) !important;
  border-radius: 20px !important;
  border: none !important;
}

/* Restore placeholder backgrounds */
.pharma-portal .pharma-feat-placeholder {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
  border: none !important;
}

/* Restore body name colors */
.pharma-portal .pharma-body-name {
  color: #059669 !important;
}

/* Restore news card border-bottom style (edge-to-edge feed) */
.pharma-portal .pharma-news-card {
  background: transparent !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: 1px solid #d1fae5 !important;
  box-shadow: none !important;
}

.pharma-portal .pharma-news-card:last-child {
  border-bottom: none !important;
}

/* ═══ DARK MODE OVERRIDES ═══ */
body.dark .pharma-portal .pharma-body-card,
body.dark .pharma-portal .pharma-feat-card,
body.dark .pharma-portal .pharma-hero-stat {
  background: #12261c !important;
  border-color: rgba(5,150,105,0.15) !important;
}

body.dark .pharma-portal .pharma-hero {
  background: linear-gradient(135deg, #0c1a14 0%, #0f2318 30%, #111827 70%, #0f172a 100%) !important;
}

body.dark .pharma-portal .pharma-feat-placeholder {
  background: linear-gradient(135deg, #0f2318, #0c2e1f) !important;
}

body.dark .pharma-portal .pharma-submit-cta {
  background: linear-gradient(135deg, #0c1a14, #0f2318, #111827) !important;
}

body.dark .pharma-portal .pharma-submit-btn-alt {
  background: #12261c !important;
  border-color: rgba(5,150,105,0.15) !important;
}

body.dark .pharma-portal .pharma-bottom-cta {
  background: #062e1f !important;
}

body.dark .pharma-portal .pharma-news-card {
  border-bottom-color: rgba(5,150,105,0.1) !important;
}

.pharma-feat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.pharma-news-card-img {
  width: 100%;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.pharma-news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
