@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ============================================
   POLITICA BAJO ANALISIS — Infinite Social Feed
   ============================================ */

:root {
  --pba-bg: #F0F2F5;
  --pba-card: #FFFFFF;
  --pba-text: #1C1E21;
  --pba-text-secondary: #65676B;
  --pba-blue: #2C3E50;
  --pba-blue-light: #34495E;
  --pba-coral: #54be14;
  --pba-coral-light: #F1948A;
  --pba-border: #DADDE1;
  --pba-dark: #1A1D23;
  --pba-accent: #3498DB;
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--pba-bg);
  color: var(--pba-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
}

/* ---- Container 85% ---- */
.pba-container {
  width: 85%;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .pba-container { width: 92%; }
}

/* ===== TOP NAV (App-style) ===== */
.pba-topnav {
  background: var(--pba-card);
  border-bottom: 1px solid var(--pba-border);
  padding: 0.6rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pba-topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pba-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.pba-logo img {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.pba-logo span {
  font-family: 'Source Serif 4', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pba-blue);
}

.pba-nav-icons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pba-nav-icons a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--pba-text-secondary);
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
}

.pba-nav-icons a:hover {
  background: var(--pba-bg);
  color: var(--pba-blue);
}

.pba-nav-icons a.btn-coral {
  background: var(--pba-coral);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  width: auto;
  padding: 0 1rem;
  border-radius: 100px;
}

.pba-nav-icons a.btn-coral:hover {
  background: #C0392B;
}

/* ===== STORIES BAR ===== */
.pba-stories {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.pba-stories::-webkit-scrollbar { display: none; }

.pba-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  flex-shrink: 0;
}

.pba-story-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--pba-coral), var(--pba-blue));
}

.pba-story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.pba-story span {
  font-size: 0.7rem;
  color: var(--pba-text-secondary);
  font-weight: 500;
}

/* ===== CREATE POST ===== */
.pba-create {
  background: var(--pba-card);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--pba-border);
}

.pba-create-top {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.pba-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pba-create-input {
  flex: 1;
  background: var(--pba-bg);
  border-radius: 20px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--pba-text-secondary);
  border: none;
}

.pba-create-actions {
  display: flex;
  justify-content: space-around;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--pba-border);
}

.pba-create-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pba-text-secondary);
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.pba-create-action:hover {
  background: var(--pba-bg);
}

.pba-create-action i { font-size: 1.1rem; }
.pba-create-action:nth-child(1) i { color: var(--pba-coral); }
.pba-create-action:nth-child(2) i { color: #27AE60; }
.pba-create-action:nth-child(3) i { color: var(--pba-blue); }

/* ===== POST CARD (Social Feed Style) ===== */
.pba-post {
  background: var(--pba-card);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--pba-border);
  transition: all 0.25s ease;
  overflow: hidden;
}

.pba-post img {
  max-width: 100%;
}

/* Override Bootstrap img-fluid */
.pba-post img.img-fluid,
.pba-post-img {
  width: 100%;
  max-height: 380px;
  height: 380px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  display: block;
}

.pba-post:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.pba-post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pba-post-info h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  color: var(--pba-text);
}

.pba-post-meta {
  font-size: 0.75rem;
  color: var(--pba-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.pba-post-meta .verified {
  color: var(--pba-blue);
  font-size: 0.8rem;
}

.pba-post-body {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--pba-text);
  margin-bottom: 0.75rem;
}

.pba-post-body p {
  margin-bottom: 0.5rem;
}

.pba-post-body p:last-child {
  margin-bottom: 0;
}

.pba-hashtag {
  color: var(--pba-blue);
  font-weight: 600;
  text-decoration: none;
}

.pba-hashtag:hover {
  text-decoration: underline;
}

.pba-post-img {
  width: 100%;
  max-height: 380px;
  height: 380px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  display: block;
}

.pba-post .pba-post-img {
  max-width: 100%;
}

.pba-post-stats {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--pba-border);
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  color: var(--pba-text-secondary);
}

.pba-post-actions {
  display: flex;
  justify-content: space-around;
}

.pba-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pba-text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
}

.pba-action:hover {
  background: var(--pba-bg);
}

.pba-action.like:hover { color: var(--pba-coral); }
.pba-action.comment:hover { color: var(--pba-blue); }
.pba-action.share:hover { color: #27AE60; }

/* ===== PINNED POST ===== */
.pba-pinned {
  border: 2px solid var(--pba-coral);
  position: relative;
}

.pba-pinned-badge {
  position: absolute;
  top: -1px;
  right: 12px;
  background: var(--pba-coral);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 0 0 6px 6px;
}

/* ===== HERO POST (Special) ===== */
.pba-hero-post {
  background: linear-gradient(135deg, var(--pba-blue), var(--pba-blue-light));
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
}

.pba-hero-post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../content/pba_portada.jpg') center/cover;
  opacity: 0.15;
}

.pba-hero-post > * {
  position: relative;
  z-index: 1;
}

.pba-hero-post .pba-post-body {
  color: rgba(255,255,255,0.95);
}

.pba-hero-post .pba-post-info h4 {
  color: white;
}

.pba-hero-post .pba-post-meta {
  color: rgba(255,255,255,0.7);
}

.pba-hero-post .pba-action {
  color: rgba(255,255,255,0.8);
}

.pba-hero-post .pba-action:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.pba-hero-post .pba-post-stats {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
}

/* ===== SIDEBAR RIGHT (Desktop) ===== */
.pba-sidebar {
  position: sticky;
  top: 70px;
}

.pba-trending {
  background: var(--pba-card);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--pba-border);
  margin-bottom: 1rem;
}

.pba-trending h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pba-coral);
}

.pba-trend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--pba-border);
  text-decoration: none;
}

.pba-trend-item:last-child { border-bottom: none; }

.pba-trend-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--pba-coral);
  line-height: 1;
  min-width: 24px;
}

.pba-trend-item div strong {
  display: block;
  font-size: 0.82rem;
  color: var(--pba-text);
  font-weight: 600;
}

.pba-trend-item div span {
  font-size: 0.72rem;
  color: var(--pba-text-secondary);
}

/* ===== CTA SECTION ===== */
.pba-cta {
  background: linear-gradient(135deg, var(--pba-coral), #C0392B);
  border-radius: 12px;
  padding: 1.5rem;
  color: white;
  text-align: center;
  margin-bottom: 1rem;
}

.pba-cta h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.pba-cta p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.pba-cta-btns {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.pba-cta-btns a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.pba-cta-btns a:first-child {
  background: white;
  color: var(--pba-coral);
}

.pba-cta-btns a:last-child {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
}

/* ===== FOOTER ===== */
.pba-footer {
  background: var(--pba-dark);
  color: white;
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}

.pba-footer h5 {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pba-coral-light);
  margin-bottom: 1rem;
}

.pba-footer ul {
  list-style: none;
  padding: 0;
}

.pba-footer li {
  margin-bottom: 0.5rem;
}

.pba-footer a {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.pba-footer a:hover {
  color: white;
  padding-left: 3px;
}

.pba-footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--pba-coral);
  margin-bottom: 0.75rem;
}

.pba-footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  line-height: 1.6;
}

.pba-footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pba-footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.pba-footer-social a:hover {
  background: var(--pba-coral);
  transform: translateY(-2px);
}

.pba-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 0;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pba-footer-bottom p,
.pba-footer-bottom a {
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  text-decoration: none;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.5s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--pba-bg); }
::-webkit-scrollbar-thumb { background: var(--pba-border); border-radius: 3px; }
