/* ==========================================================================
   FACEBOOK DARK MODE REPLICA - STYLESHEET
   Orquesta La Poderosa de Huarochirí - Feed Oficial
   ========================================================================== */

:root {
  --fb-bg: #18191a;
  --fb-surface: #242526;
  --fb-surface-hover: #3a3b3c;
  --fb-input-bg: #3a3b3c;
  --fb-border: #393a3b;
  --fb-text-primary: #e4e6eb;
  --fb-text-secondary: #b0b3b8;
  --fb-blue: #2d88ff;
  --fb-blue-hover: #1b74e4;
  --fb-gold: #facc15;
  --fb-green: #31a24c;
  --fb-red: #f02849;
  --fb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --topbar-height: 56px;
}

.social-feed-section {
  padding: 80px 0 60px;
  background: radial-gradient(circle at 50% 20%, rgba(250, 204, 21, 0.04), transparent 70%), #0d0f17;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.fb-feed-center-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: var(--fb-font);
}

.fb-post, .fb-comments-section {
  font-family: var(--fb-font);
  font-size: 15px;
  line-height: 1.34;
}

/* ==========================================================================
   1. BARRA SUPERIOR DE FACEBOOK (TOPBAR)
   ========================================================================== */
.fb-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--fb-surface);
  border-bottom: 1px solid var(--fb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}

.fb-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 320px;
}

.fb-logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
}

.fb-search-box {
  display: flex;
  align-items: center;
  background: var(--fb-input-bg);
  border-radius: 50px;
  padding: 0 14px;
  height: 40px;
  width: 240px;
}

.fb-search-icon {
  color: var(--fb-text-secondary);
  margin-right: 8px;
  font-size: 14px;
}

.fb-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fb-text-primary);
  font-size: 14px;
  width: 100%;
}

.fb-search-box input::placeholder {
  color: var(--fb-text-secondary);
}

.fb-topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex: 1;
  max-width: 600px;
}

.fb-tab-item {
  height: 100%;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fb-text-secondary);
  text-decoration: none;
  font-size: 20px;
  position: relative;
  transition: all 0.2s;
  border-radius: 8px;
}

.fb-tab-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fb-tab-item.active {
  color: var(--fb-blue);
}

.fb-tab-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--fb-blue);
  border-radius: 3px 3px 0 0;
}

.fb-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  justify-content: flex-end;
}

.fb-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fb-surface-hover);
  color: var(--fb-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.fb-circle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.fb-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--fb-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.fb-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fb-text-primary);
  padding: 3px 8px 3px 4px;
  border-radius: 20px;
  background: var(--fb-surface-hover);
  transition: background 0.2s;
}

.fb-user-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

.fb-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--fb-gold);
}

.fb-user-name {
  font-size: 14px;
  font-weight: 600;
}

/* ==========================================================================
   2. CONTENEDOR PRINCIPAL DE 3 COLUMNAS
   ========================================================================== */
.fb-layout-container {
  margin-top: var(--topbar-height);
  display: flex;
  justify-content: space-between;
  min-height: calc(100vh - var(--topbar-height));
}

/* COLUMNA IZQUIERDA (SIDEBAR) */
.fb-sidebar-left {
  width: 340px;
  padding: 16px 8px;
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
}

.fb-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--fb-text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s;
}

.fb-menu-item:hover {
  background: var(--fb-surface-hover);
}

.fb-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--fb-surface-hover);
}

.fb-menu-icon.meta-ai {
  background: linear-gradient(135deg, #0064e0, #a800e0);
}

.fb-divider {
  height: 1px;
  background: var(--fb-border);
  margin: 12px 10px;
}

.fb-section-subtitle {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fb-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* COLUMNA CENTRAL (FEED) */
.fb-main-feed {
  flex: 1;
  max-width: 680px;
  padding: 20px 16px;
  margin: 0 auto;
}

/* TARJETA ¿QUÉ ESTÁS PENSANDO? */
.fb-create-card {
  background: var(--fb-surface);
  border-radius: 10px;
  border: 1px solid var(--fb-border);
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.fb-create-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fb-border);
}

.fb-create-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--fb-gold);
}

.fb-create-fake-input {
  flex: 1;
  background: var(--fb-input-bg);
  border-radius: 30px;
  padding: 10px 16px;
  color: var(--fb-text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.fb-create-fake-input:hover {
  background: rgba(255, 255, 255, 0.15);
}

.fb-create-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding-top: 10px;
}

.fb-create-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--fb-text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.fb-create-action-btn:hover {
  background: var(--fb-surface-hover);
}

/* PUBLICACIÓN DE FACEBOOK */
.fb-post {
  background: var(--fb-surface);
  border-radius: 10px;
  border: 1px solid var(--fb-border);
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.fb-post-header {
  padding: 14px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fb-post-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fb-post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--fb-gold);
}

.fb-post-author-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--fb-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.fb-verified-badge {
  color: var(--fb-blue);
  font-size: 14px;
}

.fb-post-meta {
  font-size: 12px;
  color: var(--fb-text-secondary);
}

.fb-post-options-btn {
  background: transparent;
  border: none;
  color: var(--fb-text-secondary);
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fb-post-options-btn:hover {
  background: var(--fb-surface-hover);
}

.fb-post-title {
  padding: 4px 16px 8px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
}

.fb-post-text {
  padding: 0 16px 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fb-text-primary);
  white-space: pre-line;
}

.fb-post-media {
  width: 100%;
  max-height: 520px;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fb-post-media img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}

/* REACCIONES Y STATS */
.fb-post-stats {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--fb-border);
  font-size: 13px;
  color: var(--fb-text-secondary);
}

.fb-reactions-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fb-reaction-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* BOTONES DE ACCIÓN (LIKE, COMENTAR, COMPARTIR) */
.fb-post-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 4px 12px;
  border-bottom: 1px solid var(--fb-border);
}

.fb-action-btn {
  background: transparent;
  border: none;
  color: var(--fb-text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.fb-action-btn:hover {
  background: var(--fb-surface-hover);
  color: var(--fb-text-primary);
}

.fb-action-btn.liked {
  color: var(--fb-blue);
  font-weight: 700;
}

.fb-action-btn.liked svg,
.fb-action-btn.liked span.like-thumb {
  transform: scale(1.15);
  display: inline-block;
  transition: transform 0.2s;
}

/* SECCIÓN DE COMENTARIOS ANÓNIMOS */
.fb-comments-section {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.15);
}

.fb-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.fb-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fb-comment-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3a3b3c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.fb-comment-bubble {
  background: var(--fb-input-bg);
  border-radius: 16px;
  padding: 8px 14px;
  max-width: 90%;
}

.fb-comment-author-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fb-text-primary);
  display: block;
}

.fb-comment-text {
  font-size: 13.5px;
  color: var(--fb-text-primary);
  margin-top: 2px;
  line-height: 1.35;
}

.fb-comment-time {
  font-size: 11px;
  color: var(--fb-text-secondary);
  margin-left: 12px;
  margin-top: 3px;
}

/* FORMULARIO DE COMENTARIOS ANÓNIMOS */
.fb-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.fb-comment-inputs-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fb-comment-name-input {
  width: 150px;
  background: var(--fb-input-bg);
  border: 1px solid var(--fb-border);
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--fb-text-primary);
  outline: none;
}

.fb-comment-content-input {
  flex: 1;
  background: var(--fb-input-bg);
  border: 1px solid var(--fb-border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--fb-text-primary);
  outline: none;
}

.fb-comment-content-input:focus,
.fb-comment-name-input:focus {
  border-color: var(--fb-blue);
}

.fb-comment-send-btn {
  background: var(--fb-blue);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.fb-comment-send-btn:hover {
  background: var(--fb-blue-hover);
}

.fb-anon-hint {
  font-size: 11px;
  color: var(--fb-text-secondary);
  padding-left: 8px;
}

/* COLUMNA DERECHA (CONTACTOS Y ACCESOS) */
.fb-sidebar-right {
  width: 340px;
  padding: 16px 12px;
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
}

.fb-right-card {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.fb-right-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--fb-text-primary);
  margin-bottom: 8px;
}

.fb-right-card p {
  font-size: 13px;
  color: var(--fb-text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.btn-fb-cta {
  display: block;
  text-align: center;
  background: var(--fb-blue);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 6px;
  transition: background 0.2s;
}

.btn-fb-cta:hover {
  background: var(--fb-blue-hover);
}

.btn-fb-outline {
  display: block;
  text-align: center;
  background: transparent;
  border: 1px solid var(--fb-border);
  color: var(--fb-text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 6px;
  margin-top: 8px;
  transition: background 0.2s;
}

.btn-fb-outline:hover {
  background: var(--fb-surface-hover);
}

.fb-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  color: var(--fb-text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}

.fb-contact-item:hover {
  background: var(--fb-surface-hover);
}

.fb-online-dot {
  width: 9px;
  height: 9px;
  background: var(--fb-green);
  border-radius: 50%;
  display: inline-block;
  margin-left: auto;
}

/* NOTIFICACIÓN TOAST */
.fb-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #242526;
  border: 1px solid var(--fb-blue);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fb-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .fb-sidebar-left {
    display: none;
  }
}

@media (max-width: 900px) {
  .fb-sidebar-right {
    display: none;
  }
  .fb-topbar-left {
    width: auto;
  }
  .fb-topbar-right {
    width: auto;
  }
  .fb-search-box {
    display: none;
  }
  .fb-tab-item {
    padding: 0 16px;
  }
  .fb-user-name {
    display: none;
  }
  .fb-main-feed {
    padding: 12px 8px;
  }
  .fb-comment-inputs-row {
    flex-direction: column;
    align-items: stretch;
  }
  .fb-comment-name-input {
    width: 100%;
  }
}

/* ==========================================================================
   MOBILE RESPONSIVE RULES (<= 768px) FOR FACEBOOK FEED
   ========================================================================== */
@media (max-width: 768px) {
  .social-feed-section {
    padding: 1.6rem 0 !important;
  }

  .fb-feed-center-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .fb-post {
    padding: 10px !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
  }

  .fb-post-header {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .fb-post-avatar {
    width: 36px !important;
    height: 36px !important;
  }

  .fb-post-user-name {
    font-size: 0.84rem !important;
  }

  .fb-post-time {
    font-size: 0.68rem !important;
  }

  .fb-post-text {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    margin-bottom: 8px !important;
  }

  .fb-post-media img,
  .fb-post-media video {
    max-height: 240px !important;
    border-radius: 8px !important;
  }

  .fb-reactions-bar {
    padding: 6px 0 !important;
    font-size: 0.72rem !important;
  }

  .fb-actions-bar {
    padding: 4px 0 !important;
  }

  .fb-action-btn {
    padding: 6px 4px !important;
    font-size: 0.72rem !important;
    gap: 4px !important;
  }
}
